Learn R Programming

biogas (version 1.0.1)

vol2mass: Calculate Mass of Biogas

Description

vol2mass calculates the mass of biogas removed, based on its composition, temperature, and pressure. This function is the inverse of mass2vol.

Usage

vol2mass(volBg, xCH4, temp, pres = 1, unit.pres = "atm", unit.temp = "C")

Arguments

volBg
measured (not standardized) biogas volume in mL. Numeric vector
xCH4
mole fraction of methane within biogas (dry, methane and carbon dioxide only). Numeric vector
temp
temperature of biogas just prior to removal, in the units specified in unit.temp (default of degrees C). Numeric vector
pres
pressure of biogas just prior to removal, in the units specified in unit.pres (default of atm). Numeric vector
unit.pres
pressure units. Options are "atm" (the default), "Pa", "kPa", "hPa", and "bar". Length one character vector
unit.temp
temperature units. Options are "C" (degrees Celcius, the default), "F", and "K". Length one character vector

Value

  • biogas mass in g as a numeric vector.

concept

biogas

Details

This function is vectorized. Argument elements will be recycled as needed. Note that this function is conceptually but not numerically the inverse of mass2vol, because the volBg argument here is not standardized, and is assumed to saturated with water vapor just prior to removal.

References

Hafner, S.D., Rennuit, C., Triolo, J.M., Richards, B.K. In review. A gravimetric method for measuring biogas production. Biomass and Bioenergy.

See Also

mass2vol

Examples

Run this code
# mass of 100 mL biogas at 35 degrees C
vol2mass(100,xCH4=0.65,temp=35)

Run the code above in your browser using DataLab