Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation

Collection of validation models

Information

This package contains validation models for the classes in Buildings.Fluid.HeatExchangers.DXCoils.

Note that most validation models contain simple input data which may not be realistic, but for which the correct output can be obtained through an analytic solution. The examples plot various outputs, which have been verified against these solutions. These model outputs are stored as reference data and used for continuous validation whenever models in the library change.

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

Package Content

Name Description
Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation.VariableSpeedEnergyPlus VariableSpeedEnergyPlus Validation model for variable speed DX coil
Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation.VariableSpeedEnergyPlusPartLoad VariableSpeedEnergyPlusPartLoad Validation model for variable speed DX coil under part load condition

Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation.VariableSpeedEnergyPlus Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation.VariableSpeedEnergyPlus

Validation model for variable speed DX coil

Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation.VariableSpeedEnergyPlus

Information

This model validates the model Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.VariableSpeed.

The difference in results of TOut and XOut at the beginning and end of the simulation is because the mass flow rate is zero. For zero mass flow rate, EnergyPlus assumes steady state condition, whereas the Modelica model is a dynamic model and hence the properties at the outlet are equal to the state variables of the model.

The EnergyPlus results were generated using the example file ZoneVSWSHP_wDOAS.idf from EnergyPlus 7.1, with a nominal cooling capacity of 6758 Watts instead of autosizing and an internal gain from electric equipment as 9400 Watts. This allowed to have a speed ratio of one.

Note that EnergyPlus mass fractions (X) are in mass of water vapor per mass of dry air, whereas Modelica uses the total mass as a reference. Hence, the EnergyPlus values are corrected by dividing them by 1+X.

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

Parameters

TypeNameDefaultDescription
PowerQ_flow_nominaldatCoi.sta[1].nomVal.Q_flow_...Nominal power [W]
MassFlowRatem_flow_nominaldatCoi.sta[1].nomVal.m_flow_...Nominal mass flow rate [kg/s]
PressureDifferencedpEva_nominal1000Pressure drop at m_flow_nominal [Pa]
PressureDifferencedpCon_nominal40000Pressure drop at mCon_flow_nominal [Pa]

Modelica definition

model VariableSpeedEnergyPlus "Validation model for variable speed DX coil " extends Modelica.Icons.Example; package MediumAir = Buildings.Media.Air; package MediumWater = Buildings.Media.Water; parameter Modelica.SIunits.Power Q_flow_nominal = datCoi.sta[1].nomVal.Q_flow_nominal "Nominal power"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal = datCoi.sta[1].nomVal.m_flow_nominal "Nominal mass flow rate"; parameter Modelica.SIunits.PressureDifference dpEva_nominal = 1000 "Pressure drop at m_flow_nominal"; parameter Modelica.SIunits.PressureDifference dpCon_nominal = 40000 "Pressure drop at mCon_flow_nominal"; VariableSpeed varSpeDX( redeclare package MediumEva = MediumAir, redeclare package MediumCon = MediumWater, datCoi=datCoi, dpEva_nominal=dpEva_nominal, dpCon_nominal=dpCon_nominal, minSpeRat=0.05, TEva_start=datCoi.sta[1].nomVal.TEvaIn_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Variable speed DX coil"; Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.DXCoil datCoi( nSta=10,minSpeRat=0.1, sta={Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-1524.1,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.16648632,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=1000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-1877.9,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.1849848,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=1500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-2226.6,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.20348328,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=2000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-2911.3,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.24048024,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=2500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-3581.7,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.2774772,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=3000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-4239.5,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.31447416,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=3500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-4885.7,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.35147112,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=4000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-5520.7,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.38846808,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=4500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-6144.8,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.42546504,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=5000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-6758,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.462462,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I())}) "Coil data"; Modelica.Blocks.Sources.TimeTable speRat(table=[0,0; 3600,0; 3600,0; 7200,0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600,0; 25200,0; 25200,1; 28800,1; 28800,1; 32400,1; 32400,1; 36000,1; 36000,1; 39600,1; 39600,1; 43200,1; 43200,1; 46800,1; 46800,1; 50400,1; 50400,1; 54000,1; 54000,1; 57600,1; 57600,1; 61200,1; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000,0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "EnergyPlus speed ratio for this model"; Modelica.Blocks.Sources.TimeTable TCIn(table=[0,14.00192912; 3600,14.00192912; 3600,14.00192912; 7200,14.00192912; 7200,14.00192912; 10800,14.00192912; 10800,14.00192912; 14400,14.00192912; 14400,14.00192912; 18000,14.00192912; 18000,14.00192912; 21600,14.00192912; 21600,14.00192912; 25200,14.00192912; 25200,13.87116782; 28800,13.87116782; 28800,13.68940516; 32400,13.68940516; 32400,13.61181349; 36000,13.61181349; 36000,13.56830163; 39600,13.56830163; 39600,13.53753354; 43200,13.53753354; 43200,13.53223224; 46800,13.53223224; 46800,13.544731; 50400,13.544731; 50400,13.56823102; 54000,13.56823102; 54000,13.59838157; 57600,13.59838157; 57600,13.63238101; 61200,13.63238101; 61200,13.66852976; 64800,13.66852976; 64800,13.66852976; 68400,13.66852976; 68400,13.66852976; 72000,13.66852976; 72000,13.66852976; 75600,13.66852976; 75600,13.66852976; 79200,13.66852976; 79200,13.66852976; 82800,13.66852976; 82800,13.66852976; 86400,13.66852976]) "Condenser inlet temperature"; Modelica.Blocks.Sources.TimeTable TEvaIn(table=[0,29.12922216; 3600,29.12922216; 3600,29.05566774; 7200,29.05566774; 7200,28.96128616; 10800,28.96128616; 10800,28.85494074; 14400,28.85494074; 14400,28.74236486; 18000,28.74236486; 18000,28.63355658; 21600,28.63355658; 21600,28.65392227; 25200,28.65392227; 25200,25.92690623; 28800,25.92690623; 28800,24.32658509; 32400,24.32658509; 32400,24.00495885; 36000,24.00495885; 36000,23.4817184; 39600,23.4817184; 39600,23.50449436; 43200,23.50449436; 43200,23.48876996; 46800,23.48876996; 46800,23.52144673; 50400,23.52144673; 50400,23.61388018; 54000,23.61388018; 54000,23.64607195; 57600,23.64607195; 57600,23.58143828; 61200,23.58143828; 61200,26.68408826; 64800,26.68408826; 64800,27.85802964; 68400,27.85802964; 68400,28.17092771; 72000,28.17092771; 72000,28.78657683; 75600,28.78657683; 75600,29.10487544; 79200,29.10487544; 79200,29.21730921; 82800,29.21730921; 82800,29.18512017; 86400,29.18512017]) "Coil inlet temperature"; Modelica.Blocks.Sources.TimeTable XEvaIn(table=[0,0.00531; 3600,0.00531; 3600, 0.0053; 7200,0.0053; 7200,0.00529; 10800,0.00529; 10800,0.00529; 14400,0.00529; 14400,0.00528; 18000,0.00528; 18000,0.00527; 21600,0.00527; 21600,0.00527; 25200,0.00527; 25200,0.00531; 28800,0.00531; 28800,0.00537; 32400,0.00537; 32400,0.00539; 36000,0.00539; 36000,0.00542; 39600,0.00542; 39600,0.00541; 43200,0.00541; 43200,0.0054; 46800,0.0054; 46800,0.00534; 50400,0.00534; 50400,0.00534; 54000,0.00534; 54000,0.00536; 57600,0.00536; 57600,0.00538; 61200,0.00538; 61200,0.00533; 64800,0.00533; 64800,0.00532; 68400,0.00532; 68400,0.00532; 72000,0.00532; 72000,0.00532; 75600,0.00532; 75600,0.00531; 79200,0.00531; 79200,0.00531; 82800,0.00531; 82800,0.0053; 86400,0.0053]) "Water fraction of moist air"; Modelica.Blocks.Routing.Multiplex2 mux "Converts in an array"; Buildings.Utilities.IO.BCVTB.From_degC TCIn_K "Converts degC to K"; Buildings.Utilities.IO.BCVTB.From_degC TEvaIn_K "Converts degC to K"; Modelica.Blocks.Math.Mean TOutMea(f=1/3600); Buildings.Utilities.IO.BCVTB.To_degC TOutDegC; Modelica.Blocks.Sources.RealExpression TOut(y=varSpeDX.eva.vol.T); Modelica.Blocks.Math.Mean XEvaOutMea(f=1/3600); Modelica.Blocks.Sources.RealExpression XEvaOut(y=sum(varSpeDX.eva.vol.Xi)); Modelica.Blocks.Math.Mean Q_flowMea(f=1/3600) "Mean of cooling rate"; Modelica.Blocks.Math.Mean Q_flowSenMea(f=1/3600) "Mean of sensible cooling rate"; Modelica.Blocks.Math.Mean PMea(f=1/3600) "Mean of power"; Modelica.Blocks.Math.Add add(k1=-1); Modelica.Blocks.Sources.Constant XEvaInMoiAir(k=1.0) "Moist air fraction = 1"; Modelica.Blocks.Sources.TimeTable TOutEPlu(table=[0,29.12922216; 3600,29.12922216; 3600,29.05566774; 7200,29.05566774; 7200,28.96128616; 10800,28.96128616; 10800,28.85494074; 14400,28.85494074; 14400,28.74236486; 18000,28.74236486; 18000,28.63355658; 21600,28.63355658; 21600,28.65392227; 25200,28.65392227; 25200,9.511780529; 28800,9.511780529; 28800,8.096740784; 32400,8.096740784; 32400,7.757702268; 36000,7.757702268; 36000,7.493011832; 39600,7.493011832; 39600,7.487562491; 43200,7.487562491; 43200,7.469723021; 46800,7.469723021; 46800,7.42876332; 50400,7.42876332; 50400,7.475557577; 54000,7.475557577; 54000,7.520585945; 57600,7.520585945; 57600,7.513057428; 61200,7.513057428; 61200,26.68408826; 64800,26.68408826; 64800,27.85802964; 68400,27.85802964; 68400,28.17092771; 72000,28.17092771; 72000,28.78657683; 75600,28.78657683; 75600,29.10487544; 79200,29.10487544; 79200,29.21730921; 82800,29.21730921; 82800,29.18512017; 86400,29.18512017]) "EnergyPlus result: outlet temperature"; Modelica.Blocks.Sources.TimeTable Q_flowEPlu(table=[0,-1e-07; 3600,-1e-07; 3600, -1e-07; 7200,-1e-07; 7200,-1e-07; 10800,-1e-07; 10800,-1e-07; 14400,-1e-07; 14400,-1e-07; 18000,-1e-07; 18000,-1e-07; 21600,-1e-07; 21600,-1e-07; 25200, -1e-07; 25200,-7101.486157; 28800,-7101.486157; 28800,-7065.001284; 32400, -7065.001284; 32400,-7062.147282; 36000,-7062.147282; 36000,-7059.359628; 39600,-7059.359628; 39600,-7061.127967; 43200,-7061.127967; 43200,-7061.045112; 46800,-7061.045112; 46800,-7058.99449; 50400,-7058.99449; 50400,-7058.349457; 54000,-7058.349457; 54000,-7057.487529; 57600,-7057.487529; 57600,-7055.318157; 61200,-7055.318157; 61200,-1e-07; 64800,-1e-07; 64800,-1e-07; 68400,-1e-07; 68400,-1e-07; 72000,-1e-07; 72000,-1e-07; 75600,-1e-07; 75600,-1e-07; 79200, -1e-07; 79200,-1e-07; 82800,-1e-07; 82800,-1e-07; 86400,-1e-07]) "EnergyPlus result: heat flow"; Modelica.Blocks.Sources.TimeTable Q_flowSenEPlu(table=[0,0; 3600,0; 3600,0; 7200, 0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600,0; 25200,0; 25200,-7101.486157; 28800,-7101.486157; 28800,-7022.028225; 32400,-7022.028225; 32400,-7029.813507; 36000,-7029.813507; 36000,-6918.432248; 39600,-6918.432248; 39600,-6930.451185; 43200,-6930.451185; 43200,-6931.267635; 46800,-6931.267635; 46800,-6962.40406; 50400,-6962.40406; 50400,-6982.045473; 54000,-6982.045473; 54000,-6976.779585; 57600,-6976.779585; 57600,-6952.399564; 61200,-6952.399564; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000,0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "EnergyPlus result: sensible heat flow "; Modelica.Blocks.Math.Division shrEPlu "EnergyPlus result: SHR"; Modelica.Blocks.Sources.TimeTable XEvaOutEPlu(table=[0,0.00531; 3600,0.00531; 3600,0.0053; 7200,0.0053; 7200,0.00529; 10800,0.00529; 10800,0.00529; 14400, 0.00529; 14400,0.00528; 18000,0.00528; 18000,0.00527; 21600,0.00527; 21600, 0.00527; 25200,0.00527; 25200,0.00531; 28800,0.00531; 28800,0.00533; 32400, 0.00533; 32400,0.00536; 36000,0.00536; 36000,0.00529; 39600,0.00529; 39600, 0.00529; 43200,0.00529; 43200,0.00528; 46800,0.00528; 46800,0.00525; 50400, 0.00525; 50400,0.00527; 54000,0.00527; 54000,0.00528; 57600,0.00528; 57600, 0.00529; 61200,0.00529; 61200,0.00533; 64800,0.00533; 64800,0.00532; 68400, 0.00532; 68400,0.00532; 72000,0.00532; 72000,0.00532; 75600,0.00532; 75600, 0.00531; 79200,0.00531; 79200,0.00531; 82800,0.00531; 82800,0.0053; 86400, 0.0053]) "EnergyPlus result: outlet water mass fraction"; Modelica.Blocks.Sources.TimeTable PEPlu(table=[0,0; 3600,0; 3600,0; 7200,0; 7200, 0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600, 0; 25200,0; 25200,1230.619384; 28800,1230.619384; 28800,1217.250881; 32400, 1217.250881; 32400,1213.815124; 36000,1213.815124; 36000,1210.9557; 39600, 1210.9557; 39600,1210.19962; 43200,1210.19962; 43200,1209.925786; 46800, 1209.925786; 46800,1209.728055; 50400,1209.728055; 50400,1210.57757; 54000, 1210.57757; 54000,1211.642811; 57600,1211.642811; 57600,1212.400701; 61200, 1212.400701; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000, 0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "EnergyPlus result: electric power"; Modelica.Blocks.Sources.RealExpression XEvaInMod(y=XEvaIn.y/(1 + XEvaIn.y)) "Modified XEvaIn"; Modelica.Blocks.Sources.RealExpression XEvaOutEPluMod(y=XEvaOutEPlu.y/(1 + XEvaOutEPlu.y)) "Modified XEvaOut of energyPlus to comapre with the model results"; Modelica.Blocks.Math.Add QCoo_flow "Total cooling heat flow rate"; Sources.MassFlowSource_T souAir( redeclare package Medium = MediumAir, use_T_in=true, nPorts=1, m_flow=1.5, use_m_flow_in=true, use_X_in=true, T=299.85) "Source on air side"; Sources.Boundary_pT sinAir( redeclare package Medium = MediumAir, nPorts=1, p(displayUnit="Pa")) "Sink on air side"; Sources.Boundary_pT sinWat( redeclare package Medium = MediumWater, nPorts=1, p(displayUnit="Pa")) "Sink on water side"; Sources.MassFlowSource_T souWat( redeclare package Medium = MediumWater, nPorts=1, use_m_flow_in=true, use_T_in=true, T=298.15) "Source on water side"; Modelica.Blocks.Sources.TimeTable masEvaIn(table=[0,0; 3600,0; 3600,0; 7200,0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600, 0; 25200,0; 25200,0.42634453; 28800,0.42634453; 28800,0.42634453; 32400, 0.42634453; 32400,0.42634453; 36000,0.42634453; 36000,0.42634453; 39600, 0.42634453; 39600,0.42634453; 43200,0.42634453; 43200,0.42634453; 46800, 0.42634453; 46800,0.42634453; 50400,0.42634453; 50400,0.42634453; 54000, 0.42634453; 54000,0.42634453; 57600,0.42634453; 57600,0.42634453; 61200, 0.42634453; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000, 0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "Mass flowrate at the evaporator"; Modelica.Blocks.Sources.TimeTable masConIn(table=[0,0; 3600,0; 3600,0; 7200,0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600, 0; 25200,0; 25200,0.380079667; 28800,0.380079667; 28800,0.380079667; 32400, 0.380079667; 32400,0.380079667; 36000,0.380079667; 36000,0.380079667; 39600, 0.380079667; 39600,0.380079667; 43200,0.380079667; 43200,0.380079667; 46800, 0.380079667; 46800,0.380079667; 50400,0.380079667; 50400,0.380079667; 54000, 0.380079667; 54000,0.380079667; 57600,0.380079667; 57600,0.380079667; 61200, 0.380079667; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000, 0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "Mass flowrate at the condenser"; Sensors.TemperatureTwoPort TConOut(m_flow_nominal=0.38, redeclare package Medium = MediumWater) "Outlet temperature at the condenser"; Modelica.Blocks.Sources.TimeTable TCOutEPlu(table=[0,14.00192912; 3600,14.00192912; 3600,14.00192912; 7200,14.00192912; 7200,14.00192912; 10800,14.00192912; 10800,14.00192912; 14400,14.00192912; 14400,14.00192912; 18000,14.00192912; 18000,14.00192912; 21600,14.00192912; 21600,14.00192912; 25200,14.00192912; 25200,19.03036339; 28800,19.03036339; 28800,18.81784119; 32400,18.81784119; 32400,18.73639861; 36000,18.73639861; 36000,18.68945378; 39600,18.68945378; 39600,18.65932416; 43200,18.65932416; 43200,18.65380814; 46800,18.65380814; 46800,18.66492477; 50400,18.66492477; 50400,18.6885344; 54000,18.6885344; 54000,18.71879002; 57600,18.71879002; 57600,18.75190471; 61200,18.75190471; 61200,13.66852976; 64800,13.66852976; 64800,13.66852976; 68400,13.66852976; 68400,13.66852976; 72000,13.66852976; 72000,13.66852976; 75600,13.66852976; 75600,13.66852976; 79200,13.66852976; 79200,13.66852976; 82800,13.66852976; 82800,13.66852976; 86400,13.66852976]) "Condenser outlet temperature"; Modelica.Blocks.Sources.TimeTable Q_flowConEPlu(table=[0,0; 3600,0; 3600,0; 7200, 0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600,0; 25200,0; 25200,8209.043603; 28800,8209.043603; 28800,8160.527077; 32400,8160.527077; 32400,8154.580894; 36000,8154.580894; 36000,8149.219757; 39600,8149.219757; 39600,8150.307625; 43200,8150.307625; 43200,8149.978319; 46800,8149.978319; 46800,8147.749739; 50400,8147.749739; 50400,8147.86927; 54000,8147.86927; 54000,8147.96606; 57600,8147.96606; 57600,8146.478788; 61200,8146.478788; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000,0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "Condenser heat flow"; equation connect(TEvaIn.y, TEvaIn_K.Celsius); connect(TOut.y, TOutMea.u); connect(TOutMea.y, TOutDegC.Kelvin); connect(XEvaOut.y, XEvaOutMea.u); connect(XEvaInMoiAir.y, add.u2); connect(add.y, mux.u2[1]); connect(Q_flowSenEPlu.y, shrEPlu.u1); connect(Q_flowEPlu.y, shrEPlu.u2); connect(varSpeDX.P, PMea.u); connect(XEvaInMod.y, mux.u1[1]); connect(XEvaInMod.y, add.u1); connect(QCoo_flow.y, Q_flowMea.u); connect(TEvaIn_K.Kelvin, souAir.T_in); connect(mux.y, souAir.X_in); connect(souAir.ports[1], varSpeDX.port_a); connect(varSpeDX.port_b, sinAir.ports[1]); connect(souWat.ports[1], varSpeDX.portCon_a); connect(TCIn.y, TCIn_K.Celsius); connect(TCIn_K.Kelvin, souWat.T_in); connect(speRat.y, varSpeDX.speRat); connect(varSpeDX.QEvaSen_flow, QCoo_flow.u1); connect(varSpeDX.QEvaLat_flow, QCoo_flow.u2); connect(varSpeDX.QEvaSen_flow, Q_flowSenMea.u); connect(masConIn.y, souWat.m_flow_in); connect(masEvaIn.y, souAir.m_flow_in); connect(sinWat.ports[1], TConOut.port_b); connect(TConOut.port_a, varSpeDX.portCon_b); end VariableSpeedEnergyPlus;

Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation.VariableSpeedEnergyPlusPartLoad Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation.VariableSpeedEnergyPlusPartLoad

Validation model for variable speed DX coil under part load condition

Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Validation.VariableSpeedEnergyPlusPartLoad

Information

This model validates the model Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.VariableSpeed.

The difference in results of TOut and XOut at the beginning and end of the simulation is because the mass flow rate is zero. For zero mass flow rate, EnergyPlus assumes steady state condition, whereas the Modelica model is a dynamic model and hence the properties at the outlet are equal to the state variables of the model.

The EnergyPlus results were generated using the example file ZoneVSWSHP_wDOAS.idf from EnergyPlus 7.1, with a nominal cooling capacity of 6758 Watts instead of autosizing and an internal gain from electric equipment as 6000 Watts.This allowed to have a speed ratio between 0 and 1.

Note that EnergyPlus mass fractions (X) are in mass of water vapor per mass of dry air, whereas Modelica uses the total mass as a reference. Hence, the EnergyPlus values are corrected by dividing them by 1+X.

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

Parameters

TypeNameDefaultDescription
PowerQ_flow_nominaldatCoi.sta[1].nomVal.Q_flow_...Nominal power [W]
MassFlowRatem_flow_nominaldatCoi.sta[1].nomVal.m_flow_...Nominal mass flow rate [kg/s]
PressureDifferencedpEva_nominal1000Pressure drop at m_flow_nominal [Pa]
PressureDifferencedpCon_nominal40000Pressure drop at mCon_flow_nominal [Pa]

Modelica definition

model VariableSpeedEnergyPlusPartLoad "Validation model for variable speed DX coil under part load condition" extends Modelica.Icons.Example; package MediumAir = Buildings.Media.Air "Medium model for air"; package MediumWater = Buildings.Media.Water "Medium model for water"; parameter Modelica.SIunits.Power Q_flow_nominal = datCoi.sta[1].nomVal.Q_flow_nominal "Nominal power"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal = datCoi.sta[1].nomVal.m_flow_nominal "Nominal mass flow rate"; parameter Modelica.SIunits.PressureDifference dpEva_nominal = 1000 "Pressure drop at m_flow_nominal"; parameter Modelica.SIunits.PressureDifference dpCon_nominal = 40000 "Pressure drop at mCon_flow_nominal"; VariableSpeed varSpeDX( redeclare package MediumEva = MediumAir, redeclare package MediumCon = MediumWater, datCoi=datCoi, dpEva_nominal=dpEva_nominal, dpCon_nominal=dpCon_nominal, minSpeRat=0.05, TEva_start=datCoi.sta[1].nomVal.TEvaIn_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Variable speed DX coil"; Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.DXCoil datCoi( nSta=10,minSpeRat=0.1, sta={Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-1524.1,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.16648632,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=1000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-1877.9,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.1849848,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=1500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-2226.6,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.20348328,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=2000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-2911.3,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.24048024,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=2500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-3581.7,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.2774772,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=3000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-4239.5,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.31447416,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=3500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-4885.7,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.35147112,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=4000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-5520.7,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.38846808,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=4500/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-6144.8,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.42546504,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I()), Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage( spe=5000/60, nomVal=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=-6758,COP_nominal=4,SHR_nominal=0.75, m_flow_nominal=0.462462,mCon_flow_nominal=0.380079667, TEvaIn_nominal=273.15+19.44,TConIn_nominal=273.15+29.4,phiIn_nominal=0.5148), perCur=Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Examples.PerformanceCurves.Curve_I())}) "Coil data"; Modelica.Blocks.Sources.TimeTable speRat(table=[0,0; 3600,0; 3600,0; 7200,0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600,0; 25200,0; 25200,0.835144907; 28800,0.835144907; 28800, 0.725963941; 32400,0.725963941; 32400,0.701309629; 36000,0.701309629; 36000,0.726095313; 39600,0.726095313; 39600,0.756509478; 43200, 0.756509478; 43200,0.760310507; 46800,0.760310507; 46800,0.789773752; 50400,0.789773752; 50400,0.785538594; 54000,0.785538594; 54000, 0.762755548; 57600,0.762755548; 57600,0.705369369; 61200,0.705369369; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000,0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "EnergyPlus speed ratio for this model"; Modelica.Blocks.Sources.TimeTable TCIn(table=[0,13.86251622; 3600,13.86251622; 3600,13.86251622; 7200,13.86251622; 7200,13.86251622; 10800,13.86251622; 10800,13.86251622; 14400,13.86251622; 14400,13.86251622; 18000,13.86251622; 18000,13.86251622; 21600,13.86251622; 21600,13.86251622; 25200,13.86251622; 25200,13.76067467; 28800,13.76067467; 28800,13.62587063; 32400,13.62587063; 32400,13.56765455; 36000,13.56765455; 36000,13.51654003; 39600,13.51654003; 39600,13.49422548; 43200,13.49422548; 43200,13.49310136; 46800,13.49310136; 46800,13.50453648; 50400,13.50453648; 50400,13.52335024; 54000,13.52335024; 54000,13.54653059; 57600,13.54653059; 57600,13.57254285; 61200,13.57254285; 61200,13.60087284; 64800,13.60087284; 64800,13.60087284; 68400,13.60087284; 68400,13.60087284; 72000,13.60087284; 72000,13.60087284; 75600,13.60087284; 75600,13.60087284; 79200,13.60087284; 79200,13.60087284; 82800,13.60087284; 82800,13.60087284; 86400,13.60087284]) "Condenser inlet temperature"; Modelica.Blocks.Sources.TimeTable TEvaIn(table=[0,27.30566381; 3600,27.30566381; 3600,27.21827779; 7200,27.21827779; 7200,27.11647599; 10800,27.11647599; 10800,27.0058024; 14400,27.0058024; 14400,26.88972232; 18000,26.88972232; 18000,26.77810041; 21600,26.77810041; 21600,26.79816007; 25200,26.79816007; 25200,24.38258647; 28800,24.38258647; 28800,23.60631205; 32400,23.60631205; 32400,23.35999766; 36000,23.35999766; 36000,23.35884656; 39600,23.35884656; 39600,23.35829243; 43200,23.35829243; 43200,23.35804345; 46800,23.35804345; 46800,23.35801611; 50400,23.35801611; 50400,23.35827236; 54000,23.35827236; 54000,23.3583018; 57600,23.3583018; 57600,23.35814534; 61200,23.35814534; 61200,25.62821073; 64800,25.62821073; 64800,26.495716; 68400,26.495716; 68400,26.7309828; 72000,26.7309828; 72000,27.15903639; 75600,27.15903639; 75600,27.26532973; 79200,27.26532973; 79200,27.38959551; 82800,27.38959551; 82800,27.37275176; 86400,27.37275176]) "Coil inlet temperature"; Modelica.Blocks.Sources.TimeTable XEvaIn(table=[0,0.00538; 3600,0.00538; 3600, 0.00538; 7200,0.00538; 7200,0.00537; 10800,0.00537; 10800,0.00536; 14400,0.00536; 14400,0.00535; 18000,0.00535; 18000,0.00534; 21600, 0.00534; 21600,0.00534; 25200,0.00534; 25200,0.00538; 28800,0.00538; 28800,0.00544; 32400,0.00544; 32400,0.00546; 36000,0.00546; 36000, 0.00551; 39600,0.00551; 39600,0.00551; 43200,0.00551; 43200,0.00551; 46800,0.00551; 46800,0.00546; 50400,0.00546; 50400,0.00546; 54000, 0.00546; 54000,0.00548; 57600,0.00548; 57600,0.00551; 61200,0.00551; 61200,0.00541; 64800,0.00541; 64800,0.0054; 68400,0.0054; 68400,0.0054; 72000,0.0054; 72000,0.0054; 75600,0.0054; 75600,0.00539; 79200,0.00539; 79200,0.00539; 82800,0.00539; 82800,0.00538; 86400,0.00538]) "Water fraction of moist air"; Modelica.Blocks.Routing.Multiplex2 mux "Converts in an array"; Buildings.Utilities.IO.BCVTB.From_degC TCIn_K "Converts degC to K"; Buildings.Utilities.IO.BCVTB.From_degC TEvaIn_K "Converts degC to K"; Modelica.Blocks.Math.Mean TOutMea(f=1/3600); Buildings.Utilities.IO.BCVTB.To_degC TOutDegC; Modelica.Blocks.Sources.RealExpression TOut(y=varSpeDX.eva.vol.T); Modelica.Blocks.Math.Mean XEvaOutMea(f=1/3600); Modelica.Blocks.Sources.RealExpression XEvaOut(y=sum(varSpeDX.eva.vol.Xi)); Modelica.Blocks.Math.Mean Q_flowMea(f=1/3600) "Mean of cooling rate"; Modelica.Blocks.Math.Mean Q_flowSenMea(f=1/3600) "Mean of sensible cooling rate"; Modelica.Blocks.Math.Mean PMea(f=1/3600) "Mean of power"; Modelica.Blocks.Math.Add add(k1=-1); Modelica.Blocks.Sources.Constant XEvaInMoiAir(k=1.0) "Moist air fraction = 1"; Modelica.Blocks.Sources.TimeTable TOutEPlu(table=[0,27.30566381; 3600,27.30566381; 3600,27.21827779; 7200,27.21827779; 7200,27.11647599; 10800,27.11647599; 10800,27.0058024; 14400,27.0058024; 14400,26.88972232; 18000,26.88972232; 18000,26.77810041; 21600,26.77810041; 21600,26.79816007; 25200,26.79816007; 25200,8.558164875; 28800,8.558164875; 28800,8.425553165; 32400,8.425553165; 32400,8.090261936; 36000,8.090261936; 36000,8.014264329; 39600,8.014264329; 39600,7.933216144; 43200,7.933216144; 43200,7.930680761; 46800,7.930680761; 46800,7.787349788; 50400,7.787349788; 50400,7.794251378; 54000,7.794251378; 54000,7.88577408; 57600,7.88577408; 57600,8.108580275; 61200,8.108580275; 61200,25.62821073; 64800,25.62821073; 64800,26.495716; 68400,26.495716; 68400,26.7309828; 72000,26.7309828; 72000,27.15903639; 75600,27.15903639; 75600,27.26532973; 79200,27.26532973; 79200,27.38959551; 82800,27.38959551; 82800,27.37275176; 86400,27.37275176]) "EnergyPlus result: outlet temperature"; Modelica.Blocks.Sources.TimeTable Q_flowEPlu(table=[0,-1e-07; 3600,-1e-07; 3600, -1e-07; 7200,-1e-07; 7200,-1e-07; 10800,-1e-07; 10800,-1e-07; 14400,-1e-07; 14400,-1e-07; 18000,-1e-07; 18000,-1e-07; 21600,-1e-07; 21600,-1e-07; 25200, -1e-07; 25200,-5993.93491; 28800,-5993.93491; 28800,-5241.352381; 32400, -5241.352381; 32400,-5109.221236; 36000,-5109.221236; 36000,-5276.319149; 39600,-5276.319149; 39600,-5479.659005; 43200,-5479.659005; 43200,-5505.142371; 46800,-5505.142371; 46800,-5698.989696; 50400,-5698.989696; 50400,-5669.788807; 54000,-5669.788807; 54000,-5517.891066; 57600,-5517.891066; 57600,-5136.545718; 61200,-5136.545718; 61200,-1e-07; 64800,-1e-07; 64800,-1e-07; 68400,-1e-07; 68400,-1e-07; 72000,-1e-07; 72000,-1e-07; 75600,-1e-07; 75600,-1e-07; 79200, -1e-07; 79200,-1e-07; 82800,-1e-07; 82800,-1e-07; 86400,-1e-07]) "EnergyPlus result: heat flow"; Modelica.Blocks.Sources.TimeTable Q_flowSenEPlu(table=[0,0; 3600,0; 3600,0; 7200, 0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600,0; 25200,0; 25200,-5964.489051; 28800,-5964.489051; 28800,-5206.664409; 32400,-5206.664409; 32400,-5027.556976; 36000,-5027.556976; 36000,-5184.015367; 39600,-5184.015367; 39600,-5373.829789; 43200,-5373.829789; 43200,-5395.020923; 46800,-5395.020923; 46800,-5603.430852; 50400,-5603.430852; 50400,-5578.150113; 54000,-5578.150113; 54000,-5423.518277; 57600,-5423.518277; 57600,-5042.653124; 61200,-5042.653124; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000,0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "EnergyPlus result: sensible heat flow "; Modelica.Blocks.Math.Division shrEPlu "EnergyPlus result: SHR"; Modelica.Blocks.Sources.TimeTable XEvaOutEPlu(table=[0,0.00525; 3600,0.00525; 3600,0.00524; 7200,0.00524; 7200,0.00523; 10800,0.00523; 10800,0.00523; 14400,0.00523; 14400,0.00522; 18000,0.00522; 18000,0.00521; 21600,0.00521; 21600,0.00521; 25200,0.00521; 25200,0.00521; 28800,0.00521; 28800,0.00522; 32400,0.00522; 32400,0.00522; 36000,0.00522; 36000,0.00523; 39600,0.00523; 39600,0.00524; 43200,0.00524; 43200,0.00525; 46800,0.00525; 46800,0.00522; 50400,0.00522; 50400,0.00522; 54000,0.00522; 54000,0.00523; 57600,0.00523; 57600,0.00524; 61200,0.00524; 61200,0.00527; 64800,0.00527; 64800,0.00526; 68400,0.00526; 68400,0.00526; 72000,0.00526; 72000,0.00526; 75600,0.00526; 75600,0.00526; 79200,0.00526; 79200,0.00525; 82800,0.00525; 82800,0.00525; 86400,0.00525]) "EnergyPlus result: outlet water mass fraction"; Modelica.Blocks.Sources.TimeTable PEPlu(table=[0,0; 3600,0; 3600,0; 7200,0; 7200, 0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600, 0; 25200,0; 25200,1034.300037; 28800,1034.300037; 28800,900.2508689; 32400, 900.2508689; 32400,875.7430481; 36000,875.7430481; 36000,903.2013238; 39600, 903.2013238; 39600,937.554675; 43200,937.554675; 43200,941.9339651; 46800, 941.9339651; 46800,975.1567966; 50400,975.1567966; 50400,970.6256299; 54000, 970.6256299; 54000,945.3102202; 57600,945.3102202; 57600,880.6992676; 61200, 880.6992676; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000, 0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "EnergyPlus result: electric power"; Modelica.Blocks.Sources.RealExpression XEvaInMod(y=XEvaIn.y/(1 + XEvaIn.y)) "Modified XEvaIn"; Modelica.Blocks.Sources.RealExpression XEvaOutEPluMod(y=XEvaOutEPlu.y/(1 + XEvaOutEPlu.y)) "Modified XEvaOut of energyPlus to comapre with the model results"; Modelica.Blocks.Math.Add QCoo_flow "Total cooling heat flow rate"; Sources.MassFlowSource_T souAir( redeclare package Medium = MediumAir, use_T_in=true, nPorts=1, m_flow=1.5, use_m_flow_in=true, use_X_in=true, T=299.85) "Source on air side"; Sources.Boundary_pT sinAir( redeclare package Medium = MediumAir, nPorts=1, p(displayUnit="Pa")) "Sink on air side"; Sources.Boundary_pT sinWat( redeclare package Medium = MediumWater, nPorts=1, p(displayUnit="Pa")) "Sink on water side"; Sources.MassFlowSource_T souWat( redeclare package Medium = MediumWater, nPorts=1, use_m_flow_in=true, use_T_in=true, T=298.15) "Source on water side"; Modelica.Blocks.Sources.TimeTable masEvaIn(table=[0,0; 3600,0; 3600,0; 7200,0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600, 0; 25200,0; 25200,0.370116476; 28800,0.370116476; 28800,0.33287751; 32400, 0.33287751; 32400,0.324468525; 36000,0.324468525; 36000,0.332922318; 39600, 0.332922318; 39600,0.343295848; 43200,0.343295848; 43200,0.344592286; 46800, 0.344592286; 46800,0.354641481; 50400,0.354641481; 50400,0.353196972; 54000, 0.353196972; 54000,0.34542623; 57600,0.34542623; 57600,0.325853203; 61200, 0.325853203; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000, 0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "Mass flowrate at the evaporator"; Modelica.Blocks.Sources.TimeTable masConIn(table=[0,0; 3600,0; 3600,0; 7200,0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600, 0; 25200,0; 25200,0.380079667; 28800,0.380079667; 28800,0.380079667; 32400, 0.380079667; 32400,0.380079667; 36000,0.380079667; 36000,0.380079667; 39600, 0.380079667; 39600,0.380079667; 43200,0.380079667; 43200,0.380079667; 46800, 0.380079667; 46800,0.380079667; 50400,0.380079667; 50400,0.380079667; 54000, 0.380079667; 54000,0.380079667; 57600,0.380079667; 57600,0.380079667; 61200, 0.380079667; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000, 0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "Mass flowrate at the condenser"; Sensors.TemperatureTwoPort TConOut(m_flow_nominal=0.38, redeclare package Medium = MediumWater) "Outlet temperature at the condenser"; Modelica.Blocks.Sources.TimeTable TCOutEPlu(table=[0,13.86251622; 3600, 13.86251622; 3600,13.86251622; 7200,13.86251622; 7200,13.86251622; 10800,13.86251622; 10800,13.86251622; 14400,13.86251622; 14400, 13.86251622; 18000,13.86251622; 18000,13.86251622; 21600,13.86251622; 21600,13.86251622; 25200,13.86251622; 25200,18.11262715; 28800, 18.11262715; 28800,17.42888551; 32400,17.42888551; 32400,17.27370577; 36000,17.27370577; 36000,17.34307309; 39600,17.34307309; 39600, 17.46794383; 43200,17.46794383; 43200,17.48530919; 46800,17.48530919; 46800,17.63736299; 50400,17.63736299; 50400,17.63528608; 54000, 17.63528608; 54000,17.5487206; 57600,17.5487206; 57600,17.29857374; 61200,17.29857374; 61200,13.60087284; 64800,13.60087284; 64800, 13.60087284; 68400,13.60087284; 68400,13.60087284; 72000,13.60087284; 72000,13.60087284; 75600,13.60087284; 75600,13.60087284; 79200, 13.60087284; 79200,13.60087284; 82800,13.60087284; 82800,13.60087284; 86400,13.60087284]) "Condenser outlet temperature"; Modelica.Blocks.Sources.TimeTable Q_flowConEPlu(table=[0,0; 3600,0; 3600,0; 7200,0; 7200,0; 10800,0; 10800,0; 14400,0; 14400,0; 18000,0; 18000,0; 21600,0; 21600,0; 25200,0; 25200,6924.804943; 28800,6924.804943; 28800, 6051.578162; 32400,6051.578162; 32400,5897.389979; 36000,5897.389979; 36000,6089.200341; 39600,6089.200341; 39600,6323.458213; 43200, 6323.458213; 43200,6352.882939; 46800,6352.882939; 46800,6576.630813; 50400,6576.630813; 50400,6543.351874; 54000,6543.351874; 54000, 6368.670264; 57600,6368.670264; 57600,5929.175058; 61200,5929.175058; 61200,0; 64800,0; 64800,0; 68400,0; 68400,0; 72000,0; 72000,0; 75600,0; 75600,0; 79200,0; 79200,0; 82800,0; 82800,0; 86400,0]) "Condenser heat flow"; equation connect(TEvaIn.y, TEvaIn_K.Celsius); connect(TOut.y, TOutMea.u); connect(TOutMea.y, TOutDegC.Kelvin); connect(XEvaOut.y, XEvaOutMea.u); connect(XEvaInMoiAir.y, add.u2); connect(add.y, mux.u2[1]); connect(Q_flowSenEPlu.y, shrEPlu.u1); connect(Q_flowEPlu.y, shrEPlu.u2); connect(varSpeDX.P, PMea.u); connect(XEvaInMod.y, mux.u1[1]); connect(XEvaInMod.y, add.u1); connect(QCoo_flow.y, Q_flowMea.u); connect(TEvaIn_K.Kelvin, souAir.T_in); connect(mux.y, souAir.X_in); connect(souAir.ports[1], varSpeDX.port_a); connect(varSpeDX.port_b, sinAir.ports[1]); connect(souWat.ports[1], varSpeDX.portCon_a); connect(TCIn.y, TCIn_K.Celsius); connect(TCIn_K.Kelvin, souWat.T_in); connect(speRat.y, varSpeDX.speRat); connect(varSpeDX.QEvaSen_flow, QCoo_flow.u1); connect(varSpeDX.QEvaLat_flow, QCoo_flow.u2); connect(varSpeDX.QEvaSen_flow, Q_flowSenMea.u); connect(masConIn.y, souWat.m_flow_in); connect(masEvaIn.y, souAir.m_flow_in); connect(sinWat.ports[1], TConOut.port_b); connect(TConOut.port_a, varSpeDX.portCon_b); end VariableSpeedEnergyPlusPartLoad;