Buildings.DHC.Plants.Combined.Subsystems.Validation

Package with validation models

Information

This pakcge contains validation models.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.DHC.Plants.Combined.Subsystems.Validation.ChillerGroup ChillerGroup Validation of chiller group model
Buildings.DHC.Plants.Combined.Subsystems.Validation.ChillerHeatRecoveryGroup ChillerHeatRecoveryGroup Validation of heat recovery chiller group model
Buildings.DHC.Plants.Combined.Subsystems.Validation.CoolingTowerGroup CoolingTowerGroup Validation of cooling tower group model
Buildings.DHC.Plants.Combined.Subsystems.Validation.HeatPumpGroup HeatPumpGroup Validation of heat pump group model
Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsDp MultiplePumpsDp Validation of multiple pumps model with dp-controlled pump model
Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsFlow MultiplePumpsFlow Validation of multiple pumps model with flow-controlled pump model
Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsSpeed MultiplePumpsSpeed Validation of multiple pumps model with speed-controlled pump model
Buildings.DHC.Plants.Combined.Subsystems.Validation.ValveOpeningFlowBalancing ValveOpeningFlowBalancing Validation model for the computation of the valve opening ensuring flow balancing
Buildings.DHC.Plants.Combined.Subsystems.Validation.BaseClasses BaseClasses Package with base classes

Buildings.DHC.Plants.Combined.Subsystems.Validation.ChillerGroup Buildings.DHC.Plants.Combined.Subsystems.Validation.ChillerGroup

Validation of chiller group model

Buildings.DHC.Plants.Combined.Subsystems.Validation.ChillerGroup

Information

This model validates Buildings.DHC.Plants.Combined.Subsystems.ChillerGroup in a configuration with two chillers. The chillers are initially On and they are switched Off one after the other as they receive an increasing CHW supply temperature setpoint.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumChiWatBuildings.Media.WaterCHW medium
replaceable package MediumConWatBuildings.Media.WaterCW medium
ReformEIRChiller_Carrier_19XR_1403kW_7_09COP_VSDdat Chiller parameters

Connectors

TypeNameDescription
replaceable package MediumChiWatCHW medium
replaceable package MediumConWatCW medium

Modelica definition

model ChillerGroup "Validation of chiller group model" extends Modelica.Icons.Example; replaceable package MediumChiWat=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "CHW medium"; replaceable package MediumConWat=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "CW medium"; parameter Fluid.Chillers.Data.ElectricReformulatedEIR.ReformEIRChiller_Carrier_19XR_1403kW_7_09COP_VSD dat "Chiller parameters"; Buildings.DHC.Plants.Combined.Subsystems.ChillerGroup chi( redeclare final package Medium1 = MediumConWat, redeclare final package Medium2 = MediumChiWat, show_T=true, nUni=2, dpEva_nominal=3E5, dpCon_nominal=3E5, final dat=dat, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Chiller group"; Fluid.Sources.Boundary_pT retChiWat( redeclare final package Medium = MediumChiWat, p=supChiWat.p + chi.dpEva_nominal + chi.valEva.dpValve_nominal, T=288.15, nPorts=1) "Boundary conditions for CHW"; Fluid.Sources.Boundary_pT supConWat( redeclare final package Medium = MediumConWat, p=retConWat.p + chi.dpCon_nominal + chi.valCon.dpValve_nominal, nPorts=1) "Boundary conditions for CW"; Fluid.Sources.Boundary_pT retConWat( redeclare final package Medium = MediumConWat, p=200000, nPorts=1) "Boundary conditions for CW"; Fluid.Sources.Boundary_pT supChiWat( redeclare final package Medium = MediumChiWat, p=200000, nPorts=1) "Boundary conditions for CHW"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp TChiWatSupSet( y(displayUnit="degC", unit="K"), height=+5, duration=1000, offset=dat.TEvaLvg_nominal) "CHW supply temperature setpoint"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1( table=[0,1,1; 0.5,1,1; 0.5,1,0; 0.8,1,0; 0.8,0,0; 1,0,0], timeScale=1000, period=1000) "Chiller On/Off command"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[chi.nUni] "Convert DO to AO"; equation connect(chi.port_b1, retConWat.ports[1]); connect(supConWat.ports[1], chi.port_a1); connect(retChiWat.ports[1], chi.port_a2); connect(supChiWat.ports[1], chi.port_b2); connect(TChiWatSupSet.y, chi.TSet); connect(y1.y, chi.y1); connect(y1.y, booToRea.u); connect(booToRea.y, chi.yValCon); connect(booToRea.y, chi.yValEva); end ChillerGroup;

Buildings.DHC.Plants.Combined.Subsystems.Validation.ChillerHeatRecoveryGroup Buildings.DHC.Plants.Combined.Subsystems.Validation.ChillerHeatRecoveryGroup

Validation of heat recovery chiller group model

Buildings.DHC.Plants.Combined.Subsystems.Validation.ChillerHeatRecoveryGroup

Information

This model validates Buildings.DHC.Plants.Combined.Subsystems.ChillerHeatRecoveryGroup in a configuration with two HRCs.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.WaterMedium model
CHW loop and cooling-only chillers
ReformEIRChiller_Carrier_19XR_1403kW_7_09COP_VSDdatdat(EIRFunT={0.0101739374,0....Chiller parameters (each unit)

Connectors

TypeNameDescription
replaceable package MediumMedium model

Modelica definition

model ChillerHeatRecoveryGroup "Validation of heat recovery chiller group model" extends Modelica.Icons.Example; replaceable package Medium=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "Medium model"; final parameter Integer nChiHea(final min=1, start=1)=2 "Number of HRCs operating at design conditions"; parameter Fluid.Chillers.Data.ElectricReformulatedEIR.ReformEIRChiller_Carrier_19XR_1403kW_7_09COP_VSD dat( EIRFunT={0.0101739374, 0.0607200115, 0.0003348647, 0.003162578, 0.0002388594, -0.0014121289}, capFunT={0.0387084662, 0.2305017927, 0.0004779504, 0.0178244359, -8.48808e-05, -0.0032406711}, EIRFunPLR={0.4304252832, -0.0144718912, 5.12039e-05, -0.7562386674, 0.5661683373, 0.0406987748, 3.0278e-06, -0.3413411197, -0.000469572, 0.0055009208}, QEva_flow_nominal=-1E6, COP_nominal=2.5, mEva_flow_nominal=20, mCon_flow_nominal=22, TEvaLvg_nominal=279.15, TEvaLvgMin=277.15, TEvaLvgMax=308.15, TConLvg_nominal=333.15, TConLvgMin=296.15, TConLvgMax=336.15) "Chiller parameters (each unit)"; Buildings.DHC.Plants.Combined.Subsystems.ChillerHeatRecoveryGroup chi( redeclare final package Medium = Medium, show_T=true, final nUni=nChiHea, dpEva_nominal=3E5, dpCon_nominal=3E5, final dat=dat, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Chiller group"; Fluid.Sources.Boundary_pT bouChiWat( redeclare final package Medium = Medium, p=300000, nPorts=1) "Pressure boundary condition for CHW"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1( table=[0,1,1; 0.8,1,1; 0.8,1,0; 0.9,1,0; 0.9,0,0; 1,0,0], timeScale=2000, period=2000) "Chiller On/Off command"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1Coo( table=[0,0,0; 0.2,0,0; 0.2,0,1; 0.6,0,1; 0.6,1,1; 1,1,1], timeScale=2000, period=2000) "Cooling mode switchover command"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1HeaCoo( table=[0,0,0; 0.4,0,0; 0.4,1,0; 0.6,1,0; 0.6,0,0; 1,0,0], timeScale=2000, period=2000) "Direct heat recovery switchover command"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSet[nChiHea]( each final k=chi.TChiWatSup_nominal, y(each final unit="K", each displayUnit="degC")) "Supply temperature setpoint"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[chi.nUni] "Convert DO to AO"; Fluid.Sensors.TemperatureTwoPort THeaWatSup( redeclare final package Medium = Medium, final m_flow_nominal=chi.mConWat_flow_nominal) "HW supply temperature"; Fluid.Sensors.MassFlowRate floHeaWat(redeclare final package Medium = Medium) "HW flow"; Fluid.Sensors.MassFlowRate floChiWat(redeclare final package Medium = Medium) "CHW flow"; Fluid.Sensors.TemperatureTwoPort TChiWatSup(redeclare final package Medium = Medium, final m_flow_nominal=chi.mChiWat_flow_nominal) "CHW supply temperature"; Buildings.Controls.OBC.CDL.Logical.Or cooOrDir[nChiHea] "Return true if cooling OR direct HR"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal yValConSwi[nChiHea] "HRC condenser switchover valve commanded position"; Buildings.Controls.OBC.CDL.Logical.Not hea[nChiHea] "Return true if heating"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt[nChiHea] "Convert"; Buildings.Controls.OBC.CDL.Integers.MultiSum numHea(nin=nChiHea) "Number of HRC connected to HW loop"; Buildings.Controls.OBC.CDL.Integers.Less intLes[nChiHea] "Return true if switchover valve to be open"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant idx[nChiHea](final k={i for i in 1:nChiHea}) "HRC index"; Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator rep(final nout= nChiHea) "Replicate"; Buildings.Controls.OBC.CDL.Logical.Or mul[nChiHea] "Return true if cooling OR direct HR"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal yValEvaSwi[nChiHea] "HRC evaporator switchover valve commanded position"; Buildings.Controls.OBC.CDL.Logical.Not heaAndCas[nChiHea] "Return true if cascading heating"; Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt1[nChiHea] "Convert"; Buildings.Controls.OBC.CDL.Integers.MultiSum numHeaAndCas(nin=nChiHea) "Number of HRC in cascading heating"; Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator rep1(final nout= nChiHea) "Replicate"; Buildings.Controls.OBC.CDL.Integers.Less intLes1 [nChiHea] "Return true if switchover valve to be open"; Buildings.Controls.OBC.CDL.Logical.Or mul1 [nChiHea] "Return true if cooling OR direct HR"; Buildings.Controls.OBC.CDL.Reals.Switch TChiHeaSupSet[nChiHea] "Switch supply temperature setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSet[nChiHea]( each final k=chi.THeaWatSup_nominal, y(each final unit="K", each displayUnit="degC")) "Supply temperature setpoint"; Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pumChiWat( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nPum=1, have_var=false, have_valve=true, final mPum_flow_nominal=chi.mChiWat_flow_nominal, final dpPum_nominal=chi.dpEva_nominal) "CHW pumps"; Buildings.Controls.OBC.CDL.Logical.MultiOr y1PumConWatCon(nin=2) "Start pump if any HRC in cascading cooling"; Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pumHeaWat( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nPum=1, have_var=false, have_valve=true, final mPum_flow_nominal=chi.mConWat_flow_nominal, final dpPum_nominal=chi.dpCon_nominal) "HW pumps"; Buildings.Controls.OBC.CDL.Logical.And onAndHea[nChiHea] "Return true if On and heating"; Buildings.Controls.OBC.CDL.Logical.MultiOr y1PumHeaWat(nin=2) "Start pump if any HRC On and in heating"; Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pumConWatCon( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nPum=1, have_var=false, have_valve=true, final mPum_flow_nominal=chi.mConWat_flow_nominal, final dpPum_nominal=chi.dpCon_nominal) "CW pumps serving condenser barrels"; Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pumConWatEva( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nPum=1, have_var=false, have_valve=true, final mPum_flow_nominal=chi.mChiWat_flow_nominal, final dpPum_nominal=chi.dpEva_nominal) "CW pumps serving evaporator barrels"; Buildings.Controls.OBC.CDL.Integers.GreaterEqualThreshold y1PumConWatEva(t=1) "Return true if CW to be operating"; Buildings.Controls.OBC.CDL.Logical.MultiOr y1PumChiWat(nin=2) "Start pump if any HRC in cooling or direct HR mode"; Fluid.HeatExchangers.SensibleCooler_T disHeaWat( redeclare final package Medium = Medium, final m_flow_nominal=THeaWatRet.k, final dp_nominal=0, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=300, T_start=chi.THeaWatSup_nominal - 12) "Distribution system approximated by prescribed temperature"; Fluid.HeatExchangers.Heater_T disConWatEva( redeclare final package Medium = Medium, final m_flow_nominal=chi.mChiWat_flow_nominal, final dp_nominal=0, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=300, T_start=TConWatEvaSup.k) "Distribution system approximated by prescribed temperature"; Fluid.HeatExchangers.SensibleCooler_T disConWatCon( redeclare final package Medium = Medium, final m_flow_nominal=TConWatConSup.k, final dp_nominal=0, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=300, T_start=chi.TCasCooEnt_nominal) "Distribution system approximated by prescribed temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatRet( final k=chi.THeaWatSup_nominal - 12, y(final unit="K", displayUnit="degC")) "Return temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TConWatConSup(final k= chi.TCasCooEnt_nominal, y(final unit="K", displayUnit="degC")) "Supply temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TConWatEvaSup(final k= chi.TCasHeaEnt_nominal, y(final unit="K", displayUnit="degC")) "Supply temperature"; Fluid.HeatExchangers.Heater_T disChiWat( redeclare final package Medium = Medium, final m_flow_nominal=TChiWatRet.k, final dp_nominal=0, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=300, T_start=chi.TChiWatSup_nominal) "Distribution system approximated by prescribed temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatRet( final k=chi.TChiWatSup_nominal + 6, y(final unit="K", displayUnit="degC")) "Return temperature"; Fluid.Sources.Boundary_pT bouHeaWat( redeclare final package Medium = Medium, p=300000, nPorts=1) "Pressure boundary condition for HW"; equation connect(y1.y, chi.y1); connect(y1Coo.y, chi.y1Coo); connect(y1.y, booToRea.u); connect(booToRea.y, chi.yValEva); connect(chi.port_b1, THeaWatSup.port_a); connect(floChiWat.port_b, chi.port_a4); connect(TChiWatSup.port_a, chi.port_b4); connect(y1Coo.y, cooOrDir.u1); connect(y1HeaCoo.y, cooOrDir.u2); connect(y1Coo.y, hea.u); connect(hea.y, booToInt.u); connect(booToInt.y, numHea.u); connect(idx.y, intLes.u1); connect(rep.y, intLes.u2); connect(intLes.y, mul.u2); connect(mul.y, yValConSwi.u); connect(yValConSwi.y, chi.yValConSwi); connect(y1Coo.y[1:2], mul.u1); connect(yValEvaSwi.y, chi.yValEvaSwi); connect(numHea.y, rep.u); connect(cooOrDir.y, heaAndCas.u); connect(heaAndCas.y, booToInt1.u); connect(booToInt1.y, numHeaAndCas.u); connect(numHeaAndCas.y, rep1.u); connect(rep1.y, intLes1.u2); connect(idx.y, intLes1.u1); connect(cooOrDir.y, mul1.u1); connect(intLes1.y, mul1.u2); connect(mul1.y, yValEvaSwi.u); connect(TChiWatSet.y, TChiHeaSupSet.u1); connect(THeaWatSet.y, TChiHeaSupSet.u3); connect(y1Coo.y, TChiHeaSupSet.u2); connect(TChiHeaSupSet.y, chi.TSet); connect(pumChiWat.port_b, floChiWat.port_a); connect(y1Coo.y[1:2], y1PumConWatCon.u[1:2]); connect(pumHeaWat.port_b, floHeaWat.port_a); connect(y1.y[1:2], onAndHea.u1); connect(hea.y, onAndHea.u2); connect(onAndHea.y, y1PumHeaWat.u[1:2]); connect(y1PumHeaWat.y, pumHeaWat.y1[1]); connect(THeaWatSup.port_b, pumHeaWat.port_a); connect(pumConWatEva.port_b, chi.port_a2); connect(chi.port_b3, pumConWatCon.port_a); connect(numHeaAndCas.y, y1PumConWatEva.u); connect(y1PumConWatEva.y, pumConWatEva.y1[1]); connect(y1PumConWatCon.y, pumConWatCon.y1[1]); connect(y1PumChiWat.y, pumChiWat.y1[1]); connect(cooOrDir.y, y1PumChiWat.u[1:2]); connect(floHeaWat.port_b, disHeaWat.port_a); connect(disHeaWat.port_b, chi.port_a1); connect(chi.port_b2, disConWatEva.port_a); connect(disConWatEva.port_b, pumConWatEva.port_a); connect(pumConWatCon.port_b, disConWatCon.port_a); connect(disConWatCon.port_b, chi.port_a3); connect(THeaWatRet.y, disHeaWat.TSet); connect(TConWatConSup.y, disConWatCon.TSet); connect(TConWatEvaSup.y, disConWatEva.TSet); connect(disChiWat.port_b, pumChiWat.port_a); connect(TChiWatSup.port_b, disChiWat.port_a); connect(TChiWatRet.y, disChiWat.TSet); connect(bouChiWat.ports[1], pumChiWat.port_a); connect(booToRea.y, chi.yValCon); connect(bouHeaWat.ports[1], pumHeaWat.port_a); end ChillerHeatRecoveryGroup;

Buildings.DHC.Plants.Combined.Subsystems.Validation.CoolingTowerGroup Buildings.DHC.Plants.Combined.Subsystems.Validation.CoolingTowerGroup

Validation of cooling tower group model

Buildings.DHC.Plants.Combined.Subsystems.Validation.CoolingTowerGroup

Information

This model validates Buildings.DHC.Plants.Combined.Subsystems.CoolingTowerGroup in a configuration with two tower cells. The tower cells are initially enabled and they are disabled one after the other as the CW supply temperature setpoint is increasing after an initial period where it is fixed at its design value. The Start command of the CW pumps is the same signal as the one used for the cooling towers.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumConWatBuildings.Media.WaterCW medium

Connectors

TypeNameDescription
replaceable package MediumConWatCW medium

Modelica definition

model CoolingTowerGroup "Validation of cooling tower group model" extends Modelica.Icons.Example; replaceable package MediumConWat=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "CW medium"; Buildings.DHC.Plants.Combined.Subsystems.CoolingTowerGroup coo( redeclare final package Medium = MediumConWat, show_T=true, nUni=2, mConWatUni_flow_nominal=1, dpConWatFriUni_nominal=1E4, mAirUni_flow_nominal=coo.mConWatUni_flow_nominal/1.45, TWetBulEnt_nominal=297.05, TConWatRet_nominal=308.15, TConWatSup_nominal=302.55, PFanUni_nominal=340*coo.mConWatUni_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Cooling tower group"; Fluid.Sources.Boundary_pT bouConWat( redeclare final package Medium = MediumConWat, T=coo.TConWatRet_nominal, nPorts=2) "Boundary conditions for CW"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp TConWatSupSet( height=+3, duration=500, offset=coo.TConWatSup_nominal, startTime=500, y(displayUnit="degC", unit="K")) "CW supply temperature setpoint"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1( table=[0,1,1; 0.4,1,1; 0.4,1,0; 0.8,1,0; 0.8,0,0; 1,0,0], timeScale=1000, period=1000) "On/Off command"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat( filNam=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")) "Outdoor conditions"; Fluid.Sensors.TemperatureTwoPort TConWatSup( redeclare package Medium =MediumConWat, final m_flow_nominal=coo.mConWat_flow_nominal) "CW supply temperature"; Fluid.Sensors.TemperatureTwoPort TConWatRet( redeclare package Medium =MediumConWat, final m_flow_nominal=coo.mConWat_flow_nominal) "CW return temperature"; ETS.Combined.Controls.PIDWithEnable ctl( k=1, Ti=60, reverseActing=false) "Controller"; Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pum( redeclare package Medium =MediumConWat, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final nPum=coo.nUni, have_var=false, have_valve=false, final mPum_flow_nominal=coo.mConWatUni_flow_nominal, final dpPum_nominal=coo.dpConWatFriUni_nominal) "CW pumps"; equation connect(y1.y, coo.y1); connect(weaDat.weaBus, coo.weaBus); connect(coo.port_b, TConWatSup.port_a); connect(bouConWat.ports[1],TConWatRet. port_a); connect(TConWatRet.port_b, coo.port_a); connect(coo.TConWatSup, ctl.u_m); connect(y1.y[1], ctl.uEna); connect(TConWatSupSet.y, ctl.u_s); connect(ctl.y, coo.y); connect(pum.port_b, bouConWat.ports[2]); connect(TConWatSup.port_b, pum.port_a); connect(y1.y, pum.y1); end CoolingTowerGroup;

Buildings.DHC.Plants.Combined.Subsystems.Validation.HeatPumpGroup Buildings.DHC.Plants.Combined.Subsystems.Validation.HeatPumpGroup

Validation of heat pump group model

Buildings.DHC.Plants.Combined.Subsystems.Validation.HeatPumpGroup

Information

This model validates Buildings.DHC.Plants.Combined.Subsystems.HeatPumpGroup in a configuration with two heat pumps. The heat pumps are initially On and they are switched Off one after the other as they are exposed to an increasing HW return temperature.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumHeaWatBuildings.Media.WaterCHW medium
replaceable package MediumAirBuildings.Media.AirCW medium
Genericdatdat(dpHeaLoa_nominal=50000, ...Heat pump parameters (each unit)

Connectors

TypeNameDescription
replaceable package MediumHeaWatCHW medium
replaceable package MediumAirCW medium

Modelica definition

model HeatPumpGroup "Validation of heat pump group model" extends Modelica.Icons.Example; replaceable package MediumHeaWat=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "CHW medium"; replaceable package MediumAir=Buildings.Media.Air constrainedby Modelica.Media.Interfaces.PartialMedium "CW medium"; parameter Fluid.HeatPumps.Data.EquationFitReversible.Generic dat( dpHeaLoa_nominal=50000, dpHeaSou_nominal=100, hea( mLoa_flow=dat.hea.Q_flow / 10 / 4186, mSou_flow=1E-4 * dat.hea.Q_flow, Q_flow=1E6, P=dat.hea.Q_flow / 2.2, coeQ={-5.64420084, 1.95212447, 9.96663913, 0.23316322, -5.64420084}, coeP={-3.96682255, 6.8419453, 1.99606939, 0.01393387, -3.96682255}, TRefLoa=298.15, TRefSou=253.15), coo( mLoa_flow=0, mSou_flow=0, Q_flow=-1, P=0, coeQ=fill(0, 5), coeP=fill(0, 5), TRefLoa=273.15, TRefSou=273.15)) "Heat pump parameters (each unit)"; Buildings.DHC.Plants.Combined.Subsystems.HeatPumpGroup heaPum( redeclare final package Medium = MediumHeaWat, redeclare final package MediumAir = MediumAir, show_T=true, nUni=2, final dat=dat, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Heat pump group"; Fluid.Sources.Boundary_pT bouHeaWat( redeclare final package Medium = MediumHeaWat, use_T_in=true, nPorts=2) "Boundary conditions for HW"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSupSet( k=dat.hea.TRefLoa+ 10, y(displayUnit="degC", unit="K")) "HW supply temperature setpoint"; Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1( table=[0,1,1; 0.5,1,1; 0.5,1,0; 0.8,1,0; 0.8,0,0; 1,0,0], timeScale=1000, period=1000) "Heat pump On/Off command"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat( filNam=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos")) "Outdoor conditions"; Buildings.Controls.OBC.CDL.Reals.Sources.Ramp THeaWatRetBou( y(displayUnit="degC", unit="K"), height=+5, duration=1000, offset=dat.hea.TRefLoa) "HW return temperature"; Fluid.Sensors.TemperatureTwoPort THeaWatSup( redeclare package Medium = MediumHeaWat, final m_flow_nominal=heaPum.mHeaWat_flow_nominal) "HW supply temperature"; Fluid.Sensors.TemperatureTwoPort THeaWatRet( redeclare package Medium = MediumHeaWat, final m_flow_nominal=heaPum.mHeaWat_flow_nominal) "HW return temperature"; equation connect(THeaWatSupSet.y,heaPum. TSet); connect(y1.y,heaPum. y1); connect(weaDat.weaBus,heaPum. weaBus); connect(THeaWatRetBou.y, bouHeaWat.T_in); connect(heaPum.port_b, THeaWatSup.port_a); connect(THeaWatSup.port_b, bouHeaWat.ports[1]); connect(bouHeaWat.ports[2], THeaWatRet.port_a); connect(THeaWatRet.port_b, heaPum.port_a); end HeatPumpGroup;

Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsDp Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsDp

Validation of multiple pumps model with dp-controlled pump model

Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsDp

Information

This model validates Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsDp by comparing an instance of that model with two instances of Buildings.Fluid.Movers.FlowControlled_dp connected in parallel. The two pumps are commanded On one after the other as they receive an increasing differential pressure setpoint and work against a two-way modulating valve that gets progressively opened.

Extends from BaseClasses.PartialMultiplePumps (Base class for validating the multiple pumps model).

Parameters

TypeNameDefaultDescription
IntegernPum2Number of pumps
Pressurep_min2E5Circuit minimum pressure [Pa]
PressureDifferencedp_nominaldpPum_nominalCircuit total pressure drop at design conditions [Pa]
Nominal condition
MassFlowRatemPum_flow_nominal1Pump mass flow rate (each pump) [kg/s]
PressureDifferencedpPum_nominal1E5Pump head (each pump) [Pa]

Modelica definition

model MultiplePumpsDp "Validation of multiple pumps model with dp-controlled pump model" extends BaseClasses.PartialMultiplePumps( redeclare final Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsDp pum, redeclare final Buildings.Fluid.Movers.FlowControlled_dp pum1( final m_flow_nominal=mPum_flow_nominal, final dp_nominal=dpPum_nominal), redeclare final Buildings.Fluid.Movers.FlowControlled_dp pum2( final m_flow_nominal=mPum_flow_nominal, final dp_nominal=dpPum_nominal)); Buildings.Controls.OBC.CDL.Reals.Sources.Ramp dpSet( height=dpPum_nominal, duration=500) "Differential pressure setpoint"; equation connect(dpSet.y, inp1.u1); connect(dpSet.y, inp2.u1); connect(inp1.y, pum1.dp_in); connect(inp2.y, pum2.dp_in); connect(dpSet.y, pum.dp_in); end MultiplePumpsDp;

Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsFlow Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsFlow

Validation of multiple pumps model with flow-controlled pump model

Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsFlow

Information

This model validates Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsFlow by comparing an instance of that model with two instances of Buildings.Fluid.Movers.FlowControlled_m_flow connected in parallel. The two pumps are commanded On one after the other as they receive an increasing flow setpoint and work against a two-way modulating valve that gets progressively opened.

Extends from BaseClasses.PartialMultiplePumps (Base class for validating the multiple pumps model).

Parameters

TypeNameDefaultDescription
IntegernPum2Number of pumps
Pressurep_min2E5Circuit minimum pressure [Pa]
PressureDifferencedp_nominaldpPum_nominalCircuit total pressure drop at design conditions [Pa]
Nominal condition
MassFlowRatemPum_flow_nominal1Pump mass flow rate (each pump) [kg/s]
PressureDifferencedpPum_nominal1E5Pump head (each pump) [Pa]

Modelica definition

model MultiplePumpsFlow "Validation of multiple pumps model with flow-controlled pump model" extends BaseClasses.PartialMultiplePumps( redeclare final Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsFlow pum, redeclare final Buildings.Fluid.Movers.FlowControlled_m_flow pum1( final m_flow_nominal=mPum_flow_nominal, final dp_nominal=dpPum_nominal), redeclare final Buildings.Fluid.Movers.FlowControlled_m_flow pum2( final m_flow_nominal=mPum_flow_nominal, final dp_nominal=dpPum_nominal)); Buildings.Controls.OBC.CDL.Reals.Sources.Ramp floSet(height= mPum_flow_nominal, duration=500) "Mass flow rate setpoint (each pump)"; Buildings.Controls.OBC.CDL.Reals.Add floTotSet "Compute total flow rate setpoint (all pumps)"; equation connect(floSet.y, inp1.u1); connect(floSet.y, inp2.u1); connect(inp2.y, pum2.m_flow_in); connect(inp1.y, pum1.m_flow_in); connect(floTotSet.y, pum.m_flow_in); connect(inp1.y, floTotSet.u1); connect(inp2.y, floTotSet.u2); end MultiplePumpsFlow;

Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsSpeed Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsSpeed

Validation of multiple pumps model with speed-controlled pump model

Buildings.DHC.Plants.Combined.Subsystems.Validation.MultiplePumpsSpeed

Information

This model validates Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed by comparing an instance of that model with two instances of Buildings.Fluid.Movers.SpeedControlled_y connected in parallel. The two pumps are commanded On one after the other as they receive an increasing speed signal and work against a two-way modulating valve that gets progressively opened.

Extends from BaseClasses.PartialMultiplePumps (Base class for validating the multiple pumps model).

Parameters

TypeNameDefaultDescription
IntegernPum2Number of pumps
Pressurep_min2E5Circuit minimum pressure [Pa]
PressureDifferencedp_nominaldpPum_nominalCircuit total pressure drop at design conditions [Pa]
Nominal condition
MassFlowRatemPum_flow_nominal1Pump mass flow rate (each pump) [kg/s]
PressureDifferencedpPum_nominal1E5Pump head (each pump) [Pa]

Modelica definition

model MultiplePumpsSpeed "Validation of multiple pumps model with speed-controlled pump model" extends BaseClasses.PartialMultiplePumps( redeclare final Buildings.DHC.Plants.Combined.Subsystems.MultiplePumpsSpeed pum, redeclare final Fluid.Movers.SpeedControlled_y pum1, redeclare final Fluid.Movers.SpeedControlled_y pum2); Buildings.Controls.OBC.CDL.Reals.Sources.Ramp spe(duration=500) "Pump speed signal"; equation connect(spe.y, pum.y); connect(spe.y, inp1.u1); connect(spe.y, inp2.u1); connect(inp1.y, pum1.y); connect(inp2.y, pum2.y); end MultiplePumpsSpeed;

Buildings.DHC.Plants.Combined.Subsystems.Validation.ValveOpeningFlowBalancing Buildings.DHC.Plants.Combined.Subsystems.Validation.ValveOpeningFlowBalancing

Validation model for the computation of the valve opening ensuring flow balancing

Buildings.DHC.Plants.Combined.Subsystems.Validation.ValveOpeningFlowBalancing

Information

This model validates the computation of the valve opening that ensures flow balancing proportional to design flow in the case of linear valves configured with a pressure drop varying linearly with the flow rate.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.WaterCHW medium
Realm1_flow1Valve #1 design mass flow rate
Realm2_flow1.5Valve #2 design mass flow rate
Realdpv11E3Valve #1 design pressure drop
Realdpv21E3Valve #2 design pressure drop
Realdpf13E4Design pressure drop of fixed flow resistance in series with valve #1
Realdpf25E4Design pressure drop of fixed flow resistance in series with valve #2
Realdps20E4 
Realy1if dpf2 + dpv2 - dpf1 <= 0 t...Valve #1 opening
Realy2if dpf1 + dpv1 - dpf2 <= 0 t...Valve #2 opening

Connectors

TypeNameDescription
replaceable package MediumCHW medium

Modelica definition

model ValveOpeningFlowBalancing "Validation model for the computation of the valve opening ensuring flow balancing" extends Modelica.Icons.Example; replaceable package Medium=Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "CHW medium"; parameter Real m1_flow = 1 "Valve #1 design mass flow rate"; parameter Real m2_flow = 1.5 "Valve #2 design mass flow rate"; parameter Real dpv1 = 1E3 "Valve #1 design pressure drop"; parameter Real dpv2 = 1E3 "Valve #2 design pressure drop"; parameter Real dpf1 = 3E4 "Design pressure drop of fixed flow resistance in series with valve #1"; parameter Real dpf2 = 5E4 "Design pressure drop of fixed flow resistance in series with valve #2"; parameter Real dps = 20E4; parameter Real y1 = if dpf2 + dpv2 - dpf1 <= 0 then 1 else (dpv1 / (dpf2 + dpv2 - dpf1))^0.5 "Valve #1 opening"; parameter Real y2 = if dpf1 + dpv1 - dpf2 <= 0 then 1 else (dpv2 / (dpf1 + dpv1 - dpf2))^0.5 "Valve #2 opening"; Fluid.Actuators.Valves.TwoWayLinear val1( redeclare package Medium = Medium, m_flow_nominal=m1_flow, linearized=true, dpValve_nominal=dpv1, use_inputFilter=false, dpFixed_nominal=dpf1) "Valve #1"; Fluid.Actuators.Valves.TwoWayLinear val2( redeclare package Medium=Medium, m_flow_nominal=m2_flow, linearized=true, dpValve_nominal=dpv2, use_inputFilter=false, dpFixed_nominal=dpf2) "Valve #1"; Fluid.Sources.Boundary_pT bou( p=Medium.p_default + dps, nPorts=2, redeclare package Medium=Medium) "Pressure boundary condition"; Fluid.Sources.Boundary_pT bou1(nPorts=2, redeclare package Medium=Medium) "Pressure boundary condition"; Modelica.Blocks.Sources.RealExpression y[2](y={y1, y2}) "Valve opening signal"; equation connect(bou.ports[1], val1.port_a); connect(val1.port_b, bou1.ports[1]); connect(bou.ports[2],val2. port_a); connect(val2.port_b, bou1.ports[2]); connect(y[1].y, val1.y); connect(y[2].y,val2. y); end ValveOpeningFlowBalancing;