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 |
BuildingRCZ1Valve
|
One-zone RC building model with distribution pumps and mixing valves |
BuildingRCZ6
|
Six-zone RC building model based on URBANopt GeoJSON export, with distribution pumps |
BuildingSpawnZ1
|
One-zone EnergyPlus building model |
BuildingSpawnZ6
|
Six-zone EnergyPlus building model based on URBANopt GeoJSON export, with distribution pumps |
BuildingTimeSeries
|
Building model with heating and cooling loads provided as time series |
FanCoil4Pipe
|
Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate |
FanCoil4PipeHeatPorts
|
Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate |
PartialFanCoil4Pipe
|
Partial model of a sensible only four-pipe fan coil unit computing a required water mass flow rate |
GeojsonExportRC
|
Package with RC building zone models |
One-zone RC building model with distribution pumps and mixing valves
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
Type | Name | Default | Description |
replaceable package Medium | Water | Medium in the building distribution system |
Integer | nZon | 1 | Number of thermal zones |
Configuration |
Boolean | have_heaWat | true | Set to true if the building has heating water system |
Boolean | have_chiWat | true | Set to true if the building has chilled water system |
Boolean | have_eleHea | false | Set to true if the building has decentralized electric heating system |
Boolean | have_eleCoo | false | Set to true if the building has decentralized electric cooling system |
Boolean | have_fan | false | Set to true if fan power is computed |
Boolean | have_pum | false | Set to true if pump power is computed |
Boolean | have_weaBus | true | Set to true to use a weather bus |
Scaling |
Real | facMul | 1 | Multiplier factor |
Assumptions |
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the building distribution system |
Bus | weaBus | Weather data bus |
FluidPorts_a | ports_aHeaWat[nPorts_aHeaWat] | Heating water inlet ports |
FluidPorts_b | ports_bHeaWat[nPorts_bHeaWat] | Heating water outlet ports |
FluidPorts_a | ports_aChiWat[nPorts_aChiWat] | Chilled water inlet ports |
FluidPorts_b | ports_bChiWat[nPorts_bChiWat] | Chilled water outlet ports |
output RealOutput | QHea_flow | Total heating heat flow rate transferred to the loads (>=0) [W] |
output RealOutput | QCoo_flow | Total cooling heat flow rate transferred to the loads (<=0) [W] |
output RealOutput | PHea | Power drawn by decentralized heating system [W] |
output RealOutput | PCoo | Power drawn by decentralized cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
Modelica definition
model BuildingRCZ1Valve
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
;
parameter Integer nZon=1
;
Buildings.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[2](
each outSkyCon=true,
each outGroCon=true,
each til=1.5707963267949,
azi={3.1415926535898,4.7123889803847})
;
Buildings.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[2](
each til=
1.5707963267949, azi={3.1415926535898,4.7123889803847})
;
Buildings.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane corGDouPan(
n=2,
UWin=2.1)
;
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)
;
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)
;
Modelica.Blocks.Math.Add solRad[2]
;
Buildings.HeatTransfer.Sources.PrescribedTemperature preTem
;
Buildings.HeatTransfer.Sources.PrescribedTemperature preTem1
;
Modelica.Thermal.HeatTransfer.Components.Convection theConWin
;
Modelica.Thermal.HeatTransfer.Components.Convection theConWall
;
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow perRad
;
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow perCon
;
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)
;
Modelica.Blocks.Sources.Constant const[2](
each k=0)
;
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow macConv
;
Modelica.Blocks.Sources.Constant hConWall(
k=25*11.5)
;
Modelica.Blocks.Sources.Constant hConWin(
k=20*14)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet(
k=293.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxTSet(
k=297.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Continuous.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)
;
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)
;
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)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetSecHea(
k=308.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetSecChi(
k=289.15,
y(
final unit="K",
displayUnit="degC"))
;
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;
Six-zone RC building model based on URBANopt GeoJSON export, with distribution pumps
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
Type | Name | Default | Description |
replaceable package Medium | Water | Medium in the building distribution system |
Integer | nZon | 6 | Number of thermal zones |
Real | facMulTerUni[nZon] | {15 for i in 1:nZon} | Multiplier factor for terminal units |
Configuration |
Boolean | have_heaWat | true | Set to true if the building has heating water system |
Boolean | have_chiWat | true | Set to true if the building has chilled water system |
Boolean | have_eleHea | false | Set to true if the building has decentralized electric heating system |
Boolean | have_eleCoo | false | Set to true if the building has decentralized electric cooling system |
Boolean | have_fan | false | Set to true if fan power is computed |
Boolean | have_pum | true | Set to true if pump power is computed |
Boolean | have_weaBus | true | Set to true to use a weather bus |
Scaling |
Real | facMul | 1 | Multiplier factor |
Nominal condition |
MassFlowRate | mLoa_flow_nominal[nZon] | fill(1, nZon) | Load side mass flow rate at nominal conditions [kg/s] |
HeatFlowRate | QHea_flow_nominal[nZon] | fill(10000, nZon) ./ facMulT... | Design heating heat flow rate (>=0) [W] |
HeatFlowRate | QCoo_flow_nominal[nZon] | cat(1, fill(-10000, nZon - 1... | Design cooling heat flow rate (<=0) [W] |
Assumptions |
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the building distribution system |
Bus | weaBus | Weather data bus |
FluidPorts_a | ports_aHeaWat[nPorts_aHeaWat] | Heating water inlet ports |
FluidPorts_b | ports_bHeaWat[nPorts_bHeaWat] | Heating water outlet ports |
FluidPorts_a | ports_aChiWat[nPorts_aChiWat] | Chilled water inlet ports |
FluidPorts_b | ports_bChiWat[nPorts_bChiWat] | Chilled water outlet ports |
output RealOutput | QHea_flow | Total heating heat flow rate transferred to the loads (>=0) [W] |
output RealOutput | QCoo_flow | Total cooling heat flow rate transferred to the loads (<=0) [W] |
output RealOutput | PHea | Power drawn by decentralized heating system [W] |
output RealOutput | PCoo | Power drawn by decentralized cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
Modelica definition
model BuildingRCZ6
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
;
parameter Integer nZon=6
;
parameter Real facMulTerUni[nZon]={15
for i
in 1:nZon}
;
parameter Modelica.Units.SI.MassFlowRate mLoa_flow_nominal[nZon]=
fill(1, nZon)
;
parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal[nZon]=
fill(10000,
nZon) ./ facMulTerUni ;
parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal[nZon]=
cat(
1,
fill(-10000, nZon - 1),
{-50000}) ./ facMulTerUni ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet[nZon](
k=
fill(
293.15,
nZon),
y(
each final unit="K",
each displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxTSet[nZon](
k=
fill(
297.15,
nZon),
y(
each final unit="K",
each displayUnit="degC"))
;
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.Continuous.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)
;
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)
;
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)
;
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;
One-zone EnergyPlus building model
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
Type | Name | Default | Description |
replaceable package Medium | Water | Medium in the building distribution system |
Integer | nZon | 1 | Number of thermal zones |
String | idfName | "modelica://Buildings/Resour... | Name of the IDF file |
String | epwName | "modelica://Buildings/Resour... | Name of the weather file |
String | weaName | "modelica://Buildings/Resour... | Name of the weather file |
Configuration |
Boolean | have_heaWat | true | Set to true if the building has heating water system |
Boolean | have_chiWat | true | Set to true if the building has chilled water system |
Boolean | have_eleHea | false | Set to true if the building has decentralized electric heating system |
Boolean | have_eleCoo | false | Set to true if the building has decentralized electric cooling system |
Boolean | have_fan | false | Set to true if fan power is computed |
Boolean | have_pum | false | Set to true if pump power is computed |
Boolean | have_weaBus | false | Set to true to use a weather bus |
Scaling |
Real | facMul | 1 | Multiplier factor |
Assumptions |
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the building distribution system |
Bus | weaBus | Weather data bus |
FluidPorts_a | ports_aHeaWat[nPorts_aHeaWat] | Heating water inlet ports |
FluidPorts_b | ports_bHeaWat[nPorts_bHeaWat] | Heating water outlet ports |
FluidPorts_a | ports_aChiWat[nPorts_aChiWat] | Chilled water inlet ports |
FluidPorts_b | ports_bChiWat[nPorts_bChiWat] | Chilled water outlet ports |
output RealOutput | QHea_flow | Total heating heat flow rate transferred to the loads (>=0) [W] |
output RealOutput | QCoo_flow | Total cooling heat flow rate transferred to the loads (<=0) [W] |
output RealOutput | PHea | Power drawn by decentralized heating system [W] |
output RealOutput | PCoo | Power drawn by decentralized cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
Modelica definition
model BuildingSpawnZ1
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
;
parameter Integer nZon=1
;
parameter String idfName="modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.idf"
;
parameter String epwName="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"
;
parameter String weaName="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"
;
Modelica.Blocks.Sources.Constant qConGai_flow(
k=0)
;
Modelica.Blocks.Sources.Constant qRadGai_flow(
k=0)
;
Modelica.Blocks.Routing.Multiplex3 multiplex3_1;
Modelica.Blocks.Sources.Constant qLatGai_flow(
k=0)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zon(
redeclare package Medium=Medium2,
zoneName="Core_ZN",
nPorts=2)
;
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))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet(
k=293.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxTSet(
k=297.15,
y(
final unit="K",
displayUnit="degC"))
;
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)
;
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)
;
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)
;
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;
Six-zone EnergyPlus building model based on URBANopt GeoJSON export, with distribution pumps
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
Type | Name | Default | Description |
replaceable package Medium | Water | Medium in the building distribution system |
Integer | nZon | 5 | Number of conditioned thermal zones |
Real | facMulTerUni[nZon] | {5 for i in 1:nZon} | Multiplier factor for terminal units |
String | idfName | "modelica://Buildings/Resour... | Name of the IDF file |
String | epwName | "modelica://Buildings/Resour... | Name of the weather file |
String | weaName | "modelica://Buildings/Resour... | Name of the weather file |
Configuration |
Boolean | have_heaWat | true | Set to true if the building has heating water system |
Boolean | have_chiWat | true | Set to true if the building has chilled water system |
Boolean | have_eleHea | false | Set to true if the building has decentralized electric heating system |
Boolean | have_eleCoo | false | Set to true if the building has decentralized electric cooling system |
Boolean | have_fan | false | Set to true if fan power is computed |
Boolean | have_pum | true | Set to true if pump power is computed |
Boolean | have_weaBus | false | Set to true to use a weather bus |
Scaling |
Real | facMul | 1 | Multiplier factor |
Nominal condition |
MassFlowRate | mLoa_flow_nominal[nZon] | fill(1, nZon) | Load side mass flow rate at nominal conditions (single terminal unit) [kg/s] |
HeatFlowRate | QHea_flow_nominal[nZon] | fill(2000, nZon) ./ facMulTe... | Design heating heat flow rate (single terminal unit) [W] |
HeatFlowRate | QCoo_flow_nominal[nZon] | fill(-2000, nZon) ./ facMulT... | Design cooling heat flow rate (single terminal unit) [W] |
Assumptions |
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the building distribution system |
Bus | weaBus | Weather data bus |
FluidPorts_a | ports_aHeaWat[nPorts_aHeaWat] | Heating water inlet ports |
FluidPorts_b | ports_bHeaWat[nPorts_bHeaWat] | Heating water outlet ports |
FluidPorts_a | ports_aChiWat[nPorts_aChiWat] | Chilled water inlet ports |
FluidPorts_b | ports_bChiWat[nPorts_bChiWat] | Chilled water outlet ports |
output RealOutput | QHea_flow | Total heating heat flow rate transferred to the loads (>=0) [W] |
output RealOutput | QCoo_flow | Total cooling heat flow rate transferred to the loads (<=0) [W] |
output RealOutput | PHea | Power drawn by decentralized heating system [W] |
output RealOutput | PCoo | Power drawn by decentralized cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
Modelica definition
model BuildingSpawnZ6
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
;
parameter Integer nZon=5
;
parameter Real facMulTerUni[nZon]={5
for i
in 1:nZon}
;
parameter Modelica.Units.SI.MassFlowRate mLoa_flow_nominal[nZon]=
fill(1, nZon)
;
parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal[nZon]=
fill(2000,
nZon) ./ facMulTerUni
;
parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal[nZon]=
fill(-2000,
nZon) ./ facMulTerUni
;
parameter String idfName="modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.idf"
;
parameter String epwName="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"
;
parameter String weaName="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet[nZon](
k=
fill(
293.15,
nZon),
y(
each final unit="K",
each displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxTSet[nZon](
k=
fill(
297.15,
nZon),
y(
each final unit="K",
each displayUnit="degC"))
;
Modelica.Blocks.Sources.Constant qConGai_flow(
k=0)
;
Modelica.Blocks.Sources.Constant qRadGai_flow(
k=0)
;
Modelica.Blocks.Routing.Multiplex3 multiplex3_1;
Modelica.Blocks.Sources.Constant qLatGai_flow(
k=0)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znAttic(
redeclare package Medium=Medium2,
zoneName="Attic")
;
Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znCore_ZN(
redeclare package Medium=Medium2,
zoneName="Core_ZN",
nPorts=2)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znPerimeter_ZN_1(
redeclare package Medium=Medium2,
zoneName="Perimeter_ZN_1",
nPorts=2)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znPerimeter_ZN_2(
redeclare package Medium=Medium2,
zoneName="Perimeter_ZN_2",
nPorts=2)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znPerimeter_ZN_3(
redeclare package Medium=Medium2,
zoneName="Perimeter_ZN_3",
nPorts=2)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone znPerimeter_ZN_4(
redeclare package Medium=Medium2,
zoneName="Perimeter_ZN_4",
nPorts=2)
;
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))
;
Buildings.Controls.OBC.CDL.Continuous.MultiSum mulSum(
final nin=nZon);
Buildings.Controls.OBC.CDL.Continuous.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)
;
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)
;
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)
;
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;
Building model with heating and cooling loads provided as time series
Information
This is a simplified building model where the space heating and cooling loads
are provided as time series.
Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding (Partial class for building model).
Parameters
Type | Name | Default | Description |
replaceable package Medium | Water | Medium in the building distribution system |
replaceable package Medium2 | Buildings.Media.Air | Load side medium |
String | filNam | | File name with thermal loads as time series |
Real | k | 0.1 | Gain of controller |
Time | Ti | 10 | Time constant of integrator block [s] |
FanCoil2PipeHeating | terUniHea | terUniHea(final k=k, final T... | Heating terminal unit |
FanCoil2PipeCooling | terUniCoo | terUniCoo(final QHea_flow_no... | Cooling terminal unit |
Configuration |
Boolean | have_heaWat | true | Set to true if the building has heating water system |
Boolean | have_chiWat | true | Set to true if the building has chilled water system |
Boolean | have_eleHea | false | Set to true if the building has decentralized electric heating system |
Boolean | have_eleCoo | false | Set to true if the building has decentralized electric cooling system |
Boolean | have_fan | false | Set to true if fan power is computed |
Boolean | have_pum | true | Set to true if pump power is computed |
Boolean | have_weaBus | false | Set to true to use a weather bus |
Boolean | have_hotWat | false | Set to true if SHW load is included in the time series |
Scaling |
Real | facMul | 1 | Multiplier factor |
Real | facMulHea | 1 | Heating terminal unit multiplier factor |
Real | facMulCoo | 1 | Cooling terminal unit scaling factor |
Nominal condition |
Temperature | T_aHeaWat_nominal | 313.15 | Heating water inlet temperature at nominal conditions [K] |
Temperature | T_bHeaWat_nominal | T_aHeaWat_nominal - 5 | Heating water outlet temperature at nominal conditions [K] |
Temperature | T_aChiWat_nominal | 280.15 | Chilled water inlet temperature at nominal conditions [K] |
Temperature | T_bChiWat_nominal | T_aChiWat_nominal + 5 | Chilled water outlet temperature at nominal conditions [K] |
Temperature | T_aLoaHea_nominal | 293.15 | Load side inlet temperature at nominal conditions in heating mode [K] |
Temperature | T_aLoaCoo_nominal | 297.15 | Load side inlet temperature at nominal conditions in cooling mode [K] |
MassFraction | w_aLoaCoo_nominal | 0.0095 | Load side inlet humidity ratio at nominal conditions in cooling mode [1] |
MassFlowRate | mLoaHea_flow_nominal | 1 | Load side mass flow rate at nominal conditions in heating mode (single unit) [kg/s] |
MassFlowRate | mLoaCoo_flow_nominal | mLoaHea_flow_nominal | Load side mass flow rate at nominal conditions in cooling mode (single unit) [kg/s] |
HeatFlowRate | QCoo_flow_nominal | Buildings.Experimental.DHC.L... | Design cooling heat flow rate (<=0) [W] |
HeatFlowRate | QHea_flow_nominal | Buildings.Experimental.DHC.L... | Design heating heat flow rate (>=0) [W] |
MassFlowRate | mChiWat_flow_nominal | abs(QCoo_flow_nominal/cp_def... | Chilled water mass flow rate at nominal conditions (all units) [kg/s] |
MassFlowRate | mHeaWat_flow_nominal | abs(QHea_flow_nominal/cp_def... | Heating water mass flow rate at nominal conditions (all units) [kg/s] |
Assumptions |
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the building distribution system |
Bus | weaBus | Weather data bus |
FluidPorts_a | ports_aHeaWat[nPorts_aHeaWat] | Heating water inlet ports |
FluidPorts_b | ports_bHeaWat[nPorts_bHeaWat] | Heating water outlet ports |
FluidPorts_a | ports_aChiWat[nPorts_aChiWat] | Chilled water inlet ports |
FluidPorts_b | ports_bChiWat[nPorts_bChiWat] | Chilled water outlet ports |
output RealOutput | QHea_flow | Total heating heat flow rate transferred to the loads (>=0) [W] |
output RealOutput | QCoo_flow | Total cooling heat flow rate transferred to the loads (<=0) [W] |
output RealOutput | PHea | Power drawn by decentralized heating system [W] |
output RealOutput | PCoo | Power drawn by decentralized cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
replaceable package Medium2 | Load side medium |
output RealOutput | QReqHotWat_flow | SHW load [W] |
output RealOutput | QReqHea_flow | Heating load [W] |
output RealOutput | QReqCoo_flow | Cooling load [W] |
Modelica definition
model BuildingTimeSeries
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
;
parameter Boolean have_hotWat = false
;
parameter String filNam
;
parameter Real facMulHea=1
;
parameter Real facMulCoo=1
;
parameter Modelica.Units.SI.Temperature T_aHeaWat_nominal=313.15
;
parameter Modelica.Units.SI.Temperature T_bHeaWat_nominal(
min=273.15,
displayUnit="degC") = T_aHeaWat_nominal - 5
;
parameter Modelica.Units.SI.Temperature T_aChiWat_nominal=280.15
;
parameter Modelica.Units.SI.Temperature T_bChiWat_nominal(
min=273.15,
displayUnit="degC") = T_aChiWat_nominal + 5
;
parameter Modelica.Units.SI.Temperature T_aLoaHea_nominal=293.15
;
parameter Modelica.Units.SI.Temperature T_aLoaCoo_nominal=297.15
;
parameter Modelica.Units.SI.MassFraction w_aLoaCoo_nominal=0.0095
;
parameter Modelica.Units.SI.MassFlowRate mLoaHea_flow_nominal=1
;
parameter Modelica.Units.SI.MassFlowRate mLoaCoo_flow_nominal=
mLoaHea_flow_nominal
;
parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal(max=-Modelica.Constants.eps)=
Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad(string=
"#Peak space cooling load", filNam=
Modelica.Utilities.Files.loadResource(
filNam)) ;
parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal(min=Modelica.Constants.eps)=
Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad(string=
"#Peak space heating load", filNam=
Modelica.Utilities.Files.loadResource(
filNam)) ;
parameter Modelica.Units.SI.MassFlowRate mChiWat_flow_nominal=
abs(
QCoo_flow_nominal/cp_default/(T_aChiWat_nominal - T_bChiWat_nominal))
;
parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal=
abs(
QHea_flow_nominal/cp_default/(T_aHeaWat_nominal - T_bHeaWat_nominal))
;
parameter Real k(
min=0)=0.1
;
parameter Modelica.Units.SI.Time Ti(min=Modelica.Constants.small) = 10
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput QReqHotWat_flow(
final unit="W")
if have_hotWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput QReqHea_flow(
final quantity="HeatFlowRate",
final unit="W")
if have_heaLoa
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput QReqCoo_flow(
final quantity="HeatFlowRate",
final unit="W")
if have_cooLoa
;
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)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet(
k=293.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxTSet(
k=297.15,
y(
final unit="K",
displayUnit="degC"))
;
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)
;
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
;
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
;
replaceable Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.FanCoil2PipeCooling
terUniCoo(
final QHea_flow_nominal=QHea_flow_nominal/facMulHea,
final T_aLoaHea_nominal=T_aLoaHea_nominal,
final k=k,
final Ti=Ti,
final TRooHea_nominal=T_aLoaHea_nominal,
final QRooHea_flow_nominal=QHea_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)
;
Buildings.Controls.OBC.CDL.Continuous.Add addPPum
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant noCoo(
k=0)
if not have_chiWat
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant noHea(
k=0)
if not have_heaWat
;
Buildings.Controls.OBC.CDL.Continuous.Add addPFan
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter mulQReqHea_flow(u(
final unit="W"),
final k=facMul)
if have_heaLoa ;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter mulQReqCoo_flow(u(
final unit="W"),
final k=facMul)
if have_cooLoa ;
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(loa.y[3], QReqHotWat_flow);
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);
end BuildingTimeSeries;
Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate
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
Type | Name | Default | Description |
Scaling |
Real | facMul | 1 | Multiplier factor |
Real | facMulZon | 1 | Zone multiplier factor |
Configuration |
Boolean | have_heaPor | false | Set to true for heat ports on the load side |
Boolean | have_fluPor | true | Set to true for fluid ports on the load side |
Boolean | have_TSen | true | Set to true for measured temperature as an input |
Nominal condition |
HeatFlowRate | QHea_flow_nominal | 0 | Nominal heating capacity (>=0) [W] |
HeatFlowRate | QCoo_flow_nominal | 0 | Nominal cooling capacity (<=0) [W] |
MassFlowRate | mLoaHea_flow_nominal | 0 | Load side mass flow rate at nominal conditions in heating mode [kg/s] |
MassFlowRate | mLoaCoo_flow_nominal | 0 | Load side mass flow rate at nominal conditions in cooling mode [kg/s] |
Temperature | T_aHeaWat_nominal | 273.15 + 60 | Heating water inlet temperature at nominal conditions [K] |
Temperature | T_bHeaWat_nominal | T_aHeaWat_nominal - 22.2 | Heating water outlet temperature at nominal conditions [K] |
Temperature | T_aChiWat_nominal | 273.15 + 7.2 | Chilled water inlet temperature at nominal conditions [K] |
Temperature | T_bChiWat_nominal | T_aChiWat_nominal + 5.6 | Chilled water outlet temperature at nominal conditions [K] |
Temperature | T_aLoaHea_nominal | 273.15 + 21.1 | Load side inlet temperature at nominal conditions in heating mode [K] |
Temperature | T_aLoaCoo_nominal | 273.15 + 26.7 | Load side inlet temperature at nominal conditions in cooling mode [K] |
MassFraction | w_aLoaCoo_nominal | 0.011 | Load side inlet humidity ratio at nominal conditions in cooling mode [1] |
Connectors
Type | Name | Description |
input RealInput | TSen | Temperature (measured) [K] |
input RealInput | TSetHea | Heating set point [K] |
input RealInput | TSetCoo | Cooling set point [K] |
input RealInput | QReqHea_flow | Required heat flow rate to meet heating set point (>=0) [W] |
input RealInput | QReqCoo_flow | Required heat flow rate to meet cooling set point (<=0) [W] |
output RealOutput | QActHea_flow | Heating heat flow rate transferred to the load (>=0) [W] |
output RealOutput | QActCoo_flow | Cooling heat flow rate transferred to the load (<=0) [W] |
output RealOutput | PHea | Power drawn by heating system [W] |
output RealOutput | PCoo | Power drawn by cooling system [W] |
output RealOutput | PFan | Power drawn by fans motors [W] |
output RealOutput | PPum | Power drawn by pumps motors [W] |
output RealOutput | mReqHeaWat_flow | Required heating water flow rate to meet heating set point [kg/s] |
output RealOutput | mReqChiWat_flow | Required chilled water flow rate to meet cooling set point [kg/s] |
FluidPort_a | port_aLoa | Fluid stream inlet port on the load side |
FluidPort_b | port_bLoa | Fluid stream outlet port on the load side |
HeatPort_b | heaPorCon | Heat port transferring convective heat to the load |
HeatPort_b | heaPorRad | Heat port transferring radiative heat to the load |
Bus | weaBus | Weather data bus |
FluidPort_a | port_aHeaWat | Heating water inlet port |
FluidPort_a | port_aChiWat | Chilled water inlet port |
FluidPort_b | port_bHeaWat | Heating water outlet port |
FluidPort_b | port_bChiWat | Chilled water outlet port |
Modelica definition
model FanCoil4Pipe
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;
Model of a sensible only four-pipe fan coil unit computing a required water mass flow rate
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
Type | Name | Default | Description |
Scaling |
Real | facMul | 1 | Multiplier factor |
Real | facMulZon | 1 | Zone multiplier factor |
Configuration |
Boolean | have_heaPor | true | Set to true for heat ports on the load side |
Boolean | have_fluPor | false | Set to true for fluid ports on the load side |
Boolean | have_TSen | false | Set to true for measured temperature as an input |
Nominal condition |
HeatFlowRate | QHea_flow_nominal | 0 | Nominal heating capacity (>=0) [W] |
HeatFlowRate | QCoo_flow_nominal | 0 | Nominal cooling capacity (<=0) [W] |
MassFlowRate | mLoaHea_flow_nominal | 0 | Load side mass flow rate at nominal conditions in heating mode [kg/s] |
MassFlowRate | mLoaCoo_flow_nominal | 0 | Load side mass flow rate at nominal conditions in cooling mode [kg/s] |
Temperature | T_aHeaWat_nominal | 273.15 + 60 | Heating water inlet temperature at nominal conditions [K] |
Temperature | T_bHeaWat_nominal | T_aHeaWat_nominal - 22.2 | Heating water outlet temperature at nominal conditions [K] |
Temperature | T_aChiWat_nominal | 273.15 + 7.2 | Chilled water inlet temperature at nominal conditions [K] |
Temperature | T_bChiWat_nominal | T_aChiWat_nominal + 5.6 | Chilled water outlet temperature at nominal conditions [K] |
Temperature | T_aLoaHea_nominal | 273.15 + 21.1 | Load side inlet temperature at nominal conditions in heating mode [K] |
Temperature | T_aLoaCoo_nominal | 273.15 + 26.7 | Load side inlet temperature at nominal conditions in cooling mode [K] |
MassFraction | w_aLoaCoo_nominal | 0.011 | Load side inlet humidity ratio at nominal conditions in cooling mode [1] |
Connectors
Type | Name | Description |
input RealInput | TSen | Temperature (measured) [K] |
input RealInput | TSetHea | Heating set point [K] |
input RealInput | TSetCoo | Cooling set point [K] |
input RealInput | QReqHea_flow | Required heat flow rate to meet heating set point (>=0) [W] |
input RealInput | QReqCoo_flow | Required heat flow rate to meet cooling set point (<=0) [W] |
output RealOutput | QActHea_flow | Heating heat flow rate transferred to the load (>=0) [W] |
output RealOutput | QActCoo_flow | Cooling heat flow rate transferred to the load (<=0) [W] |
output RealOutput | PHea | Power drawn by heating system [W] |
output RealOutput | PCoo | Power drawn by cooling system [W] |
output RealOutput | PFan | Power drawn by fans motors [W] |
output RealOutput | PPum | Power drawn by pumps motors [W] |
output RealOutput | mReqHeaWat_flow | Required heating water flow rate to meet heating set point [kg/s] |
output RealOutput | mReqChiWat_flow | Required chilled water flow rate to meet cooling set point [kg/s] |
FluidPort_a | port_aLoa | Fluid stream inlet port on the load side |
FluidPort_b | port_bLoa | Fluid stream outlet port on the load side |
HeatPort_b | heaPorCon | Heat port transferring convective heat to the load |
HeatPort_b | heaPorRad | Heat port transferring radiative heat to the load |
Bus | weaBus | Weather data bus |
FluidPort_a | port_aHeaWat | Heating water inlet port |
FluidPort_a | port_aChiWat | Chilled water inlet port |
FluidPort_b | port_bHeaWat | Heating water outlet port |
FluidPort_b | port_bChiWat | Chilled water outlet port |
Modelica definition
model FanCoil4PipeHeatPorts
extends PartialFanCoil4Pipe(
final have_heaPor=true,
final have_fluPor=false,
final have_TSen=false);
Buildings.HeatTransfer.Sources.PrescribedHeatFlow heaFloHeaCon
;
Buildings.HeatTransfer.Sources.PrescribedHeatFlow heaFloCooCon
;
Fluid.Sources.Boundary_pT retAir(
redeclare package Medium=
Medium2,
use_T_in=true,
nPorts=1)
;
Fluid.Sources.Boundary_pT sinAir(
redeclare package Medium=
Medium2,
use_T_in=false,
nPorts=1)
;
HeatTransfer.Sources.PrescribedHeatFlow heaFloHeaRad
;
HeatTransfer.Sources.PrescribedHeatFlow heaFloCooRad
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant zero(
k=0)
;
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senT
;
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;
Partial model of a sensible only four-pipe fan coil unit computing a required water mass flow rate
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
Type | Name | Default | Description |
replaceable package Medium1 | Water | Medium in the building distribution system |
replaceable package Medium2 | Air | Load side medium |
Scaling |
Real | facMul | 1 | Multiplier factor |
Real | facMulZon | 1 | Zone multiplier factor |
Configuration |
Boolean | have_heaWat | true | Set to true if the system uses heating water |
Boolean | have_chiWat | true | Set to true if the system uses chilled water |
Boolean | have_chaOve | false | Set to true if the chilled water based heat exchanger operates in change-over |
Boolean | have_eleHea | false | Set to true if the system has electric heating system |
Boolean | have_eleCoo | false | Set to true if the system has electric cooling system |
Boolean | have_heaPor | false | Set to true for heat ports on the load side |
Boolean | have_fluPor | false | Set to true for fluid ports on the load side |
Boolean | have_TSen | false | Set to true for measured temperature as an input |
Boolean | have_QReq_flow | false | Set to true for required heat flow rate as an input |
Boolean | have_weaBus | false | Set to true to use a weather bus |
Boolean | have_fan | true | Set to true if fan power is computed |
Boolean | have_pum | false | Set to true if pump power is computed |
Nominal condition |
HeatFlowRate | QHea_flow_nominal | 0 | Nominal heating capacity (>=0) [W] |
HeatFlowRate | QCoo_flow_nominal | 0 | Nominal cooling capacity (<=0) [W] |
MassFlowRate | mHeaWat_flow_nominal | abs(QHea_flow_nominal/cpHeaW... | Heating water mass flow rate at nominal conditions [kg/s] |
MassFlowRate | mChiWat_flow_nominal | abs(QCoo_flow_nominal/cpChiW... | Chilled water mass flow rate at nominal conditions [kg/s] |
MassFlowRate | mLoaHea_flow_nominal | 0 | Load side mass flow rate at nominal conditions in heating mode [kg/s] |
MassFlowRate | mLoaCoo_flow_nominal | 0 | Load side mass flow rate at nominal conditions in cooling mode [kg/s] |
Temperature | T_aHeaWat_nominal | 273.15 + 60 | Heating water inlet temperature at nominal conditions [K] |
Temperature | T_bHeaWat_nominal | T_aHeaWat_nominal - 22.2 | Heating water outlet temperature at nominal conditions [K] |
Temperature | T_aChiWat_nominal | 273.15 + 7.2 | Chilled water inlet temperature at nominal conditions [K] |
Temperature | T_bChiWat_nominal | T_aChiWat_nominal + 5.6 | Chilled water outlet temperature at nominal conditions [K] |
Temperature | T_aLoaHea_nominal | 273.15 + 21.1 | Load side inlet temperature at nominal conditions in heating mode [K] |
Temperature | T_aLoaCoo_nominal | 273.15 + 26.7 | Load side inlet temperature at nominal conditions in cooling mode [K] |
MassFraction | w_aLoaCoo_nominal | 0.011 | Load side inlet humidity ratio at nominal conditions in cooling mode [1] |
Assumptions |
Boolean | allowFlowReversal | false | Set to true to allow flow reversal in building distribution system |
Boolean | allowFlowReversalLoa | true | Set to true to allow flow reversal on the load side |
Connectors
Type | Name | Description |
replaceable package Medium1 | Medium in the building distribution system |
replaceable package Medium2 | Load side medium |
input RealInput | TSen | Temperature (measured) [K] |
input RealInput | TSetHea | Heating set point [K] |
input RealInput | TSetCoo | Cooling set point [K] |
input RealInput | QReqHea_flow | Required heat flow rate to meet heating set point (>=0) [W] |
input RealInput | QReqCoo_flow | Required heat flow rate to meet cooling set point (<=0) [W] |
output RealOutput | QActHea_flow | Heating heat flow rate transferred to the load (>=0) [W] |
output RealOutput | QActCoo_flow | Cooling heat flow rate transferred to the load (<=0) [W] |
output RealOutput | PHea | Power drawn by heating system [W] |
output RealOutput | PCoo | Power drawn by cooling system [W] |
output RealOutput | PFan | Power drawn by fans motors [W] |
output RealOutput | PPum | Power drawn by pumps motors [W] |
output RealOutput | mReqHeaWat_flow | Required heating water flow rate to meet heating set point [kg/s] |
output RealOutput | mReqChiWat_flow | Required chilled water flow rate to meet cooling set point [kg/s] |
FluidPort_a | port_aLoa | Fluid stream inlet port on the load side |
FluidPort_b | port_bLoa | Fluid stream outlet port on the load side |
HeatPort_b | heaPorCon | Heat port transferring convective heat to the load |
HeatPort_b | heaPorRad | Heat port transferring radiative heat to the load |
Bus | weaBus | Weather data bus |
FluidPort_a | port_aHeaWat | Heating water inlet port |
FluidPort_a | port_aChiWat | Chilled water inlet port |
FluidPort_b | port_bHeaWat | Heating water outlet port |
FluidPort_b | port_bChiWat | Chilled water outlet port |
Modelica definition
partial model PartialFanCoil4Pipe
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
;
final parameter hexConfiguration hexConCoo=hexConfiguration.CounterFlow
;
Buildings.Controls.OBC.CDL.Continuous.PID conHea(
Ti=10,
yMax=1,
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
reverseActing=true,
yMin=0)
;
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.Continuous.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.Continuous.MultiplyByParameter gaiFloNom2(k=
max({
mLoaHea_flow_nominal,mLoaCoo_flow_nominal}));
Buildings.Controls.OBC.CDL.Continuous.PID conCoo(
Ti=10,
yMax=1,
controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
reverseActing=false,
yMin=0)
;
Buildings.Controls.OBC.CDL.Continuous.MultiplyByParameter gaiCooFloNom(k=
mChiWat_flow_nominal) ;
Utilities.Math.SmoothMax smoothMax(
deltaX=1E-2)
;
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;