Buildings.Templates.Plants.HeatPumps.Validation

Package with validation models

Information

This package contains models validating the templates within Buildings.Templates.Plants.HeatPumps for various system configurations.

The models also illustrate parameter propagation from the top-level HVAC system record datAll.

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

Package Content

Name Description
Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterPolyvalent AirToWaterPolyvalent Validation of AWHP plant template with polyvalent (4-pipe) units only
Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversibleHeatRecovery AirToWaterReversibleHeatRecovery Validation of AWHP plant template with reversible heat pumps and heat recovery chiller
Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversiblePolyvalent AirToWaterReversiblePolyvalent Validation of AWHP plant template with reversible (2-pipe) and polyvalent (4-pipe) units
Buildings.Templates.Plants.HeatPumps.Validation.UserProject UserProject Package with configured models

Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterPolyvalent Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterPolyvalent

Validation of AWHP plant template with polyvalent (4-pipe) units only

Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterPolyvalent

Information

This model extends Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversibleHeatRecovery and validates the AWHP plant template Buildings.Templates.Plants.HeatPumps.AirToWater in a configuration with three polyvalent (4-pipe) heat pumps with lead/lag alternation, and a primary-only distribution system with headered pumps.

The modeling assumptions are reproduced from the parent validation model, except for the load profile, which is deliberately chosen to increase simultaneous heating and cooling loads, exercising the mode selection and staging logic for polyvalent heat pumps.

Simulating this model shows how the plant responds to a varying load by

Extends from Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversiblePolyvalent (Validation of AWHP plant template with reversible (2-pipe) and polyvalent (4-pipe) units).

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMain medium (common for CHW and HW)
PressureDifferencedpTer_nominal3E4Liquid pressure drop across terminal unit at design conditions [Pa]
PressureDifferencedpValve_nominaldpTer_nominalTerminal unit control valve pressure drop at design conditions [Pa]
Assumptions
BooleanallowFlowReversaltrue= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDescription
BusbusAirHanAHU control bus
BusbusPlaPlant control bus

Modelica definition

model AirToWaterPolyvalent "Validation of AWHP plant template with polyvalent (4-pipe) units only" extends Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversiblePolyvalent( redeclare Buildings.Templates.Plants.HeatPumps.Validation.UserProject.Data.AirToWaterPolyvalent datAll, pla( typ=Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Polyvalent, nPhp_select=3, typDis_select1=Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only, typArrPumPri_select=Buildings.Templates.Components.Types.PumpArrangement.Headered, nPumHeaWatPri_select=2, nPumChiWatPri_select=2)); end AirToWaterPolyvalent;

Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversibleHeatRecovery Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversibleHeatRecovery

Validation of AWHP plant template with reversible heat pumps and heat recovery chiller

Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversibleHeatRecovery

Information

This model validates Buildings.Templates.Plants.HeatPumps.AirToWater by simulating a 24-hour period with overlapping heating and cooling loads. The heating loads reach their peak value first, the cooling loads reach it last.

Three equally sized, lead/lag alternated heat pumps are modeled. A heat recovery chiller (HRC) is included (pla.typ=Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversibleHeatRecovery) and connected to the HW and CHW return pipes (sidestream integration). A unique aggregated load is modeled on each loop using a heat exchanger component exposed to conditioned space air, and a two-way modulating valve. An importance multiplier of 10 is applied to the plant requests and reset requests generated from the valve position.

The user can modify the plant parameter pla.typ to switch between a cooling and heating system (the default setting) and a heating-only system. Advanced equipment and control options can be modified via the parameter dialog of the plant component.

Simulating this model shows how the plant responds to a varying load by

Note that the HRC model does not explicitly represent compressor cycling. As a result, the cycling-based disabling condition specified in Buildings.Templates.Plants.Controls.HeatRecoveryChillers.Enable is never triggered. This limitation may lead to overestimating the HRC operating time.

Details

By default, all valves within the plant are modeled considering a linear variation of the pressure drop with the flow rate (pla.linearized=true), as opposed to the quadratic relationship usually considered for a turbulent flow regime. By limiting the size of the system of nonlinear equations, this setting reduces the risk of solver failure and the time to solution for testing various plant configurations.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.WaterMain medium (common for CHW and HW)
AirToWaterReversibleHeatRecoverydatAlldatAll(pla(final cfg=pla.cfg))Plant parameters
PressureDifferencedpTer_nominal3E4Liquid pressure drop across terminal unit at design conditions [Pa]
PressureDifferencedpValve_nominaldpTer_nominalTerminal unit control valve pressure drop at design conditions [Pa]
Assumptions
BooleanallowFlowReversaltrue= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDescription
replaceable package MediumMain medium (common for CHW and HW)
BusbusAirHanAHU control bus
BusbusPlaPlant control bus

Modelica definition

model AirToWaterReversibleHeatRecovery "Validation of AWHP plant template with reversible heat pumps and heat recovery chiller" extends Modelica.Icons.Example; replaceable package Medium = Buildings.Media.Water constrainedby Modelica.Media.Interfaces.PartialMedium "Main medium (common for CHW and HW)"; final parameter Boolean have_chiWat = pla.have_chiWat "Set to true if the plant provides CHW"; inner replaceable parameter UserProject.Data.AirToWaterReversibleHeatRecovery datAll( pla(final cfg=pla.cfg)) "Plant parameters"; parameter Modelica.Units.SI.PressureDifference dpTer_nominal( displayUnit="Pa") = 3E4 "Liquid pressure drop across terminal unit at design conditions"; parameter Modelica.Units.SI.PressureDifference dpValve_nominal( displayUnit="Pa") = dpTer_nominal "Terminal unit control valve pressure drop at design conditions"; parameter Boolean allowFlowReversal = true "= true to allow flow reversal, false restricts to design direction (port_a -> port_b)"; parameter Modelica.Fluid.Types.Dynamics energyDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat( filNam=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")) "Outdoor conditions"; Buildings.Templates.Plants.HeatPumps.AirToWater pla( redeclare final package MediumHeaWat=Medium, typ=Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversibleHeatRecovery, final dat=datAll.pla, nHp_select=3, typArrPumPri_select=Buildings.Templates.Components.Types.PumpArrangement.Dedicated, typPumPri_select=Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Constant, nPumHeaWatSec_select=2, nPumChiWatSec_select=2, final allowFlowReversal=allowFlowReversal, linearized=true, show_T=true, ctl(nAirHan=1, nEquZon=0, have_senTPriRet_select=true), is_dpBalYPumSetCal=true, dpChiWatLoo_nominal=datAll.pla.ctl.dpChiWatLocSet_max, dpHeaWatLoo_nominal=datAll.pla.ctl.dpHeaWatLocSet_max) "Heat pump plant"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TDum( k=293.15, y(final unit="K", displayUnit="degC")) "Placeholder signal for request generator"; Fluid.Sensors.RelativePressure dpHeaWatRem[1]( redeclare each final package Medium=Medium) "HW differential pressure at one remote location"; Fluid.Sensors.RelativePressure dpChiWatRem[1]( redeclare each final package Medium=Medium) if have_chiWat "CHW differential pressure at one remote location"; Buildings.Controls.OBC.ASHRAE.G36.AHUs.MultiZone.VAV.SetPoints.PlantRequests reqPlaRes( final heaCoi=Buildings.Controls.OBC.ASHRAE.G36.Types.HeatingCoil.WaterBased, final cooCoi=if have_chiWat then Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.WaterBased else Buildings.Controls.OBC.ASHRAE.G36.Types.CoolingCoil.None) "Plant and reset request"; AirHandlersFans.Interfaces.Bus busAirHan "AHU control bus"; Interfaces.Bus busPla "Plant control bus"; Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable ratLoa( table=[ 0, 0, 0; 5, 0, 0; 7, 1, 0; 10, 0.5, 0; 14, 0, 0.6; 16, 0, 1; 18, 0, 0.6; 22, 0.1, 0.1; 24, 0, 0], timeScale=3600) "Fraction of design load – Index 1 for heating, 2 for cooling"; Fluid.Sensors.VolumeFlowRate VChiWat_flow( redeclare final package Medium=Medium, final m_flow_nominal=pla.mChiWat_flow_nominal) if have_chiWat "CHW volume flow rate"; Fluid.Sensors.VolumeFlowRate VHeaWat_flow( redeclare final package Medium=Medium, final m_flow_nominal=pla.mHeaWat_flow_nominal) "HW volume flow rate"; Buildings.Controls.OBC.CDL.Integers.Multiply mulInt[4] "Importance multiplier"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant cst[4](each k=10) "Request multiplier factor"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant enaLoa(k=true) "Load enable"; Buildings.Fluid.FixedResistances.PressureDrop pipHeaWat( redeclare final package Medium=Medium, final m_flow_nominal=pla.mHeaWat_flow_nominal, final dp_nominal=Buildings.Templates.Data.Defaults.dpHeaWatLocSet_max - max( datAll.pla.ctl.dpHeaWatRemSet_max)) "Piping"; Buildings.Fluid.FixedResistances.PressureDrop pipChiWat( redeclare final package Medium=Medium, final m_flow_nominal=pla.mChiWat_flow_nominal, final dp_nominal=Buildings.Templates.Data.Defaults.dpChiWatLocSet_max - max( datAll.pla.ctl.dpChiWatRemSet_max)) if have_chiWat "Piping"; Controls.Utilities.PlaceholderInteger ph[2]( each final have_inp=have_chiWat, each final u_internal=0) "Placeholder value"; Buildings.Templates.Components.Loads.LoadTwoWayValve loaCoo( redeclare final package MediumLiq=Medium, final energyDynamics=energyDynamics, final typ=Buildings.Fluid.HydronicConfigurations.Types.Control.Cooling, final mLiq_flow_nominal=pla.mChiWat_flow_nominal, final dpTer_nominal=dpTer_nominal, final dpValve_nominal=dpValve_nominal, final dpBal1_nominal=datAll.pla.ctl.dpChiWatRemSet_max[1] - dpTer_nominal - dpValve_nominal, final TLiqEnt_nominal=pla.TChiWatSup_nominal, final TLiqLvg_nominal=pla.TChiWatRet_nominal, con(val(y_start=0)), loa(coi(show_T=true))) if have_chiWat "Cooling load"; Buildings.Templates.Components.Loads.LoadTwoWayValve loaHea( redeclare final package MediumLiq=Medium, final energyDynamics=energyDynamics, final typ=Buildings.Fluid.HydronicConfigurations.Types.Control.Heating, final mLiq_flow_nominal=pla.mHeaWat_flow_nominal, final dpTer_nominal=dpTer_nominal, final dpValve_nominal=dpValve_nominal, final dpBal1_nominal=datAll.pla.ctl.dpHeaWatRemSet_max[1] - dpTer_nominal - dpValve_nominal, final TLiqEnt_nominal=pla.THeaWatSup_nominal, final TLiqLvg_nominal=pla.THeaWatRet_nominal, con(val(y_start=0))) "Heating load"; Buildings.Fluid.MixingVolumes.MixingVolume volHeaWat( energyDynamics=energyDynamics, final m_flow_nominal=pla.mHeaWat_flow_nominal, V=Buildings.Templates.Data.Defaults.ratVLiqByCap * pla.capHea_nominal, redeclare package Medium=Medium, nPorts=2) "Fluid volume in distribution system"; Buildings.Fluid.MixingVolumes.MixingVolume volChiWat( energyDynamics=energyDynamics, final m_flow_nominal=pla.mChiWat_flow_nominal, V=Buildings.Templates.Data.Defaults.ratVLiqByCap * pla.capCoo_nominal, redeclare package Medium=Medium, nPorts=2) if have_chiWat "Fluid volume in distribution system"; equation if have_chiWat then connect(mulInt[3].y, busAirHan.reqResChiWat); connect(mulInt[4].y, busAirHan.reqPlaChiWat); end if; connect(weaDat.weaBus, pla.busWea); connect(TDum.y, reqPlaRes.TAirSup); connect(TDum.y, reqPlaRes.TAirSupSet); connect(busAirHan, pla.busAirHan[1]); connect(pla.bus, busPla); connect(VChiWat_flow.port_b, dpChiWatRem[1].port_b); connect(VHeaWat_flow.port_b, dpHeaWatRem[1].port_b); connect(cst.y, mulInt.u1); connect(mulInt[1].y, busAirHan.reqResHeaWat); connect(mulInt[2].y, busAirHan.reqPlaHeaWat); connect(VChiWat_flow.port_b, pipChiWat.port_a); connect(VHeaWat_flow.port_b, pipHeaWat.port_a); connect(reqPlaRes.yChiWatResReq, ph[1].u); connect(reqPlaRes.yChiPlaReq, ph[2].u); connect(reqPlaRes.yHotWatResReq, mulInt[1].u2); connect(reqPlaRes.yHotWatPlaReq, mulInt[2].u2); connect(ph[1].y, mulInt[3].u2); connect(ph[2].y, mulInt[4].u2); connect(dpChiWatRem.p_rel, busPla.dpChiWatRem); connect(dpHeaWatRem.p_rel, busPla.dpHeaWatRem); connect(loaCoo.port_b, VChiWat_flow.port_a); connect(dpChiWatRem[1].port_a, loaCoo.port_a); connect(loaCoo.yVal_actual, reqPlaRes.uCooCoiSet); connect(loaHea.port_b, VHeaWat_flow.port_a); connect(dpHeaWatRem[1].port_a, loaHea.port_a); connect(ratLoa.y[2], loaCoo.u); connect(ratLoa.y[1], loaHea.u); connect(loaHea.yVal_actual, reqPlaRes.uHeaCoiSet); connect(enaLoa.y, loaCoo.u1); connect(enaLoa.y, loaHea.u1); connect(pla.port_bHeaWat, volHeaWat.ports[1]); connect(volHeaWat.ports[2], loaHea.port_a); connect(pipHeaWat.port_b, pla.port_aHeaWat); connect(pla.port_bChiWat, volChiWat.ports[1]); connect(volChiWat.ports[2], loaCoo.port_a); connect(pipChiWat.port_b, pla.port_aChiWat); end AirToWaterReversibleHeatRecovery;

Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversiblePolyvalent Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversiblePolyvalent

Validation of AWHP plant template with reversible (2-pipe) and polyvalent (4-pipe) units

Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversiblePolyvalent

Information

This model extends Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversibleHeatRecovery and validates the AWHP plant template Buildings.Templates.Plants.HeatPumps.AirToWater in a configuration with two reversible (2-pipe) heat pumps with lead/lag alternation and one polyvalent (4-pipe) heat pump.

The modeling assumptions are reproduced from the parent validation model, except for the load profile, which is deliberately chosen to increase simultaneous heating and cooling loads, exercising the mode selection and staging logic for polyvalent heat pumps.

Simulating this model shows how the plant responds to a varying load by

Extends from Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversibleHeatRecovery (Validation of AWHP plant template with reversible heat pumps and heat recovery chiller).

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMain medium (common for CHW and HW)
PressureDifferencedpTer_nominal3E4Liquid pressure drop across terminal unit at design conditions [Pa]
PressureDifferencedpValve_nominaldpTer_nominalTerminal unit control valve pressure drop at design conditions [Pa]
Assumptions
BooleanallowFlowReversaltrue= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDescription
BusbusAirHanAHU control bus
BusbusPlaPlant control bus

Modelica definition

model AirToWaterReversiblePolyvalent "Validation of AWHP plant template with reversible (2-pipe) and polyvalent (4-pipe) units" extends Buildings.Templates.Plants.HeatPumps.Validation.AirToWaterReversibleHeatRecovery( redeclare replaceable Buildings.Templates.Plants.HeatPumps.Validation.UserProject.Data.AirToWaterReversiblePolyvalent datAll, pla( typ=Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversiblePolyvalent, nHp_select=2, nPhp_select=1, typDis_select1=Buildings.Templates.Plants.HeatPumps.Types.Distribution.Constant1Variable2, typPumPri_select=Buildings.Templates.Plants.HeatPumps.Types.PumpsPrimary.Constant, have_pumPriDedComHp_select=true, ctl(have_senTPriRet_select=true)), ratLoa( table=[ 0, 0, 0; 5, 0, 0; 7, 1, 0.2; 10, 0.5, 0.5; 14, 0, 0.6; 16, 0, 1; 18, 0, 0.6; 22, 0.1, 0.1; 24, 0, 0]) ); end AirToWaterReversiblePolyvalent;