# HTC and temperature-dependent viscosity

**URL:** <https://discourse.opengeosys.org/t/htc-and-temperature-dependent-viscosity/1657>\
**Category:** Help & Support\
**Tags:** ogs6\
**Created:** [July 7, 2025, 5:10pm UTC](https://discourse.opengeosys.org/t/htc-and-temperature-dependent-viscosity/1657 "2025-07-07T17:10:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtecklenburg](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/jtecklenburg/32/1399_2.png) [@jtecklenburg](https://discourse.opengeosys.org/u/jtecklenburg)\
**Post date:** [July 7, 2025, 5:10pm UTC](https://discourse.opengeosys.org/t/htc-and-temperature-dependent-viscosity/1657/1 "2025-07-07T17:10:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MaxDax](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@MaxDax](https://discourse.opengeosys.org/u/MaxDax)\
**Post date:** [July 8, 2025, 11:26am UTC](https://discourse.opengeosys.org/t/htc-and-temperature-dependent-viscosity/1657/2 "2025-07-08T11:26:56Z")

</div>

Hi Jan, I think this is a bug, which is not fixed yet. See also this [MR](https://gitlab.opengeosys.org/ogs/ogs/-/merge_requests/5128) . Maybe your example works with this code?

---

<div class="post-metadata">

**Author:** ![jtecklenburg](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/jtecklenburg/32/1399_2.png) [@jtecklenburg](https://discourse.opengeosys.org/u/jtecklenburg)\
**Post date:** [July 10, 2025, 7:43am UTC](https://discourse.opengeosys.org/t/htc-and-temperature-dependent-viscosity/1657/3 "2025-07-10T07:43:13Z")

</div>

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.”

---

<div class="post-metadata">

**Author:** ![bilke](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/bilke/32/868_2.png) [@bilke](https://discourse.opengeosys.org/u/bilke)\
**Post date:** [July 10, 2025, 10:24am UTC](https://discourse.opengeosys.org/t/htc-and-temperature-dependent-viscosity/1657/4 "2025-07-10T10:24:51Z")

</div>

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