sashahafner / biogas

Tools for biogas research in R: process biogas data and predict biogas production
14 stars 4 forks source link

Automatic adjusment of relative humidity in stdVol() #33

Open sashahafner opened 4 years ago

sashahafner commented 4 years ago

For a headspace pressure of 3 atm at 35 C, expanded nearly 3x when measured at 1 atm and 20C, water vapor pressure will be slightly below saturation. For measurement at 35C, error would be larger.

sashahafner commented 4 years ago

For example, at 35C for headspace and measurement, with 3 atm in headspace, error is around 1%:

> stdVol(1, temp = 35, pres = 3, rh = 1)
Using a standard pressure of 1 atm and standard temperature of 0 C for standardizing volume.
[1] 2.609401
Warning message:
In stdVol(1, temp = 35, pres = 3, rh = 1) :
  pres ranges from 3 atm to 3 atm. Is this really correct?

> stdVol(1, temp = 35, pres = 3, rh = 1/3)
Using a standard pressure of 1 atm and standard temperature of 0 C for standardizing volume.
[1] 2.642638
Warning message:
In stdVol(1, temp = 35, pres = 3, rh = 1/3) :
  pres ranges from 3 atm to 3 atm. Is this really correct?
> 1 - 261/264
[1] 0.01136364
sashahafner commented 4 years ago

For 3 atm and measurement at 20C, it is around 0.4%.

> stdVol(1, temp = 35, pres = 3, rh = 0, temp.std = 20, pres.std = 1)
Using a standard pressure of 1 atm and standard temperature of 20 C for standardizing volume.
[1] 2.853967

> biogas:::watVap(temp = 20 + 273.15)
[1] 2333.441
> biogas:::watVap(temp = 35 + 273.15)/2.85
[1] 1971.077
> stdVol(1, temp = 20, pres = 1, rh = 1)
Using a standard pressure of 1 atm and standard temperature of 0 C for standardizing volume.
[1] 0.9102041
> stdVol(1, temp = 20, pres = 1, rh = 1971/2333)
Using a standard pressure of 1 atm and standard temperature of 0 C for standardizing volume.
[1] 0.9135512
> 1 - 910/914
[1] 0.004376368