# T in °C or K

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 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()
- Heat (if(FluidProp->density_model == 14)
-(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/
_______________________________________

Hi Christof,

as you might know I had a similar issue with the Density() functions and T_KILVIN_ZERO while working on coupled H2T models with ECLIPSE. My temporary fix was to implement a flag to switch the addition of T_KILVIN_ZERO on and off (should be already in the Kiel branch I think...).

Anyway, in my opion SI-units should be used throughout the code for all processes. Mixing °C and K truly is a bad idea, especially if there is no proper manual the user can refer to (easily that is). For those who really need °C maybe we can implement a keyword that changes all input/output variables related to the heat transport from K to °C. This way it would be the users responsibility to supply all necessary input values in consistent units.

So bottom line: To keep some consistency within the code I woud vote for SI-units throughout.

Good night & take care,
Tilmann

···

Am 07.07.15 um 18:12 schrieb Christof Beyer:

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 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()
- Heat (if(FluidProp->density_model == 14)
-(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

--
Wolf Tilmann Pfeiffer
Geohydromodelling
Institute of Geoscience
Christian-Albrechts-University of Kiel
Ludewig-Meyn-Strasse 10, 24118 Kiel, Germany
phone: 0049 (0)431 880-4805
mail: wtp@gpi.uni-kiel.de

+1 to Tilmann's suggestion!

best,
nori

···

On 07/07/15 18:12, Christof Beyer wrote:

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 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()
- Heat (if(FluidProp->density_model == 14)
-(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

--
Norihiro Watanabe, Dr.-Ing.
Department of Environmental Informatics

Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research GmbH - UFZ
Permoserstraße 15 / 04318 Leipzig / Germany
Telefon +49 341 235 1806
norihiro.watanabe@ufz.de / www.ufz.de

Sitz der Gesellschaft: Leipzig
Registergericht: Amtsgericht Leipzig, Handelsregister Nr. B 4703
Vorsitzender des Aufsichtsrats: MinDirig Wilfried Kraus
Wissenschaftlicher Geschäftsführer: Prof. Dr. Georg Teutsch

+2
Greetings, georg

···

Am 07.07.2015 um 22:00 schrieb Norihiro Watanabe:

+1 to Tilmann's suggestion!

best,
nori

On 07/07/15 18:12, Christof Beyer wrote:

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 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()
- Heat (if(FluidProp->density_model == 14)
-(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

+3

- - - - - - - - - - - - - - - - - -

Dr. rer. nat. Marc Walther
Hydrologist

Department of Environmental Informatics
Helmholtz Centre for Environmental Research - UFZ
Permoserstraße 15, 04318 Leipzig, Germany

Phone +49 341 235 10 54
Fax +49 341 235 19 39
Mobile +49 178 334 18 19

Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Registered Office: Leipzig
Registration Office: Amtsgericht Leipzig
Chairman of the Supervisory Board: MinR Wilfried Kraus
Scientific Director: Prof. Dr. Georg Teutsch

- - - - - - - - - - - - - - - - - -

···

Sent from mobile device, please excuse spelling mistakes.

Am 7. Juli 2015 22:01:55 schrieb Georg Kosakowski <georg.kosakowski@psi.ch>:

+2
Greetings, georg

Am 07.07.2015 um 22:00 schrieb Norihiro Watanabe:
> +1 to Tilmann's suggestion!
>
> best,
> nori
>
> On 07/07/15 18:12, Christof Beyer wrote:
>> 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 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()
>> - Heat (if(FluidProp->density_model == 14)
>> -(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
>>
>

--
You received this message because you are subscribed to the Google Groups "ogs-devs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ogs-devs+unsubscribe@googlegroups.com.

It causes confusion to use °C as temperature unit. I agree with Wolf to only use K as temperature unit. I will check it in next week.

···

On 07/07/2015 06:12 PM, Christof Beyer wrote:

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 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()
- Heat (if(FluidProp->density_model == 14)
-(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

Dear Christof,

As a temporary solution for your calculation, you can change your input data of T0 as 294 (273+21) for density model 6 or for any other temperature data for fluids material properties, and keep the temperature unit for IC and Direchlet BC in °C. By this way, you get temperature solution in °C due to
rho C d(T+273)/dt = rho C dT/dt

Best,

Wenqing

···

On 07/07/2015 06:12 PM, Christof Beyer wrote:

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 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()
- Heat (if(FluidProp->density_model == 14)
-(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

Dear Christof,

As a temporary solution for your calculation, you can change your input
data of T0 as 294 (273+21) for density model 6 or for any other
temperature data for fluids material properties, and keep the
temperature unit for IC and Direchlet BC in °C. By this way, you get
temperature solution in °C due to
rho C d(T+273)/dt = rho C dT/dt

Best,

Wenqing

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 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()
- Heat (if(FluidProp->density_model == 14)
-(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

···

On 07/08/2015 10:37 AM, Wenqing Wang wrote:

On 07/07/2015 06:12 PM, Christof Beyer wrote:

--
PD Dr. Georg Kosakowski * Laboratory for Waste Management
Paul Scherrer Institut * 5232 Villigen/PSI * Switzerland
Phone: +41-56-3104743 * Email: georg.kosakowski@psi.ch
homepage: http://www.psi.ch/les/georg-kosakowski

Hi,
sorry for the empty email. Please use/implement the correct conversion
from C to K: 0°C = 273.15K
Greetings, Georg

···

On 07/08/2015 10:37 AM, Wenqing Wang wrote:

Dear Christof,

As a temporary solution for your calculation, you can change your input
data of T0 as 294 (273+21) for density model 6 or for any other
temperature data for fluids material properties, and keep the
temperature unit for IC and Direchlet BC in °C. By this way, you get
temperature solution in °C due to
rho C d(T+273)/dt = rho C dT/dt

Best,

Wenqing

On 07/07/2015 06:12 PM, Christof Beyer wrote:

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 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()
- Heat (if(FluidProp->density_model == 14)
-(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

--
PD Dr. Georg Kosakowski * Laboratory for Waste Management
Paul Scherrer Institut * 5232 Villigen/PSI * Switzerland
Phone: +41-56-3104743 * Email: georg.kosakowski@psi.ch
homepage: http://www.psi.ch/les/georg-kosakowski