Skip to content

Commit

Permalink
Refactored Xi assignment for #1650
Browse files Browse the repository at this point in the history
  • Loading branch information
mwetter committed Oct 25, 2022
1 parent 76fe5b9 commit dd9c5e1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion IBPSA/Fluid/Sensors/TemperatureWetBulbTwoPort.mo
Expand Up @@ -53,7 +53,10 @@ equation
Xi = port_b.Xi_outflow;
end if;
// Compute wet bulb temperature
wetBulMod.TDryBul = Medium.temperature_phX(p=port_a.p, h=h, X=cat(1,Xi,{1-sum(Xi)}));
wetBulMod.TDryBul = Medium.temperature_phX(
p=port_a.p,
h=h,
X=if Medium.reducedX then cat(1, Xi, {1-sum(Xi)}) else Xi));
wetBulMod.Xi = Xi;
wetBulMod.p = port_a.p;
TMedWetBul = wetBulMod.TWetBul;
Expand Down Expand Up @@ -114,6 +117,12 @@ IBPSA.Fluid.Sensors.UsersGuide</a> for an explanation.
revisions="<html>
<ul>
<li>
October 24, 2022, by Michael Wetter:<br/>
Improved conversion from <code>Xi</code> to <code>X</code> so that it also works
with media that have <code>reducedX=true</code>.<br/>
See <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1650\">#1650</a>.
</li>
<li>
February 21, 2020, by Michael Wetter:<br/>
Changed icon to display its operating state.<br/>
This is for
Expand Down

0 comments on commit dd9c5e1

Please sign in to comment.