Description Usage Arguments Details Value Author(s) References See Also Examples
stdVol
corrects gas volumes to dry conditions at a specified temperature and pressure.
1 2 3 4 5 6 |
vol |
measured gas volume at |
temp |
temperature of gas in degrees C by default (see |
pres |
pressure of gas in atm by default (see |
rh |
relative humidity of the gas ( |
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 |
unit.temp |
temperature units for |
std.message |
should a message with the standard conditions be displayed? Default is TRUE. |
warn |
if |
Standardisation is done in a two-step process following Hafner et al. (2015). First, the contribution of water vapor is removed and volume is corrected to the standard pressure:
vd = vm*(pm - rh*pw)/ps
where vd = dry volume at standard pressure ps, vm = measured volume at pressure pm, pw = saturation vapor pressure of water (all pressures in Pa), and rh = relative humidity (rh
above).
Water vapor pressure pw is calculated from the Magnus form equation given in Alduchov and Eskridge (1996) (Eqs. (21) and (22)).
In the second step, the volume is adjusted for temperature.
vs = vd*Ts/T
where vs = standardised volume and Ts = standardisation temperature (K, converted from temp.std
argument).
This approach is based on Charles's and Boyle's laws.
Comparison with calculations using the Peng-Robinson equation of state suggests that error in stdVol
is around 0.1% for typical biogas with volume measured at 25 degrees C, and higher at higher temperatures (up to 0.3% at 55 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.
Alternatively, standard values and units of temperature and pressure can be globally set using the function options
.
Default values are 0 degrees C and 1.0 atm.
stdVol
is vectorized, and if one argument has a shorter length than the others, it will be recycled.
Standardised gas volume in the same units as vol
.
A numeric vector.
Sasha D. Hafner and Charlotte Rennuit
Hafner, S.D., Rennuit, C., Triolo, J.M., Richards, B.K. 2015. Validation of a simple gravimetric method for measuring biogas production in laboratory experiments. Biomass and Bioenergy 83, 297-301.
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.
cumBg
,
summBg
,
stdVol
,
options
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # 100 mL, measured at 35 C
stdVol(100, temp = 35, pres = 1)
# Or, with different units
stdVol(100, temp = 35, pres = 103, unit.pres = "kPa", pres.std = 101.325)
# Vectorized
data(vol)
head(vol)
vol$vol.std <- stdVol(vol$vol, temp = 20, pres = 1.02)
head(vol)
#using options() (recommended!)
oldoptions <- options(temp.std = 273.15, pres.std = 101325,
unit.temp = 'K', unit.pres = 'Pa')
vol$vol.std <- stdVol(vol$vol, temp = 293.15, pres = 101325)
head(vol)
options(oldoptions)
|
Using a standard pressure of 1 atm and standard temperature of 0 C for standardizing volume.
[1] 83.70153
Using a standard pressure of 101.325 kPa and standard temperature of 0 C for standardizing volume.
[1] 85.16649
id date.time days vol
1 2_1 2014-06-07 11:00:00 1.98 393
2 2_1 2014-06-08 11:00:00 2.98 260
3 2_1 2014-06-09 11:00:00 3.98 245
4 2_1 2014-06-10 11:00:00 4.98 225
5 2_1 2014-06-11 11:00:00 5.98 200
6 2_1 2014-06-12 12:00:00 7.02 175
Using a standard pressure of 1 atm and standard temperature of 0 C for standardizing volume.
id date.time days vol vol.std
1 2_1 2014-06-07 11:00:00 1.98 393 365.0332
2 2_1 2014-06-08 11:00:00 2.98 260 241.4978
3 2_1 2014-06-09 11:00:00 3.98 245 227.5652
4 2_1 2014-06-10 11:00:00 4.98 225 208.9885
5 2_1 2014-06-11 11:00:00 5.98 200 185.7675
6 2_1 2014-06-12 12:00:00 7.02 175 162.5466
Using a standard pressure of 101325 Pa and standard temperature of 273.15 K for standardizing volume.
id date.time days vol vol.std
1 2_1 2014-06-07 11:00:00 1.98 393 357.7102
2 2_1 2014-06-08 11:00:00 2.98 260 236.6531
3 2_1 2014-06-09 11:00:00 3.98 245 223.0000
4 2_1 2014-06-10 11:00:00 4.98 225 204.7959
5 2_1 2014-06-11 11:00:00 5.98 200 182.0408
6 2_1 2014-06-12 12:00:00 7.02 175 159.2857
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.