Collection of models that illustrate model use and test models
Information
This package contains examples for the use of models that can be found in
Buildings.Experimental.DistrictHeatingCooling.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
HeatingCoolingHotWater3Clusters
|
Validation model for a system with three clusters of buildings |
HeatingCoolingHotWater3ClustersBaseCase
|
Base case for model of a system with 3 clusters |
IdealSystem3Clusters
|
Validation model for a small system with three clusters of buildings |
BaseClasses
|
Package with base classes |
Validation model for a system with three clusters of buildings
Information
This model validates a small ideal bi-directional heating and cooling network.
The heating and cooling heat flow rates extracted from the district supply
are prescribed by time series.
Extends from Buildings.Experimental.DistrictHeatingCooling.Examples.BaseClasses.HeatingCoolingHotWater3Clusters (Load models for Buildings.Experimental.DistrictHeatingCooling.Examples.HeatingCoolingHotWater3Clusters), Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
HeatFlowRate | Q_flow_nominal | 2.5E6 | Nominal heat flow rate, positive for heating, negative for cooling [W] |
Real | R_nominal | 100 | Pressure drop per meter at nominal flow rate [Pa/m] |
Nominal conditions |
Temperature | TChiSup_nominal | 273.15 + 16 | Chilled water leaving temperature at the evaporator [K] |
Temperature | THeaSup_nominal | 273.15 + 30 | Supply temperature space heating system at TOut_nominal [K] |
Temperature | THeaRet_nominal | 273.15 + 25 | Return temperature space heating system at TOut_nominal [K] |
Design parameter |
Temperature | TSetHeaLea | 273.15 + 12 | Set point for leaving fluid temperature warm supply [K] |
Temperature | TSetCooLea | 273.15 + 16 | Set point for leaving fluid temperature cold supply [K] |
TemperatureDifference | dT_nominal | TSetCooLea - TSetHeaLea | Temperature difference between warm and cold pipe [K] |
Connectors
Type | Name | Description |
Bus | weaBus | Weather data bus |
Modelica definition
model HeatingCoolingHotWater3Clusters
extends Buildings.Experimental.DistrictHeatingCooling.Examples.BaseClasses.HeatingCoolingHotWater3Clusters
(PHea(nu=17), PCoo(nu=9));
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
parameter Modelica.SIunits.HeatFlowRate Q_flow_nominal=2.5E6 ;
parameter Modelica.SIunits.Temperature TSetHeaLea=273.15 + 12 ;
parameter Modelica.SIunits.Temperature TSetCooLea=273.15 + 16 ;
parameter Modelica.SIunits.TemperatureDifference dT_nominal(
min=0.5,
displayUnit="K") = TSetCooLea - TSetHeaLea ;
parameter Real R_nominal(unit="Pa/m") = 100 ;
final parameter Modelica.SIunits.MassFlowRate m_flow_nominal=Q_flow_nominal/4200
/dT_nominal ;
Plants.HeatingCoolingCarnot_T pla(
redeclare package Medium = Medium,
show_T=true,
m_flow_nominal=m_flow_nominal) ;
Plants.LakeWaterHeatExchanger_T bayWatHex(
dpHex_nominal=0,
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
show_T=true) ;
Buildings.Fluid.Sources.Boundary_pT pSet(
redeclare package Medium = Medium,
nPorts=1) ;
Buildings.Fluid.FixedResistances.Pipe pip(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Pipe pip1(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Pipe pip2(
redeclare package Medium = Medium,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=m_flow_nominal/3);
Buildings.Fluid.FixedResistances.Pipe pip3(
redeclare package Medium = Medium,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=m_flow_nominal/3);
Buildings.Fluid.FixedResistances.Pipe pip4(
redeclare package Medium = Medium,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=m_flow_nominal/3);
Buildings.Fluid.FixedResistances.Pipe pip5(
redeclare package Medium = Medium,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=m_flow_nominal/3);
Buildings.Fluid.FixedResistances.Junction splSup1(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splRet1(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splSup2(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splRet2(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splSup3(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splRet3(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splSup5(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splRet5(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splSup6(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splRet6(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splSup4(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splRet4(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splSup7(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
Buildings.Fluid.FixedResistances.Junction splRet7(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal*{1,1,1},
dp_nominal=40*R_nominal*{0,1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
tau=5*60,
from_dp=false) ;
protected
Modelica.Blocks.Sources.Constant TSetC(k=TSetCooLea) ;
Modelica.Blocks.Sources.Constant TSetH(k=TSetHeaLea) ;
public
Modelica.Blocks.Sources.CombiTimeTable watTem(
tableOnFile=true,
tableName="tab1",
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative,
y(
each unit="K"),
fileName=
Buildings.BoundaryConditions.WeatherData.BaseClasses.getAbsolutePath("modelica://Buildings/Resources/Data/Experimental/DistrictHeatingCooling/Plants/AlamedaOceanT.mos"))
;
equation
connect(splSup1.port_2, splSup2.port_1);
connect(splSup2.port_2, splSup3.port_1);
connect(splSup1.port_3, larOff1.port_a);
connect(larOff1.port_b, splRet1.port_3);
connect(splSup2.port_3, ret1.port_a);
connect(splSup3.port_3, larOff2.port_a);
connect(ret1.port_b, splRet2.port_3);
connect(splRet1.port_2, splRet2.port_1);
connect(splRet2.port_2, splRet3.port_1);
connect(larOff2.port_b, splRet3.port_3);
connect(pip2.port_b, splSup5.port_1);
connect(splSup5.port_2, splSup6.port_1);
connect(splSup5.port_3, apa1.port_a);
connect(splSup6.port_3, larOff3.port_a);
connect(splSup6.port_2, larOff4.port_a);
connect(pip3.port_a, splRet5.port_1);
connect(splRet5.port_2, splRet6.port_1);
connect(apa1.port_b, splRet5.port_3);
connect(larOff3.port_b, splRet6.port_3);
connect(splRet6.port_2, larOff4.port_b);
connect(splSup3.port_2, splSup4.port_1);
connect(splSup4.port_2, pip2.port_a);
connect(splSup4.port_3, pip4.port_a);
connect(splRet3.port_2, splRet4.port_1);
connect(splRet4.port_2, pip3.port_b);
connect(splRet4.port_3, pip5.port_b);
connect(pip4.port_b, splSup7.port_1);
connect(splSup7.port_3, apa2.port_a);
connect(apa2.port_b, splRet7.port_3);
connect(splSup7.port_2, ret2.port_a);
connect(pip5.port_a, splRet7.port_1);
connect(splRet7.port_2, ret2.port_b);
connect(pip.port_b, splSup1.port_1);
connect(pip1.port_a, splRet1.port_1);
connect(pla.TSetHea, TSetH.y);
connect(TSetC.y, pla.TSetCoo);
connect(bayWatHex.TSetHea, TSetH.y);
connect(TSetC.y, bayWatHex.TSetCoo);
connect(bayWatHex.port_b1, pip.port_a);
connect(bayWatHex.port_a2, pip1.port_b);
connect(bayWatHex.port_b2, pla.port_a);
connect(pla.port_b, bayWatHex.port_a1);
connect(pSet.ports[1], pla.port_a);
connect(pla.TSink, weaBus.TDryBul);
connect(pla.PComHea, PHea.u[17]);
connect(pla.PComCoo, PCoo.u[9]);
connect(bayWatHex.TSouWat, watTem.y[1]);
connect(bayWatHex.TSouHea, weaBus.TDryBul);
connect(bayWatHex.TSouCoo, weaBus.TDryBul);
end HeatingCoolingHotWater3Clusters;
Base case for model of a system with 3 clusters
Information
This is the base case model for
Buildings.Experimental.DistrictHeatingCooling.Examples.HeatingCoolingHotWater3Clusters.
Rather than being connected in a bi-directional district heating
and cooling system, the heat pumps of each building are exposed
to outside air conditions. Hence, they do not share any waste heat
with each other.
Extends from Buildings.Experimental.DistrictHeatingCooling.Examples.BaseClasses.HeatingCoolingHotWater3Clusters (Load models for Buildings.Experimental.DistrictHeatingCooling.Examples.HeatingCoolingHotWater3Clusters), Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Nominal conditions |
Temperature | TChiSup_nominal | 273.15 + 16 | Chilled water leaving temperature at the evaporator [K] |
Temperature | THeaSup_nominal | 273.15 + 30 | Supply temperature space heating system at TOut_nominal [K] |
Temperature | THeaRet_nominal | 273.15 + 25 | Return temperature space heating system at TOut_nominal [K] |
Connectors
Type | Name | Description |
Bus | weaBus | Weather data bus |
Modelica definition
model HeatingCoolingHotWater3ClustersBaseCase
extends Buildings.Experimental.DistrictHeatingCooling.Examples.BaseClasses.HeatingCoolingHotWater3Clusters
(
larOff1(mixingVolumeEnergyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState),
ret1(mixingVolumeEnergyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState),
larOff2(mixingVolumeEnergyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState),
apa1(mixingVolumeEnergyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState),
larOff3(mixingVolumeEnergyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState),
larOff4(mixingVolumeEnergyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState),
apa2(mixingVolumeEnergyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState),
ret2(mixingVolumeEnergyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState));
extends Modelica.Icons.Example;
BaseClasses.SubStationBoundaryCondition bou_a1(
redeclare package Medium = Medium,
warmSide=true) ;
BaseClasses.SubStationBoundaryCondition bou_b1(
redeclare package Medium = Medium,
warmSide=false) ;
BaseClasses.SubStationBoundaryCondition bou_a2(
redeclare package Medium = Medium,
warmSide=true) ;
BaseClasses.SubStationBoundaryCondition bou_b2(
redeclare package Medium = Medium,
warmSide=false) ;
BaseClasses.SubStationBoundaryCondition bou_a3(
redeclare package Medium = Medium,
warmSide=true) ;
BaseClasses.SubStationBoundaryCondition bou_b3(
redeclare package Medium = Medium,
warmSide=false) ;
BaseClasses.SubStationBoundaryCondition bou_a4(
redeclare package Medium = Medium,
warmSide=true) ;
BaseClasses.SubStationBoundaryCondition bou_b4(
redeclare package Medium = Medium,
warmSide=false) ;
BaseClasses.SubStationBoundaryCondition bou_a5(
redeclare package Medium = Medium,
warmSide=true) ;
BaseClasses.SubStationBoundaryCondition bou_b5(
redeclare package Medium = Medium,
warmSide=false) ;
BaseClasses.SubStationBoundaryCondition bou_a6(
redeclare package Medium = Medium,
warmSide=true) ;
BaseClasses.SubStationBoundaryCondition bou_b6(
redeclare package Medium = Medium,
warmSide=false) ;
BaseClasses.SubStationBoundaryCondition bou_a7(
redeclare package Medium = Medium,
warmSide=true) ;
BaseClasses.SubStationBoundaryCondition bou_b7(
redeclare package Medium = Medium,
warmSide=false) ;
BaseClasses.SubStationBoundaryCondition bou_a8(
redeclare package Medium = Medium,
warmSide=true) ;
BaseClasses.SubStationBoundaryCondition bou_b8(
redeclare package Medium = Medium,
warmSide=false) ;
equation
connect(weaBus.TDryBul, bou_a1.TOut);
connect(weaBus.TDryBul, bou_b1.TOut);
connect(weaBus.TDryBul, bou_a2.TOut);
connect(weaBus.TDryBul, bou_b2.TOut);
connect(weaBus.TDryBul, bou_a3.TOut);
connect(weaBus.TDryBul, bou_b3.TOut);
connect(weaBus.TDryBul, bou_a4.TOut);
connect(weaBus.TDryBul, bou_b4.TOut);
connect(weaBus.TDryBul, bou_a5.TOut);
connect(weaBus.TDryBul, bou_b5.TOut);
connect(weaBus.TDryBul, bou_a6.TOut);
connect(weaBus.TDryBul, bou_b6.TOut);
connect(weaBus.TDryBul, bou_a7.TOut);
connect(weaBus.TDryBul, bou_b7.TOut);
connect(weaBus.TDryBul, bou_a8.TOut);
connect(weaBus.TDryBul, bou_b8.TOut);
connect(bou_a1.port_a, larOff1.port_a);
connect(bou_a1.heaPor, larOff1.heatPort_a);
connect(bou_b1.port_a, larOff1.port_b);
connect(larOff1.heatPort_b, bou_b1.heaPor);
connect(bou_a2.port_a, ret1.port_a);
connect(bou_a2.heaPor, ret1.heatPort_a);
connect(ret1.port_b, bou_b2.port_a);
connect(ret1.heatPort_b, bou_b2.heaPor);
connect(bou_a3.port_a, larOff2.port_a);
connect(bou_a3.heaPor, larOff2.heatPort_a);
connect(larOff2.port_b, bou_b3.port_a);
connect(larOff2.heatPort_b, bou_b3.heaPor);
connect(bou_a4.port_a, apa1.port_a);
connect(bou_a4.heaPor, apa1.heatPort_a);
connect(apa1.port_b, bou_b4.port_a);
connect(apa1.heatPort_b, bou_b4.heaPor);
connect(bou_a5.port_a, larOff3.port_a);
connect(bou_a5.heaPor, larOff3.heatPort_a);
connect(larOff3.port_b, bou_b5.port_a);
connect(larOff3.heatPort_b, bou_b5.heaPor);
connect(bou_a6.port_a, larOff4.port_a);
connect(bou_a6.heaPor, larOff4.heatPort_a);
connect(larOff4.port_b, bou_b6.port_a);
connect(larOff4.heatPort_b, bou_b6.heaPor);
connect(bou_a7.port_a, apa2.port_a);
connect(bou_a7.heaPor, apa2.heatPort_a);
connect(apa2.port_b, bou_b7.port_a);
connect(apa2.heatPort_b, bou_b7.heaPor);
connect(bou_a8.port_a, ret2.port_a);
connect(bou_a8.heaPor, ret2.heatPort_a);
connect(ret2.port_b, bou_b8.port_a);
connect(ret2.heatPort_b, bou_b8.heaPor);
end HeatingCoolingHotWater3ClustersBaseCase;
Validation model for a small system with three clusters of buildings
Information
This model validates a small ideal bi-directional heating and cooling network.
The heating and cooling heat flow rates extracted from the district supply
are prescribed by time series.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
HeatFlowRate | Q_flow_nominal | 3*2E6 | Nominal heat flow rate, positive for heating, negative for cooling [W] |
Design parameter |
Temperature | TSetHeaLea | 273.15 + 8 | Set point for leaving fluid temperature warm supply [K] |
Temperature | TSetCooLea | 273.15 + 14 | Set point for leaving fluid temperature cold supply [K] |
TemperatureDifference | dT_nominal | TSetCooLea - TSetHeaLea | Temperature difference between warm and cold pipe [K] |
Modelica definition
model IdealSystem3Clusters
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
parameter Modelica.SIunits.HeatFlowRate Q_flow_nominal=3*2E6 ;
parameter Modelica.SIunits.Temperature TSetHeaLea=273.15 + 8 ;
parameter Modelica.SIunits.Temperature TSetCooLea=273.15 + 14 ;
parameter Modelica.SIunits.TemperatureDifference dT_nominal(
min=0.5,
displayUnit="K") = TSetCooLea - TSetHeaLea ;
final parameter Modelica.SIunits.MassFlowRate m_flow_nominal=Q_flow_nominal/4200
/dT_nominal ;
Plants.Ideal_T pla(
redeclare package Medium = Medium,
show_T=true,
m_flow_nominal=m_flow_nominal) ;
Buildings.Fluid.Sources.Boundary_pT pSet(
redeclare package Medium = Medium,
nPorts=1) ;
SubStations.Heating hea1(
redeclare package Medium = Medium, Q_flow_nominal=200E3)
;
SubStations.Heating hea2(
redeclare package Medium = Medium, Q_flow_nominal=200E3)
;
SubStations.Cooling coo1(
redeclare package Medium = Medium, Q_flow_nominal=-250E3)
;
SubStations.Cooling coo2(
redeclare package Medium = Medium, Q_flow_nominal=-100E3)
;
Buildings.Fluid.FixedResistances.Pipe pip(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Pipe pip1(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Modelica.Blocks.Sources.CombiTimeTable QHea1(
table=[0, 200E3; 6, 200E3; 6, 50E3; 18, 50E3; 18, 75E3; 24, 75E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
Modelica.Blocks.Sources.CombiTimeTable QHea2(
table=[0, 200E3; 6, 200E3; 6, 50E3; 18, 50E3; 18, 0E3; 24, 0E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
Modelica.Blocks.Sources.CombiTimeTable QCoo1(
table=[0, -10E3; 6, -10E3; 6, -10E3; 12, -20E3; 18, -250E3; 24, -250E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
Modelica.Blocks.Sources.CombiTimeTable QCoo2(
table=[0, -10E3; 9, -100E3; 9, -50E3; 18, -150E3; 18, -150E3; 24, -150E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
SubStations.Heating hea3(
redeclare package Medium = Medium, Q_flow_nominal=200E3)
;
SubStations.Heating hea4(
redeclare package Medium = Medium, Q_flow_nominal=100E3)
;
SubStations.Cooling coo3(
redeclare package Medium = Medium, Q_flow_nominal=-200E3)
;
SubStations.Cooling coo4(
redeclare package Medium = Medium, Q_flow_nominal=-100E3)
;
Buildings.Fluid.FixedResistances.Pipe pip2(
redeclare package Medium = Medium,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=m_flow_nominal/3);
Buildings.Fluid.FixedResistances.Pipe pip3(
redeclare package Medium = Medium,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=m_flow_nominal/3);
Modelica.Blocks.Sources.CombiTimeTable QHea3(
table=[0, 200E3; 6, 200E3; 6, 50E3; 18, 50E3; 18, 75E3; 24, 75E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
Modelica.Blocks.Sources.CombiTimeTable QHea4(
table=[0, 100E3; 6, 100E3; 6, 50E3; 18, 50E3; 18, 75E3; 24, 75E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
Modelica.Blocks.Sources.CombiTimeTable QCoo3(
table=[0, -100E3; 6, -80E3; 6, -50E3; 12, -100E3; 18, -200E3; 24, -200E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
Modelica.Blocks.Sources.CombiTimeTable QCoo4(
table=[0, -10E3; 9, -10E3; 9, -50E3; 18, -50E3; 18, -150E3; 24, -150E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
SubStations.Heating hea5(
redeclare package Medium = Medium, Q_flow_nominal=100E3)
;
Modelica.Blocks.Sources.CombiTimeTable QHea5(
table=[0, 100E3; 6, 100E3; 6, 50E3; 18, 50E3; 18, 0E3; 24, 0E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
SubStations.Heating hea6(
redeclare package Medium = Medium, Q_flow_nominal=200E3)
;
SubStations.Heating hea7(
redeclare package Medium = Medium, Q_flow_nominal=300E3)
;
SubStations.Cooling coo5(
redeclare package Medium = Medium, Q_flow_nominal=-150E3)
;
Buildings.Fluid.FixedResistances.Pipe pip4(
redeclare package Medium = Medium,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=m_flow_nominal/3);
Buildings.Fluid.FixedResistances.Pipe pip5(
redeclare package Medium = Medium,
nSeg=3,
thicknessIns=0.2,
lambdaIns=0.04,
length=50,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=m_flow_nominal/3);
Modelica.Blocks.Sources.CombiTimeTable QHea6(
table=[0, 0E3; 6, 0; 6, 200E3; 18, 200E3; 18, 20E3; 24, 25E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
Modelica.Blocks.Sources.CombiTimeTable QHea7(
table=[0, 0E3; 6, 0E3; 6, 100E3; 18, 100E3; 18, 200E3; 24, 200E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
Modelica.Blocks.Sources.CombiTimeTable QCoo5(
table=[0, -50E3; 6, -50E3; 6, -50E3; 12, -20E3; 18, -150E3; 24, -150E3],
timeScale=3600,
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) ;
protected
Modelica.Blocks.Sources.Constant TSetC(k=TSetCooLea) ;
protected
Modelica.Blocks.Sources.Constant TSetH(k=TSetHeaLea) ;
equation
connect(pla.port_b, pip.port_a);
connect(pip.port_b, hea1.port_a);
connect(pip.port_b, hea2.port_a);
connect(pip.port_b, coo1.port_b);
connect(pip.port_b, coo2.port_b);
connect(pla.port_a, pip1.port_b);
connect(pip1.port_a, hea1.port_b);
connect(pip1.port_a, hea2.port_b);
connect(pip1.port_a, coo1.port_a);
connect(pip1.port_a, coo2.port_a);
connect(QHea1.y[1], hea1.Q_flow);
connect(QHea2.y[1], hea2.Q_flow);
connect(QCoo1.y[1], coo1.Q_flow);
connect(QCoo2.y[1], coo2.Q_flow);
connect(pSet.ports[1], pip1.port_b);
connect(pip2.port_b, hea3.port_a);
connect(pip2.port_b, hea4.port_a);
connect(pip2.port_b, coo3.port_b);
connect(pip2.port_b, coo4.port_b);
connect(pip3.port_a, hea3.port_b);
connect(pip3.port_a, hea4.port_b);
connect(pip3.port_a, coo3.port_a);
connect(pip3.port_a, coo4.port_a);
connect(QHea3.y[1], hea3.Q_flow);
connect(QHea4.y[1], hea4.Q_flow);
connect(QCoo3.y[1], coo3.Q_flow);
connect(QCoo4.y[1], coo4.Q_flow);
connect(pip2.port_a, pip.port_b);
connect(pip3.port_b, pip1.port_a);
connect(pip3.port_a, hea5.port_b);
connect(pip2.port_b, hea5.port_a);
connect(QHea5.y[1], hea5.Q_flow);
connect(pip4.port_b, hea6.port_a);
connect(pip4.port_b, hea7.port_a);
connect(pip4.port_b, coo5.port_b);
connect(pip5.port_a, hea6.port_b);
connect(pip5.port_a, hea7.port_b);
connect(pip5.port_a, coo5.port_a);
connect(QHea6.y[1], hea6.Q_flow);
connect(QHea7.y[1], hea7.Q_flow);
connect(QCoo5.y[1], coo5.Q_flow);
connect(pip4.port_a, pip.port_b);
connect(pip5.port_b, pip1.port_a);
connect(TSetH.y, pla.TSetHea);
connect(TSetC.y, pla.TSetCoo);
end IdealSystem3Clusters;