Skip to content

Commit

Permalink
Corrected formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mwetter committed Sep 23, 2024
1 parent 15014a5 commit 5cd1ac6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
18 changes: 9 additions & 9 deletions IBPSA/Fluid/Movers/FlowControlled_dp.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
25 changes: 14 additions & 11 deletions IBPSA/Fluid/Movers/FlowControlled_m_flow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5cd1ac6

Please sign in to comment.