Buildings.Fluid.HeatPumps.ModularReversible.Examples

Collection of models that illustrate model use and test models

Information

This package contains examples for the use of models that can be found in Buildings.Fluid.HeatPumps.ModularReversible.

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

Package Content

Name Description
Buildings.Fluid.HeatPumps.ModularReversible.Examples.AirToWater2D_OneRoomRadiator AirToWater2D_OneRoomRadiator Reversible heat pump with EN 2D data connected to a simple room model with radiator
Buildings.Fluid.HeatPumps.ModularReversible.Examples.CarnotWithLosses_OneRoomRadiator CarnotWithLosses_OneRoomRadiator Reversible heat pump with Carnot approach connected to a simple room model with radiator
Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator LargeScaleWaterToWater_OneRoomRadiator Large scale water to water heat pump connected to a simple room model with radiator
Buildings.Fluid.HeatPumps.ModularReversible.Examples.Modular_OneRoomRadiator Modular_OneRoomRadiator Modular reversible heat pump connected to a simple room model with radiator
Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses BaseClasses Bases package for examples

Buildings.Fluid.HeatPumps.ModularReversible.Examples.AirToWater2D_OneRoomRadiator Buildings.Fluid.HeatPumps.ModularReversible.Examples.AirToWater2D_OneRoomRadiator

Reversible heat pump with EN 2D data connected to a simple room model with radiator

Buildings.Fluid.HeatPumps.ModularReversible.Examples.AirToWater2D_OneRoomRadiator

Information

This example demonstrates how to use the Buildings.Fluid.HeatPumps.ModularReversible.AirToWaterTableData2D heat pump model. Please check the associated documentation for further information.

Please check the documentation of Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator for further information on the example.

Extends from Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator (Simple room model with radiator, without a heat pump), Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
replaceable package MediumAirAirMedium model for air
replaceable package MediumWatWaterMedium model for water
replaceable package MediumEvaWaterMedium model for evaporator-side fluid
HeatFlowRateQ_flow_nominal20000Nominal heat flow rate of radiator [W]
TemperatureTRadSup_nominal273.15 + 50Radiator nominal supply water temperature [K]
TemperatureTRadRet_nominal273.15 + 45Radiator nominal return water temperature [K]
MassFlowRatemCon_flow_nominalheaPum.mCon_flow_nominalHeat pump nominal mass flow rate in condenser [kg/s]
MassFlowRatemEva_flow_nominalheaPum.mEva_flow_nominalHeat pump nominal mass flow rate in evaporator [kg/s]
VolumeV6*10*3Room volume [m3]
MassFlowRatemAirRoo_flow_nominalV*1.2*6/3600Nominal mass flow rate of room air [kg/s]
HeatFlowRateQRooInt_flowQ_flow_nominal/5Internal heat gains of the room [W]
BooleanwitCootrue=true to simulate cooling behaviour

Connectors

TypeNameDescription
replaceable package MediumEvaMedium model for evaporator-side fluid
BusweaBusWeather data bus

Modelica definition

model AirToWater2D_OneRoomRadiator "Reversible heat pump with EN 2D data connected to a simple room model with radiator" extends Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator ( redeclare package MediumEva = MediumAir, mEva_flow_nominal=heaPum.mEva_flow_nominal, mCon_flow_nominal=heaPum.mCon_flow_nominal, sin(nPorts=1), booToReaPumEva(realTrue=heaPum.mEva_flow_nominal), pumHeaPumSou( dp_nominal=heaPum.dpEva_nominal), sou(use_T_in=true), pumHeaPum(dp_nominal=heaPum.dpCon_nominal)); Buildings.Fluid.HeatPumps.ModularReversible.AirToWaterTableData2D heaPum( redeclare package MediumCon = MediumWat, redeclare package MediumEva = MediumEva, TCon_start=TRadSup_nominal, QHea_flow_nominal=Q_flow_nominal, use_intSafCtr=true, dpCon_nominal(displayUnit="Pa") = 2000, dpEva_nominal(displayUnit="Pa") = 200, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, TConHea_nominal=rad.TRad_nominal, TEvaHea_nominal=283.15, TConCoo_nominal=oneRooRadHeaPumCtr.TRadMinSup, TEvaCoo_nominal=303.15, redeclare Buildings.Fluid.HeatPumps.ModularReversible.Data.TableData2D.EN14511.Vitocal251A08 datTabHea, redeclare Buildings.Fluid.Chillers.ModularReversible.Data.TableData2D.EN14511.Vitocal251A08 datTabCoo, redeclare Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021 safCtrPar( use_minOnTime=true, minOnTime=300, use_minOffTime=true, minOffTime=300, use_maxCycRat=true)) "Reversible heat pump based on 2D table data"; extends Modelica.Icons.Example; Modelica.Blocks.Sources.Pulse TAirSouSte( amplitude=20, width=10, period=86400, offset=283.15, startTime=86400/2) if witCoo "Air source temperature step for cooling phase"; equation connect(heaPum.port_b2, sin.ports[1]); connect(heaPum.port_a2, pumHeaPumSou.port_b); connect(heaPum.port_b1, pumHeaPum.port_a); connect(heaPum.port_a1, temRet.port_b); connect(oneRooRadHeaPumCtr.ySet, heaPum.ySet); connect(heaPum.hea, oneRooRadHeaPumCtr.hea); connect(TAirSouSte.y, sou.T_in); end AirToWater2D_OneRoomRadiator;

Buildings.Fluid.HeatPumps.ModularReversible.Examples.CarnotWithLosses_OneRoomRadiator Buildings.Fluid.HeatPumps.ModularReversible.Examples.CarnotWithLosses_OneRoomRadiator

Reversible heat pump with Carnot approach connected to a simple room model with radiator

Buildings.Fluid.HeatPumps.ModularReversible.Examples.CarnotWithLosses_OneRoomRadiator

Information

This example demonstrates how to use the Buildings.Fluid.HeatPumps.ModularReversible.CarnotWithLosses heat pump model. Please check the associated documentation for further information.

Please check the documentation of Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator for further information on the example.

Extends from Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator (Simple room model with radiator, without a heat pump), Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
replaceable package MediumAirAirMedium model for air
replaceable package MediumWatWaterMedium model for water
replaceable package MediumEvaWaterMedium model for evaporator-side fluid
HeatFlowRateQ_flow_nominal20000Nominal heat flow rate of radiator [W]
TemperatureTRadSup_nominal273.15 + 50Radiator nominal supply water temperature [K]
TemperatureTRadRet_nominal273.15 + 45Radiator nominal return water temperature [K]
MassFlowRatemCon_flow_nominalheaPum.mCon_flow_nominalHeat pump nominal mass flow rate in condenser [kg/s]
MassFlowRatemEva_flow_nominalheaPum.mEva_flow_nominalHeat pump nominal mass flow rate in evaporator [kg/s]
VolumeV6*10*3Room volume [m3]
MassFlowRatemAirRoo_flow_nominalV*1.2*6/3600Nominal mass flow rate of room air [kg/s]
HeatFlowRateQRooInt_flowQ_flow_nominal/5Internal heat gains of the room [W]
BooleanwitCootrue=true to simulate cooling behaviour
RealperHeaLos0.01Percentage of heat losses in the heat exchangers to the nominal heating output

Connectors

TypeNameDescription
BusweaBusWeather data bus

Modelica definition

model CarnotWithLosses_OneRoomRadiator "Reversible heat pump with Carnot approach connected to a simple room model with radiator" extends Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator( mEva_flow_nominal=heaPum.mEva_flow_nominal, mCon_flow_nominal=heaPum.mCon_flow_nominal, sin(nPorts=1), booToReaPumEva(realTrue=heaPum.mEva_flow_nominal), pumHeaPumSou(dp_nominal=heaPum.dpEva_nominal), pumHeaPum(dp_nominal=heaPum.dpCon_nominal)); extends Modelica.Icons.Example; parameter Real perHeaLos=0.01 "Percentage of heat losses in the heat exchangers to the nominal heating output"; Buildings.Fluid.HeatPumps.ModularReversible.CarnotWithLosses heaPum( redeclare package MediumCon = MediumWat, redeclare package MediumEva = MediumEva, QHea_flow_nominal=Q_flow_nominal, use_rev=true, use_intSafCtr=true, TConHea_nominal=TRadSup_nominal, dTCon_nominal=TRadSup_nominal - TRadRet_nominal, dpCon_nominal(displayUnit="Pa") = 2000, CCon=5000, GConOut=perHeaLos*Q_flow_nominal/(TRadSup_nominal - temAmbBas.k), GConIns=20000, TEvaHea_nominal=sou.T, dTEva_nominal=5, dpEva_nominal(displayUnit="Pa") = 2000, CEva=5000, GEvaOut=perHeaLos*Q_flow_nominal/(temAmbBas.k - sou.T), GEvaIns=20000, TConCoo_nominal=oneRooRadHeaPumCtr.TRadMinSup, TEvaCoo_nominal=sou.T + 10, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, redeclare Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021 safCtrPar, etaCarnot_nominal=0.4) "Reversible heat pump with losses and Carnot approach"; Modelica.Blocks.Sources.Constant temAmbBas(final k( final unit="K", displayUnit="degC") = 291.15) "Ambient temperature in basement of building"; equation connect(heaPum.port_b2, sin.ports[1]); connect(heaPum.port_a2, pumHeaPumSou.port_b); connect(heaPum.port_b1, pumHeaPum.port_a); connect(heaPum.port_a1, temRet.port_b); connect(temAmbBas.y, heaPum.TEvaAmb); connect(temAmbBas.y, heaPum.TConAmb); connect(oneRooRadHeaPumCtr.hea, heaPum.hea); connect(oneRooRadHeaPumCtr.ySet, heaPum.ySet); end CarnotWithLosses_OneRoomRadiator;

Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator

Large scale water to water heat pump connected to a simple room model with radiator

Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator

Information

This example demonstrates how to use the Buildings.Fluid.HeatPumps.ModularReversible.LargeScaleWaterToWater heat pump model. Please check the associated documentation for further information.

Contrary to the other models, parameters for heat exchanger inertia (tau) and mass flow rates are calculated automatically based on the heat demand.

Furthermore, this example demonstrates the warnings which are raised if two devices are combined with different sizes, leading to different scaling factors for heating and cooling operation. If the default QCoo_flow_nominal is used (leading to the same scaling factors), the mass flow rates will differ. Setting the parameter allowDifferentDeviceIdentifiers to false, an additional warning is raised, indicating that the table data for cooling and heating operation do not originate from the same real device.

Please check the documentation of Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator for further information on the example.

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator (Simple room model with radiator, without a heat pump).

Parameters

TypeNameDefaultDescription
replaceable package MediumAirAirMedium model for air
replaceable package MediumWatWaterMedium model for water
replaceable package MediumEvaWaterMedium model for evaporator-side fluid
HeatFlowRateQ_flow_nominal200000Nominal heat flow rate of radiator [W]
TemperatureTRadSup_nominal273.15 + 50Radiator nominal supply water temperature [K]
TemperatureTRadRet_nominal273.15 + 45Radiator nominal return water temperature [K]
MassFlowRatemCon_flow_nominalheaPum.mCon_flow_nominalHeat pump nominal mass flow rate in condenser [kg/s]
MassFlowRatemEva_flow_nominalheaPum.mEva_flow_nominalHeat pump nominal mass flow rate in evaporator [kg/s]
VolumeV6*100*3Room volume [m3]
MassFlowRatemAirRoo_flow_nominalV*1.2*6/3600*10Nominal mass flow rate of room air [kg/s]
HeatFlowRateQRooInt_flowQ_flow_nominal/5Internal heat gains of the room [W]
BooleanwitCootrue=true to simulate cooling behaviour

Connectors

TypeNameDescription
BusweaBusWeather data bus

Modelica definition

model LargeScaleWaterToWater_OneRoomRadiator "Large scale water to water heat pump connected to a simple room model with radiator" extends Modelica.Icons.Example; extends Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator( mEva_flow_nominal=heaPum.mEva_flow_nominal, mCon_flow_nominal=heaPum.mCon_flow_nominal, V=6*100*3, witCoo=true, mAirRoo_flow_nominal=V*1.2*6/3600*10, Q_flow_nominal=200000, sin(nPorts=1), booToReaPumEva(realTrue=heaPum.mEva_flow_nominal), pumHeaPumSou(dp_nominal=150000), pumHeaPum(dp_nominal=150000), sou(use_T_in=true)); Buildings.Fluid.HeatPumps.ModularReversible.LargeScaleWaterToWater heaPum( allowDifferentDeviceIdentifiers=true, QHea_flow_nominal=Q_flow_nominal, use_intSafCtr=true, QCoo_flow_nominal=-Q_flow_nominal/2, TConHea_nominal=TRadSup_nominal, dpCon_nominal(displayUnit="Pa"), TEvaHea_nominal=sou.T, dpEva_nominal(displayUnit="Pa"), energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, redeclare Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021 safCtrPar, TConCoo_nominal=oneRooRadHeaPumCtr.TRadMinSup, TEvaCoo_nominal=sou.T + 30, redeclare Buildings.Fluid.HeatPumps.ModularReversible.Data.TableData2D.EN14511.WAMAK_WaterToWater_220kW datTabHea, redeclare Buildings.Fluid.Chillers.ModularReversible.Data.TableData2D.EN14511.Carrier30XWP1012_1MW datTabCoo) "Large scale water to water heat pump"; Modelica.Blocks.Sources.Pulse TAirSouSte( amplitude=20, width=10, period=86400, offset=283.15, startTime=86400/2) if witCoo "Air source temperature step for cooling phase"; equation connect(heaPum.port_b2, sin.ports[1]); connect(heaPum.port_a2, pumHeaPumSou.port_b); connect(heaPum.port_b1, pumHeaPum.port_a); connect(heaPum.port_a1, temRet.port_b); connect(oneRooRadHeaPumCtr.ySet, heaPum.ySet); connect(oneRooRadHeaPumCtr.hea, heaPum.hea); connect(TAirSouSte.y, sou.T_in); end LargeScaleWaterToWater_OneRoomRadiator;

Buildings.Fluid.HeatPumps.ModularReversible.Examples.Modular_OneRoomRadiator Buildings.Fluid.HeatPumps.ModularReversible.Examples.Modular_OneRoomRadiator

Modular reversible heat pump connected to a simple room model with radiator

Buildings.Fluid.HeatPumps.ModularReversible.Examples.Modular_OneRoomRadiator

Information

This example demonstrates how to use the Buildings.Fluid.HeatPumps.ModularReversible.Modular heat pump model directly. Please check the associated documentation for further information.

Correct replacement of the replaceable submodels and, thus, flexible aggregation to a new model approach is demonstrated.

Please check the documentation of Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator for further information on the example.

Extends from Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator (Simple room model with radiator, without a heat pump), Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
replaceable package MediumAirAirMedium model for air
replaceable package MediumWatWaterMedium model for water
replaceable package MediumEvaWaterMedium model for evaporator-side fluid
HeatFlowRateQ_flow_nominal20000Nominal heat flow rate of radiator [W]
TemperatureTRadSup_nominal273.15 + 50Radiator nominal supply water temperature [K]
TemperatureTRadRet_nominal273.15 + 45Radiator nominal return water temperature [K]
MassFlowRatemCon_flow_nominalQ_flow_nominal/4200/5Heat pump nominal mass flow rate in condenser [kg/s]
MassFlowRatemEva_flow_nominalheaPum.mEva_flow_nominalHeat pump nominal mass flow rate in evaporator [kg/s]
VolumeV6*10*3Room volume [m3]
MassFlowRatemAirRoo_flow_nominalV*1.2*6/3600Nominal mass flow rate of room air [kg/s]
HeatFlowRateQRooInt_flowQ_flow_nominal/5Internal heat gains of the room [W]
BooleanwitCootrue=true to simulate cooling behaviour

Connectors

TypeNameDescription
replaceable package MediumEvaMedium model for evaporator-side fluid
BusweaBusWeather data bus

Modelica definition

model Modular_OneRoomRadiator "Modular reversible heat pump connected to a simple room model with radiator" extends Buildings.Fluid.HeatPumps.ModularReversible.Examples.BaseClasses.PartialOneRoomRadiator ( redeclare package MediumEva = MediumAir, mEva_flow_nominal=heaPum.mEva_flow_nominal, sin(nPorts=1), pumHeaPumSou( dp_nominal=heaPum.dpEva_nominal), booToReaPumEva(realTrue=heaPum.mEva_flow_nominal), pumHeaPum(dp_nominal=heaPum.dpCon_nominal)); extends Modelica.Icons.Example; Buildings.Fluid.HeatPumps.ModularReversible.Modular heaPum( redeclare package MediumCon = MediumWat, redeclare package MediumEva = MediumAir, use_rev=true, allowDifferentDeviceIdentifiers=true, QHea_flow_nominal=Q_flow_nominal, redeclare model RefrigerantCycleInertia = Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.Inertias.NoInertia, use_intSafCtr=true, TConHea_nominal=TRadSup_nominal, TConCoo_nominal=oneRooRadHeaPumCtr.TRadMinSup, dTCon_nominal=TRadSup_nominal - TRadRet_nominal, dpCon_nominal(displayUnit="Pa") = 2000, use_conCap=true, CCon=3000, GConOut=100, GConIns=1000, TEvaHea_nominal=sou.T, TEvaCoo_nominal=sou.T, dTEva_nominal=2, dpEva_nominal(displayUnit="Pa") = 200, use_evaCap=false, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, redeclare model RefrigerantCycleHeatPumpHeating = Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.ConstantCarnotEffectiveness( redeclare Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.Frosting.NoFrosting iceFacCal, TAppCon_nominal=0, TAppEva_nominal=0), redeclare model RefrigerantCycleHeatPumpCooling = Buildings.Fluid.Chillers.ModularReversible.RefrigerantCycle.TableData2D( redeclare Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.Frosting.NoFrosting iceFacCal, mCon_flow_nominal=heaPum.mCon_flow_nominal, mEva_flow_nominal=heaPum.mEva_flow_nominal, datTab=Buildings.Fluid.Chillers.ModularReversible.Data.TableData2D.EN14511.Vitocal251A08()), redeclare Buildings.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021 safCtrPar( use_TConOutHea=true, use_TEvaOutHea=false, use_antFre=true, TAntFre=275.15), QCoo_flow_nominal=-Q_flow_nominal*0.5) "Modular reversible heat pump"; Modelica.Blocks.Sources.Constant temAmbBas( final k( final unit="K", displayUnit="degC") = 291.15) "Ambient temperature in basement of building"; equation connect(heaPum.port_b2, sin.ports[1]); connect(heaPum.port_a2, pumHeaPumSou.port_b); connect(heaPum.port_b1, pumHeaPum.port_a); connect(heaPum.port_a1, temRet.port_b); connect(temAmbBas.y, heaPum.TConAmb); connect(heaPum.hea, oneRooRadHeaPumCtr.hea); connect(oneRooRadHeaPumCtr.ySet, heaPum.ySet); end Modular_OneRoomRadiator;