Learn R Programming

biogas (version 1.0.1)

predBg: Predict Biogas Production

Description

predBg predicts biogas and methane production based on composition and other, optional details.

Usage

predBg(form, mass = 1, mol, fs = 0, fd = 1, mcomp, COD, conc.sub, pH, temp, 
       mu = 0.1, value = "CH4")

Arguments

form
a chemical formula for the substrate, as a character vector of length one, e.g., "C6H12O6" for glucose or "CH3COOH" for acetic acid.
mass
mass of substrate present, in g. A numeric vector.
mol
(optional) moles of substrate present. A numeric vector.
fs
fraction of substrate used for microbial biomass production (0<=fs<=1< code="">). See "Details". A numeric vector.
fd
fraction of substrate that is degradable (0<=fd<=1< code="">). See "Details". A numeric vector.
mcomp
(optional) 'macromolecule'-based composition of the substrate. A named numeric vector with one or more of these elements: vfa (volatile fatty acids, VFAs), protein, carbohydrate, lipid, and li
COD
(optional) chemical oxygen demand (COD) of the substrate (g oxygen). If provided, mass will be ignored. A numeric vector.
conc.sub
(optional) concentration of the substrate relative to water, as g substrate per kg water. Used only for carbon dioxide partitioning. A numeric vector.
pH
(optional) pH of the solution. Used only for carbon dioxide partitioning. A numeric vector.
temp
(optional) temperature of the system in degrees C. Used only for carbon dioxide partitioning. A numeric vector.
mu
(optional) ionic strength of the solution. Used only for carbon dioxide partitioning. A numeric vector.
value
what should be returned? Two options are currently available. "CH4" (default) returns standardized methane volume only. "all" returns all available additional results. Length-one character vector.

Value

  • Normalised volume of methane produced in mL (for value="CH4"), or a data frame with some of these columns (depending on provided arguments):
  • formempirical chemical formula of substrate, typically from the input argument
  • masssubstrate mass in g, typically from the input argument
  • mol.masssubstrate molar mass in g/mol
  • molesmoles of subtrate
  • CODtotal calculated oxygen demand (COD') based on form (or echoed chemical oxygen demand (COD)) of substrate in g oxygen
  • fsfs argument echoed
  • feRittmann and McCarty's fe (fe = 1 - fs)
  • fdfd argument echoed
  • conc.subconc.sub argument echoed
  • temptemp argument echoed
  • pHpH argument echoed
  • hydrohydrolytic water consumption (g water)
  • fCH4moles methane producted divided by the sum of methane and carbon dioxide moles. Equal to xCH4 in biogas if carbon dioxide (and related aqueous species) in solution are negligible
  • xCH4mole fraction of methane in dry biogas
  • vCH4standardized volume (dry, 0 degrees C, 1.0 atm) of methane produced in mL
  • mCH4mass of methane produced in g
  • mCO2mass of carbon dioxide produced in g (including both biogas and inorganic carbon in solution)
  • mCO2Bgmass of carbon dioxide in biogas in g
  • mCO2.solmass of inorganic carbon in solution in g
  • cTICconcentration of inorganic carbon in solution in mol/kg (per kg water)
  • m.biomass of microbial biomass produced, VS only, in g
  • N.reqnitrogen required for production of required microbial biomass in g of N. Negative value indicates mineralization

concept

  • biogas
  • chemistry

Details

predBg is a flexible function that returns different details depending on the data provided. In its simplest usage, it calculates theoretical biochemical methane potential (theoretical BMP). Alternatively, it can calculate the methane equivalence of chemical oxygen demand (COD). With more parameters, it can also predict carbon dioxide partitioning, total biogas production and composition, as well as microbial biomass production and nitrogen requirement. See 'Examples' for more information. Stoichiometry is based on Eq. 13.5 in Rittmann and McCarty (2001). Partitioning of carbon dioxide is based on an equilibrium speciation model using temperature-dependent parameters (Henry's law constant and dissociation constants) based on Hafner et al. (2012). predBg is vectorized for all arguments except mcomp, and will recycle argument elements as needed.

References

Hafner, S.D. 2007 Ammonia Speciation in Anaerobic Digesters. PhD dissertation, Cornell University. Hafner, S.D., Montes, F., Rotz, C.A. 2012 The role of carbon dioxide in emission of ammonia from manure. Atmospheric Environment 66: 63-71. Moller, H.B., Sommer, S.G., Ahring, B.K. 2004 Methane productivity of manure, straw and solid fractions of manure. Biomass and Bioenergy 26: 485-495. Rittmann, B., McCarty, P. 2001 Environmental Biotechnology. McGraw-Hill. Triolo, J.M., Sommer, S.G., Moller, H.B., Weisbjerg, M.R., Jiang, X.Y. 2011 A new algorithm to characterize biodegradability of biomass during anaerobic digestion: Influence of lignin concentration on methane production potential. Bioresource Technology 102: 9395-9402.

See Also

calcCOD, molMass

Examples

Run this code
# Given a substrate with a COD of 1.4 g
  predBg(COD=1.4)
  predBg(COD=1.4,fd=0.8,fs=0.1)

  # BMP of cellulose in mL CH4/g
  predBg("C6H10O5")

  # How much is produced in a real reactor? Assume 10% goes to biomass production
  predBg("C6H10O5",fs=0.1)

  # And substrate is 80% degradable
  predBg("C6H10O5",fs=0.1,fd=0.8)

  # More detailed results
  predBg("C6H10O5",value="all")

  # Can use macromolecule composition, e.g., for pig manure
  predBg(mcomp=c(vfa=0.2,protein=0.25,carbohydrate=0.32,lipid=0.15,lignin=0.08),value="all")

  # For CO2 partitioning, cattle manure example from Hafner (2007)
  predBg("C13H20O11N",conc.sub=85,fs=0.1,fd=0.56,pH=7.7,temp=35,value="all")
  
  # Function is vectorized for everything except mcomp, e.g., 
  predBg("C6H10O5",fs=c(0,0.05,0.1),value="all")
  predBg(c("C6H10O5","C10H19O3N","CH3CH2OH"),value="all")
  predBg("C13H20O11N",conc.sub=85,fs=0.1,fd=0.56,pH=7+0:10/10,temp=35,value="all")

Run the code above in your browser using DataLab