Skip to content

Commit 18747cd

Browse files
authored
Merge pull request #2042 from ibpsa/issue2041_borefieldSteadyState
Guarded against division by zero in borefield data
2 parents ef0c64f + d9450d8 commit 18747cd

File tree

1 file changed

+9
-2
lines changed
  • IBPSA/Fluid/Geothermal/Borefields/Data/Filling

1 file changed

+9
-2
lines changed

IBPSA/Fluid/Geothermal/Borefields/Data/Filling/Template.mo

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ record Template
88
"Specific heat capacity of the borehole filling material";
99
parameter Modelica.Units.SI.Density dFil(displayUnit="kg/m3")
1010
"Density of the borehole filling material";
11-
parameter Boolean steadyState = (cFil < Modelica.Constants.eps or dFil < Modelica.Constants.eps)
11+
parameter Boolean steadyState = dFil*cFil < Modelica.Constants.eps
1212
"Flag, if true, then material is computed using steady-state heat conduction"
1313
annotation(Evaluate=true);
14-
final parameter Modelica.Units.SI.ThermalDiffusivity aFil=kFil/(dFil*cFil)
14+
final parameter Modelica.Units.SI.ThermalDiffusivity aFil=
15+
if (dFil*cFil < Modelica.Constants.eps) then 1E20 else kFil/(dFil*cFil)
1516
"Heat diffusion coefficient of the borehole filling material";
1617
annotation (
1718
defaultComponentPrefixes="parameter",
@@ -25,6 +26,12 @@ IBPSA.Fluid.Geothermal.Borefields.Data.Filling</a>.</p>
2526
revisions="<html>
2627
<ul>
2728
<li>
29+
September 3, 2025, by Michael Wetter:<br/>
30+
Guarded against division by zero.<br/>
31+
This is for
32+
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/2041\">IBPSA, issue 2041</a>.
33+
</li>
34+
<li>
2835
July 15, 2018, by Michael Wetter:<br/>
2936
Revised implementation, added <code>defaultComponentPrefixes</code> and
3037
<code>defaultComponentName</code>.

0 commit comments

Comments
 (0)