Skip to content

Commit

Permalink
merged from Buildings
Browse files Browse the repository at this point in the history
  • Loading branch information
hcasperfu committed Jun 4, 2024
1 parent 125ac08 commit a70a9f5
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 33 deletions.
20 changes: 3 additions & 17 deletions IBPSA/Fluid/Movers/Validation/BaseClasses/ComparePower.mo
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,15 @@ model ComparePower
T=Medium.T_default,
X=Medium.X_default) "Default medium density";

replaceable IBPSA.Fluid.Movers.SpeedControlled_y mov1(
redeclare final package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_inputFilter=false)
replaceable IBPSA.Fluid.Movers.BaseClasses.PartialFlowMachine mov1
constrainedby IBPSA.Fluid.Movers.BaseClasses.PartialFlowMachine
"Mover (fan or pump)"
annotation (Placement(transformation(extent={{-40,30},{-20,50}})));
replaceable IBPSA.Fluid.Movers.SpeedControlled_y mov2(
redeclare final package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_inputFilter=false)
replaceable IBPSA.Fluid.Movers.BaseClasses.PartialFlowMachine mov2
constrainedby IBPSA.Fluid.Movers.BaseClasses.PartialFlowMachine
"Mover (fan or pump)"
annotation (Placement(transformation(extent={{-40,-30},{-20,-10}})));
replaceable IBPSA.Fluid.Movers.SpeedControlled_y mov3(
redeclare final package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_inputFilter=false)
replaceable IBPSA.Fluid.Movers.BaseClasses.PartialFlowMachine mov3
constrainedby IBPSA.Fluid.Movers.BaseClasses.PartialFlowMachine
"Mover (fan or pump)"
annotation (Placement(transformation(extent={{-40,-80},{-20,-60}})));
Expand Down Expand Up @@ -96,8 +84,6 @@ equation
connect(sou.ports[1], mov1.port_a)
annotation (Line(points={{-80,-1.33333},{-80,40},{-40,40}},
color={0,127,255}));
connect(ramSpe.y, mov1.y)
annotation (Line(points={{-59,80},{-30,80},{-30,52}}, color={0,0,127}));
connect(sou.ports[2], mov2.port_a)
annotation (Line(points={{-80,0},{-80,-20},{-40,-20}}, color={0,127,255}));
connect(sou.ports[3], mov3.port_a) annotation (Line(points={{-80,1.33333},{-78,
Expand Down
48 changes: 33 additions & 15 deletions IBPSA/Fluid/Movers/Validation/ComparePowerHydraulic.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,46 @@ model ComparePowerHydraulic
"Compare power estimation with hydraulic power curve"
extends Modelica.Icons.Example;
extends IBPSA.Fluid.Movers.Validation.BaseClasses.ComparePower(
redeclare IBPSA.Fluid.Movers.Data.Fans.Greenheck.BIDW15 per(
redeclare replaceable IBPSA.Fluid.Movers.Data.Fans.Greenheck.BIDW15 per(
etaMotMet=IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_VolumeFlowRate,
motorEfficiency(V_flow={0}, eta={0.7})),
mov1(per=per),
mov2(per(
powerOrEfficiencyIsHydraulic=per.powerOrEfficiencyIsHydraulic,
pressure=per.pressure,
etaHydMet=IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber,
peak=per.peak,
etaMotMet=per.etaMotMet)),
mov3(per(
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}),
etaMotMet=per.etaMotMet)));
motorEfficiency(V_flow={0}, eta={0.7}))
constrainedby IBPSA.Fluid.Movers.Data.Generic,
redeclare IBPSA.Fluid.Movers.SpeedControlled_y mov1(
redeclare final package Medium = Medium,
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_inputFilter=false),
redeclare IBPSA.Fluid.Movers.SpeedControlled_y mov2(
redeclare final package Medium = Medium,
per(
powerOrEfficiencyIsHydraulic=per.powerOrEfficiencyIsHydraulic,
pressure=per.pressure,
etaHydMet=IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber,
peak=per.peak,
etaMotMet=per.etaMotMet),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_inputFilter=false),
redeclare IBPSA.Fluid.Movers.SpeedControlled_y mov3(
redeclare final package Medium = Medium,
per(
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}),
etaMotMet=per.etaMotMet),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_inputFilter=false));

equation
connect(ramSpe.y, mov2.y) annotation (Line(points={{-59,80},{-52,80},{-52,0},
{-30,0},{-30,-8}}, color={0,0,127}));
connect(ramSpe.y, mov3.y) annotation (Line(points={{-59,80},{-52,80},{-52,-50},
{-30,-50},{-30,-58}}, color={0,0,127}));
connect(ramSpe.y, mov1.y)
annotation (Line(points={{-59,80},{-30,80},{-30,52}}, color={0,0,127}));
annotation(experiment(Tolerance=1e-6, StopTime=200),
__Dymola_Commands(file="modelica://IBPSA/Resources/Scripts/Dymola/Fluid/Movers/Validation/ComparePowerHydraulic.mos"
"Simulate and plot"),
Expand Down
9 changes: 8 additions & 1 deletion IBPSA/Fluid/Movers/Validation/ComparePowerInput.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ model ComparePowerInput
redeclare IBPSA.Fluid.Movers.Data.Fans.Greenheck.BIDW15 per(
etaMotMet=IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_VolumeFlowRate,
motorEfficiency(V_flow={0}, eta={0.7})),
mov1(per=per),
redeclare IBPSA.Fluid.Movers.SpeedControlled_y mov1(
redeclare final package Medium = Medium,
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_inputFilter=false),
redeclare IBPSA.Fluid.Movers.FlowControlled_dp mov2(
redeclare final package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
Expand Down Expand Up @@ -35,6 +40,8 @@ equation
annotation (Line(points={{-39,0},{-30,0},{-30,-8}}, color={0,0,127}));
connect(exp_m_flow.y, mov3.m_flow_in)
annotation (Line(points={{-37,-50},{-30,-50},{-30,-58}}, color={0,0,127}));
connect(ramSpe.y, mov1.y)
annotation (Line(points={{-59,80},{-30,80},{-30,52}}, color={0,0,127}));
annotation(experiment(Tolerance=1e-6, StopTime=200),
__Dymola_Commands(file="modelica://IBPSA/Resources/Scripts/Dymola/Fluid/Movers/Validation/ComparePowerInput.mos"
"Simulate and plot"),
Expand Down
12 changes: 12 additions & 0 deletions IBPSA/Resources/Scripts/BuildingsPy/conf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@
openmodelica:
comment: simulation terminated by an assertion at initialization. Works with April 30 2024 nightly build.
translate: false
- model_name: IBPSA.Fluid.Movers.Validation.ComparePowerHydraulic
optimica:
comment: 'Fail to translate due to OpenModelica glitch. Fixed in https://github.com/OpenModelica/OpenModelica/issues/12484'
translate: false
- model_name: IBPSA.Fluid.Movers.Validation.ComparePowerInput
optimica:
comment: 'Fail to translate due to OpenModelica glitch. Fixed in https://github.com/OpenModelica/OpenModelica/issues/12484'
translate: false
- model_name: IBPSA.Fluid.Movers.Validation.ComparePowerTotal
optimica:
comment: 'Fail to translate due to OpenModelica glitch. Fixed in https://github.com/OpenModelica/OpenModelica/issues/12484'
translate: false
- model_name: IBPSA.ThermalZones.ReducedOrder.Validation.VDI6007.TestCase11
openmodelica:
comment: returned non-zero exit status 139
Expand Down

0 comments on commit a70a9f5

Please sign in to comment.