Buildings.DHC.ETS.Combined.Validation.BaseClasses

Package with base classes

Information

This package contains base classes that are used to construct the classes in Buildings.DHC.ETS.Combined.Validation.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.DHC.ETS.Combined.Validation.BaseClasses.PartialChillerBorefield PartialChillerBorefield Partial validation of the ETS model with heat recovery chiller and optional borefield

Buildings.DHC.ETS.Combined.Validation.BaseClasses.PartialChillerBorefield Buildings.DHC.ETS.Combined.Validation.BaseClasses.PartialChillerBorefield

Partial validation of the ETS model with heat recovery chiller and optional borefield

Buildings.DHC.ETS.Combined.Validation.BaseClasses.PartialChillerBorefield

Information

This is a partial model used as a base class to construct the validation and example models.

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

Parameters

TypeNameDefaultDescription
MassFlowRatemHeaWat_flow_nominal0.9*datChi.mCon_flow_nominalNominal heating water mass flow rate [kg/s]
MassFlowRatemChiWat_flow_nominal0.9*datChi.mEva_flow_nominalNominal chilled water mass flow rate [kg/s]
GenericdatChidatChi(QEva_flow_nominal=QCo...Chiller performance data
Design parameter
HeatFlowRateQCoo_flow_nominal-1e6Design cooling heat flow rate (<=0) [W]
HeatFlowRateQHea_flow_nominalabs(QCoo_flow_nominal)*(1 + ...Design heating heat flow rate (>=0) [W]

Modelica definition

partial model PartialChillerBorefield "Partial validation of the ETS model with heat recovery chiller and optional borefield" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Medium model"; parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal=0.9*datChi.mCon_flow_nominal "Nominal heating water mass flow rate"; parameter Modelica.Units.SI.MassFlowRate mChiWat_flow_nominal=0.9*datChi.mEva_flow_nominal "Nominal chilled water mass flow rate"; parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal(max=-Modelica.Constants.eps)= -1e6 "Design cooling heat flow rate (<=0)"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal(min=Modelica.Constants.eps)= abs(QCoo_flow_nominal)*(1 + 1/datChi.COP_nominal) "Design heating heat flow rate (>=0)"; parameter Buildings.Fluid.Chillers.Data.ElectricEIR.Generic datChi( QEva_flow_nominal=QCoo_flow_nominal, COP_nominal=3, PLRMax=1, PLRMinUnl=0.3, PLRMin=0.3, etaMotor=1, mEva_flow_nominal=abs(QCoo_flow_nominal)/5/4186, mCon_flow_nominal=QHea_flow_nominal/5/4186, TEvaLvg_nominal=277.15, capFunT={1.72,0.02,0,-0.02,0,0}, EIRFunT={0.28,-0.02,0,0.02,0,0}, EIRFunPLR={0.1,0.9,0}, TEvaLvgMin=277.15, TEvaLvgMax=288.15, TConEnt_nominal=313.15, TConEntMin=298.15, TConEntMax=328.15) "Chiller performance data"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant THeaWatSupSet( k=45+273.15, y(final unit="K", displayUnit="degC")) "Heating water supply temperature set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSupSet( k=7+273.15, y(final unit="K", displayUnit="degC")) "Chilled water supply temperature set point"; Buildings.Fluid.Sensors.TemperatureTwoPort senTHeaWatSup(redeclare package Medium = Medium, m_flow_nominal=datChi.mCon_flow_nominal) "Heating water supply temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senTChiWatSup(redeclare package Medium = Medium, m_flow_nominal=datChi.mEva_flow_nominal) "Chilled water supply temperature"; Buildings.DHC.ETS.Combined.ChillerBorefield ets( redeclare package MediumSer = Medium, redeclare package MediumBui = Medium, QChiWat_flow_nominal=QCoo_flow_nominal, QHeaWat_flow_nominal=QHea_flow_nominal, dp1Hex_nominal=40E3, dp2Hex_nominal=40E3, QHex_flow_nominal=-QCoo_flow_nominal, T_a1Hex_nominal=284.15, T_b1Hex_nominal=279.15, T_a2Hex_nominal=277.15, T_b2Hex_nominal=282.15, QWSE_flow_nominal=QCoo_flow_nominal, dpCon_nominal=40E3, dpEva_nominal=40E3, datChi=datChi, nPorts_bChiWat=1, nPorts_bHeaWat=1, nPorts_aHeaWat=1, nPorts_aChiWat=1) "ETS"; Buildings.Fluid.Sensors.TemperatureTwoPort senTHeaWatRet(redeclare final package Medium = Medium, m_flow_nominal=datChi.mCon_flow_nominal) "Heating water return temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort senTChiWatRet(redeclare final package Medium = Medium, m_flow_nominal=datChi.mEva_flow_nominal) "Chilled water return temperature"; Buildings.Fluid.Sources.Boundary_pT disWat( redeclare package Medium = Medium, use_T_in=true, nPorts=2) "District water boundary conditions"; DHC.ETS.BaseClasses.Pump_m_flow pumChiWat( redeclare package Medium = Medium, final m_flow_nominal=mChiWat_flow_nominal, dp_nominal=100E3) "Chilled water distribution pump"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2(final k= mChiWat_flow_nominal) "Scale to nominal mass flow rate"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1(final k= mHeaWat_flow_nominal) "Scale to nominal mass flow rate"; DHC.ETS.BaseClasses.Pump_m_flow pumHeaWat( redeclare package Medium = Medium, final m_flow_nominal=mHeaWat_flow_nominal, dp_nominal=100E3) "Heating water distribution pump"; Buildings.Fluid.MixingVolumes.MixingVolume volHeaWat( energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=45 + 273.15, final prescribedHeatFlowRate=true, redeclare package Medium = Medium, V=10, final mSenFac=1, final m_flow_nominal=mHeaWat_flow_nominal, nPorts=2) "Volume for heating water distribution circuit"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai3(final k=-ets.QHeaWat_flow_nominal) "Scale to nominal heat flow rate"; Buildings.HeatTransfer.Sources.PrescribedHeatFlow loaHea "Heating load as prescribed heat flow rate"; Buildings.Fluid.MixingVolumes.MixingVolume volChiWat( energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=7 + 273.15, final prescribedHeatFlowRate=true, redeclare package Medium = Medium, V=10, final mSenFac=1, final m_flow_nominal=mChiWat_flow_nominal, nPorts=2) "Volume for chilled water distribution circuit"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai4(final k=-ets.QChiWat_flow_nominal) "Scale to nominal heat flow rate"; Buildings.HeatTransfer.Sources.PrescribedHeatFlow loaCoo "Cooling load as prescribed heat flow rate"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold uHea( final t=0.01, final h=0.005) "Enable heating"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold uCoo( final t=0.01, final h=0.005) "Enable cooling"; Modelica.Blocks.Routing.RealPassThrough heaLoaNor "Connect with normalized heating load"; Modelica.Blocks.Routing.RealPassThrough loaCooNor "Connect with normalized cooling load"; Modelica.Blocks.Sources.CombiTimeTable TDisWatSup( tableName="tab1", table=[ 0,11; 49,11; 50,20; 100,20], extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, timeScale=3600, offset={273.15}, columns={2}, smoothness=Modelica.Blocks.Types.Smoothness.MonotoneContinuousDerivative1) "District water supply temperature"; Modelica.Blocks.Sources.CombiTimeTable loa( tableName="tab1", table=[ 0,0,0; 1,0,0; 2,0,1; 3,0,1; 4,0,0.5; 5,0,0.5; 6,0,0.1; 7,0,0.1; 8,0,0; 9,0,0; 10,0,0; 11,0,0; 12,1,0; 13,1,0; 14,0.5,0; 15,0.5,0; 16,0.1,0; 17,0.1,0; 18,0,0; 19,0,0; 20,0,0; 21,0,0; 22,1,1; 23,1,1; 24,0.5,0.5; 25,0.5,0.5; 26,0.1,0.1; 27,0.1,0.1; 28,0,0; 29,0,0; 30,0,0; 31,0,0; 32,0.1,1; 33,0.1,1; 34,0.5,0.5; 35,0.5,0.5; 36,1,0.1; 37,1,0.1; 38,0,0; 39,0,0; 40,0,0; 41,0,0; 42,0.1,0.3; 43,0.1,0.3; 44,0.3,0.1; 45,0.3,0.1; 46,0.1,0.1; 47,0.1,0.1; 48,0,0; 49,0,0], extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, timeScale=3600, offset={0,0}, columns={2,3}, smoothness=Modelica.Blocks.Types.Smoothness.MonotoneContinuousDerivative1) "Thermal loads (y[1] is cooling load, y[2] is heating load)"; Buildings.Fluid.Sensors.TemperatureTwoPort senTDisWatSup(redeclare final package Medium = Medium, final m_flow_nominal=ets.hex.m1_flow_nominal) "District water supply temperature"; Modelica.Blocks.Continuous.Integrator EChi( y(unit="J")) "Chiller electricity use"; Fluid.Sensors.TemperatureTwoPort senTDisWatRet(redeclare final package Medium = Medium, final m_flow_nominal=ets.hex.m1_flow_nominal) "District water return temperature"; equation connect(TChiWatSupSet.y,ets.TChiWatSupSet); connect(THeaWatSupSet.y,ets.THeaWatSupSet); connect(pumChiWat.port_a,senTChiWatSup.port_b); connect(gai2.y,pumChiWat.m_flow_in); connect(pumHeaWat.port_b,senTHeaWatSup.port_a); connect(gai1.y,pumHeaWat.m_flow_in); connect(gai3.y,loaHea.Q_flow); connect(loaHea.port,volHeaWat.heatPort); connect(pumChiWat.port_b,volChiWat.ports[1]); connect(volChiWat.ports[2],senTChiWatRet.port_a); connect(senTHeaWatSup.port_b,volHeaWat.ports[1]); connect(gai4.y,loaCoo.Q_flow); connect(loaCoo.port,volChiWat.heatPort); connect(volHeaWat.ports[2],senTHeaWatRet.port_a); connect(heaLoaNor.y,gai3.u); connect(heaLoaNor.y,uHea.u); connect(heaLoaNor.y,gai1.u); connect(loaCooNor.y,gai4.u); connect(loaCooNor.y,gai2.u); connect(loaCooNor.y,uCoo.u); connect(TDisWatSup.y[1],disWat.T_in); connect(uCoo.y,ets.uCoo); connect(uHea.y,ets.uHea); connect(disWat.ports[1],senTDisWatSup.port_a); connect(senTDisWatSup.port_b, ets.port_aSerAmb); connect(ets.ports_bChiWat[1],senTChiWatSup.port_a); connect(ets.ports_bHeaWat[1],pumHeaWat.port_a); connect(senTHeaWatRet.port_b,ets.ports_aHeaWat[1]); connect(senTChiWatRet.port_b,ets.ports_aChiWat[1]); connect(ets.PCoo, EChi.u); connect(ets.port_bSerAmb, senTDisWatRet.port_a); connect(senTDisWatRet.port_b, disWat.ports[2]); end PartialChillerBorefield;