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

Issue1912 avoid getPeak function unless asked #1923

Merged
merged 7 commits into from
Aug 28, 2024
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
23 changes: 19 additions & 4 deletions IBPSA/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==
IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber));
final parameter IBPSA.Fluid.Movers.BaseClasses.Euler.peak peak_internal=
IBPSA.Fluid.Movers.BaseClasses.Euler.getPeak(pressure=pressure,power=power)
if etaHydMet == IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber
then IBPSA.Fluid.Movers.BaseClasses.Euler.getPeak(pressure=pressure,power=power)
else IBPSA.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://IBPSA.Fluid.Movers.BaseClasses.Euler.getPeak\">
IBPSA.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
7 changes: 4 additions & 3 deletions IBPSA/Fluid/Movers/Preconfigured/UsersGuide.mo
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ IBPSA.Fluid.Movers.Data.Pumps</a>
for pumps and
<a href=\"Modelica://IBPSA.Fluid.Movers.Data.Fans\">
IBPSA.Fluid.Movers.Data.Fans</a>
for fans.
(See also
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/1884\">#1884</a>.)
for fans. See link in References for more details.
The model identifies itself as a fan or pump based on the default density of
the medium.
</li>
Expand All @@ -42,6 +40,9 @@ IBPSA.Fluid.Movers.BaseClasses.Characteristics.motorEfficiencyCurve</a>
for details.
</li>
</ul>
<h4>References</h4>
<a href=\"https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Fluid_HydronicConfigurations_UsersGuide.html#Buildings.Fluid.HydronicConfigurations.UsersGuide.ModelParameters\">
https://simulationresearch.lbl.gov/modelica/releases/v10.0.0/help/Buildings_Fluid_HydronicConfigurations_UsersGuide.html#Buildings.Fluid.HydronicConfigurations.UsersGuide.ModelParameters</a>
</html>"));

end UsersGuide;
3 changes: 2 additions & 1 deletion IBPSA/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 IBPSA/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=IBPSA.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=IBPSA.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 IBPSA.Fluid.Movers.BaseClasses.Euler.peak peak =
IBPSA.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
Loading