HTC and temperature-dependent viscosity

Dear OGS Community,

I would like to build a model of a geothermal doublet. In doing so, I want to take into account temperature-dependent viscosity as well as changes in porosity and permeability due to chemical processes.

For the temperature-dependent viscosity, I modified the 2D_single_fracture_HTC example.

<property>
	<name>viscosity</name>
	<!--<type>Constant</type>
	<value>1e-3</value>-->
	<type>Function</type>
	<value>
		<expression>4.883795e-5 * exp(486.37/(temperature - 148.86))</expression>
	</value>
</property>

However, I then receive this error message:

critical: C:/Users/gitlab/code/ogs/ogs/MaterialLib/MPL/Properties/Function.cpp:232 MaterialPropertyLib::updateVariableArrayValues::<lambda_1>::operator ()()
error: Function property: Scalar variable ‘temperature’ is not initialized.
error: OGS terminated with error on 2025-07-03 16:27:58+0200.

What can I do about the error message? Do you have any tips or suggestions on how I can build the model?

Thank you in advanced
Jan Tecklenburg

Hi Jan, I think this is a bug, which is not fixed yet. See also this MR . Maybe your example works with this code?

Hi Max, I cannot see this code. The branch doesn’t exist. And there is this warning: “Unable to load the merge request widget. Try reloading the page.”

Hi all,
we fixed the GitLab issue. The MRs contents should be available again.

1 Like