From 5cd1ac697f1b747b35d6389685199fc2f19d3e84 Mon Sep 17 00:00:00 2001 From: Michael Wetter Date: Mon, 23 Sep 2024 10:44:36 -0700 Subject: [PATCH] Corrected formatting --- IBPSA/Fluid/Movers/FlowControlled_dp.mo | 18 +++++++-------- IBPSA/Fluid/Movers/FlowControlled_m_flow.mo | 25 ++++++++++++--------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/IBPSA/Fluid/Movers/FlowControlled_dp.mo b/IBPSA/Fluid/Movers/FlowControlled_dp.mo index 6cbb8871be..1036978b79 100644 --- a/IBPSA/Fluid/Movers/FlowControlled_dp.mo +++ b/IBPSA/Fluid/Movers/FlowControlled_dp.mo @@ -16,19 +16,19 @@ model FlowControlled_dp y(final unit="Pa", nominal=dp_nominal)), eff(per( final pressure=if per.havePressureCurve then per.pressure else - IBPSA.Fluid.Movers.BaseClasses.Characteristics.flowParameters( - V_flow={i/(nOri - 1)*2.0*m_flow_nominal/rho_default for i in 0:( - nOri - 1)}, + IBPSA.Fluid.Movers.BaseClasses.Characteristics.flowParameters( + V_flow={i/(nOri - 1)*2.0*m_flow_nominal/rho_default for i in 0:(nOri - 1)}, dp={i/(nOri - 1)*2.0*dp_nominal for i in (nOri - 1):-1:0}), final etaHydMet=if (per.etaHydMet == IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Power_VolumeFlowRate - or per.etaHydMet == IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber) - and not per.havePressureCurve then IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided - else per.etaHydMet, + or per.etaHydMet == IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber) + and not per.havePressureCurve then + IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided + else per.etaHydMet, final etaMotMet=if (per.etaMotMet == IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_MotorPartLoadRatio - or per.etaMotMet == IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve) - and (not per.haveWMot_nominal and not per.havePressureCurve) then + or per.etaMotMet == IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve) + and (not per.haveWMot_nominal and not per.havePressureCurve) then IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided - else per.etaMotMet), r_N(start=if abs(dp_nominal) > 1E-8 then + else per.etaMotMet), r_N(start=if abs(dp_nominal) > 1E-8 then dp_start/dp_nominal else 0))); parameter Modelica.Units.SI.PressureDifference dp_start( diff --git a/IBPSA/Fluid/Movers/FlowControlled_m_flow.mo b/IBPSA/Fluid/Movers/FlowControlled_m_flow.mo index eb950f8938..8ad4242bf3 100644 --- a/IBPSA/Fluid/Movers/FlowControlled_m_flow.mo +++ b/IBPSA/Fluid/Movers/FlowControlled_m_flow.mo @@ -15,20 +15,23 @@ model FlowControlled_m_flow y(final unit="kg/s", nominal=m_flow_nominal)), eff(per( final pressure=if per.havePressureCurve then per.pressure else - IBPSA.Fluid.Movers.BaseClasses.Characteristics.flowParameters( - V_flow={i/(nOri - 1)*2.0*m_flow_nominal/rho_default for i in 0:( - nOri - 1)}, + IBPSA.Fluid.Movers.BaseClasses.Characteristics.flowParameters( + V_flow={i/(nOri - 1)*2.0*m_flow_nominal/rho_default for i in 0:(nOri - 1)}, dp={i/(nOri - 1)*2.0*dp_nominal for i in (nOri - 1):-1:0}), final etaHydMet=if (per.etaHydMet == IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Power_VolumeFlowRate - or per.etaHydMet == IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber) - and not per.havePressureCurve then IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided - else per.etaHydMet, + or per.etaHydMet == IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber) + and not per.havePressureCurve then + IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided + else + per.etaHydMet, final etaMotMet=if (per.etaMotMet == IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_MotorPartLoadRatio - or per.etaMotMet == IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve) - and (not per.haveWMot_nominal and not per.havePressureCurve) then - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided - else per.etaMotMet), r_N(start=if abs(m_flow_nominal) > 1E-8 then - m_flow_start/m_flow_nominal else 0)), + or per.etaMotMet == IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve) + and (not per.haveWMot_nominal and not per.havePressureCurve) then + IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided + else per.etaMotMet), r_N(start=if abs(m_flow_nominal) > 1E-8 then + m_flow_start/m_flow_nominal + else + 0)), preSou(m_flow_start=m_flow_start)); parameter Modelica.Units.SI.MassFlowRate m_flow_nominal(