The thermal zone is based on the BESTEST Case 600 envelope, while the HVAC
system is based on a conventional VAV system with air cooled chiller and
economizer. See documentation for the specific models for more information.
This is a single zone model based on the envelope of the BESTEST Case 600
building, though it has some modifications. Supply and return air ports are
included for simulation with air-based HVAC systems. Heating and cooling
setpoints and internal loads are time-varying according to an assumed
occupancy schedule.
model Room
replaceable package MediumA =
Buildings.Media.Air ;
parameter Modelica.SIunits.MassFlowRate mAir_flow_nominal
;
parameter Modelica.SIunits.Angle lat ;
parameter Modelica.SIunits.Angle S_=
Buildings.Types.Azimuth.S ;
parameter Modelica.SIunits.Angle E_=
Buildings.Types.Azimuth.E ;
parameter Modelica.SIunits.Angle W_=
Buildings.Types.Azimuth.W ;
parameter Modelica.SIunits.Angle N_=
Buildings.Types.Azimuth.N ;
parameter Modelica.SIunits.Angle C_=
Buildings.Types.Tilt.Ceiling ;
parameter Modelica.SIunits.Angle F_=
Buildings.Types.Tilt.Floor ;
parameter Modelica.SIunits.Angle Z_=
Buildings.Types.Tilt.Wall ;
parameter Integer nConExtWin = 1 ;
parameter Integer nConBou = 1
;
parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matExtWal(
nLay=3,
absIR_a=0.9,
absIR_b=0.9,
absSol_a=0.6,
absSol_b=0.6,
material={
Buildings.HeatTransfer.Data.Solids.Generic(
x=0.009,
k=0.140,
c=900,
d=530,
nStaRef=Buildings.ThermalZones.Detailed.Validation.BESTEST.nStaRef),
Buildings.HeatTransfer.Data.Solids.Generic(
x=0.066,
k=0.040,
c=840,
d=12,
nStaRef=Buildings.ThermalZones.Detailed.Validation.BESTEST.nStaRef),
Buildings.HeatTransfer.Data.Solids.Generic(
x=0.012,
k=0.160,
c=840,
d=950,
nStaRef=Buildings.ThermalZones.Detailed.Validation.BESTEST.nStaRef)})
;
parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matFlo(
final nLay= 2,
absIR_a=0.9,
absIR_b=0.9,
absSol_a=0.6,
absSol_b=0.6,
material={
Buildings.HeatTransfer.Data.Solids.Generic(
x=1.003,
k=0.040,
c=0,
d=0,
nStaRef=Buildings.ThermalZones.Detailed.Validation.BESTEST.nStaRef),
Buildings.HeatTransfer.Data.Solids.Generic(
x=0.025,
k=0.140,
c=1200,
d=650,
nStaRef=Buildings.ThermalZones.Detailed.Validation.BESTEST.nStaRef)})
;
parameter Buildings.HeatTransfer.Data.Solids.Generic soil(
x=2,
k=1.3,
c=800,
d=1500) ;
parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic roof(
nLay=3,
absIR_a=0.9,
absIR_b=0.9,
absSol_a=0.6,
absSol_b=0.6,
material={
Buildings.HeatTransfer.Data.Solids.Generic(
x=0.019,
k=0.140,
c=900,
d=530,
nStaRef=Buildings.ThermalZones.Detailed.Validation.BESTEST.nStaRef),
Buildings.HeatTransfer.Data.Solids.Generic(
x=0.1118,
k=0.040,
c=840,
d=12,
nStaRef=Buildings.ThermalZones.Detailed.Validation.BESTEST.nStaRef),
Buildings.HeatTransfer.Data.Solids.Generic(
x=0.010,
k=0.160,
c=840,
d=950,
nStaRef=Buildings.ThermalZones.Detailed.Validation.BESTEST.nStaRef)})
;
parameter Buildings.ThermalZones.Detailed.Validation.BESTEST.Data.Win600 window600(
UFra=3,
haveExteriorShade=false,
haveInteriorShade=false) ;
Buildings.HeatTransfer.Conduction.SingleLayer soi(
A=48,
material=soil,
steadyStateInitial=true,
stateAtSurface_a=false,
stateAtSurface_b=true,
T_a_start=283.15,
T_b_start=283.75)
;
Modelica.Fluid.Interfaces.FluidPort_a supplyAir(
redeclare final package
Medium =
MediumA)
;
Modelica.Fluid.Interfaces.FluidPort_b returnAir(
redeclare final package
Medium =
MediumA)
;
Buildings.BoundaryConditions.WeatherData.Bus weaBus
;
Modelica.Blocks.Interfaces.RealOutput TRooAir
;
Buildings.ThermalZones.Detailed.MixedAir roo(
redeclare package Medium =
MediumA,
use_C_flow=true,
nPorts=5,
hRoo=2.7,
nConExtWin=nConExtWin,
nConBou=1,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
AFlo=48,
datConBou(
layers={matFlo},
each A=48,
each til=F_),
datConExt(
layers={roof,matExtWal,matExtWal,matExtWal},
A={48,6*2.7,6*2.7,8*2.7},
til={C_,Z_,Z_,Z_},
azi={S_,W_,E_,N_}),
nConExt=4,
nConPar=0,
nSurBou=0,
datConExtWin(
layers={matExtWal},
A={8*2.7},
glaSys={window600},
wWin={2*3},
hWin={2},
fFra={0.001},
til={Z_},
azi={S_}),
massDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
lat=lat,
intConMod=Buildings.HeatTransfer.Types.InteriorConvection.Temperature,
extConMod=Buildings.HeatTransfer.Types.ExteriorConvection.TemperatureWind,
steadyStateWindow=false)
;
Modelica.Blocks.Sources.Constant qConGai_flow(k=192/48)
;
Modelica.Blocks.Sources.Constant qRadGai_flow(k=288/48)
;
Modelica.Blocks.Routing.Multiplex3 mul
;
Modelica.Blocks.Sources.Constant qLatGai_flow(k=96/48)
;
Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TSoi[nConBou](
each T= 283.15)
;
Fluid.Sources.MassFlowSource_WeatherData sinInf(
redeclare package Medium =
MediumA,
C=
fill(0.0004, 1),
nPorts=1,
use_m_flow_in=true)
;
Modelica.Blocks.Sources.Constant InfiltrationRate(k=48*2.7*0.5/3600)
;
Modelica.Blocks.Math.Product product;
Buildings.Fluid.Sensors.Density density(
redeclare package Medium =
MediumA,
warnAboutOnePortConnection=false)
;
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTZon
;
Fluid.Sources.MassFlowSource_WeatherData souInf(
redeclare package Medium =
MediumA,
use_m_flow_in=true,
C=
fill(0.0004, 1),
nPorts=1)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable intLoad(table=[0,
0.1; 8*3600,0.1; 8*3600,1.0; 18*3600,1.0; 18*3600,0.1; 24*3600,0.1])
;
Modelica.Blocks.Sources.Constant CO2_flow_per(k=1.023e-5)
;
Modelica.Blocks.Logical.GreaterThreshold greThr(threshold=0.1)
;
Modelica.Blocks.Sources.Constant desOcc(k=2)
;
Modelica.Blocks.Math.Product numOcc
;
Modelica.Blocks.Math.BooleanToReal booToRea
;
protected
Modelica.Blocks.Math.Product pro1
;
Modelica.Blocks.Math.Product pro2
;
Modelica.Blocks.Math.Product pro3
;
Modelica.Blocks.Math.Gain gaiInf(
final k=-1)
;
Modelica.Blocks.Math.Product pro4
;
equation
connect(mul.y, roo.qGai_flow);
connect(density.port, roo.ports[1]);
connect(density.d, product.u2);
connect(TSoi[1].port, soi.port_a);
connect(soi.port_b, roo.surf_conBou[1]);
connect(sinInf.ports[1], roo.ports[2]);
connect(weaBus,sinInf. weaBus);
connect(weaBus, roo.weaBus);
connect(senTZon.T, TRooAir);
connect(senTZon.port, roo.heaPorAir);
connect(qRadGai_flow.y, pro1.u1);
connect(qLatGai_flow.y, pro2.u1);
connect(qConGai_flow.y, pro3.u1);
connect(intLoad.y[1], pro2.u2);
connect(pro1.y, mul.u1[1]);
connect(pro3.y, mul.u2[1]);
connect(pro2.y, mul.u3[1]);
connect(souInf.weaBus, weaBus);
connect(souInf.ports[1], roo.ports[3]);
connect(product.y, gaiInf.u);
connect(gaiInf.y, souInf.m_flow_in);
connect(product.y, sinInf.m_flow_in);
connect(supplyAir, roo.ports[4]);
connect(returnAir, roo.ports[5]);
connect(InfiltrationRate.y, product.u1);
connect(intLoad.y[1], pro1.u2);
connect(pro3.u2, intLoad.y[1]);
connect(CO2_flow_per.y, pro4.u2);
connect(desOcc.y, numOcc.u1);
connect(greThr.y, booToRea.u);
connect(booToRea.y, numOcc.u2);
connect(greThr.u, pro2.u2);
connect(numOcc.y, pro4.u1);
connect(pro4.y, roo.C_flow[1]);
end Room;