Skip to content

Commit

Permalink
Ibpsa1912 avoid get peak function unless asked (#3976)
Browse files Browse the repository at this point in the history
* merged from IBPSA
  • Loading branch information
hcasperfu authored Sep 3, 2024
1 parent cbe1013 commit 77e582f
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 131 deletions.
23 changes: 19 additions & 4 deletions Buildings/Fluid/Movers/Data/Generic.mo
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ record Generic "Generic data record for movers"
enable = etaHydMet==
Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber));
final parameter Buildings.Fluid.Movers.BaseClasses.Euler.peak peak_internal=
Buildings.Fluid.Movers.BaseClasses.Euler.getPeak(pressure=pressure,power=power)
if etaHydMet == Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber
then Buildings.Fluid.Movers.BaseClasses.Euler.getPeak(pressure=pressure,power=power)
else Buildings.Fluid.Movers.BaseClasses.Euler.peak(V_flow=V_flow_max/2,
dp=dpMax/2,
eta=max(efficiency.eta))
"Internal peak variable";
// The getPeak() function automatically handles the estimation of peak point
// when insufficient information is provided from the pressure curve.
Expand All @@ -105,11 +109,13 @@ record Generic "Generic data record for movers"
then
if powerOrEfficiencyIsHydraulic
then max(power.P)*1.2
else max(power.P)
else max(power.P)
else
if havePressureCurve
then V_flow_max/2 * dpMax/2 /0.7*1.2
else 0
then if powerOrEfficiencyIsHydraulic
then V_flow_max/2 * dpMax/2 /peak.eta*1.2
else V_flow_max/2 * dpMax/2 /0.7*1.2
else 0
"Rated motor power"
annotation(Dialog(group="Power computation",
enable= etaMotMet==
Expand Down Expand Up @@ -161,6 +167,15 @@ record Generic "Generic data record for movers"
Documentation(revisions="<html>
<ul>
<li>
August 20, 2024, by Hongxiang Fu:<br/>
Now the function
<a href=\"modelica://Buildings.Fluid.Movers.BaseClasses.Euler.getPeak\">
Buildings.Fluid.Movers.BaseClasses.Euler.getPeak</a>
is not called unless the Euler number method is selected.
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1912\">IBPSA, #1912</a>.
</li>
<li>
April 8, 2024, by Hongxiang Fu:<br/>
Default efficiency methods now depend on whether a pressure curve is available.
This is for
Expand Down
9 changes: 6 additions & 3 deletions Buildings/Fluid/Movers/Preconfigured/UsersGuide.mo
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ Buildings.Fluid.Movers.Data.Pumps</a>
for pumps and
<a href=\"Modelica://Buildings.Fluid.Movers.Data.Fans\">
Buildings.Fluid.Movers.Data.Fans</a>
for fans.
(See also
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/1884\">#1884</a>.)
for fans. It goes through the design operating point and spans over
<i>0</i> and twice the design flow rate at maximum speed. See figure below.
The model identifies itself as a fan or pump based on the default density of
the medium.
<p align=\"center\">
<img alt=\"Pump characteristic\"
src=\"modelica://Buildings/Resources/Images/Fluid/Movers/Preconfigured/PumpCharacteristic.png\"/>
</p>
</li>
<li>
The hydraulic efficiency is computed based on the Euler number.
Expand Down
3 changes: 2 additions & 1 deletion Buildings/Fluid/Movers/UsersGuide.mo
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,8 @@ P<sub>mot,nominal</sub>=
&frasl; &eta;<sub>hyd,p</sub>,
</p>
where the factor <i>1.2</i> also assumes a 20% oversize
and the assumed peak hydraulic efficiency <i>&eta;<sub>hyd,p</sub>=0.7</i>.
and the assumed peak hydraulic efficiency <i>&eta;<sub>hyd,p</sub>=0.7</i>
unless a hydraulic peak value is available in the record.
</li>
</ul>
The model then computes the efficiency the same way as in the option of
Expand Down
17 changes: 15 additions & 2 deletions Buildings/Fluid/Movers/Validation/ComparePowerHydraulic.mo
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ model ComparePowerHydraulic
powerOrEfficiencyIsHydraulic=per.powerOrEfficiencyIsHydraulic,
pressure=per.pressure,
etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber,
peak=per.peak,
peak=peak,
etaMotMet=per.etaMotMet),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
Expand All @@ -30,12 +30,18 @@ model ComparePowerHydraulic
powerOrEfficiencyIsHydraulic=per.powerOrEfficiencyIsHydraulic,
pressure=per.pressure,
etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Efficiency_VolumeFlowRate,
efficiency(V_flow={per.peak.V_flow}, eta={per.peak.eta}),
efficiency(V_flow={peak.V_flow}, eta={peak.eta}),
etaMotMet=per.etaMotMet),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_inputFilter=false));

final parameter Buildings.Fluid.Movers.BaseClasses.Euler.peak peak =
Buildings.Fluid.Movers.BaseClasses.Euler.getPeak(
pressure=per.pressure,
power=per.power)
"Peak operating point";

equation
connect(ramSpe.y, mov2.y) annotation (Line(points={{-59,80},{-52,80},{-52,0},
{-30,0},{-30,-8}}, color={0,0,127}));
Expand Down Expand Up @@ -86,6 +92,13 @@ to capture this characteristic.
</html>", revisions="<html>
<ul>
<li>
August 20, 2024, by Hongxiang Fu:<br/>
Added standalone declaration for the peak operating condition to ensure that
the same values are used for each mover.
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1912\">IBPSA, #1912</a>.
</li>
<li>
May 15, 2024, by Hongxiang Fu:<br/>
First implementation. This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1880\">IBPSA, #1880</a>.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 77e582f

Please sign in to comment.