Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected wrong use of getInstanceName() #1815

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ initial equation
kMed=kMed,
muMed=muMed,
cpMed=cpMed,
m_flow_nominal=m_flow_nominal);
m_flow_nominal=m_flow_nominal,
instanceName=getInstanceName());

annotation (
__Dymola_Commands(file=
Expand All @@ -75,6 +76,13 @@ borehole.
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
June 21, 2018, by Massimo Cimmino:<br/>
First implementation.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ initial equation
kMed=kMed,
muMed=muMed,
cpMed=cpMed,
m_flow_nominal=m_flow_nominal);
m_flow_nominal=m_flow_nominal,
instanceName=getInstanceName());

annotation (
__Dymola_Commands(file=
Expand All @@ -79,6 +80,13 @@ capacity location <code>x</code> is then automatically set to zero.
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
June 21, 2018, by Massimo Cimmino:<br/>
First implementation.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ initial equation
kMed=kMed,
muMed=muMed,
cpMed=cpMed,
m_flow_nominal=m_flow_nominal);
m_flow_nominal=m_flow_nominal,
instanceName=getInstanceName());

annotation (
__Dymola_Commands(file=
Expand All @@ -76,6 +77,13 @@ borehole.
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
June 21, 2018, by Massimo Cimmino:<br/>
First implementation.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ initial equation
kMed=kMed,
muMed=muMed,
cpMed=cpMed,
m_flow_nominal=m_flow_nominal);
m_flow_nominal=m_flow_nominal,
instanceName=getInstanceName());

annotation (
__Dymola_Commands(file=
Expand All @@ -81,6 +82,13 @@ capacity location <code>x</code> is then automatically set to zero.
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
June 21, 2018, by Massimo Cimmino:<br/>
First implementation.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ algorithm
i := i + 1;
end while;
end if;
assert(test, "In " + getInstanceName() + ":\n" +
assert(test, "In " + instanceName + ":\n" +
"Maximum number of iterations exceeded. Check the borehole geometry.
The tubes may be too close to the borehole wall.
Input to the function
Expand Down Expand Up @@ -121,6 +121,13 @@ International Journal of Energy Research, 35:312&ndash;320, 2011.</p>
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
February 7, 2022, by Michael Wetter:<br/>
Changed function to be <code>pure</code>.<br/>
This is for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ algorithm
i := i + 1;
end while;
end if;
assert(test, "In " + getInstanceName() + ":\n" +
assert(test, "In " + instanceName + ":\n" +
"Maximum number of iterations exceeded. Check the borehole geometry.
The tubes may be too close to the borehole wall.
Input to the function
Expand Down Expand Up @@ -129,6 +129,13 @@ International Journal of Energy Research, 35:312&ndash;320, 2011.</p>
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
February 7, 2022, by Michael Wetter:<br/>
Changed function to be <code>pure</code>.<br/>
This is for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ partial function partialInternalResistances
input Modelica.Units.SI.SpecificHeatCapacity cpMed
"Specific heat capacity of the fluid";
input Modelica.Units.SI.MassFlowRate m_flow_nominal "Nominal mass flow rate";
input String instanceName="undeclared caller"
"Instance name of the model or block that calls this function";
mwetter marked this conversation as resolved.
Show resolved Hide resolved

// Outputs
output Real x "Capacity location";
Expand Down Expand Up @@ -71,6 +73,13 @@ the borehole internal resistances.
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
June 4, 2023, by Michael Wetter:<br/>
Corrected variability.<br/>
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1762\">IBPSA, #1762</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ initial equation
kMed=kMed,
muMed=muMed,
cpMed=cpMed,
m_flow_nominal=m1_flow_nominal);
m_flow_nominal=m1_flow_nominal,
instanceName=getInstanceName());

equation
assert(borFieDat.conDat.borCon == IBPSA.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.SingleUTube,
Expand Down Expand Up @@ -159,6 +160,13 @@ International Journal Of Energy Research, 35:312-320, 2011.
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
March 7, 2022, by Michael Wetter:<br/>
Removed <code>massDynamics</code>.<br/>
This is for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ initial equation
kMed=kMed,
muMed=muMed,
cpMed=cpMed,
m_flow_nominal=m1_flow_nominal);
m_flow_nominal=m1_flow_nominal,
instanceName=getInstanceName());

equation
assert(borFieDat.conDat.borCon == IBPSA.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.DoubleUTubeParallel
Expand Down Expand Up @@ -253,6 +254,13 @@ International Journal Of Energy Research, 35:312-320, 2011.
</html>", revisions="<html>
<ul>
<li>
November 22, 2023, by Michael Wetter:<br/>
Corrected use of <code>getInstanceName()</code> which was called inside a function which
is not allowed.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1814\">IBPSA, #1814</a>.
</li>
<li>
March 7, 2022, by Michael Wetter:<br/>
Removed <code>massDynamics</code>.<br/>
This is for
Expand Down