Skip to content

Commit e0b5538

Browse files
committed
Reformulated function to avoid binding eqn warning (maint 12)
For #4215
1 parent ba3ea59 commit e0b5538

2 files changed

Lines changed: 25 additions & 7 deletions

File tree

Buildings/HeatTransfer/Conduction/BaseClasses/der_temperature_u.mo

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ function der_temperature_u
2020
each unit="kg.K2/J")
2121
"Derivatives dT/du at the support points";
2222
protected
23-
parameter Real scale=0.999 "Used to place points on the phase transition";
24-
Modelica.Units.SI.Temperature Tm1=TSol + (1 - scale)*(TLiq - TSol)
23+
constant Real scale=0.999 "Used to place points on the phase transition";
24+
Modelica.Units.SI.Temperature Tm1
2525
"Support point";
26-
Modelica.Units.SI.Temperature Tm2=TSol + scale*(TLiq - TSol)
26+
Modelica.Units.SI.Temperature Tm2
2727
"Support point";
2828
algorithm
2929
assert(Buildings.HeatTransfer.Conduction.nSupPCM == 6,
3030
"The material must have exactly 6 support points for the u(T) relation.");
3131
assert(TLiq > TSol, "TLiq has to be larger than TSol.");
32+
Tm1:=TSol + (1 - scale)*(TLiq - TSol);
33+
Tm2:=TSol + scale*(TLiq - TSol);
3234
// Get the derivative values at the support points
3335
ud:={c*scale*TSol,
3436
c*TSol,
@@ -61,6 +63,12 @@ to compute for a given specific internal energy the temperature.
6163
revisions="<html>
6264
<ul>
6365
<li>
66+
May 1, 2025, by Michael Wetter:<br/>
67+
Reformulated model to avoid warning about binding equation not being a parameter expression.<br/>
68+
This is for
69+
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/4215\">#4215</a>.
70+
</li>
71+
<li>
6472
August 30, 2024, by Michael Wetter:<br/>
6573
Removed wrong <code>parameter</code> declaration on a protected variable which causes an error in
6674
Dymola 2025x beta1.<br/>

Buildings/UsersGuide/ReleaseNotes/Version_12_0_1.mo

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ have been <b style=\"color:blue\">improved</b> in a
4444
Buildings.Utilities.Clustering
4545
</td>
4646
</tr>
47+
<tr><td valign=\"top\">Buildings.Utilities.Clustering.KMeans
48+
</td>
49+
<td valign=\"top\">Improved code to avoid an error during initialization of certain borefield geometries.<br/>
50+
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1985\">IBPSA, #1985</a> and
51+
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1976\">IBPSA, #1976</a>.
52+
</td>
53+
</tr>
4754
<tr><td colspan=\"2\"><b>Buildings.Electrical</b>
4855
</td>
4956
</tr>
@@ -54,11 +61,14 @@ have been <b style=\"color:blue\">improved</b> in a
5461
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1996\">IBPSA, #1996</a>.
5562
</td>
5663
</tr>
57-
<tr><td valign=\"top\">Buildings.Utilities.Clustering.KMeans
64+
<tr><td colspan=\"2\"><b>Buildings.HeatTransfer</b>
5865
</td>
59-
<td valign=\"top\">Improved code to avoid an error during initialization of certain borefield geometries.<br/>
60-
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1985\">IBPSA, #1985</a> and
61-
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1976\">IBPSA, #1976</a>.
66+
</tr>
67+
<tr><td valign=\"top\">Buildings.HeatTransfer.Conduction.BaseClasses.der_temperature_u
68+
</td>
69+
<td valign=\"top\">Reformulated model to avoid warning about binding equation not being a parameter expression.<br/>
70+
This is for
71+
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/4215\">#4215</a>.
6272
</td>
6373
</tr>
6474
<tr><td colspan=\"2\"><b>xxx</b>

0 commit comments

Comments
 (0)