From a70a9f5e02b7a0f595d1d6bfe4bebec3626188c8 Mon Sep 17 00:00:00 2001 From: hcasperfu Date: Tue, 4 Jun 2024 10:01:37 -0700 Subject: [PATCH] merged from Buildings --- .../Validation/BaseClasses/ComparePower.mo | 20 ++------ .../Validation/ComparePowerHydraulic.mo | 48 +++++++++++++------ .../Movers/Validation/ComparePowerInput.mo | 9 +++- IBPSA/Resources/Scripts/BuildingsPy/conf.yml | 12 +++++ 4 files changed, 56 insertions(+), 33 deletions(-) diff --git a/IBPSA/Fluid/Movers/Validation/BaseClasses/ComparePower.mo b/IBPSA/Fluid/Movers/Validation/BaseClasses/ComparePower.mo index 1636844c08..4da7bc243e 100644 --- a/IBPSA/Fluid/Movers/Validation/BaseClasses/ComparePower.mo +++ b/IBPSA/Fluid/Movers/Validation/BaseClasses/ComparePower.mo @@ -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}}))); @@ -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, diff --git a/IBPSA/Fluid/Movers/Validation/ComparePowerHydraulic.mo b/IBPSA/Fluid/Movers/Validation/ComparePowerHydraulic.mo index 82f90aa63f..91abcbd8e1 100644 --- a/IBPSA/Fluid/Movers/Validation/ComparePowerHydraulic.mo +++ b/IBPSA/Fluid/Movers/Validation/ComparePowerHydraulic.mo @@ -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"), diff --git a/IBPSA/Fluid/Movers/Validation/ComparePowerInput.mo b/IBPSA/Fluid/Movers/Validation/ComparePowerInput.mo index f6992a9fa5..a6833c962f 100644 --- a/IBPSA/Fluid/Movers/Validation/ComparePowerInput.mo +++ b/IBPSA/Fluid/Movers/Validation/ComparePowerInput.mo @@ -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, @@ -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"), diff --git a/IBPSA/Resources/Scripts/BuildingsPy/conf.yml b/IBPSA/Resources/Scripts/BuildingsPy/conf.yml index 341ca12da2..b3f256fe02 100644 --- a/IBPSA/Resources/Scripts/BuildingsPy/conf.yml +++ b/IBPSA/Resources/Scripts/BuildingsPy/conf.yml @@ -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