Buildings.Obsolete.DistrictHeatingCooling.Examples.BaseClasses
Package with base classes
Information
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
HeatingCoolingHotWater3Clusters | Load models for Buildings.Obsolete.DistrictHeatingCooling.Examples.HeatingCoolingHotWater3Clusters |
SubStationBoundaryCondition | Model with boundary condition for the base case |
Buildings.Obsolete.DistrictHeatingCooling.Examples.BaseClasses.HeatingCoolingHotWater3Clusters
Load models for Buildings.Obsolete.DistrictHeatingCooling.Examples.HeatingCoolingHotWater3Clusters
Information
Model with loads for bi-directional energy system.
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
partial model HeatingCoolingHotWater3Clusters
"Load models for Buildings.Obsolete.DistrictHeatingCooling.Examples.HeatingCoolingHotWater3Clusters"
package Medium = Buildings.Media.Water "Fluid in the pipes";
parameter Modelica.SIunits.Temperature TChiSup_nominal = 273.15 + 16
"Chilled water leaving temperature at the evaporator";
parameter Modelica.SIunits.Temperature THeaSup_nominal = 273.15+30
"Supply temperature space heating system at TOut_nominal";
parameter Modelica.SIunits.Temperature THeaRet_nominal = 273.15+25
"Return temperature space heating system at TOut_nominal";
Obsolete.DistrictHeatingCooling.SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT
larOff1(
redeclare package Medium = Medium,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Obsolete/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgLargeOfficeNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos"),
final TChiSup_nominal=TChiSup_nominal,
final THeaSup_nominal=THeaSup_nominal,
final THeaRet_nominal=THeaRet_nominal,
final TOut_nominal=273.15) "Large office";
Obsolete.DistrictHeatingCooling.SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT
ret1(
redeclare package Medium = Medium,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Obsolete/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgStand-aloneRetailNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos"),
final TChiSup_nominal=TChiSup_nominal,
final THeaSup_nominal=THeaSup_nominal,
final THeaRet_nominal=THeaRet_nominal,
final TOut_nominal=273.15) "Retail";
Obsolete.DistrictHeatingCooling.SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT
larOff2(
redeclare package Medium = Medium,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Obsolete/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgLargeOfficeNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos"),
final TChiSup_nominal=TChiSup_nominal,
final THeaSup_nominal=THeaSup_nominal,
final THeaRet_nominal=THeaRet_nominal,
final TOut_nominal=273.15) "Large office";
Obsolete.DistrictHeatingCooling.SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT
apa1(
redeclare package Medium = Medium,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Obsolete/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgMidriseApartmentNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos"),
final TChiSup_nominal=TChiSup_nominal,
final THeaSup_nominal=THeaSup_nominal,
final THeaRet_nominal=THeaRet_nominal,
final TOut_nominal=273.15) "Midrise apartment";
Obsolete.DistrictHeatingCooling.SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT
larOff3(
redeclare package Medium = Medium,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Obsolete/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgLargeOfficeNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos"),
final TChiSup_nominal=TChiSup_nominal,
final THeaSup_nominal=THeaSup_nominal,
final THeaRet_nominal=THeaRet_nominal,
final TOut_nominal=273.15) "Large office";
Obsolete.DistrictHeatingCooling.SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT
larOff4(
redeclare package Medium = Medium,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Obsolete/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgLargeOfficeNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos"),
show_T=true,
final TChiSup_nominal=TChiSup_nominal,
final THeaSup_nominal=THeaSup_nominal,
final THeaRet_nominal=THeaRet_nominal,
final TOut_nominal=273.15) "Large office";
Obsolete.DistrictHeatingCooling.SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT
apa2(
redeclare package Medium = Medium,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Obsolete/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgMidriseApartmentNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos"),
final TChiSup_nominal=TChiSup_nominal,
final THeaSup_nominal=THeaSup_nominal,
final THeaRet_nominal=THeaRet_nominal,
final TOut_nominal=273.15) "Midrise apartment";
Obsolete.DistrictHeatingCooling.SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT
ret2(
redeclare package Medium = Medium,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/Obsolete/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgStand-aloneRetailNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos"),
final TChiSup_nominal=TChiSup_nominal,
final THeaSup_nominal=THeaSup_nominal,
final THeaRet_nominal=THeaRet_nominal,
final TOut_nominal=273.15) "Retail";
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos"),
computeWetBulbTemperature=false) "File reader that reads weather data";
BoundaryConditions.WeatherData.Bus weaBus "Weather data bus";
Modelica.Blocks.Math.MultiSum PHea(nu=16)
"Electrical energy use for space heating and hot water";
Modelica.Blocks.Math.MultiSum PCoo(nu=8) "Electrical energy use for cooling";
Modelica.Blocks.Continuous.Integrator EEleHea(y(unit="J"))
"Electrical energy for space heating and hot water";
Modelica.Blocks.Continuous.Integrator EEleCoo(y(unit="J"))
"Electrical energy for cooling";
Modelica.Blocks.Math.MultiSum QHea(nu=8)
"Thermal energy use for space heating";
Modelica.Blocks.Math.MultiSum QHotWat(nu=8)
"Thermal energy use for hot water";
Modelica.Blocks.Math.MultiSum QCoo(nu=8) "Thermal energy use for cooling";
Modelica.Blocks.Continuous.Integrator ETheHea(y(unit="J"))
"Thermal energy for space heating";
Modelica.Blocks.Continuous.Integrator ETheHotWat(y(unit="J"))
"Thermal energy for hot water";
Modelica.Blocks.Continuous.Integrator ETheCoo(y(unit="J"))
"Thermal energy for cooling";
Modelica.Blocks.Sources.RealExpression SPFHea(y=(ETheHea.y + ETheHotWat.y)/
max(1, EEleHea.y)) "Seasonal performance factor for heating";
Modelica.Blocks.Sources.RealExpression SPFCoo(y=-ETheCoo.y/max(1, EEleCoo.y))
"Seasonal performance factor for cooling";
equation
connect(weaBus, larOff1.weaBus);
connect(weaBus, ret1.weaBus);
connect(weaBus,larOff2. weaBus);
connect(weaBus, apa1.weaBus);
connect(weaBus, larOff3.weaBus);
connect(weaBus,larOff4. weaBus);
connect(weaBus, apa2.weaBus);
connect(weaBus, ret2.weaBus);
connect(weaDat.weaBus, weaBus);
connect(PHea.y, EEleHea.u);
connect(PCoo.y, EEleCoo.u);
connect(larOff1.PHea, PHea.u[1]);
connect(ret1.PHea, PHea.u[2]);
connect(larOff2.PHea, PHea.u[3]);
connect(apa1.PHea, PHea.u[4]);
connect(larOff3.PHea, PHea.u[5]);
connect(larOff4.PHea, PHea.u[6]);
connect(apa2.PHea, PHea.u[7]);
connect(ret2.PHea, PHea.u[8]);
connect(larOff1.PHotWat, PHea.u[9]);
connect(ret1.PHotWat, PHea.u[10]);
connect(larOff2.PHotWat, PHea.u[11]);
connect(apa1.PHotWat, PHea.u[12]);
connect(larOff3.PHotWat, PHea.u[13]);
connect(larOff4.PHotWat, PHea.u[14]);
connect(apa2.PHotWat, PHea.u[15]);
connect(ret2.PHotWat, PHea.u[16]);
connect(larOff1.PCoo, PCoo.u[1]);
connect(ret1.PCoo, PCoo.u[2]);
connect(larOff2.PCoo, PCoo.u[3]);
connect(apa1.PCoo, PCoo.u[4]);
connect(larOff3.PCoo, PCoo.u[5]);
connect(larOff4.PCoo, PCoo.u[6]);
connect(apa2.PCoo, PCoo.u[7]);
connect(ret2.PCoo, PCoo.u[8]);
connect(QHea.y, ETheHea.u);
connect(QCoo.y, ETheCoo.u);
connect(larOff1.QHea_flow, QHea.u[1]);
connect(ret1.QHea_flow, QHea.u[2]);
connect(larOff2.QHea_flow, QHea.u[3]);
connect(apa1.QHea_flow, QHea.u[4]);
connect(larOff3.QHea_flow, QHea.u[5]);
connect(larOff4.QHea_flow, QHea.u[6]);
connect(apa2.QHea_flow, QHea.u[7]);
connect(ret2.QHea_flow, QHea.u[8]);
//////
connect(larOff1.QHotWat_flow, QHotWat.u[1]);
connect(ret1.QHotWat_flow, QHotWat.u[2]);
connect(larOff2.QHotWat_flow, QHotWat.u[3]);
connect(apa1.QHotWat_flow, QHotWat.u[4]);
connect(larOff3.QHotWat_flow, QHotWat.u[5]);
connect(larOff4.QHotWat_flow, QHotWat.u[6]);
connect(apa2.QHotWat_flow, QHotWat.u[7]);
connect(ret2.QHotWat_flow, QHotWat.u[8]);
////
connect(larOff1.QCoo_flow, QCoo.u[1]);
connect(ret1.QCoo_flow, QCoo.u[2]);
connect(larOff2.QCoo_flow, QCoo.u[3]);
connect(apa1.QCoo_flow, QCoo.u[4]);
connect(larOff3.QCoo_flow, QCoo.u[5]);
connect(larOff4.QCoo_flow, QCoo.u[6]);
connect(apa2.QCoo_flow, QCoo.u[7]);
connect(ret2.QCoo_flow, QCoo.u[8]);
connect(QHotWat.y, ETheHotWat.u);
end HeatingCoolingHotWater3Clusters;
Buildings.Obsolete.DistrictHeatingCooling.Examples.BaseClasses.SubStationBoundaryCondition
Model with boundary condition for the base case
Information
This is a model for the boundary conditions of the heat pumps
in the base case. The model sets the leaving fluid temperature,
and the temperature of its heat port, to be equal to the input
signal TOut
.
Extends from Buildings.BaseClasses.BaseIcon (Base icon).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | ||
TemperatureDifference | dTApp | 2 | Approach temperature [K] |
Boolean | warmSide | Set to true if these are the boundary conditions for the warm side inlet |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | ||
input RealInput | TOut | Outside temperature, used to set medium temperature [K] |
FluidPort_a | port_a | Fluid port at fixed pressure and temperature |
HeatPort_a | heaPor | Heat port at fixed temperature |
Modelica definition
model SubStationBoundaryCondition
"Model with boundary condition for the base case"
extends Buildings.BaseClasses.BaseIcon;
replaceable package Medium = Modelica.Media.Interfaces.PartialMedium;
parameter Modelica.SIunits.TemperatureDifference dTApp(min=0) = 2
"Approach temperature";
parameter Boolean warmSide
"Set to true if these are the boundary conditions for the warm side inlet";
Modelica.Blocks.Interfaces.RealInput TOut(
final unit="K",
displayUnit="degC") "Outside temperature, used to set medium temperature";
Modelica.Fluid.Interfaces.FluidPort_a port_a(
redeclare package Medium = Medium)
"Fluid port at fixed pressure and temperature";
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPor
"Heat port at fixed temperature";
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=1,
use_T_in=true) "Boundary condition";
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature preTem
"Prescribed temperature";
Modelica.Blocks.Math.Add add(k1=if warmSide then -1 else +1);
Modelica.Blocks.Sources.Constant TAppr(k=dTApp) "Approach temperature";
equation
connect(bou.ports[1], port_a);
connect(preTem.port, heaPor);
connect(add.u2, TOut);
connect(add.y, bou.T_in);
connect(TAppr.y, add.u1);
connect(add.y, preTem.T);
end SubStationBoundaryCondition;