predBg {biogas}R Documentation

Predict Biogas Production


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


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



(optional) a chemical formula for the substrate, as a character vector of length one, e.g., "C6H12O6" for glucose or "CH3COOH" for acetic acid.


mass of substrate present, in g. A numeric vector.


(optional) moles of substrate present. A numeric vector.


fraction of substrate used for microbial biomass production (0<=fs<=1). See "Details". A numeric vector.


fraction of substrate that is degradable (0<=fd<=1). See "Details". A numeric vector.


(optional) “macromolecule”-based composition of the substrate. A named numeric vector with relative masses of macromolecular groups or any chemical. Options for macromolecular groups include: VFA (volatile fatty acids, VFAs), protein, carbohydrate, lipid, and lignin. An empirical form will be calculated from fixed chemical formulas. To see the available options, use biogas:::std.forms.


(optional) chemical oxygen demand (COD) of the substrate (g oxygen). If provided, mass will be ignored. A numeric vector.


(optional) concentration of the substrate relative to water, as g substrate per kg water. Used only for carbon dioxide partitioning. A numeric vector.


(optional) pH of the solution. Used only for carbon dioxide partitioning. A numeric vector.


(optional) temperature of the system in degrees C. Used only for carbon dioxide partitioning. A numeric vector.


(optional) ionic strength of the solution. Used only for carbon dioxide partitioning. A numeric vector.


should formula from form or mcomp arguments be shortened? Default is FALSE if form is used, TRUE if mcomp is used.


what should be returned? Four options are currently available. "CH4" (default) returns standardised methane volume only. "all" returns all available additional results. "reactionn" returns a numeric reaction (names are chemical species). "reactionc" returns a text reaction. Length-one character vector.


predBg is a flexible function that returns different details depending on the data provided. Calculations can be based on form, COD, or mcomp (at least one of these is required). See ‘Examples’ for more information.

In its simplest usage, predBg calculates theoretical biochemical methane potential (theoretical BMP). With more parameters, it can also predict carbon dioxide partitioning, total biogas production and composition, as well as microbial biomass production and nitrogen requirement. 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.


Standardised volume (at 0 degrees C and 1 atmosphere) of methane produced in mL (for value = "CH4"), or a data frame with some of these columns (depending on provided arguments):


empirical chemical formula of substrate, typically from the input argument


substrate mass in g, typically from the input argument


substrate molar mass in g/mol


moles of subtrate


total calculated oxygen demand (COD') based on form (or echoed chemical oxygen demand (COD)) of substrate in g oxygen


fs argument echoed


Rittmann and McCarty's fe (fe = 1 - fs)


fd argument echoed


conc.sub argument echoed


temp argument echoed


pH argument echoed


hydrolytic water consumption (g water)


moles 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


mole fraction of methane in dry biogas


standardised volume (dry, 0 degrees C, 1.0 atm) of methane produced in mL


mass of methane produced in g


mass of carbon dioxide produced in g (including both biogas and inorganic carbon in solution)


mass of carbon dioxide in biogas in g


mass of inorganic carbon in solution in g


concentration of inorganic carbon in solution in mol/kg (per kg water)

mass of microbial biomass produced, VS only, in g


nitrogen required for production of required microbial biomass in g of N. Negative value indicates mineralization


Predictions will only be as good as the parameter values provided, and maybe not even that good. fs should be interpreted as $f_s$ in Ritttmann and McCarty (2001), i.e., the effective value after decay of microbial biomass, and not $f_s^0$. The original reference (Section 2.3 and Eq. (3.33) in Rittmann and McCarty (2001)) and the predBg vignette provide more details. Partitioning of carbon dioxide is based on equilibrium between all biogas produced and the solution, and represents a continuous reactor running at steady-state.


Sasha D. Hafner and Charlotte Rennuit


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


  # BMP of cellulose in mL CH4/g

  # 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")

  # Given a substrate with a COD of 1.4 g
  predBg(COD = 1.4)

  # But CH4 production is reduced if substrate is 80% degradable 
  # and 10% goes to cell synthesis
  predBg(COD = 1.4, fd = 0.8, fs = 0.1)

  # 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")

  # Function expects sum(mcomp) == 1 but this is not required
  # But unless mass is set, mass is taken as sum(mcomp)
  predBg(mcomp = c(vfa = 20, protein = 25, carbohydrate = 32, 
                   lipid = 15, lignin = 8), 
         value = "all")

  # Specify mass if this is not the case
  predBg(mcomp = c(vfa = 20, protein = 25, carbohydrate = 32, 
                   lipid = 15, lignin = 8), 
         mass = 1, value = "all")

  # Can mix formulas and macromolecular groups in mcomp
  predBg(mcomp = c(C6H12O6 = 0.5, protein = 0.5))

  # For CO2 partitioning, must provide conc.sub, pH, and temp 
  # cattle manure example from Hafner (2007)
  predBg("C13H20O11N", mass = 1, fs = 0.1, fd = 0.56, 
         conc.sub = 85, pH = 7.7, temp = 35, value = "all")

  # Or, mix of waste paper and waste vegetable oil from vignette
  predBg(mcomp = c(C6H10O5 = 5/6, C54H100O7 = 1/6), mass = 1, 
	 fd = 0.8, fs = 0.1, conc.sub = 50, pH = 7.5, temp = 35, 
	 value = "all")

  # Note that form can also be used for mixtures, but here it is 
  # molar ratios that are specified
  predBg('(C6H10O5)5(C54H100O7)1)', mass = 1, 
	 fd = 0.8, fs = 0.1, conc.sub = 50, pH = 7.5, temp = 35, 
	 value = "all")
  # Function is vectorized for everything except mcomp, e.g., 
  # fs
  predBg("C6H10O5", fs = c(0, 0.05, 0.1), value = "all")

  # form
  predBg(c("C6H10O5", "C10H19O3N", "CH3CH2OH"), value = "all")
  # pH
  predBg("C13H20O11N", conc.sub = 85, fs = 0.1, fd = 0.56, 
         pH = 7+0:10/10, temp = 35, value = "all")

[Package biogas version 1.23.2 Index]