HTC : density function depending on P, T and C

Hello everyone,

I tried modifying the staggered-scheme HTC benchmark project available in HTCWithFracture by prescribing a custom Function for the fluid density depending on pressure, temperature, and concentration.

At the first time step, the first process is solved correctly. However, when OGS starts assembling/solving the second process, I get the following error:

critical: /home/rnogandagacapito/apps/ogs-6.5.7/MaterialLib/MPL/Properties/Function.cpp:270 operator()()
warning: There are still 1 global matrices in use. This might be an indicator of a possible waste of memory.
warning: There are still 2 global vectors in use. This might be an indicator of a possible waste of memory.
error: Function property: Scalar variable ‘concentration’ is not initialized.
error: OGS terminated with error.

I found this closed MR which mentions that the issue had been fixed in more recent MRs.

So I would like to ask whether this is currently supported in OGS. Can a Function property such as density depend simultaneously on pressure, temperature, and concentration in the staggered HTC scheme?

I am using OGS 6.5.7, and you will find the modified .prj file attached below.

HTCWithFracture_modif.zip (1019.1 KB)

Thank you in advance for your help.

After fixing the bug in the code (see Pass concentration to density evaluation in ComponentTransport (!5710) · Merge requests · ogs / ogs · GitLab ) I could execute your simulation w/o problems until end.

The bug fix is merged in master branch. Next release in about 2 weeks, until then you have to compile OGS locally.

– d

Thank you very much for your help. I’ll compile it locally and try to execute the simulation.