Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses

Package with base classes

Information

This package contains base classes that are used to construct the classes in Buildings.Experimental.DHC.Loads.BaseClasses.Examples.

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

Package Content

Name Description
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingRCZ1Valve BuildingRCZ1Valve One-zone RC building model with distribution pumps and mixing valves
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingRCZ6 BuildingRCZ6 Six-zone RC building model based on URBANopt GeoJSON export, with distribution pumps
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingSpawnZ1 BuildingSpawnZ1 One-zone EnergyPlus building model
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingSpawnZ6 BuildingSpawnZ6 Six-zone EnergyPlus building model based on URBANopt GeoJSON export, with distribution pumps
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingTimeSeries BuildingTimeSeries Building model with heating and/or cooling loads provided as time series
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4Pipe FanCoil4Pipe Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4PipeHeatPorts FanCoil4PipeHeatPorts Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.PartialFanCoil4Pipe PartialFanCoil4Pipe Partial model of a sensible only four-pipe fan coil unit computing a required water mass flow rate
Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.GeojsonExportRC GeojsonExportRC Package with RC building zone models

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingRCZ1Valve Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingRCZ1Valve

One-zone RC building model with distribution pumps and mixing valves

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingRCZ1Valve

Information


This is a simplified one-zone building model based on a one-element reduced order room model. The corresponding heating and cooling loads are computed with a four-pipe fan coil unit model derived from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit and connected to the room model by means of fluid ports.

The heating and chilled water distribution to the terminal units is modeled with an instance of Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution including a mixing valve to control the supply temperature.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding (Partial class for building model).

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMedium in the building distribution system
IntegernZon1Number of thermal zones
Configuration
Booleanhave_heaWattrueSet to true if the building has heating water system
Booleanhave_chiWattrueSet to true if the building has chilled water system
Booleanhave_eleHeafalseSet to true if the building has decentralized electric heating system
Booleanhave_eleCoofalseSet to true if the building has decentralized electric cooling system
Booleanhave_fanfalseSet to true if fan power is computed
Booleanhave_pumfalseSet to true if pump power is computed
Booleanhave_weaBustrueSet to true to use a weather bus
Scaling
RealfacMul1Multiplier factor
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

TypeNameDescription
replaceable package MediumMedium in the building distribution system
BusweaBusWeather data bus
FluidPorts_aports_aHeaWat[nPorts_aHeaWat]Heating water inlet ports
FluidPorts_bports_bHeaWat[nPorts_bHeaWat]Heating water outlet ports
FluidPorts_aports_aChiWat[nPorts_aChiWat]Chilled water inlet ports
FluidPorts_bports_bChiWat[nPorts_bChiWat]Chilled water outlet ports
output RealOutputQHea_flowTotal heating heat flow rate transferred to the loads (>=0) [W]
output RealOutputQCoo_flowTotal cooling heat flow rate transferred to the loads (<=0) [W]
output RealOutputPHeaPower drawn by decentralized heating system [W]
output RealOutputPCooPower drawn by decentralized cooling system [W]
output RealOutputPFanPower drawn by fan motors [W]
output RealOutputPPumPower drawn by pump motors [W]

Modelica definition

model BuildingRCZ1Valve "One-zone RC building model with distribution pumps and mixing valves" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding( redeclare package Medium=Buildings.Media.Water, final have_heaWat=true, final have_chiWat=true, final have_eleHea=false, final have_eleCoo=false, final have_weaBus=true); package Medium2=Buildings.Media.Air "Load side medium"; parameter Integer nZon=1 "Number of thermal zones"; Buildings.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[2]( each outSkyCon=true, each outGroCon=true, each til=1.5707963267949, azi={3.1415926535898,4.7123889803847}) "Calculates diffuse solar radiation on titled surface for both directions"; Buildings.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[2](each til= 1.5707963267949, azi={3.1415926535898,4.7123889803847}) "Calculates direct solar radiation on titled surface for both directions"; Buildings.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDouPan( n=2, UWin=2.1) "Correction factor for solar transmission"; Buildings.ThermalZones.ReducedOrder.RC.OneElement thermalZoneOneElement( VAir=52.5, hRad=4.999999999999999, hConWin=2.7000000000000006, gWin=1, ratioWinConRad=0.09, hConExt=2.0490178828959134, nExt=1, RExt={0.00331421908725}, CExt={5259932.23}, RWin=0.01642857143, RExtRem=0.1265217391, nOrientations=2, AWin={7,7}, ATransparent={7,7}, AExt={3.5,8}, redeclare package Medium=Medium2, extWallRC( thermCapExt( each der_T( fixed=true))), energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=295.15, nPorts=2) "Thermal zone"; Buildings.ThermalZones.ReducedOrder.EquivalentAirTemperature.VDI6007WithWindow eqAirTemp( n=2, wfGro=0, wfWall={0.3043478260869566,0.6956521739130435}, wfWin={0.5,0.5}, withLongwave=true, aExt=0.7, hConWallOut=20.0, hRad=5.0, hConWinOut=20.0, TGro=285.15) "Computes equivalent air temperature"; Modelica.Blocks.Math.Add solRad[2] "Sums up solar radiation of both directions"; Buildings.HeatTransfer.Sources.PrescribedTemperature preTem "Prescribed temperature for exterior walls outdoor surface temperature"; Buildings.HeatTransfer.Sources.PrescribedTemperature preTem1 "Prescribed temperature for windows outdoor surface temperature"; Modelica.Thermal.HeatTransfer.Components.Convection theConWin "Outdoor convective heat transfer of windows"; Modelica.Thermal.HeatTransfer.Components.Convection theConWall "Outdoor convective heat transfer of walls"; Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow perRad "Radiative heat flow of persons"; Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow perCon "Convective heat flow of persons"; Modelica.Blocks.Sources.CombiTimeTable intGai( table=[ 0,0,0,0; 3600,0,0,0; 7200,0,0,0; 10800,0,0,0; 14400,0,0,0; 18000,0,0,0; 21600,0,0,0; 25200,0,0,0; 25200,80,80,200; 28800,80,80,200; 32400,80,80,200; 36000,80,80,200; 39600,80,80,200; 43200,80,80,200; 46800,80,80,200; 50400,80,80,200; 54000,80,80,200; 57600,80,80,200; 61200,80,80,200; 61200,0,0,0; 64800,0,0,0; 72000,0,0,0; 75600,0,0,0; 79200,0,0,0; 82800,0,0,0; 86400,0,0,0], columns={2,3,4}, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) "Table with profiles for persons (radiative and convective) and machines (convective)"; Modelica.Blocks.Sources.Constant const[2]( each k=0) "Sets sunblind signal to zero (open)"; Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow macConv "Convective heat flow of machines"; Modelica.Blocks.Sources.Constant hConWall( k=25*11.5) "Outdoor coefficient of heat transfer for walls"; Modelica.Blocks.Sources.Constant hConWin( k=20*14) "Outdoor coefficient of heat transfer for windows"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTSet( k=293.15, y(final unit="K", displayUnit="degC")) "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTSet( k=297.15, y(final unit="K", displayUnit="degC")) "Maximum temperature set point"; Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum( nin=2); Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4Pipe terUni( redeclare package Medium1=Medium, redeclare package Medium2=Medium2, QHea_flow_nominal=1000, QCoo_flow_nominal=-5000, T_aLoaHea_nominal=293.15, T_aLoaCoo_nominal=297.15, T_bHeaWat_nominal=308.15, T_bChiWat_nominal=285.15, T_aHeaWat_nominal=313.15, T_aChiWat_nominal=280.15, mLoaHea_flow_nominal=1, mLoaCoo_flow_nominal=1) "Terminal unit"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloHea( redeclare package Medium=Medium, m_flow_nominal=terUni.mHeaWat_flow_nominal, have_pum=true, have_val=true, dp_nominal=100000, nPorts_a1=1, nPorts_b1=1) "Heating water distribution system"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloCoo( redeclare package Medium=Medium, m_flow_nominal=terUni.mChiWat_flow_nominal, typDis=Buildings.Experimental.DHC.Loads.BaseClasses.Types.DistributionType.ChilledWater, have_pum=true, have_val=true, dp_nominal=100000, nPorts_a1=1, nPorts_b1=1) "Chilled water distribution system"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetSecHea( k=308.15, y(final unit="K", displayUnit="degC")) "Heating water secondary supply temperature set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetSecChi( k=289.15, y(final unit="K", displayUnit="degC")) "Chilled water secondary supply temperature set point"; equation connect(eqAirTemp.TEqAirWin,preTem1.T); connect(eqAirTemp.TEqAir,preTem.T); connect(intGai.y[1],perRad.Q_flow); connect(intGai.y[2],perCon.Q_flow); connect(intGai.y[3],macConv.Q_flow); connect(const.y,eqAirTemp.sunblind); connect(HDifTil.HSkyDifTil,corGDouPan.HSkyDifTil); connect(HDirTil.H,corGDouPan.HDirTil); connect(HDirTil.H,solRad.u1); connect(HDirTil.inc,corGDouPan.inc); connect(HDifTil.H,solRad.u2); connect(HDifTil.HGroDifTil,corGDouPan.HGroDifTil); connect(solRad.y,eqAirTemp.HSol); connect(perRad.port,thermalZoneOneElement.intGainsRad); connect(theConWin.solid,thermalZoneOneElement.window); connect(preTem1.port,theConWin.fluid); connect(thermalZoneOneElement.extWall,theConWall.solid); connect(theConWall.fluid,preTem.port); connect(hConWall.y,theConWall.Gc); connect(hConWin.y,theConWin.Gc); connect(macConv.port,thermalZoneOneElement.intGainsConv); connect(perCon.port,thermalZoneOneElement.intGainsConv); connect(corGDouPan.solarRadWinTrans,thermalZoneOneElement.solRad); connect(weaBus.TBlaSky,eqAirTemp.TBlaSky); connect(weaBus.TDryBul,eqAirTemp.TDryBul); connect(weaBus,HDifTil[2].weaBus); connect(weaBus,HDirTil[1].weaBus); connect(weaBus,HDirTil[2].weaBus); connect(weaBus,HDifTil[1].weaBus); connect(thermalZoneOneElement.ports[1],terUni.port_aLoa); connect(terUni.port_bLoa,thermalZoneOneElement.ports[2]); connect(terUni.port_bChiWat,disFloCoo.ports_a1[1]); connect(terUni.port_bHeaWat,disFloHea.ports_a1[1]); connect(disFloHea.ports_b1[1],terUni.port_aHeaWat); connect(disFloCoo.ports_b1[1],terUni.port_aChiWat); connect(terUni.mReqHeaWat_flow,disFloHea.mReq_flow[1]); connect(terUni.mReqChiWat_flow,disFloCoo.mReq_flow[1]); connect(disFloHea.PPum,mulSum.u[1]); connect(disFloCoo.PPum,mulSum.u[2]); connect(thermalZoneOneElement.TAir,terUni.TSen); connect(maxTSet.y,terUni.TSetCoo); connect(minTSet.y,terUni.TSetHea); connect(TSetSecChi.y,disFloCoo.TSupSet); connect(TSetSecHea.y,disFloHea.TSupSet); connect(mulSum.y, mulPPum.u); connect(disFloHea.QActTot_flow, mulQHea_flow.u); connect(disFloCoo.QActTot_flow, mulQCoo_flow.u); connect(terUni.PFan, mulPFan.u); connect(mulHeaWatInl[1].port_b, disFloHea.port_a); connect(mulHeaWatOut[1].port_a, disFloHea.port_b); connect(mulChiWatInl[1].port_b, disFloCoo.port_a); connect(mulChiWatOut[1].port_a, disFloCoo.port_b); end BuildingRCZ1Valve;

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingRCZ6 Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingRCZ6

Six-zone RC building model based on URBANopt GeoJSON export, with distribution pumps

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingRCZ6

Information


This is a simplified six-zone building model based on two-element reduced order model. It was generated from translating a GeoJSON model specified within the URBANopt UI. The heating and cooling loads are computed with a four-pipe fan coil unit model derived from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit and connected to the room model by means of heat ports.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding (Partial class for building model).

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMedium in the building distribution system
IntegernZon6Number of thermal zones
RealfacMulTerUni[nZon]{15 for i in 1:nZon}Multiplier factor for terminal units
Configuration
Booleanhave_heaWattrueSet to true if the building has heating water system
Booleanhave_chiWattrueSet to true if the building has chilled water system
Booleanhave_eleHeafalseSet to true if the building has decentralized electric heating system
Booleanhave_eleCoofalseSet to true if the building has decentralized electric cooling system
Booleanhave_fanfalseSet to true if fan power is computed
Booleanhave_pumtrueSet to true if pump power is computed
Booleanhave_weaBustrueSet to true to use a weather bus
Scaling
RealfacMul1Multiplier factor
Nominal condition
MassFlowRatemLoa_flow_nominal[nZon]fill(1, nZon)Load side mass flow rate at nominal conditions [kg/s]
HeatFlowRateQHea_flow_nominal[nZon]fill(10000, nZon) ./ facMulT...Design heating heat flow rate (>=0) [W]
HeatFlowRateQCoo_flow_nominal[nZon]cat(1, fill(-10000, nZon - 1...Design cooling heat flow rate (<=0) [W]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

TypeNameDescription
replaceable package MediumMedium in the building distribution system
BusweaBusWeather data bus
FluidPorts_aports_aHeaWat[nPorts_aHeaWat]Heating water inlet ports
FluidPorts_bports_bHeaWat[nPorts_bHeaWat]Heating water outlet ports
FluidPorts_aports_aChiWat[nPorts_aChiWat]Chilled water inlet ports
FluidPorts_bports_bChiWat[nPorts_bChiWat]Chilled water outlet ports
output RealOutputQHea_flowTotal heating heat flow rate transferred to the loads (>=0) [W]
output RealOutputQCoo_flowTotal cooling heat flow rate transferred to the loads (<=0) [W]
output RealOutputPHeaPower drawn by decentralized heating system [W]
output RealOutputPCooPower drawn by decentralized cooling system [W]
output RealOutputPFanPower drawn by fan motors [W]
output RealOutputPPumPower drawn by pump motors [W]

Modelica definition

model BuildingRCZ6 "Six-zone RC building model based on URBANopt GeoJSON export, with distribution pumps" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding( redeclare package Medium=Buildings.Media.Water, final have_weaBus=true, final have_heaWat=true, final have_chiWat=true, final have_eleHea=false, final have_eleCoo=false, final have_fan=false, final have_pum=true); package Medium2=Buildings.Media.Air "Load side medium"; parameter Integer nZon=6 "Number of thermal zones"; parameter Real facMulTerUni[nZon]={15 for i in 1:nZon} "Multiplier factor for terminal units"; parameter Modelica.Units.SI.MassFlowRate mLoa_flow_nominal[nZon]=fill(1, nZon) "Load side mass flow rate at nominal conditions"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal[nZon]=fill(10000, nZon) ./ facMulTerUni "Design heating heat flow rate (>=0)"; parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal[nZon]=cat( 1, fill(-10000, nZon - 1), {-50000}) ./ facMulTerUni "Design cooling heat flow rate (<=0)"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTSet[nZon]( k=fill( 293.15, nZon), y(each final unit="K", each displayUnit="degC")) "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTSet[nZon]( k=fill( 297.15, nZon), y(each final unit="K", each displayUnit="degC")) "Maximum temperature set point"; Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Office office; Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Floor floor; Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Storage storage; Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Meeting meeting; Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Restroom restroom; Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.ICT iCT; Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum( nin=2); Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4PipeHeatPorts terUni[nZon]( redeclare each final package Medium1=Medium, redeclare each final package Medium2=Medium2, final facMul=facMulTerUni, final QHea_flow_nominal=QHea_flow_nominal, final QCoo_flow_nominal=QCoo_flow_nominal, each T_aLoaHea_nominal=293.15, each T_aLoaCoo_nominal=297.15, each T_bHeaWat_nominal=35+273.15, each T_bChiWat_nominal=12+273.15, each T_aHeaWat_nominal=40+273.15, each T_aChiWat_nominal=7+273.15, each mLoaHea_flow_nominal=5, each mLoaCoo_flow_nominal=5) "Terminal unit"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloHea( redeclare package Medium=Medium, m_flow_nominal=sum( terUni.mHeaWat_flow_nominal .* terUni.facMul), have_pum=true, dp_nominal=100000, nPorts_a1=nZon, nPorts_b1=nZon) "Heating water distribution system"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloCoo( redeclare package Medium=Medium, m_flow_nominal=sum( terUni.mChiWat_flow_nominal .* terUni.facMul), typDis=Buildings.Experimental.DHC.Loads.BaseClasses.Types.DistributionType.ChilledWater, have_pum=true, dp_nominal=100000, nPorts_a1=nZon, nPorts_b1=nZon) "Chilled water distribution system"; equation connect(terUni.port_bHeaWat,disFloHea.ports_a1); connect(terUni.port_bChiWat,disFloCoo.ports_a1); connect(disFloHea.ports_b1,terUni.port_aHeaWat); connect(disFloCoo.ports_b1,terUni.port_aChiWat); connect(weaBus,office.weaBus); connect(weaBus,floor.weaBus); connect(weaBus,storage.weaBus); connect(weaBus,meeting.weaBus); connect(weaBus,restroom.weaBus); connect(weaBus,iCT.weaBus); connect(terUni[1].heaPorCon,office.port_a); connect(terUni[2].heaPorCon,floor.port_a); connect(terUni[3].heaPorCon,storage.port_a); connect(terUni[4].heaPorCon,meeting.port_a); connect(terUni[5].heaPorCon,restroom.port_a); connect(terUni[6].heaPorCon,iCT.port_a); connect(terUni[1].heaPorRad,office.port_a); connect(terUni[2].heaPorRad,floor.port_a); connect(terUni[3].heaPorRad,storage.port_a); connect(terUni[4].heaPorRad,meeting.port_a); connect(terUni[5].heaPorRad,restroom.port_a); connect(terUni[6].heaPorRad,iCT.port_a); connect(terUni.mReqHeaWat_flow,disFloHea.mReq_flow); connect(terUni.mReqChiWat_flow,disFloCoo.mReq_flow); connect(disFloHea.PPum,mulSum.u[1]); connect(disFloCoo.PPum,mulSum.u[2]); connect(maxTSet.y,terUni.TSetCoo); connect(minTSet.y,terUni.TSetHea); connect(disFloHea.QActTot_flow, mulQHea_flow.u); connect(disFloCoo.QActTot_flow, mulQCoo_flow.u); connect(mulPPum.u, mulSum.y); connect(mulHeaWatInl[1].port_b, disFloHea.port_a); connect(mulHeaWatOut[1].port_a, disFloHea.port_b); connect(mulChiWatInl[1].port_b, disFloCoo.port_a); connect(mulChiWatOut[1].port_a, disFloCoo.port_b); end BuildingRCZ6;

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingSpawnZ1 Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingSpawnZ1

One-zone EnergyPlus building model

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingSpawnZ1

Information


This is a simplified one-zone building model based on EnergyPlus building envelope model. The heating and cooling loads are computed with a four-pipe fan coil unit model derived from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit and connected to the room model by means of fluid ports.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding (Partial class for building model).

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMedium in the building distribution system
IntegernZon1Number of thermal zones
StringidfName"modelica://Buildings/Resour...Name of the IDF file
StringepwName"modelica://Buildings/Resour...Name of the weather file
StringweaName"modelica://Buildings/Resour...Name of the weather file
Configuration
Booleanhave_heaWattrueSet to true if the building has heating water system
Booleanhave_chiWattrueSet to true if the building has chilled water system
Booleanhave_eleHeafalseSet to true if the building has decentralized electric heating system
Booleanhave_eleCoofalseSet to true if the building has decentralized electric cooling system
Booleanhave_fanfalseSet to true if fan power is computed
Booleanhave_pumfalseSet to true if pump power is computed
Booleanhave_weaBusfalseSet to true to use a weather bus
Scaling
RealfacMul1Multiplier factor
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

TypeNameDescription
replaceable package MediumMedium in the building distribution system
BusweaBusWeather data bus
FluidPorts_aports_aHeaWat[nPorts_aHeaWat]Heating water inlet ports
FluidPorts_bports_bHeaWat[nPorts_bHeaWat]Heating water outlet ports
FluidPorts_aports_aChiWat[nPorts_aChiWat]Chilled water inlet ports
FluidPorts_bports_bChiWat[nPorts_bChiWat]Chilled water outlet ports
output RealOutputQHea_flowTotal heating heat flow rate transferred to the loads (>=0) [W]
output RealOutputQCoo_flowTotal cooling heat flow rate transferred to the loads (<=0) [W]
output RealOutputPHeaPower drawn by decentralized heating system [W]
output RealOutputPCooPower drawn by decentralized cooling system [W]
output RealOutputPFanPower drawn by fan motors [W]
output RealOutputPPumPower drawn by pump motors [W]

Modelica definition

model BuildingSpawnZ1 "One-zone EnergyPlus building model" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding( redeclare package Medium=Buildings.Media.Water, final have_heaWat=true, final have_chiWat=true, final have_pum=false, final have_eleHea=false, final have_eleCoo=false); package Medium2=Buildings.Media.Air "Load side medium"; parameter Integer nZon=1 "Number of thermal zones"; parameter String idfName="modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.idf" "Name of the IDF file"; parameter String epwName="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw" "Name of the weather file"; parameter String weaName="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos" "Name of the weather file"; Modelica.Blocks.Sources.Constant qConGai_flow( k=0) "Convective heat gain"; Modelica.Blocks.Sources.Constant qRadGai_flow( k=0) "Radiative heat gain"; Modelica.Blocks.Routing.Multiplex3 multiplex3_1; Modelica.Blocks.Sources.Constant qLatGai_flow( k=0) "Latent heat gain"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zon( redeclare package Medium=Medium2, zoneName="Core_ZN", nPorts=2) "Thermal zone"; inner Buildings.ThermalZones.EnergyPlus_9_6_0.Building building( idfName=Modelica.Utilities.Files.loadResource( idfName), epwName=Modelica.Utilities.Files.loadResource( epwName), weaName=Modelica.Utilities.Files.loadResource( weaName)) "Building model"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTSet( k=293.15, y(final unit="K", displayUnit="degC")) "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTSet( k=297.15, y(final unit="K", displayUnit="degC")) "Maximum temperature set point"; Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4Pipe terUni( redeclare package Medium1=Medium, redeclare package Medium2=Medium2, QHea_flow_nominal=2000, QCoo_flow_nominal=-2000, T_aLoaHea_nominal=293.15, T_aLoaCoo_nominal=297.15, T_bHeaWat_nominal=308.15, T_bChiWat_nominal=285.15, T_aHeaWat_nominal=313.15, T_aChiWat_nominal=280.15, mLoaHea_flow_nominal=1, mLoaCoo_flow_nominal=1) "Terminal unit"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloHea( redeclare package Medium=Medium, m_flow_nominal=terUni.mHeaWat_flow_nominal, dp_nominal=100000, nPorts_a1=nZon, nPorts_b1=nZon) "Heating water distribution system"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloCoo( redeclare package Medium=Medium, m_flow_nominal=terUni.mChiWat_flow_nominal, typDis=Buildings.Experimental.DHC.Loads.BaseClasses.Types.DistributionType.ChilledWater, dp_nominal=100000, nPorts_a1=nZon, nPorts_b1=nZon) "Chilled water distribution system"; equation connect(qRadGai_flow.y,multiplex3_1.u1[1]); connect(qConGai_flow.y,multiplex3_1.u2[1]); connect(multiplex3_1.u3[1],qLatGai_flow.y); connect(multiplex3_1.y,zon.qGai_flow); connect(zon.ports[1],terUni.port_aLoa); connect(terUni.port_bHeaWat,disFloHea.ports_a1[1]); connect(terUni.port_bChiWat,disFloCoo.ports_a1[1]); connect(disFloHea.ports_b1[1],terUni.port_aHeaWat); connect(disFloCoo.ports_b1[1],terUni.port_aChiWat); connect(terUni.mReqHeaWat_flow,disFloHea.mReq_flow[1]); connect(terUni.mReqChiWat_flow,disFloCoo.mReq_flow[1]); connect(terUni.port_bLoa,zon.ports[2]); connect(zon.TAir,terUni.TSen); connect(maxTSet.y,terUni.TSetCoo); connect(minTSet.y,terUni.TSetHea); connect(terUni.PFan, mulPFan.u); connect(disFloHea.QActTot_flow, mulQHea_flow.u); connect(disFloCoo.QActTot_flow, mulQCoo_flow.u); connect(mulChiWatInl[1].port_b, disFloCoo.port_a); connect(mulChiWatOut[1].port_a, disFloCoo.port_b); connect(mulHeaWatInl[1].port_b, disFloHea.port_a); connect(mulHeaWatOut[1].port_a, disFloHea.port_b); end BuildingSpawnZ1;

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingSpawnZ6 Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingSpawnZ6

Six-zone EnergyPlus building model based on URBANopt GeoJSON export, with distribution pumps

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingSpawnZ6

Information


This is a simplified six-zone building model based on an EnergyPlus building envelope model. It was generated from translating a GeoJSON model specified within the URBANopt UI. The heating and cooling loads are computed with a four-pipe fan coil unit model derived from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit and connected to the room model by means of fluid ports. The Attic zone is unconditionned, with a free floating temperature.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding (Partial class for building model).

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMedium in the building distribution system
IntegernZon5Number of conditioned thermal zones
RealfacMulTerUni[nZon]{5 for i in 1:nZon}Multiplier factor for terminal units
StringidfName"modelica://Buildings/Resour...Name of the IDF file
StringepwName"modelica://Buildings/Resour...Name of the weather file
StringweaName"modelica://Buildings/Resour...Name of the weather file
Configuration
Booleanhave_heaWattrueSet to true if the building has heating water system
Booleanhave_chiWattrueSet to true if the building has chilled water system
Booleanhave_eleHeafalseSet to true if the building has decentralized electric heating system
Booleanhave_eleCoofalseSet to true if the building has decentralized electric cooling system
Booleanhave_fanfalseSet to true if fan power is computed
Booleanhave_pumtrueSet to true if pump power is computed
Booleanhave_weaBusfalseSet to true to use a weather bus
Scaling
RealfacMul1Multiplier factor
Nominal condition
MassFlowRatemLoa_flow_nominal[nZon]fill(1, nZon)Load side mass flow rate at nominal conditions (single terminal unit) [kg/s]
HeatFlowRateQHea_flow_nominal[nZon]fill(2000, nZon) ./ facMulTe...Design heating heat flow rate (single terminal unit) [W]
HeatFlowRateQCoo_flow_nominal[nZon]fill(-2000, nZon) ./ facMulT...Design cooling heat flow rate (single terminal unit) [W]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

TypeNameDescription
replaceable package MediumMedium in the building distribution system
BusweaBusWeather data bus
FluidPorts_aports_aHeaWat[nPorts_aHeaWat]Heating water inlet ports
FluidPorts_bports_bHeaWat[nPorts_bHeaWat]Heating water outlet ports
FluidPorts_aports_aChiWat[nPorts_aChiWat]Chilled water inlet ports
FluidPorts_bports_bChiWat[nPorts_bChiWat]Chilled water outlet ports
output RealOutputQHea_flowTotal heating heat flow rate transferred to the loads (>=0) [W]
output RealOutputQCoo_flowTotal cooling heat flow rate transferred to the loads (<=0) [W]
output RealOutputPHeaPower drawn by decentralized heating system [W]
output RealOutputPCooPower drawn by decentralized cooling system [W]
output RealOutputPFanPower drawn by fan motors [W]
output RealOutputPPumPower drawn by pump motors [W]

Modelica definition

model BuildingSpawnZ6 "Six-zone EnergyPlus building model based on URBANopt GeoJSON export, with distribution pumps" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding( redeclare package Medium=Buildings.Media.Water, final have_heaWat=true, final have_chiWat=true, final have_eleHea=false, final have_eleCoo=false, final have_pum=true, final have_weaBus=false); package Medium2=Buildings.Media.Air "Medium model"; parameter Integer nZon=5 "Number of conditioned thermal zones"; parameter Real facMulTerUni[nZon]={5 for i in 1:nZon} "Multiplier factor for terminal units"; parameter Modelica.Units.SI.MassFlowRate mLoa_flow_nominal[nZon]=fill(1, nZon) "Load side mass flow rate at nominal conditions (single terminal unit)"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal[nZon]=fill(2000, nZon) ./ facMulTerUni "Design heating heat flow rate (single terminal unit)"; parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal[nZon]=fill(-2000, nZon) ./ facMulTerUni "Design cooling heat flow rate (single terminal unit)"; parameter String idfName="modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.idf" "Name of the IDF file"; parameter String epwName="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw" "Name of the weather file"; parameter String weaName="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos" "Name of the weather file"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTSet[nZon]( k=fill( 293.15, nZon), y(each final unit="K", each displayUnit="degC")) "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTSet[nZon]( k=fill( 297.15, nZon), y(each final unit="K", each displayUnit="degC")) "Maximum temperature set point"; Modelica.Blocks.Sources.Constant qConGai_flow( k=0) "Convective heat gain"; Modelica.Blocks.Sources.Constant qRadGai_flow( k=0) "Radiative heat gain"; Modelica.Blocks.Routing.Multiplex3 multiplex3_1; Modelica.Blocks.Sources.Constant qLatGai_flow( k=0) "Latent heat gain"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znAttic( redeclare package Medium=Medium2, zoneName="Attic") "Thermal zone"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znCore_ZN( redeclare package Medium=Medium2, zoneName="Core_ZN", nPorts=2) "Thermal zone"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znPerimeter_ZN_1( redeclare package Medium=Medium2, zoneName="Perimeter_ZN_1", nPorts=2) "Thermal zone"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znPerimeter_ZN_2( redeclare package Medium=Medium2, zoneName="Perimeter_ZN_2", nPorts=2) "Thermal zone"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znPerimeter_ZN_3( redeclare package Medium=Medium2, zoneName="Perimeter_ZN_3", nPorts=2) "Thermal zone"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znPerimeter_ZN_4( redeclare package Medium=Medium2, zoneName="Perimeter_ZN_4", nPorts=2) "Thermal zone"; inner Buildings.ThermalZones.EnergyPlus_9_6_0.Building building( idfName=Modelica.Utilities.Files.loadResource( idfName), epwName=Modelica.Utilities.Files.loadResource( epwName), weaName=Modelica.Utilities.Files.loadResource( weaName)) "Building outer component"; Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum( final nin=nZon); Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum3( nin=2); Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4Pipe terUni[nZon]( redeclare each final package Medium1=Medium, redeclare each final package Medium2=Medium2, final facMul=facMulTerUni, final QHea_flow_nominal=QHea_flow_nominal, final QCoo_flow_nominal=QCoo_flow_nominal, each T_aLoaHea_nominal=293.15, each T_aLoaCoo_nominal=297.15, each T_bHeaWat_nominal=308.15, each T_bChiWat_nominal=285.15, each T_aHeaWat_nominal=313.15, each T_aChiWat_nominal=280.15, final mLoaHea_flow_nominal=mLoa_flow_nominal, final mLoaCoo_flow_nominal=mLoa_flow_nominal) "Terminal unit"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloHea( redeclare package Medium=Medium, m_flow_nominal=sum( terUni.mHeaWat_flow_nominal .* terUni.facMul), have_pum=true, dp_nominal=100000, nPorts_a1=nZon, nPorts_b1=nZon) "Heating water distribution system"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloCoo( redeclare package Medium=Medium, m_flow_nominal=sum( terUni.mChiWat_flow_nominal .* terUni.facMul), typDis=Buildings.Experimental.DHC.Loads.BaseClasses.Types.DistributionType.ChilledWater, have_pum=true, dp_nominal=100000, nPorts_a1=nZon, nPorts_b1=nZon) "Chilled water distribution system"; equation connect(qRadGai_flow.y,multiplex3_1.u1[1]); connect(qConGai_flow.y,multiplex3_1.u2[1]); connect(multiplex3_1.u3[1],qLatGai_flow.y); connect(multiplex3_1.y,znAttic.qGai_flow); connect(multiplex3_1.y,znCore_ZN.qGai_flow); connect(multiplex3_1.y,znPerimeter_ZN_1.qGai_flow); connect(multiplex3_1.y,znPerimeter_ZN_2.qGai_flow); connect(multiplex3_1.y,znPerimeter_ZN_3.qGai_flow); connect(multiplex3_1.y,znPerimeter_ZN_4.qGai_flow); connect(znCore_ZN.ports[1],terUni[1].port_aLoa); connect(terUni[1].port_bLoa,znCore_ZN.ports[2]); connect(znPerimeter_ZN_1.ports[1],terUni[2].port_aLoa); connect(terUni[2].port_bLoa,znPerimeter_ZN_1.ports[2]); connect(znPerimeter_ZN_2.ports[1],terUni[3].port_aLoa); connect(terUni[3].port_bLoa,znPerimeter_ZN_2.ports[2]); connect(znPerimeter_ZN_3.ports[1],terUni[4].port_aLoa); connect(terUni[4].port_bLoa,znPerimeter_ZN_3.ports[2]); connect(znPerimeter_ZN_4.ports[1],terUni[5].port_aLoa); connect(terUni[5].port_bLoa,znPerimeter_ZN_4.ports[2]); connect(terUni.port_bHeaWat,disFloHea.ports_a1); connect(disFloHea.ports_b1,terUni.port_aHeaWat); connect(disFloCoo.ports_b1,terUni.port_aChiWat); connect(terUni.port_bChiWat,disFloCoo.ports_a1); connect(terUni.mReqChiWat_flow,disFloCoo.mReq_flow); connect(terUni.mReqHeaWat_flow,disFloHea.mReq_flow); connect(terUni.PFan,mulSum.u); connect(disFloHea.PPum,mulSum3.u[1]); connect(disFloCoo.PPum,mulSum3.u[2]); connect(znCore_ZN.TAir,terUni[1].TSen); connect(znPerimeter_ZN_1.TAir,terUni[2].TSen); connect(znPerimeter_ZN_2.TAir,terUni[3].TSen); connect(znPerimeter_ZN_3.TAir,terUni[4].TSen); connect(znPerimeter_ZN_4.TAir,terUni[5].TSen); connect(maxTSet.y,terUni.TSetCoo); connect(minTSet.y,terUni.TSetHea); connect(disFloHea.QActTot_flow, mulQHea_flow.u); connect(mulSum3.y, mulPPum.u); connect(mulSum.y, mulPFan.u); connect(disFloCoo.QActTot_flow, mulQCoo_flow.u); connect(mulHeaWatInl[1].port_b, disFloHea.port_a); connect(mulChiWatInl[1].port_b, disFloCoo.port_a); connect(mulChiWatOut[1].port_a, disFloCoo.port_b); connect(mulHeaWatOut[1].port_a, disFloHea.port_b); end BuildingSpawnZ6;

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingTimeSeries Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingTimeSeries

Building model with heating and/or cooling loads provided as time series

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.BuildingTimeSeries

Information

This is a simplified building model where the space heating and cooling loads are provided as time series. In order to approximate the emission characteristic of the building HVAC system, this model uses idealized fan coil models that are parameterized with the peak load, determined from the provided time series, and design values of the hot water and chilled water supply and return temperatures.

The time series that provide the loads are read from the file filNam. This file must have columns as shown in this example:

#1
#Heating, cooling and domestic hot water loads
#
#First column: Seconds in the year (loads are hourly)
#Second column: cooling loads in Watts (as negative numbers).
#Third column: space heating loads in Watts
#Fourth column: domestic hot water loads in Watts
#
#Peak space cooling load = -146960 Watts
#Peak space heating load = 167690 Watts
#Peak water heating load = 9390 Watts
double tab1(8760,4)
0;0;18230;0
3600;0;17520;0
7200;0;20170;0
10800;0;22450;0
[further rows omitted]
Specificallly, the format must be as follows:

The entry double tab1(8760,4) shows how many columns and rows are present.

The header also needs to contain the lines that start with #Peak as shown in the example above.

Implementation details

The total space heating (resp. cooling) load is split between facMulHea (resp. facMulCoo) identical terminal units with heat transfer performance approximated based on design specifications of a reference terminal unit. It is not expected that the user modifies the default values that are proposed for facMulHea and facMulCoo unless detailed design data are available for the building HVAC system. In that latter case, the following set of parameters should be modified consistently to match the design data.

For reference, the default reference terminal unit performance is based on manufacturer data (Carrier fan coil model 42NL/NH) at selection conditions as specified in the "Advanced" tab.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding (Partial class for building model).

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMedium in the building distribution system
replaceable package Medium2Buildings.Media.AirLoad side medium
StringfilNam File name with thermal loads as time series
Realk0.1Gain of controller
TimeTi10Time constant of integrator block [s]
FanCoil2PipeHeatingterUniHeaterUniHea(final k=k, final T...Heating terminal unit
FanCoil2PipeCoolingterUniCooterUniCoo(final k=k, final T...Cooling terminal unit
Configuration
Booleanhave_heaWattrueSet to true if the building has heating water system
Booleanhave_chiWattrueSet to true if the building has chilled water system
Booleanhave_eleHeafalseSet to true if the building has decentralized electric heating system
Booleanhave_eleCoofalseSet to true if the building has decentralized electric cooling system
Booleanhave_fanfalseSet to true if fan power is computed
Booleanhave_pumtrueSet to true if pump power is computed
Booleanhave_weaBusfalseSet to true to use a weather bus
Booleanhave_hotWatfalseSet to true if SHW load is included in the time series
Scaling
RealfacMul1Multiplier factor
Nominal condition
TemperatureT_aHeaWat_nominal323.15Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 10Heating water outlet temperature at nominal conditions [K]
TemperatureT_aChiWat_nominal280.15Chilled water inlet temperature at nominal conditions [K]
TemperatureT_bChiWat_nominalT_aChiWat_nominal + 5Chilled water outlet temperature at nominal conditions [K]
HeatFlowRateQCoo_flow_nominalif have_chiWat then Building...Design cooling heat flow rate (<=0) [W]
HeatFlowRateQHea_flow_nominalif have_heaWat then Building...Design heating heat flow rate (>=0) [W]
MassFlowRatemChiWat_flow_nominalQCoo_flow_nominal/cp_default...Chilled water mass flow rate at nominal conditions (all units) [kg/s]
MassFlowRatemHeaWat_flow_nominalQHea_flow_nominal/cp_default...Heating water mass flow rate at nominal conditions (all units) [kg/s]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
Scaling
RealfacMulHeaQHea_flow_nominal/(QHea_flow...Heating terminal unit multiplier factor
RealfacMulCooQCoo_flow_nominal/(QCoo_flow...Cooling terminal unit scaling factor
Nominal condition
TemperatureT_aLoaHea_nominal293.15Load side inlet temperature at nominal conditions in heating mode [K]
TemperatureT_aLoaCoo_nominal298.15Load side inlet temperature at nominal conditions in cooling mode [K]
MassFractionw_aLoaCoo_nominal0.01Load side inlet humidity ratio at nominal conditions in cooling mode [1]
MassFlowRatemLoaHea_flow_nominal0.5Load side mass flow rate at nominal conditions in heating mode (single unit) [kg/s]
MassFlowRatemLoaCoo_flow_nominalmLoaHea_flow_nominalLoad side mass flow rate at nominal conditions in cooling mode (single unit) [kg/s]
Reference terminal unit performance
TemperatureT_aHeaWat_nominal_ref323.15Heating water inlet temperature at nominal conditions of reference terminal unit [K]
TemperatureT_aLoaHea_nominal_ref293.15Load side inlet temperature at nominal conditions in heating mode of reference terminal unit [K]
MassFlowRatemLoaHea_flow_nominal_ref0.5Load side mass flow rate at nominal conditions in heating mode of reference terminal unit [kg/s]
HeatFlowRateQHea_flow_nominal_ref4.5E3Heat flow at nominal conditions in heating mode of reference terminal unit [W]
TemperatureT_aChiWat_nominal_ref279.15Chilled water inlet temperature at nominal conditions of reference terminal unit [K]
TemperatureT_aLoaCoo_nominal_ref298.15Load side inlet temperature at nominal conditions in cooling mode of reference terminal unit [K]
MassFractionw_aLoaCoo_nominal_ref0.01Load side inlet humidity ratio at nominal conditions in cooling mode of reference terminal unit [1]
MassFlowRatemLoaCoo_flow_nominal_ref0.5Load side mass flow rate at nominal conditions in cooling mode of reference terminal unit [kg/s]
HeatFlowRateQCoo_flow_nominal_ref-5.8E3Heat flow at nominal conditions in cooling mode of reference terminal unit [W]

Connectors

TypeNameDescription
replaceable package MediumMedium in the building distribution system
BusweaBusWeather data bus
FluidPorts_aports_aHeaWat[nPorts_aHeaWat]Heating water inlet ports
FluidPorts_bports_bHeaWat[nPorts_bHeaWat]Heating water outlet ports
FluidPorts_aports_aChiWat[nPorts_aChiWat]Chilled water inlet ports
FluidPorts_bports_bChiWat[nPorts_bChiWat]Chilled water outlet ports
output RealOutputQHea_flowTotal heating heat flow rate transferred to the loads (>=0) [W]
output RealOutputQCoo_flowTotal cooling heat flow rate transferred to the loads (<=0) [W]
output RealOutputPHeaPower drawn by decentralized heating system [W]
output RealOutputPCooPower drawn by decentralized cooling system [W]
output RealOutputPFanPower drawn by fan motors [W]
output RealOutputPPumPower drawn by pump motors [W]
replaceable package Medium2Load side medium
output RealOutputQReqHotWat_flowSHW load [W]
output RealOutputQReqHea_flowHeating load [W]
output RealOutputQReqCoo_flowCooling load [W]

Modelica definition

model BuildingTimeSeries "Building model with heating and/or cooling loads provided as time series" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding( redeclare package Medium=Buildings.Media.Water, have_heaWat=true, have_chiWat=true, final have_fan=false, final have_pum=true, final have_eleHea=false, final have_eleCoo=false, final have_weaBus=false); replaceable package Medium2=Buildings.Media.Air constrainedby Modelica.Media.Interfaces.PartialMedium "Load side medium"; parameter Boolean have_hotWat = false "Set to true if SHW load is included in the time series"; parameter String filNam "File name with thermal loads as time series"; parameter Real facMulHea(min=0)=QHea_flow_nominal / (QHea_flow_nominal_ref * abs(T_aLoaHea_nominal - T_aHeaWat_nominal) / abs(T_aLoaHea_nominal_ref - T_aHeaWat_nominal_ref) * mLoaHea_flow_nominal / mLoaHea_flow_nominal_ref) "Heating terminal unit multiplier factor"; parameter Real facMulCoo(min=0)=QCoo_flow_nominal / (QCoo_flow_nominal_ref * abs(h_aLoaCoo_nominal - hSat_nominal) / abs(h_aLoaCoo_nominal_ref - hSat_nominal_ref) * mLoaCoo_flow_nominal / mLoaCoo_flow_nominal_ref) "Cooling terminal unit scaling factor"; parameter Modelica.Units.SI.Temperature T_aHeaWat_nominal=323.15 "Heating water inlet temperature at nominal conditions"; parameter Modelica.Units.SI.Temperature T_bHeaWat_nominal( min=273.15, displayUnit="degC") = T_aHeaWat_nominal - 10 "Heating water outlet temperature at nominal conditions"; parameter Modelica.Units.SI.Temperature T_aChiWat_nominal=280.15 "Chilled water inlet temperature at nominal conditions "; parameter Modelica.Units.SI.Temperature T_bChiWat_nominal( min=273.15, displayUnit="degC") = T_aChiWat_nominal + 5 "Chilled water outlet temperature at nominal conditions"; parameter Modelica.Units.SI.Temperature T_aLoaHea_nominal=293.15 "Load side inlet temperature at nominal conditions in heating mode"; parameter Modelica.Units.SI.Temperature T_aLoaCoo_nominal=298.15 "Load side inlet temperature at nominal conditions in cooling mode"; parameter Modelica.Units.SI.MassFraction w_aLoaCoo_nominal=0.01 "Load side inlet humidity ratio at nominal conditions in cooling mode"; parameter Modelica.Units.SI.MassFlowRate mLoaHea_flow_nominal(min=Modelica.Constants.eps)=0.5 "Load side mass flow rate at nominal conditions in heating mode (single unit)"; parameter Modelica.Units.SI.MassFlowRate mLoaCoo_flow_nominal(min=Modelica.Constants.eps)= mLoaHea_flow_nominal "Load side mass flow rate at nominal conditions in cooling mode (single unit)"; parameter Modelica.Units.SI.Temperature T_aHeaWat_nominal_ref=323.15 "Heating water inlet temperature at nominal conditions of reference terminal unit"; parameter Modelica.Units.SI.Temperature T_aLoaHea_nominal_ref=293.15 "Load side inlet temperature at nominal conditions in heating mode of reference terminal unit"; parameter Modelica.Units.SI.MassFlowRate mLoaHea_flow_nominal_ref(min=Modelica.Constants.eps) = 0.5 "Load side mass flow rate at nominal conditions in heating mode of reference terminal unit"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal_ref(min=Modelica.Constants.eps) = 4.5E3 "Heat flow at nominal conditions in heating mode of reference terminal unit"; parameter Modelica.Units.SI.Temperature T_aChiWat_nominal_ref=279.15 "Chilled water inlet temperature at nominal conditions of reference terminal unit"; parameter Modelica.Units.SI.Temperature T_aLoaCoo_nominal_ref=298.15 "Load side inlet temperature at nominal conditions in cooling mode of reference terminal unit"; parameter Modelica.Units.SI.MassFraction w_aLoaCoo_nominal_ref=0.01 "Load side inlet humidity ratio at nominal conditions in cooling mode of reference terminal unit"; parameter Modelica.Units.SI.MassFlowRate mLoaCoo_flow_nominal_ref(min=Modelica.Constants.eps) = 0.5 "Load side mass flow rate at nominal conditions in cooling mode of reference terminal unit"; parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal_ref(max=-Modelica.Constants.eps) = -5.8E3 "Heat flow at nominal conditions in cooling mode of reference terminal unit"; parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal(max=0)= if have_chiWat then Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad(string= "#Peak space cooling load", filNam=Modelica.Utilities.Files.loadResource(filNam)) else 0 "Design cooling heat flow rate (<=0)"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal(min=0)= if have_heaWat then Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad(string= "#Peak space heating load", filNam=Modelica.Utilities.Files.loadResource(filNam)) else 0 "Design heating heat flow rate (>=0)"; parameter Modelica.Units.SI.MassFlowRate mChiWat_flow_nominal(min=0)= QCoo_flow_nominal/cp_default/(T_aChiWat_nominal - T_bChiWat_nominal) "Chilled water mass flow rate at nominal conditions (all units)"; parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal(min=0)= QHea_flow_nominal/cp_default/(T_aHeaWat_nominal - T_bHeaWat_nominal) "Heating water mass flow rate at nominal conditions (all units)"; parameter Real k( min=0)=0.1 "Gain of controller"; parameter Modelica.Units.SI.Time Ti(min=Modelica.Constants.small) = 10 "Time constant of integrator block"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput QReqHotWat_flow( final unit="W") if have_hotWat "SHW load"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput QReqHea_flow( final quantity="HeatFlowRate", final unit="W") if have_heaLoa "Heating load"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput QReqCoo_flow( final quantity="HeatFlowRate", final unit="W") if have_cooLoa "Cooling load"; Modelica.Blocks.Sources.CombiTimeTable loa( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( filNam), extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, y(each unit="W"), offset={0,0,0}, columns={2,3,4}, smoothness=Modelica.Blocks.Types.Smoothness.MonotoneContinuousDerivative1) "Reader for thermal loads (y[1] is cooling load, y[2] is space heating load, y[3] is domestic water heat load)"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant minTSet( k=293.15, y(final unit="K", displayUnit="degC")) if have_heaWat "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTSet( k=297.15, y(final unit="K", displayUnit="degC")) if have_chiWat "Maximum temperature set point"; replaceable Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.FanCoil2PipeHeating terUniHea( final k=k, final Ti=Ti) if have_heaWat constrainedby Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit ( redeclare final package Medium1=Medium, redeclare final package Medium2=Medium2, final allowFlowReversal=allowFlowReversal, final facMul=facMulHea, final facMulZon=1, final QHea_flow_nominal=QHea_flow_nominal/facMulHea, final mLoaHea_flow_nominal=mLoaHea_flow_nominal, final T_aHeaWat_nominal=T_aHeaWat_nominal, final T_bHeaWat_nominal=T_bHeaWat_nominal, final T_aLoaHea_nominal=T_aLoaHea_nominal) "Heating terminal unit"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloHea( redeclare final package Medium=Medium, final allowFlowReversal=allowFlowReversal, m_flow_nominal=mHeaWat_flow_nominal, have_pum=true, typCtr=Buildings.Experimental.DHC.Loads.BaseClasses.Types.PumpControlType.ConstantHead, dp_nominal=100000, nPorts_a1=1, nPorts_b1=1) if have_heaWat "Heating water distribution system"; Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution disFloCoo( redeclare final package Medium=Medium, final allowFlowReversal=allowFlowReversal, m_flow_nominal=mChiWat_flow_nominal, typDis=Buildings.Experimental.DHC.Loads.BaseClasses.Types.DistributionType.ChilledWater, have_pum=true, typCtr=Buildings.Experimental.DHC.Loads.BaseClasses.Types.PumpControlType.ConstantHead, dp_nominal=100000, nPorts_b1=1, nPorts_a1=1) if have_chiWat "Chilled water distribution system"; replaceable Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.FanCoil2PipeCooling terUniCoo( final k=k, final Ti=Ti, final QEnv_flow_nominal=if have_heaWat then QHea_flow_nominal/facMulHea else -QCoo_flow_nominal/facMulCoo) if have_chiWat constrainedby Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit ( redeclare final package Medium1 = Medium, redeclare final package Medium2 = Medium2, final allowFlowReversal=allowFlowReversal, final facMul=facMulCoo, final facMulZon=1, final QCoo_flow_nominal=QCoo_flow_nominal/facMulCoo, final mLoaCoo_flow_nominal=mLoaCoo_flow_nominal, final T_aChiWat_nominal=T_aChiWat_nominal, final T_bChiWat_nominal=T_bChiWat_nominal, final T_aLoaCoo_nominal=T_aLoaCoo_nominal, final w_aLoaCoo_nominal=w_aLoaCoo_nominal) "Cooling terminal unit"; Buildings.Controls.OBC.CDL.Reals.Add addPPum "Sum pump power"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant noCoo( k=0) if not have_chiWat "No cooling system"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant noHea( k=0) if not have_heaWat "No heating system"; Buildings.Controls.OBC.CDL.Reals.Add addPFan "Sum fan power"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter mulQReqHea_flow( u(final unit="W"), final k=facMul) if have_heaLoa "Scaling"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter mulQReqCoo_flow(u( final unit="W"), final k=facMul) if have_cooLoa "Scaling"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter mulQReqHot_flow(u(final unit="W"), final k=facMul) if have_heaLoa "Scaling"; protected parameter Modelica.Units.SI.AbsolutePressure pSat_nominal= Buildings.Utilities.Psychrometrics.Functions.saturationPressure(T_aChiWat_nominal) "Saturation pressure at entering water temperature"; parameter Modelica.Units.SI.AbsolutePressure pSat_nominal_ref= Buildings.Utilities.Psychrometrics.Functions.saturationPressure(T_aChiWat_nominal_ref) "Saturation pressure at entering water temperature for reference terminal unit"; parameter Modelica.Units.SI.MassFraction X1_aLoaCoo_nominal= w_aLoaCoo_nominal / (1 + w_aLoaCoo_nominal) "Water vapor concentration in [kg/kg total air]"; parameter Modelica.Units.SI.MassFraction X1Sat_nominal= Buildings.Utilities.Psychrometrics.Functions.X_pSatpphi( pSat=pSat_nominal, p=Medium2.p_default, phi=1.0) "Water vapor concentration at saturation in [kg/kg total air]"; parameter Modelica.Units.SI.MassFraction X1_aLoaCoo_nominal_ref= w_aLoaCoo_nominal_ref / (1 + w_aLoaCoo_nominal_ref) "Water vapor concentration in [kg/kg total air]"; parameter Modelica.Units.SI.MassFraction X1Sat_nominal_ref= Buildings.Utilities.Psychrometrics.Functions.X_pSatpphi( pSat=pSat_nominal_ref, p=Medium2.p_default, phi=1.0) "Water vapor concentration at saturation in [kg/kg total air]"; parameter Modelica.Units.SI.SpecificEnthalpy h_aLoaCoo_nominal= Buildings.Media.Air.specificEnthalpy_pTX( p=Medium2.p_default, T=T_aLoaCoo_nominal, X={X1_aLoaCoo_nominal, 1-X1_aLoaCoo_nominal}) "Specific enthalpy of enytering air at nominal conditions in cooling mode"; parameter Modelica.Units.SI.SpecificEnthalpy hSat_nominal= Buildings.Media.Air.specificEnthalpy_pTX( p=Medium2.p_default, T=T_aChiWat_nominal, X={X1Sat_nominal, 1-X1Sat_nominal}) "Specific enthalpy of saturated air at entering water temperature in cooling mode"; parameter Modelica.Units.SI.SpecificEnthalpy h_aLoaCoo_nominal_ref= Buildings.Media.Air.specificEnthalpy_pTX( p=Medium2.p_default, T=T_aLoaCoo_nominal_ref, X={X1_aLoaCoo_nominal_ref, 1-X1_aLoaCoo_nominal_ref}) "Specific enthalpy of enytering air at nominal conditions for reference terminal unit"; parameter Modelica.Units.SI.SpecificEnthalpy hSat_nominal_ref= Buildings.Media.Air.specificEnthalpy_pTX( p=Medium2.p_default, T=T_aChiWat_nominal_ref, X={X1Sat_nominal_ref, 1-X1Sat_nominal_ref}) "Specific enthalpy of saturated air at entering water temperature for reference terminal unit"; initial equation if have_chiWat then assert(QCoo_flow_nominal < -Modelica.Constants.eps, "QCoo_flow_nominal must be negative."); assert(T_aChiWat_nominal - T_bChiWat_nominal < 0, "Temperature difference (T_aChiWat_nominal - T_bChiWat_nominal) has wrong sign."); end if; if have_heaWat then assert(T_aHeaWat_nominal - T_bHeaWat_nominal > 0, "Temperature difference (T_aHeaWat_nominal - T_bHeaWat_nominal) has wrong sign."); end if; equation connect(terUniHea.port_bHeaWat,disFloHea.ports_a1[1]); connect(disFloHea.ports_b1[1],terUniHea.port_aHeaWat); connect(terUniHea.mReqHeaWat_flow,disFloHea.mReq_flow[1]); connect(loa.y[1],terUniCoo.QReqCoo_flow); connect(loa.y[2],terUniHea.QReqHea_flow); connect(disFloCoo.ports_b1[1],terUniCoo.port_aChiWat); connect(terUniCoo.port_bChiWat,disFloCoo.ports_a1[1]); connect(terUniCoo.mReqChiWat_flow,disFloCoo.mReq_flow[1]); connect(minTSet.y,terUniHea.TSetHea); connect(maxTSet.y,terUniCoo.TSetCoo); connect(disFloHea.PPum,addPPum.u1); connect(disFloCoo.PPum,addPPum.u2); connect(noHea.y,addPPum.u1); connect(noCoo.y,addPPum.u2); connect(noHea.y,addPFan.u1); connect(noCoo.y,addPFan.u2); connect(terUniCoo.PFan,addPFan.u2); connect(terUniHea.PFan,addPFan.u1); connect(disFloCoo.port_b, mulChiWatOut[1].port_a); connect(disFloHea.port_b, mulHeaWatOut[1].port_a); connect(mulHeaWatInl[1].port_b, disFloHea.port_a); connect(mulChiWatInl[1].port_b, disFloCoo.port_a); connect(addPFan.y, mulPFan.u); connect(addPPum.y, mulPPum.u); connect(mulQReqCoo_flow.y, QReqCoo_flow); connect(mulQReqHea_flow.y, QReqHea_flow); connect(loa.y[1], mulQReqCoo_flow.u); connect(loa.y[2], mulQReqHea_flow.u); connect(disFloHea.QActTot_flow, mulQHea_flow.u); connect(disFloCoo.QActTot_flow, mulQCoo_flow.u); connect(mulQReqHot_flow.y, QReqHotWat_flow); connect(mulQReqHot_flow.u, loa.y[3]); end BuildingTimeSeries;

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4Pipe Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4Pipe

Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4Pipe

Information

This is a simplified model of a sensible only four-pipe fan coil unit for heating and cooling. It is intended to be coupled to a room model by means of fluid ports. See Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.PartialFanCoil4Pipe for a description of the modeling principles.

Extends from PartialFanCoil4Pipe (Partial model of a sensible only four-pipe fan coil unit computing a required water mass flow rate).

Parameters

TypeNameDefaultDescription
Scaling
RealfacMul1Multiplier factor
RealfacMulZon1Zone multiplier factor
Configuration
Booleanhave_heaPorfalseSet to true for heat ports on the load side
Booleanhave_fluPortrueSet to true for fluid ports on the load side
Booleanhave_TSentrueSet to true for measured temperature as an input
Nominal condition
HeatFlowRateQHea_flow_nominal0Nominal heating capacity (>=0) [W]
HeatFlowRateQCoo_flow_nominal0Nominal cooling capacity (<=0) [W]
MassFlowRatemLoaHea_flow_nominal0Load side mass flow rate at nominal conditions in heating mode [kg/s]
MassFlowRatemLoaCoo_flow_nominal0Load side mass flow rate at nominal conditions in cooling mode [kg/s]
TemperatureT_aHeaWat_nominal273.15 + 60Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 22.2Heating water outlet temperature at nominal conditions [K]
TemperatureT_aChiWat_nominal273.15 + 7.2Chilled water inlet temperature at nominal conditions [K]
TemperatureT_bChiWat_nominalT_aChiWat_nominal + 5.6Chilled water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 21.1Load side inlet temperature at nominal conditions in heating mode [K]
TemperatureT_aLoaCoo_nominal273.15 + 26.7Load side inlet temperature at nominal conditions in cooling mode [K]
MassFractionw_aLoaCoo_nominal0.011Load side inlet humidity ratio at nominal conditions in cooling mode [1]

Connectors

TypeNameDescription
input RealInputTSenTemperature (measured) [K]
input RealInputTSetHeaHeating set point [K]
input RealInputTSetCooCooling set point [K]
input RealInputQReqHea_flowRequired heat flow rate to meet heating set point (>=0) [W]
input RealInputQReqCoo_flowRequired heat flow rate to meet cooling set point (<=0) [W]
output RealOutputQActHea_flowHeating heat flow rate transferred to the load (>=0) [W]
output RealOutputQActCoo_flowCooling heat flow rate transferred to the load (<=0) [W]
output RealOutputPHeaPower drawn by heating system [W]
output RealOutputPCooPower drawn by cooling system [W]
output RealOutputPFanPower drawn by fans motors [W]
output RealOutputPPumPower drawn by pumps motors [W]
output RealOutputmReqHeaWat_flowRequired heating water flow rate to meet heating set point [kg/s]
output RealOutputmReqChiWat_flowRequired chilled water flow rate to meet cooling set point [kg/s]
FluidPort_aport_aLoaFluid stream inlet port on the load side
FluidPort_bport_bLoaFluid stream outlet port on the load side
HeatPort_bheaPorConHeat port transferring convective heat to the load
HeatPort_bheaPorRadHeat port transferring radiative heat to the load
BusweaBusWeather data bus
FluidPort_aport_aHeaWatHeating water inlet port
FluidPort_aport_aChiWatChilled water inlet port
FluidPort_bport_bHeaWatHeating water outlet port
FluidPort_bport_bChiWatChilled water outlet port

Modelica definition

model FanCoil4Pipe "Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate" extends PartialFanCoil4Pipe( final have_TSen=true, final have_fluPor=true, final have_heaPor=false); equation connect(TSen,conCoo.u_m); connect(TSen,conHea.u_m); connect(hexHea.port_b2,mulLoaMasFloOut.port_a); connect(mulLoaMasFloInl.port_b,fan.port_a); end FanCoil4Pipe;

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4PipeHeatPorts Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4PipeHeatPorts

Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.FanCoil4PipeHeatPorts

Information

This is a simplified model of a sensible only four-pipe fan coil unit for heating and cooling. It is intended to be coupled to a room model by means of heat ports. See Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.PartialFanCoil4Pipe for a description of the modeling principles.

Extends from PartialFanCoil4Pipe (Partial model of a sensible only four-pipe fan coil unit computing a required water mass flow rate).

Parameters

TypeNameDefaultDescription
Scaling
RealfacMul1Multiplier factor
RealfacMulZon1Zone multiplier factor
Configuration
Booleanhave_heaPortrueSet to true for heat ports on the load side
Booleanhave_fluPorfalseSet to true for fluid ports on the load side
Booleanhave_TSenfalseSet to true for measured temperature as an input
Nominal condition
HeatFlowRateQHea_flow_nominal0Nominal heating capacity (>=0) [W]
HeatFlowRateQCoo_flow_nominal0Nominal cooling capacity (<=0) [W]
MassFlowRatemLoaHea_flow_nominal0Load side mass flow rate at nominal conditions in heating mode [kg/s]
MassFlowRatemLoaCoo_flow_nominal0Load side mass flow rate at nominal conditions in cooling mode [kg/s]
TemperatureT_aHeaWat_nominal273.15 + 60Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 22.2Heating water outlet temperature at nominal conditions [K]
TemperatureT_aChiWat_nominal273.15 + 7.2Chilled water inlet temperature at nominal conditions [K]
TemperatureT_bChiWat_nominalT_aChiWat_nominal + 5.6Chilled water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 21.1Load side inlet temperature at nominal conditions in heating mode [K]
TemperatureT_aLoaCoo_nominal273.15 + 26.7Load side inlet temperature at nominal conditions in cooling mode [K]
MassFractionw_aLoaCoo_nominal0.011Load side inlet humidity ratio at nominal conditions in cooling mode [1]

Connectors

TypeNameDescription
input RealInputTSenTemperature (measured) [K]
input RealInputTSetHeaHeating set point [K]
input RealInputTSetCooCooling set point [K]
input RealInputQReqHea_flowRequired heat flow rate to meet heating set point (>=0) [W]
input RealInputQReqCoo_flowRequired heat flow rate to meet cooling set point (<=0) [W]
output RealOutputQActHea_flowHeating heat flow rate transferred to the load (>=0) [W]
output RealOutputQActCoo_flowCooling heat flow rate transferred to the load (<=0) [W]
output RealOutputPHeaPower drawn by heating system [W]
output RealOutputPCooPower drawn by cooling system [W]
output RealOutputPFanPower drawn by fans motors [W]
output RealOutputPPumPower drawn by pumps motors [W]
output RealOutputmReqHeaWat_flowRequired heating water flow rate to meet heating set point [kg/s]
output RealOutputmReqChiWat_flowRequired chilled water flow rate to meet cooling set point [kg/s]
FluidPort_aport_aLoaFluid stream inlet port on the load side
FluidPort_bport_bLoaFluid stream outlet port on the load side
HeatPort_bheaPorConHeat port transferring convective heat to the load
HeatPort_bheaPorRadHeat port transferring radiative heat to the load
BusweaBusWeather data bus
FluidPort_aport_aHeaWatHeating water inlet port
FluidPort_aport_aChiWatChilled water inlet port
FluidPort_bport_bHeaWatHeating water outlet port
FluidPort_bport_bChiWatChilled water outlet port

Modelica definition

model FanCoil4PipeHeatPorts "Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate" extends PartialFanCoil4Pipe( final have_heaPor=true, final have_fluPor=false, final have_TSen=false); Buildings.HeatTransfer.Sources.PrescribedHeatFlow heaFloHeaCon "Convective heat flow rate to load"; Buildings.HeatTransfer.Sources.PrescribedHeatFlow heaFloCooCon "Convective heat flow rate to load"; Fluid.Sources.Boundary_pT retAir( redeclare package Medium=Medium2, use_T_in=true, nPorts=1) "Source for return air"; Fluid.Sources.Boundary_pT sinAir( redeclare package Medium=Medium2, use_T_in=false, nPorts=1) "Sink for supply air"; HeatTransfer.Sources.PrescribedHeatFlow heaFloHeaRad "Radiative heat flow rate to load"; HeatTransfer.Sources.PrescribedHeatFlow heaFloCooRad "Radiative heat flow rate to load"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant zero( k=0) "Zero"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senT "Load temperature (measured)"; equation connect(hexHea.port_b2,sinAir.ports[1]); connect(Q_flowCoo.y,heaFloCooCon.Q_flow); connect(Q_flowHea.y,heaFloHeaCon.Q_flow); connect(zero.y,heaFloHeaRad.Q_flow); connect(zero.y,heaFloCooRad.Q_flow); connect(retAir.ports[1],fan.port_a); connect(heaPorCon,senT.port); connect(senT.T,retAir.T_in); connect(senT.T,conCoo.u_m); connect(senT.T,conHea.u_m); connect(heaFloCooCon.port,mulHeaFloCon.port_a); connect(heaFloHeaCon.port,mulHeaFloCon.port_a); connect(heaFloHeaRad.port,mulHeaFloRad.port_a); connect(heaFloCooRad.port,mulHeaFloRad.port_a); end FanCoil4PipeHeatPorts;

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.PartialFanCoil4Pipe Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.PartialFanCoil4Pipe

Partial model of a sensible only four-pipe fan coil unit computing a required water mass flow rate

Buildings.Experimental.DHC.Loads.BaseClasses.Examples.BaseClasses.PartialFanCoil4Pipe

Information

This is a simplified partial model of a sensible only four-pipe fan coil unit for heating and cooling. It is intended to be used in conjunction with Buildings.Experimental.DHC.Loads.BaseClasses.FlowDistribution, and hence it computes the water mass flow rate required to meet the temperature set point.

For the sake of simplicity, a sensible only heat exchanger model is considered.

For the sake of computational performance, a PI controller is used instead of an inverse model of the heat exchanger to assess the required water mass flow rate. Each controller output signal is mapped linearly to the water mass flow rate, from zero to its nominal value. The maximum of the two output signals is mapped linearly to the air mass flow rate, from zero to its nominal value.

The model takes the measured room air temperature as an input (as opposed to the fan inlet temperature) to maintain a valid control loop output in case of zero air flow rate.

The model is partial to allow various connectivity options on the load side: either with fluid ports or with heat ports.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit (Partial model for HVAC terminal unit).

Parameters

TypeNameDefaultDescription
replaceable package Medium1WaterMedium in the building distribution system
replaceable package Medium2AirLoad side medium
Scaling
RealfacMul1Multiplier factor
RealfacMulZon1Zone multiplier factor
Configuration
Booleanhave_heaWattrueSet to true if the system uses heating water
Booleanhave_chiWattrueSet to true if the system uses chilled water
Booleanhave_chaOvefalseSet to true if the chilled water based heat exchanger operates in change-over
Booleanhave_eleHeafalseSet to true if the system has electric heating system
Booleanhave_eleCoofalseSet to true if the system has electric cooling system
Booleanhave_heaPorfalseSet to true for heat ports on the load side
Booleanhave_fluPorfalseSet to true for fluid ports on the load side
Booleanhave_TSenfalseSet to true for measured temperature as an input
Booleanhave_QReq_flowfalseSet to true for required heat flow rate as an input
Booleanhave_weaBusfalseSet to true to use a weather bus
Booleanhave_fantrueSet to true if fan power is computed
Booleanhave_pumfalseSet to true if pump power is computed
Nominal condition
HeatFlowRateQHea_flow_nominal0Nominal heating capacity (>=0) [W]
HeatFlowRateQCoo_flow_nominal0Nominal cooling capacity (<=0) [W]
MassFlowRatemHeaWat_flow_nominalabs(QHea_flow_nominal/cpHeaW...Heating water mass flow rate at nominal conditions [kg/s]
MassFlowRatemChiWat_flow_nominalabs(QCoo_flow_nominal/cpChiW...Chilled water mass flow rate at nominal conditions [kg/s]
MassFlowRatemLoaHea_flow_nominal0Load side mass flow rate at nominal conditions in heating mode [kg/s]
MassFlowRatemLoaCoo_flow_nominal0Load side mass flow rate at nominal conditions in cooling mode [kg/s]
TemperatureT_aHeaWat_nominal273.15 + 60Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 22.2Heating water outlet temperature at nominal conditions [K]
TemperatureT_aChiWat_nominal273.15 + 7.2Chilled water inlet temperature at nominal conditions [K]
TemperatureT_bChiWat_nominalT_aChiWat_nominal + 5.6Chilled water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 21.1Load side inlet temperature at nominal conditions in heating mode [K]
TemperatureT_aLoaCoo_nominal273.15 + 26.7Load side inlet temperature at nominal conditions in cooling mode [K]
MassFractionw_aLoaCoo_nominal0.011Load side inlet humidity ratio at nominal conditions in cooling mode [1]
Assumptions
BooleanallowFlowReversalfalseSet to true to allow flow reversal in building distribution system
BooleanallowFlowReversalLoatrueSet to true to allow flow reversal on the load side

Connectors

TypeNameDescription
replaceable package Medium1Medium in the building distribution system
replaceable package Medium2Load side medium
input RealInputTSenTemperature (measured) [K]
input RealInputTSetHeaHeating set point [K]
input RealInputTSetCooCooling set point [K]
input RealInputQReqHea_flowRequired heat flow rate to meet heating set point (>=0) [W]
input RealInputQReqCoo_flowRequired heat flow rate to meet cooling set point (<=0) [W]
output RealOutputQActHea_flowHeating heat flow rate transferred to the load (>=0) [W]
output RealOutputQActCoo_flowCooling heat flow rate transferred to the load (<=0) [W]
output RealOutputPHeaPower drawn by heating system [W]
output RealOutputPCooPower drawn by cooling system [W]
output RealOutputPFanPower drawn by fans motors [W]
output RealOutputPPumPower drawn by pumps motors [W]
output RealOutputmReqHeaWat_flowRequired heating water flow rate to meet heating set point [kg/s]
output RealOutputmReqChiWat_flowRequired chilled water flow rate to meet cooling set point [kg/s]
FluidPort_aport_aLoaFluid stream inlet port on the load side
FluidPort_bport_bLoaFluid stream outlet port on the load side
HeatPort_bheaPorConHeat port transferring convective heat to the load
HeatPort_bheaPorRadHeat port transferring radiative heat to the load
BusweaBusWeather data bus
FluidPort_aport_aHeaWatHeating water inlet port
FluidPort_aport_aChiWatChilled water inlet port
FluidPort_bport_bHeaWatHeating water outlet port
FluidPort_bport_bChiWatChilled water outlet port

Modelica definition

partial model PartialFanCoil4Pipe "Partial model of a sensible only four-pipe fan coil unit computing a required water mass flow rate" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit( redeclare package Medium1=Buildings.Media.Water, redeclare package Medium2=Buildings.Media.Air, final have_heaWat=true, final have_chiWat=true, final have_fan=true, final allowFlowReversal=false, final allowFlowReversalLoa=true, final have_chaOve=false, final have_eleHea=false, final have_eleCoo=false, final have_QReq_flow=false, final have_weaBus=false, final have_pum=false, final mHeaWat_flow_nominal=abs( QHea_flow_nominal/cpHeaWat_nominal/(T_aHeaWat_nominal-T_bHeaWat_nominal)), final mChiWat_flow_nominal=abs( QCoo_flow_nominal/cpChiWat_nominal/(T_aChiWat_nominal-T_bChiWat_nominal))); import hexConfiguration=Buildings.Fluid.Types.HeatExchangerConfiguration; final parameter hexConfiguration hexConHea=hexConfiguration.CounterFlow "Heating heat exchanger configuration"; final parameter hexConfiguration hexConCoo=hexConfiguration.CounterFlow "Cooling heat exchanger configuration"; Buildings.Controls.OBC.CDL.Reals.PID conHea( Ti=10, yMax=1, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, reverseActing=true, yMin=0) "PI controller for heating"; Buildings.Fluid.Movers.FlowControlled_m_flow fan( redeclare final package Medium=Medium2, final m_flow_nominal=max( {mLoaHea_flow_nominal,mLoaCoo_flow_nominal}), redeclare final Fluid.Movers.Data.Generic per, nominalValuesDefineDefaultPressureCurve=true, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, use_inputFilter=false, dp_nominal=400, final allowFlowReversal=allowFlowReversalLoa); Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexHea( redeclare final package Medium1=Medium1, redeclare final package Medium2=Medium2, final configuration=hexConHea, final m1_flow_nominal=mHeaWat_flow_nominal, final m2_flow_nominal=mLoaHea_flow_nominal, final dp1_nominal=0, dp2_nominal=200, final Q_flow_nominal=QHea_flow_nominal, final T_a1_nominal=T_aHeaWat_nominal, final T_a2_nominal=T_aLoaHea_nominal, final allowFlowReversal1=allowFlowReversal, final allowFlowReversal2=allowFlowReversalLoa); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiHeaFloNom(k= mHeaWat_flow_nominal); Modelica.Blocks.Sources.RealExpression Q_flowHea( y=hexHea.Q2_flow); Fluid.HeatExchangers.WetCoilEffectivenessNTU hexWetNtu( redeclare final package Medium1=Medium1, redeclare final package Medium2=Medium2, final configuration=hexConCoo, final m1_flow_nominal=mChiWat_flow_nominal, final m2_flow_nominal=mLoaCoo_flow_nominal, final dp1_nominal=0, dp2_nominal=200, use_Q_flow_nominal=true, final Q_flow_nominal=QCoo_flow_nominal, final T_a1_nominal=T_aChiWat_nominal, final T_a2_nominal=T_aLoaCoo_nominal, final allowFlowReversal1=allowFlowReversal, final allowFlowReversal2=allowFlowReversalLoa, final w_a2_nominal=w_aLoaCoo_nominal); Modelica.Blocks.Sources.RealExpression Q_flowCoo(y=hexWetNtu.Q2_flow); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiFloNom2(k=max({ mLoaHea_flow_nominal,mLoaCoo_flow_nominal})); Buildings.Controls.OBC.CDL.Reals.PID conCoo( Ti=10, yMax=1, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, reverseActing=false, yMin=0) "PI controller for cooling"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiCooFloNom(k= mChiWat_flow_nominal) "Scaling"; Utilities.Math.SmoothMax smoothMax( deltaX=1E-2) "C1 maximum"; equation connect(hexWetNtu.port_b2, hexHea.port_a2); connect(fan.port_b, hexWetNtu.port_a2); connect(gaiFloNom2.y,fan.m_flow_in); connect(conHea.y,gaiHeaFloNom.u); connect(conCoo.y,gaiCooFloNom.u); connect(gaiHeaFloNom.y,mulMasFloReqHeaWat.u); connect(gaiCooFloNom.y,mulMasFloReqChiWat.u); connect(fan.P,mulPFan.u); connect(Q_flowHea.y,mulQActHea_flow.u); connect(Q_flowCoo.y,mulQActCoo_flow.u); connect(TSetCoo,conCoo.u_s); connect(TSetHea,conHea.u_s); connect(smoothMax.y,gaiFloNom2.u); connect(conHea.y,smoothMax.u1); connect(conCoo.y,smoothMax.u2); connect(mulChiWatFloInl.port_b, hexWetNtu.port_a1); connect(hexWetNtu.port_b1, mulChiWatFloOut.port_a); connect(hexHea.port_b1,mulHeaWatFloOut.port_a); connect(mulHeaWatFloInl.port_b,hexHea.port_a1); end PartialFanCoil4Pipe;