Buildings.Fluid.HeatPumps.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.

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

Package Content

Name Description
Buildings.Fluid.HeatPumps.Examples.Carnot_TCon Carnot_TCon Test model for heat pump based on Carnot efficiency and condenser outlet temperature control signal
Buildings.Fluid.HeatPumps.Examples.Carnot_y Carnot_y Test model for heat pump based on Carnot efficiency
Buildings.Fluid.HeatPumps.Examples.EquationFitReversible EquationFitReversible Test model for reverse heat pump based on performance curves
Buildings.Fluid.HeatPumps.Examples.EquationFitReversible_CoolingClosedLoop EquationFitReversible_CoolingClosedLoop Test model for a closed loop of a reverse heat pump based on performance curves
Buildings.Fluid.HeatPumps.Examples.ScrollWaterToWater_OneRoomRadiator ScrollWaterToWater_OneRoomRadiator Heat pump with scroll compressor connected to a simple room model with radiator

Buildings.Fluid.HeatPumps.Examples.Carnot_TCon Buildings.Fluid.HeatPumps.Examples.Carnot_TCon

Test model for heat pump based on Carnot efficiency and condenser outlet temperature control signal

Buildings.Fluid.HeatPumps.Examples.Carnot_TCon

Information

Example that simulates a chiller whose efficiency is scaled based on the Carnot cycle. The chiller takes as an input the evaporator leaving water temperature. The condenser mass flow rate is computed in such a way that it has a temperature difference equal to dTEva_nominal.

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

Parameters

TypeNameDefaultDescription
TemperatureDifferencedTEva_nominal-5Temperature difference evaporator inlet-outlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
HeatFlowRateQCon_flow_nominal100E3Evaporator heat flow rate [W]
MassFlowRatem1_flow_nominalQCon_flow_nominal/dTCon_nomi...Nominal mass flow rate at condenser [kg/s]

Modelica definition

model Carnot_TCon "Test model for heat pump based on Carnot efficiency and condenser outlet temperature control signal" extends Modelica.Icons.Example; package Medium1 = Buildings.Media.Water "Medium model"; package Medium2 = Buildings.Media.Water "Medium model"; parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=-5 "Temperature difference evaporator inlet-outlet"; parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10 "Temperature difference condenser outlet-inlet"; parameter Modelica.Units.SI.HeatFlowRate QCon_flow_nominal=100E3 "Evaporator heat flow rate"; parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal=QCon_flow_nominal/ dTCon_nominal/4200 "Nominal mass flow rate at condenser"; Buildings.Fluid.HeatPumps.Carnot_TCon heaPum( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, m1_flow_nominal=m1_flow_nominal, show_T=true, allowFlowReversal1=false, allowFlowReversal2=false, use_eta_Carnot_nominal=true, etaCarnot_nominal=0.3, QCon_flow_nominal=QCon_flow_nominal, dp1_nominal=6000, dp2_nominal=6000) "Heat pump"; Buildings.Fluid.Sources.MassFlowSource_T sou1(nPorts=1, redeclare package Medium = Medium1, m_flow=m1_flow_nominal, T=293.15); Buildings.Fluid.Sources.MassFlowSource_T sou2(nPorts=1, redeclare package Medium = Medium2, use_T_in=false, use_m_flow_in=true, T=288.15); Modelica.Blocks.Sources.Ramp TConLvg( duration=60, startTime=1800, height=15, offset=273.15 + 35) "Control signal for condenser leaving temperature"; Modelica.Blocks.Math.Gain mEva_flow(k=-1/cp2_default/dTEva_nominal) "Evaporator mass flow rate"; Modelica.Blocks.Math.Add QEva_flow(k2=-1) "Evaporator heat flow rate"; Buildings.Fluid.Sources.Boundary_pT sin2( redeclare package Medium = Medium2, nPorts=1); Buildings.Fluid.Sources.Boundary_pT sin1( redeclare package Medium = Medium1, nPorts=1); final parameter Modelica.Units.SI.SpecificHeatCapacity cp2_default= Medium2.specificHeatCapacityCp(Medium2.setState_pTX( Medium2.p_default, Medium2.T_default, Medium2.X_default)) "Specific heat capacity of medium 2 at default medium state"; equation connect(sou1.ports[1], heaPum.port_a1); connect(sou2.ports[1], heaPum.port_a2); connect(QEva_flow.y,mEva_flow. u); connect(TConLvg.y, heaPum.TSet); connect(mEva_flow.y, sou2.m_flow_in); connect(QEva_flow.u1, heaPum.QCon_flow); connect(QEva_flow.u2, heaPum.P); connect(sin2.ports[1], heaPum.port_b2); connect(heaPum.port_b1, sin1.ports[1]); end Carnot_TCon;

Buildings.Fluid.HeatPumps.Examples.Carnot_y Buildings.Fluid.HeatPumps.Examples.Carnot_y

Test model for heat pump based on Carnot efficiency

Buildings.Fluid.HeatPumps.Examples.Carnot_y

Information

Example that simulates a heat pump whose efficiency is scaled based on the Carnot cycle. The control signal of the heat pump is the compressor speed.

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

Parameters

TypeNameDefaultDescription
RealCOP_nominal6Nominal COP
PowerP_nominal10E3Nominal compressor power (at y=1) [W]
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
MassFlowRatem2_flow_nominal-P_nominal*(COP_nominal - 1)...Nominal mass flow rate at chilled water side [kg/s]
MassFlowRatem1_flow_nominalP_nominal*COP_nominal/cp1_de...Nominal mass flow rate at condenser water wide [kg/s]

Modelica definition

model Carnot_y "Test model for heat pump based on Carnot efficiency" extends Modelica.Icons.Example; package Medium1 = Buildings.Media.Water "Medium model"; package Medium2 = Buildings.Media.Water "Medium model"; parameter Real COP_nominal = 6 "Nominal COP"; parameter Modelica.Units.SI.Power P_nominal=10E3 "Nominal compressor power (at y=1)"; parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=-10 "Temperature difference evaporator outlet-inlet"; parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10 "Temperature difference condenser outlet-inlet"; parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal=-P_nominal*( COP_nominal - 1)/cp2_default/dTEva_nominal "Nominal mass flow rate at chilled water side"; parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal=P_nominal* COP_nominal/cp1_default/dTCon_nominal "Nominal mass flow rate at condenser water wide"; Buildings.Fluid.HeatPumps.Carnot_y heaPum( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, P_nominal=P_nominal, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, dp1_nominal=6000, dp2_nominal=6000, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, show_T=true, use_eta_Carnot_nominal=false, COP_nominal=COP_nominal, TCon_nominal=303.15, TEva_nominal=278.15) "Heat pump model"; Buildings.Fluid.Sources.MassFlowSource_T sou1(nPorts=1, redeclare package Medium = Medium1, use_T_in=true, m_flow=m1_flow_nominal, T=298.15); Buildings.Fluid.Sources.MassFlowSource_T sou2(nPorts=1, redeclare package Medium = Medium2, use_T_in=true, m_flow=m2_flow_nominal, T=291.15); Buildings.Fluid.Sources.Boundary_pT sin1( nPorts=1, redeclare package Medium = Medium1); Buildings.Fluid.Sources.Boundary_pT sin2( nPorts=1, redeclare package Medium = Medium2); Modelica.Blocks.Sources.Ramp uCom( height=-1, duration=60, offset=1, startTime=1800) "Compressor control signal"; Modelica.Blocks.Sources.Ramp TCon_in( height=10, duration=60, offset=273.15 + 20, startTime=60) "Condenser inlet temperature"; Modelica.Blocks.Sources.Ramp TEva_in( height=10, duration=60, startTime=900, offset=273.15 + 15) "Evaporator inlet temperature"; final parameter Modelica.Units.SI.SpecificHeatCapacity cp1_default= Medium1.specificHeatCapacityCp(Medium1.setState_pTX( Medium1.p_default, Medium1.T_default, Medium1.X_default)) "Specific heat capacity of medium 2 at default medium state"; final parameter Modelica.Units.SI.SpecificHeatCapacity cp2_default= Medium2.specificHeatCapacityCp(Medium2.setState_pTX( Medium2.p_default, Medium2.T_default, Medium2.X_default)) "Specific heat capacity of medium 2 at default medium state"; equation connect(sou1.ports[1], heaPum.port_a1); connect(sou2.ports[1], heaPum.port_a2); connect(heaPum.port_b1, sin1.ports[1]); connect(sin2.ports[1], heaPum.port_b2); connect(TCon_in.y, sou1.T_in); connect(TEva_in.y, sou2.T_in); connect(uCom.y, heaPum.y); end Carnot_y;

Buildings.Fluid.HeatPumps.Examples.EquationFitReversible Buildings.Fluid.HeatPumps.Examples.EquationFitReversible

Test model for reverse heat pump based on performance curves

Buildings.Fluid.HeatPumps.Examples.EquationFitReversible

Information

Example that simulates the performance of Buildings.Fluid.HeatPumps.EquationFitReversible based on the equation fit method. The heat pump takes as an input the set point for the heating or the chilled leaving water temperature and an integer input to specify the heat pump operational mode.

Parameters

TypeNameDefaultDescription
Trane_Axiom_EXW240per Reverse heat pump performance data
MassFlowRatemSou_flow_nominalper.hea.mSou_flowSource heat exchanger nominal mass flow rate [kg/s]
MassFlowRatemLoa_flow_nominalper.hea.mLoa_flowLoad heat exchanger nominal mass flow rate [kg/s]

Modelica definition

model EquationFitReversible "Test model for reverse heat pump based on performance curves" package Medium = Buildings.Media.Water "Medium model"; parameter Data.EquationFitReversible.Trane_Axiom_EXW240 per "Reverse heat pump performance data"; parameter Modelica.Units.SI.MassFlowRate mSou_flow_nominal=per.hea.mSou_flow "Source heat exchanger nominal mass flow rate"; parameter Modelica.Units.SI.MassFlowRate mLoa_flow_nominal=per.hea.mLoa_flow "Load heat exchanger nominal mass flow rate"; Buildings.Fluid.HeatPumps.EquationFitReversible heaPum( redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T1_start=281.4, per=per) "Water to Water heat pump"; Modelica.Blocks.Math.RealToInteger reaToInt "Real to integer conversion"; Sources.MassFlowSource_T loaPum( redeclare package Medium = Medium, use_m_flow_in=false, m_flow=mLoa_flow_nominal, use_T_in=true, nPorts=1) "Load Side water pump"; Sources.MassFlowSource_T souPum( redeclare package Medium = Medium, m_flow=mSou_flow_nominal, nPorts=1, use_T_in=true) "Source side water pump"; Modelica.Fluid.Sources.FixedBoundary loaVol( redeclare package Medium = Medium, nPorts=1) "Volume for the load side"; Modelica.Fluid.Sources.FixedBoundary souVol( redeclare package Medium = Medium, nPorts=1) "Volume for source side"; Controls.OBC.CDL.Continuous.Sources.Ramp THeaLoaSet( height=5, duration(displayUnit="h") = 14400, offset=55 + 273.15) "Heating load side setpoint water temperature"; Controls.OBC.CDL.Continuous.Sources.Ramp TCooLoaSet( height=1, duration(displayUnit="h") = 14400, offset=6 + 273.15) "Cooling load setpoint water temperature"; Controls.OBC.CDL.Integers.GreaterThreshold intGreThr(t=-1) "Integer threshold"; Controls.OBC.CDL.Continuous.Switch swi "Switch for set point temperature"; Controls.OBC.CDL.Continuous.Sources.Ramp TSouEntCoo( height=5, duration(displayUnit="h") = 14400, offset=28 + 273.15) "Source side entering water temperature in cooling mode"; Modelica.Blocks.Sources.Ramp uMod( height=2, duration(displayUnit="h") = 14400, offset=-1) "Heat pump operates in heating mode"; Controls.OBC.CDL.Continuous.Switch swi1 "Switch for set point temperature"; Controls.OBC.CDL.Continuous.Switch swi2 "Switch for set point temperature"; Controls.OBC.CDL.Continuous.Sources.Ramp TSouEntHea( height=2, duration(displayUnit="h") = 14400, offset=12 + 273.15) "Source side entering water temperature in heating mode"; Controls.OBC.CDL.Continuous.Sources.Ramp TLoaEntHea( height=5, duration(displayUnit="h") = 14400, offset=50 + 273.15) "Load side entering water temperature in heating mode"; Controls.OBC.CDL.Continuous.Sources.Ramp TLoaEntCoo( height=5, duration(displayUnit="h") = 14400, offset=10 + 273.15) "Load side entering water temperature in cooling mode"; equation connect(souPum.ports[1], heaPum.port_a2); connect(heaPum.port_b1, loaVol.ports[1]); connect(heaPum.port_b2, souVol.ports[1]); connect(swi.u2,intGreThr. y); connect(intGreThr.u, reaToInt.y); connect(reaToInt.u, uMod.y); connect(swi2.u3, TSouEntCoo.y); connect(TSouEntHea.y, swi2.u1); connect(intGreThr.y, swi2.u2); connect(swi1.y, loaPum.T_in); connect(intGreThr.y, swi1.u2); connect(TLoaEntCoo.y, swi1.u3); connect(TLoaEntHea.y, swi1.u1); connect(swi.y, heaPum.TSet); connect(swi2.y, souPum.T_in); connect(loaPum.ports[1], heaPum.port_a1); connect(THeaLoaSet.y, swi.u1); connect(TCooLoaSet.y, swi.u3); connect(reaToInt.y, heaPum.uMod); end EquationFitReversible;

Buildings.Fluid.HeatPumps.Examples.EquationFitReversible_CoolingClosedLoop Buildings.Fluid.HeatPumps.Examples.EquationFitReversible_CoolingClosedLoop

Test model for a closed loop of a reverse heat pump based on performance curves

Buildings.Fluid.HeatPumps.Examples.EquationFitReversible_CoolingClosedLoop

Information

Example that simulates the performance of Buildings.Fluid.HeatPumps.EquationFitReversible based on the equation fit method. The heat pump takes as an input the set point for the chilled leaving water temperature and an integer input equals to -1 which corresponds to the cooling operational mode.

The heat pump is connected to a control volume to which heat is added and the pump moves the water to the heatpump where it is cooled to meet the corresponding set point water temperature.

Parameters

TypeNameDefaultDescription
Trane_Axiom_EXW240per Reversible heat pump performance data
MassFlowRatemSou_flow_nominalper.hea.mSou_flowSource heat exchanger nominal mass flow rate [kg/s]
MassFlowRatemLoa_flow_nominalper.hea.mLoa_flowLoad heat exchanger nominal mass flow rate [kg/s]

Modelica definition

model EquationFitReversible_CoolingClosedLoop "Test model for a closed loop of a reverse heat pump based on performance curves" package Medium = Buildings.Media.Water "Medium model"; parameter Data.EquationFitReversible.Trane_Axiom_EXW240 per "Reversible heat pump performance data"; parameter Modelica.Units.SI.MassFlowRate mSou_flow_nominal=per.hea.mSou_flow "Source heat exchanger nominal mass flow rate"; parameter Modelica.Units.SI.MassFlowRate mLoa_flow_nominal=per.hea.mLoa_flow "Load heat exchanger nominal mass flow rate"; Buildings.Fluid.HeatPumps.EquationFitReversible heaPum( redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, per=per, scaling_factor=1) "Reversible water to water heat pump"; Modelica.Blocks.Math.RealToInteger reaToInt "Real to integer conversion"; Sources.MassFlowSource_T souPum( redeclare package Medium = Medium, m_flow=mSou_flow_nominal, nPorts=1, use_T_in=true) "Source side water pump"; Modelica.Fluid.Sources.FixedBoundary souVol( redeclare package Medium = Medium, nPorts=1) "Volume for source side"; Controls.OBC.CDL.Continuous.Sources.Pulse uMod( amplitude=-1, width=0.7, period=200, offset=0) "heat pump operational mode input signal"; Controls.OBC.CDL.Continuous.Sources.Pulse pulse( amplitude=1, width=0.7, period(displayUnit="s") = 200, offset=0); Modelica.Blocks.Math.Gain Q_flow(k=4200) "Heat input to volume"; Modelica.Blocks.Math.Gain m_flow(k=mLoa_flow_nominal) "Pump mass flow rate"; HeatTransfer.Sources.PrescribedHeatFlow heaFlo "Prescribed heat flow rate"; Movers.FlowControlled_m_flow pum( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, m_flow_nominal=mLoa_flow_nominal, addPowerToMedium=false, nominalValuesDefineDefaultPressureCurve=true) "Chilled water pump"; MixingVolumes.MixingVolume vol( redeclare package Medium = Medium, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=285.15, m_flow_nominal=mLoa_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=0.1*3600*mLoa_flow_nominal/1000, nPorts=2) "Mixing volume mimics a room to be cooled"; Controls.OBC.CDL.Continuous.Sources.Pulse TSouEnt( amplitude=3, width=0.7, period=200, offset=25 + 273.15) "Source side entering water temperature"; Controls.OBC.CDL.Continuous.Sources.Pulse TLoaSet( y(final unit="K", displayUnit="degC"), amplitude=1, width=0.7, period=200, offset=6 + 273.15) "Set point chilled water temperature"; Sources.Boundary_pT pre( redeclare package Medium = Medium, nPorts=1) "Pressure source."; equation connect(souPum.ports[1], heaPum.port_a2); connect(uMod.y, reaToInt.u); connect(reaToInt.y, heaPum.uMod); connect(heaPum.port_b2, souVol.ports[1]); connect(pulse.y,m_flow. u); connect(m_flow.y,Q_flow. u); connect(heaFlo.port, vol.heatPort); connect(pum.port_a, vol.ports[1]); connect(vol.ports[2], heaPum.port_b1); connect(pum.port_b, heaPum.port_a1); connect(m_flow.y, pum.m_flow_in); connect(Q_flow.y, heaFlo.Q_flow); connect(souPum.T_in, TSouEnt.y); connect(TLoaSet.y, heaPum.TSet); connect(pum.port_a, pre.ports[1]); end EquationFitReversible_CoolingClosedLoop;

Buildings.Fluid.HeatPumps.Examples.ScrollWaterToWater_OneRoomRadiator Buildings.Fluid.HeatPumps.Examples.ScrollWaterToWater_OneRoomRadiator

Heat pump with scroll compressor connected to a simple room model with radiator

Buildings.Fluid.HeatPumps.Examples.ScrollWaterToWater_OneRoomRadiator

Information

Example that simulates one room equipped with a radiator. Hot water is produced by a 24 kW nominal capacity heat pump. The source side water temperature to the heat pump is constant at 10°C.

The heat pump is turned on when the room temperature falls below 19°C and turned off when the room temperature rises above 21°C.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumABuildings.Media.AirMedium model for air
replaceable package MediumWBuildings.Media.WaterMedium model for water
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]
MassFlowRatemHeaPum_flow_nominalQ_flow_nominal/4200/5Heat pump nominal mass flow rate [kg/s]
VolumeV6*10*3Room volume [m3]
MassFlowRatemA_flow_nominalV*1.2*6/3600Nominal mass flow rate [kg/s]
HeatFlowRateQRooInt_flow4000Internal heat gains of the room [W]

Connectors

TypeNameDescription
replaceable package MediumAMedium model for air
replaceable package MediumWMedium model for water
BusweaBusWeather data bus

Modelica definition

model ScrollWaterToWater_OneRoomRadiator "Heat pump with scroll compressor connected to a simple room model with radiator" extends Modelica.Icons.Example; replaceable package MediumA = Buildings.Media.Air "Medium model for air"; replaceable package MediumW = Buildings.Media.Water "Medium model for water"; parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=20000 "Nominal heat flow rate of radiator"; parameter Modelica.Units.SI.Temperature TRadSup_nominal=273.15 + 50 "Radiator nominal supply water temperature"; parameter Modelica.Units.SI.Temperature TRadRet_nominal=273.15 + 45 "Radiator nominal return water temperature"; parameter Modelica.Units.SI.MassFlowRate mHeaPum_flow_nominal=Q_flow_nominal/ 4200/5 "Heat pump nominal mass flow rate"; parameter Modelica.Units.SI.Volume V=6*10*3 "Room volume"; parameter Modelica.Units.SI.MassFlowRate mA_flow_nominal=V*1.2*6/3600 "Nominal mass flow rate"; parameter Modelica.Units.SI.HeatFlowRate QRooInt_flow=4000 "Internal heat gains of the room"; //------------------------------------------------------------------------------// Buildings.Fluid.MixingVolumes.MixingVolume vol( redeclare package Medium = MediumA, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, m_flow_nominal=mA_flow_nominal, V=V); Modelica.Thermal.HeatTransfer.Components.ThermalConductor theCon(G=20000/40) "Thermal conductance with the ambient"; Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHea "Prescribed heat flow"; Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heaCap(C=2*V*1.2*1006) "Heat capacity for furniture and walls"; Modelica.Blocks.Sources.CombiTimeTable timTab( extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments, table=[-6*3600, 0; 8*3600, QRooInt_flow; 18*3600, 0]) "Time table for internal heat gain"; Buildings.Fluid.HeatExchangers.Radiators.RadiatorEN442_2 rad( redeclare package Medium = MediumW, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, Q_flow_nominal=Q_flow_nominal, T_a_nominal=TRadSup_nominal, T_b_nominal=TRadRet_nominal, m_flow_nominal=mHeaPum_flow_nominal, T_start=TRadSup_nominal) "Radiator"; Buildings.Fluid.Sensors.TemperatureTwoPort temSup( redeclare package Medium = MediumW, m_flow_nominal=mHeaPum_flow_nominal, T_start=TRadSup_nominal) "Supply water temperature"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temRoo "Room temperature"; //----------------------------------------------------------------------------// Buildings.Fluid.Movers.FlowControlled_m_flow pumHeaPum( redeclare package Medium = MediumW, m_flow_nominal=mHeaPum_flow_nominal, m_flow_start=0.85, T_start=TRadSup_nominal, nominalValuesDefineDefaultPressureCurve=true, use_inputFilter=false, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Pump for radiator side"; //----------------------------------------------------------------------------// Buildings.Fluid.Sensors.TemperatureTwoPort temRet( redeclare package Medium = MediumW, m_flow_nominal=mHeaPum_flow_nominal, T_start=TRadSup_nominal) "Return water temperature"; //------------------------------------------------------------------------------------// Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam= Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos")) "Weather data reader"; Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"; Buildings.HeatTransfer.Sources.PrescribedTemperature TOut "Outside temperature"; //--------------------------------------------------------------------------------------// ScrollWaterToWater heaPum( redeclare package Medium1 = MediumW, redeclare package Medium2 = MediumW, redeclare package ref = Buildings.Media.Refrigerants.R410A, dp1_nominal=2000, dp2_nominal=2000, tau1=15, tau2=15, show_T=true, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, m1_flow_nominal=mHeaPum_flow_nominal, m2_flow_nominal=mHeaPum_flow_nominal, datHeaPum=Data.ScrollWaterToWater.Heating.Daikin_WRA072_24kW_4_30COP_R410A(), T1_start=TRadSup_nominal) "Heat pump"; Buildings.Fluid.Movers.FlowControlled_m_flow pumHeaPumSou( redeclare package Medium = MediumW, m_flow_start=0.85, m_flow_nominal=mHeaPum_flow_nominal, nominalValuesDefineDefaultPressureCurve=true, use_inputFilter=false, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Pump for heat pump source side"; Modelica.Blocks.Logical.Hysteresis hysteresis( uLow=273.15 + 19, uHigh=273.15 + 21) "Hysteresis controller"; Modelica.Blocks.Logical.Not not2 "Negate output of hysteresis"; Modelica.Blocks.Math.BooleanToReal booToReaPum(realTrue=1, y(start=0)) "Pump signal"; Modelica.Blocks.Logical.And and1; Modelica.Blocks.Logical.And and2; Modelica.Blocks.Math.BooleanToReal booToReaPum1( realTrue=1, y(start=0)) "Pump signal"; Modelica.Blocks.Logical.Hysteresis tesConHea( uHigh=0.25*mHeaPum_flow_nominal, uLow=0.20*mHeaPum_flow_nominal) "Test for flow rate of condenser pump"; Modelica.Blocks.Logical.Hysteresis tesEvaPum( uLow=0.20*mHeaPum_flow_nominal, uHigh=0.25*mHeaPum_flow_nominal) "Test for flow rate of evaporator pump"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = MediumW, T=281.15, nPorts=1) "Fluid source on source side"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = MediumW, T=283.15, nPorts=1) "Fluid sink on source side"; Buildings.Fluid.Sources.Boundary_pT preSou( redeclare package Medium = MediumW, T=TRadSup_nominal, nPorts=1) "Source for pressure and to account for thermal expansion of water"; equation connect(theCon.port_b, vol.heatPort); connect(preHea.port, vol.heatPort); connect(heaCap.port, vol.heatPort); connect(timTab.y[1], preHea.Q_flow); connect(temSup.port_b, rad.port_a); connect(temRoo.port, vol.heatPort); connect(rad.heatPortCon, vol.heatPort); connect(rad.heatPortRad, vol.heatPort); connect(weaDat.weaBus, weaBus); connect(weaBus.TDryBul, TOut.T); connect(TOut.port, theCon.port_a); connect(temRet.port_b, heaPum.port_a1); connect(pumHeaPumSou.port_b, heaPum.port_a2); connect(hysteresis.y, not2.u); connect(temRoo.T, hysteresis.u); connect(pumHeaPum.port_b, temSup.port_a); connect(temRet.port_a, rad.port_b); connect(booToReaPum1.y, heaPum.y); connect(tesConHea.y, and1.u1); connect(tesEvaPum.y, and1.u2); connect(heaPum.port_b1, pumHeaPum.port_a); connect(booToReaPum.y, pumHeaPum.m_flow_in); connect(booToReaPum.y, pumHeaPumSou.m_flow_in); connect(not2.y, and2.u1); connect(not2.y, booToReaPum.u); connect(sou.ports[1], pumHeaPumSou.port_a); connect(sin.ports[1], heaPum.port_b2); connect(pumHeaPum.m_flow_actual, tesConHea.u); connect(and1.y, and2.u2); connect(pumHeaPumSou.m_flow_actual, tesEvaPum.u); connect(and2.y, booToReaPum1.u); connect(preSou.ports[1], temRet.port_b); end ScrollWaterToWater_OneRoomRadiator;