Dear all,
I came across an inconsistency in units in OGS which is worrying me.
We ran a coupled H2T model (PP model for multiphase flow), where T is defined in [°C]. We found that when the density function is called from CalCoefMass2() for example, T is converted to [K] by
if(diffusion)
TG = interpolate(NodalValC1) + T_KILVIN_ZERO;
Then Density(variables) is called. In our model, rho=f(P,T) (model 6) and the reference T_0 = 21 °C is mfp-input value in [°C], which is intuitive, as her whole model runs with BCs and IC T in [°C].
In this case
delta_T = variables[1] in [K] - T_0 in [°C]
which gives quite a large delta_T (~274°) and thus a very large density change (-110 kg/m³).
So in order to correctly use the PP model and T-dependent density,
it seems to me we have to define IC, BC etc. in [°C], but the mfp-density parameter for rho(T) in [K]. If this is true, I think we should generally think about the way we handle T-units in OGS, as user errors are very likely with the current implementation.
I also found that for other processes the + T_KILVIN_ZERO temperature transformation is applied:
- CalCoefMass()
- Richards
- CalCoefLaplace()
- Richards (if(MediaProp->permeability_stress_mode > 1))
- Liquidflow (if(MediaProp->permeability_stress_mode > 1))
- Airflow
- CalCoefLaplace2()
- CalCoefAdvection()
- Heat (if(FluidProp->density_model == 14)
- CalcAdvection
-(if(multiphase))
and several CalCoef_RHS... functions
These seem to be mostly special cases (but I'm not completely sure) but some warning messages should probably be be added as long as there is no standard internal T unit.
What do you think?
Have a nice evening,
Christof
···
--
_______________________________________
Dr. Christof Beyer
Institute of Geosciences
Geohydromodelling
Christian-Albrechts-University Kiel
Ludewig-Meyn-Str. 10
24118 Kiel
Germany
phone: +49(0)431-8803172
fax: +49(0)431-8807606
mobile: +49(0)176-24297908
email: christof.beyer@gpi.uni-kiel.de
home: http://www.ifg.uni-kiel.de/
_______________________________________