Skip to content

Commit

Permalink
Corrected dimension of X in Adaptors.Outlet
Browse files Browse the repository at this point in the history
This corrects the dimension which caused the model to not translate in some tools if water is used (with nX=1).
  • Loading branch information
mwetter committed Jun 29, 2023
1 parent a6fa250 commit aec9da4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Buildings/Fluid/FMI/Adaptors/Outlet.mo
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ equation
bacPro_internal.T = Medium.temperature_phX(
p = p_in_internal,
h = port_a.h_outflow,
X = port_a.Xi_outflow);
X = cat(1, port_a.Xi_outflow, {1-sum(port_a.Xi_outflow)}));
bacPro_internal.C = port_a.C_outflow;

// Conditional connectors for pressure
Expand Down Expand Up @@ -153,6 +153,11 @@ for how to use this model.
</html>", revisions="<html>
<ul>
<li>
June 29, 2023, by Michael Wetter:<br/>
Corrected dimension of <code>X</code> in function call.<br/>
See <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1768\">#1768</a>.
</li>
<li>
January 18, 2019, by Jianjun Hu:<br/>
Limited the media choice to moist air and water.
See <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1050\">#1050</a>.
Expand Down
6 changes: 6 additions & 0 deletions Buildings/Utilities/Math/Functions/bicubic.mo
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ algorithm
+ a[10] * x1 * x2Sq;

annotation (smoothOrder=999, Documentation(info="<html>
<p>
This function computes
</p>
<p align=\"center\" style=\"font-style:italic;\">
y = a<sub>1</sub>
+ a<sub>2</sub> x<sub>1</sub> + a<sub>3</sub> x<sub>1</sub><sup>2</sup>
Expand All @@ -34,6 +36,10 @@ This function computes
</html>", revisions="<html>
<ul>
<li>
June 25, 2023, by Michael Wetter:<br/>
Corrected html formatting.
</li>
<li>
Sep 17, 2010 by Michael Wetter:<br/>
First implementation.
</li>
Expand Down
10 changes: 10 additions & 0 deletions Buildings/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,16 @@ that do <b style=\"color:red\">not</b> lead to wrong simulation results, e.g.,
units are wrong or errors in documentation):
</p>
<table class=\"releaseTable\" summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr><td colspan=\"2\"><b>Buildings.Fluid.FMI</b>
</td>
</tr>
<tr><td valign=\"top\">Buildings.Fluid.FMI.Adaptors.Outlet
</td>
<td valign=\"top\">Corrected dimension of <code>X</code> in function call, which caused the model to not translate with some tools
if the media has only one component such as water.<br/>
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1768\">IBPSA, #1768</a>.
</td>
</tr>
<tr><td colspan=\"2\"><b>Buildings.Fluid.HeatExchangers</b>
</td>
</tr>
Expand Down

0 comments on commit aec9da4

Please sign in to comment.