Learn R Programming

biogas (version 1.0.1)

stdVol: Correct Gas Volume to 'Standard' Conditions

Description

stdVol corrects gas volumes to dry conditions at a specified temperature and pressure.

Usage

stdVol(vol, temp = 0, pres = 1, rh = 1, temp.std = NULL, pres.std = NULL, 
       unit.pres = "atm", unit.temp = "C")

Arguments

vol
measured gas volume at temp temperature, pres pressure, and rh relative humidity. A numeric vector.
temp
temperature of gas in degrees C by default (see unit.temp). A numeric vector.
pres
pressure of gas in atm by default (see unit.pres). A numeric vector.
rh
relative humidity of the gas (0<=rh<=1< code="">). Typically should be 1.0 (the default). A numeric vector.
temp.std
"standard" temperature. Default value is 0 degrees C.
pres.std
"standard" pressure. Default value is 1.0 atm.
unit.pres
pressure units for pres and pres.std arguments. Options are "atm" (the default), "Pa", "kPa", "hPa", and "bar".
unit.temp
temperature units for temp and temp.std arguments. Options are "C" (degrees Celcius), "F" (degrees Fahrenheit), and "K" (Kelvin).

Value

  • normalized gas volume in the same units as vol. A numeric vector.

concept

biogas

Details

Standardization is done in a two-step process following Hafner et al. (In review). First, the contribution of water vapor is removed and volume is corrected to the standard pressure: vd = vm*(pm - pw)/ps (1) where vd = dry volume at standard pressure ps, vm = measured volume at pressure pm, and pw = vapor pressure of water (all pressures here in atm). Water vapor pressure pw is calculated from the Antoine equation: pw = rh*10^(6.203913 - 2354.731/(t + 280.709)) (2) where rh = relative humidity (rh argument above) and t = measurement temperature (degrees C). In the second step, the volume is adjusted for temperature. vs = vd*(ts + 273.15)/(t + 273.15) (3) where vs = final standardized volume and ts = standardization temperature (degrees C). Standard temperature and pressure and their units can be defined by the user using the temp.std, pres.std, temp.unit, and pres.unit arguments. Default values are 0 degrees C and 1.0 atm. stdVol is vectorized, and if one argument has a shorted length than the others, it will be recycled.

References

Hafner, S.D., Rennuit, C., Triolo, J.M., Richards, B.K. In review. A gravimetric method for measuring biogas production. Biomass and Bioenergy. Richards, B.K., Cummings, R.J., White, T.E., Jewell, W.J. 1991. Methods for kinetic analysis of methane fermentation in high solids biomass digesters. Biomass and Bioenergy 1: 65-73.

See Also

cumBg, summBg

Examples

Run this code
# 100 mL, measured at 35 C
  stdVol(100,temp=35)

  # And 1.02 atm
  stdVol(100,temp=35,pres=1.02)

  # Or, with different pressure units
  stdVol(100,temp=35,pres=103,unit.pres="kPa")

  # With different units and standard conditions
  stdVol(100,temp=100,pres=1,unit.pres="bar",pres.std=1,unit.temp="F",temp.std=68)

  # Vectorized
  data(vol)
  head(vol)
  vol$vol.std <- stdVol(vol$vol,temp=20,pres=1.02)
  head(vol)

Run the code above in your browser using DataLab