Buildings.DHC.Plants.Combined.Subsystems.Validation.BaseClasses

Package with base classes

Information

This package contains base classes that are used for validation purposes.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.DHC.Plants.Combined.Subsystems.Validation.BaseClasses.PartialMultiplePumps PartialMultiplePumps Base class for validating the multiple pumps model

Buildings.DHC.Plants.Combined.Subsystems.Validation.BaseClasses.PartialMultiplePumps Buildings.DHC.Plants.Combined.Subsystems.Validation.BaseClasses.PartialMultiplePumps

Base class for validating the multiple pumps model

Buildings.DHC.Plants.Combined.Subsystems.Validation.BaseClasses.PartialMultiplePumps

Information

This base class is used to construct validation models for the various multiple-pump models within Buildings.DHC.Plants.Combined.Subsystems.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
IntegernPum2Number of pumps
Pressurep_min2E5Circuit minimum pressure [Pa]
PressureDifferencedp_nominaldpPum_nominalCircuit total pressure drop at design conditions [Pa]
MultiplePumpsSpeedpumredeclare Buildings.DHC.Plan...Multiple pumps in parallel - Speed controlled
SpeedControlled_ypum1redeclare Fluid.Movers.Speed...Pump
SpeedControlled_ypum2redeclare Fluid.Movers.Speed...Pump
Nominal condition
MassFlowRatemPum_flow_nominal1Pump mass flow rate (each pump) [kg/s]
PressureDifferencedpPum_nominal1E5Pump head (each pump) [Pa]

Modelica definition

partial model PartialMultiplePumps "Base class for validating the multiple pumps model" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model for hot water"; parameter Integer nPum( final min=1)=2 "Number of pumps"; parameter Modelica.Units.SI.MassFlowRate mPum_flow_nominal=1 "Pump mass flow rate (each pump)"; parameter Modelica.Units.SI.PressureDifference dpPum_nominal = 1E5 "Pump head (each pump)"; final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal= nPum * mPum_flow_nominal "Circuit mass flow rate at design conditions"; parameter Modelica.Units.SI.Pressure p_min = 2E5 "Circuit minimum pressure"; parameter Modelica.Units.SI.PressureDifference dp_nominal = dpPum_nominal "Circuit total pressure drop at design conditions"; Fluid.Sources.Boundary_pT bou( redeclare final package Medium = Medium, final p=p_min, nPorts=2) "Pressure boundary condition"; replaceable Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pum constrainedby Buildings.DHC.Plants.Combined.Subsystems.BaseClasses.PartialMultiplePumps ( redeclare final package Medium = Medium, final nPum=nPum, final mPum_flow_nominal=mPum_flow_nominal, final dpPum_nominal=dpPum_nominal, use_inputFilter=false, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Multiple pumps in parallel - Speed controlled"; Fluid.Sensors.RelativePressure senRelPre(redeclare package Medium = Medium) "Differential pressure sensor"; Fluid.Sensors.MassFlowRate senMasFlo(redeclare package Medium = Medium) "Mass flow rate sensor"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ope( height=0.8, duration=300, offset=0.2, startTime=200) "Valve opening signal"; Fluid.Actuators.Valves.TwoWayEqualPercentage val( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dpValve_nominal=5000, dpFixed_nominal=dp_nominal - val.dpValve_nominal) "Modulating valve"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1Pum( table=[0,0,0; 1,0,0; 1,1,0; 4,1,1; 4,1,1; 10,1,1], timeScale=100, period=1000) "Pump Start signal"; replaceable Fluid.Movers.SpeedControlled_y pum1 constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine( redeclare final package Medium = Medium, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, use_inputFilter=false, final per=pum.per, addPowerToMedium=false) "Pump"; Fluid.FixedResistances.CheckValve cheVal1( redeclare final package Medium = Medium, final m_flow_nominal=mPum_flow_nominal, final dpValve_nominal=pum.dpValve_nominal) "Check valve"; replaceable Fluid.Movers.SpeedControlled_y pum2 constrainedby Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine( redeclare final package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, use_inputFilter=false, final per=pum.per, addPowerToMedium=false) "Pump"; Fluid.FixedResistances.CheckValve cheVal2( redeclare final package Medium = Medium, final m_flow_nominal=mPum_flow_nominal, final dpValve_nominal=pum.dpValve_nominal) "Check valve"; Fluid.Actuators.Valves.TwoWayEqualPercentage val1( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dpValve_nominal=5000, dpFixed_nominal=dp_nominal - val.dpValve_nominal) "Modulating valve"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[2] "Convert to real"; Fluid.Sensors.RelativePressure senRelPre1(redeclare package Medium = Medium) "Differential pressure sensor"; Fluid.Sensors.MassFlowRate senMasFlo1(redeclare package Medium = Medium) "Mass flow rate sensor"; Buildings.Controls.OBC.CDL.Reals.Multiply inp1 "Compute pump input signal"; Buildings.Controls.OBC.CDL.Reals.Multiply inp2 "Compute pump input signal"; equation connect(bou.ports[1], pum.port_a); connect(val.port_b, pum.port_a); connect(pum.port_b, senRelPre.port_a); connect(ope.y, val.y); connect(y1Pum.y, pum.y1); connect(pum.port_b, senMasFlo.port_a); connect(senMasFlo.port_b, val.port_a); connect(senRelPre.port_b, pum.port_a); connect(pum1.port_b, cheVal1.port_a); connect(pum2.port_b, cheVal2.port_a); connect(val1.port_b, pum2.port_a); connect(val1.port_b, pum1.port_a); connect(val1.port_b, bou.ports[2]); connect(y1Pum.y, booToRea.u); connect(cheVal2.port_b, senMasFlo1.port_a); connect(senMasFlo1.port_b, val1.port_a); connect(cheVal1.port_b, senMasFlo1.port_a); connect(senRelPre1.port_a, senMasFlo1.port_a); connect(senRelPre1.port_b, pum2.port_a); connect(booToRea[1].y, inp1.u2); connect(ope.y, val1.y); connect(booToRea[2].y, inp2.u2); end PartialMultiplePumps;