model Floor
"Model of a floor of the building"
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium
"Medium model for air";
parameter HeatTransfer.Types.InteriorConvection intConMod=Buildings.HeatTransfer.Types.InteriorConvection.Temperature
"Convective heat transfer model for room-facing surfaces of opaque constructions";
parameter Modelica.SIunits.Angle lat
"Latitude";
parameter Real winWalRat(
min=0.01,
max=0.99) = 0.33
"Window to wall ratio for exterior walls";
parameter Modelica.SIunits.Length hWin = 1.5
"Height of windows";
parameter HeatTransfer.Data.Solids.Plywood matFur(x=0.15, nStaRef=5)
"Material for furniture";
parameter HeatTransfer.Data.Resistances.Carpet matCar
"Carpet";
parameter HeatTransfer.Data.Solids.Concrete matCon(
x=0.1,
k=1.311,
c=836,
nStaRef=5)
"Concrete";
parameter HeatTransfer.Data.Solids.Plywood matWoo(
x=0.01,
k=0.11,
d=544,
nStaRef=1)
"Wood for exterior construction";
parameter HeatTransfer.Data.Solids.Generic matIns(
x=0.087,
k=0.049,
c=836.8,
d=265,
nStaRef=5)
"Steelframe construction with insulation";
parameter HeatTransfer.Data.Solids.GypsumBoard matGyp(
x=0.0127,
k=0.16,
c=830,
d=784,
nStaRef=2)
"Gypsum board";
parameter HeatTransfer.Data.Solids.GypsumBoard matGyp2(
x=0.025,
k=0.16,
c=830,
d=784,
nStaRef=2)
"Gypsum board";
parameter HeatTransfer.Data.OpaqueConstructions.Generic conExtWal(
final nLay=3,
material={matWoo,matIns,matGyp})
"Exterior construction";
parameter HeatTransfer.Data.OpaqueConstructions.Generic conIntWal(
final nLay=1,
material={matGyp2})
"Interior wall construction";
parameter HeatTransfer.Data.OpaqueConstructions.Generic conFlo(
final nLay=1, material={
matCon})
"Floor construction (opa_a is carpet)";
parameter HeatTransfer.Data.OpaqueConstructions.Generic conFur(
final nLay=1, material={
matFur})
"Construction for internal mass of furniture";
parameter HeatTransfer.Data.Solids.Plywood matCarTra(
k=0.11,
d=544,
nStaRef=1,
x=0.215/0.11)
"Wood for floor";
parameter HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys(
UFra=2,
shade=
Buildings.HeatTransfer.Data.Shades.Gray(),
haveInteriorShade=false,
haveExteriorShade=false)
"Data record for the glazing system";
constant Modelica.SIunits.Height hRoo=2.74
"Room height";
Rooms.MixedAir sou(
redeclare package Medium =
Medium,
lat=lat,
AFlo=568.77/hRoo,
hRoo=hRoo,
nConExt=0,
nConExtWin=1,
datConExtWin(
layers={conExtWal},
A={49.91*hRoo},
glaSys={glaSys},
wWin={winWalRat/hWin*49.91*hRoo},
each hWin=hWin,
fFra={0.1},
til={Buildings.Types.Tilt.Wall},
azi={Buildings.Types.Azimuth.S}),
nConPar=2,
datConPar(
layers={conFlo,conFur},
A={568.77/hRoo,414.68},
til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}),
nConBou=3,
datConBou(
layers={conIntWal,conIntWal,conIntWal},
A={6.47,40.76,6.47}*hRoo,
til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}),
nSurBou=0,
nPorts=5,
intConMod=intConMod,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
"South zone";
Rooms.MixedAir eas(
redeclare package Medium =
Medium,
lat=lat,
AFlo=360.0785/hRoo,
hRoo=hRoo,
nConExt=0,
nConExtWin=1,
datConExtWin(
layers={conExtWal},
A={33.27*hRoo},
glaSys={glaSys},
wWin={winWalRat/hWin*33.27*hRoo},
each hWin=hWin,
fFra={0.1},
til={Buildings.Types.Tilt.Wall},
azi={Buildings.Types.Azimuth.E}),
nConPar=2,
datConPar(
layers={conFlo,conFur},
A={360.0785/hRoo,262.52},
til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}),
nConBou=1,
datConBou(
layers={conIntWal},
A={24.13}*hRoo,
til={Buildings.Types.Tilt.Wall}),
nSurBou=2,
surBou(
each A=6.47*hRoo,
each absIR=0.9,
each absSol=0.9,
til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}),
nPorts=5,
intConMod=intConMod,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
"East zone";
Rooms.MixedAir nor(
redeclare package Medium =
Medium,
lat=lat,
AFlo=568.77/hRoo,
hRoo=hRoo,
nConExt=0,
nConExtWin=1,
datConExtWin(
layers={conExtWal},
A={49.91*hRoo},
glaSys={glaSys},
wWin={winWalRat/hWin*49.91*hRoo},
each hWin=hWin,
fFra={0.1},
til={Buildings.Types.Tilt.Wall},
azi={Buildings.Types.Azimuth.N}),
nConPar=2,
datConPar(
layers={conFlo,conFur},
A={568.77/hRoo,414.68},
til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}),
nConBou=3,
datConBou(
layers={conIntWal,conIntWal,conIntWal},
A={6.47,40.76,6.47}*hRoo,
til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}),
nSurBou=0,
nPorts=5,
intConMod=intConMod,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
"North zone";
Rooms.MixedAir wes(
redeclare package Medium =
Medium,
lat=lat,
AFlo=360.0785/hRoo,
hRoo=hRoo,
nConExt=0,
nConExtWin=1,
datConExtWin(
layers={conExtWal},
A={33.27*hRoo},
glaSys={glaSys},
wWin={winWalRat/hWin*33.27*hRoo},
each hWin=hWin,
fFra={0.1},
til={Buildings.Types.Tilt.Wall},
azi={Buildings.Types.Azimuth.W}),
nConPar=2,
datConPar(
layers={conFlo,conFur},
A={360.0785/hRoo,262.52},
til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}),
nConBou=1,
datConBou(
layers={conIntWal},
A={24.13}*hRoo,
til={Buildings.Types.Tilt.Wall}),
nSurBou=2,
surBou(
each A=6.47*hRoo,
each absIR=0.9,
each absSol=0.9,
til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}),
nPorts=5,
intConMod=intConMod,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
"West zone";
Rooms.MixedAir cor(
redeclare package Medium =
Medium,
lat=lat,
AFlo=2698/hRoo,
hRoo=hRoo,
nConExt=0,
nConExtWin=0,
nConPar=2,
datConPar(
layers={conFlo,conFur},
A={360.0785/hRoo,262.52},
til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}),
nConBou=0,
nSurBou=4,
surBou(
A={40.76,24.13,40.76,24.13}*hRoo,
each absIR=0.9,
each absSol=0.9,
til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}),
nPorts=11,
intConMod=intConMod,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
"Core zone";
Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsSou[2](
redeclare package Medium =
Medium)
"Fluid inlets and outlets";
Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsEas[2](
redeclare package Medium =
Medium)
"Fluid inlets and outlets";
Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsNor[2](
redeclare package Medium =
Medium)
"Fluid inlets and outlets";
Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsWes[2](
redeclare package Medium =
Medium)
"Fluid inlets and outlets";
Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsCor[2](
redeclare package Medium =
Medium)
"Fluid inlets and outlets";
Modelica.Blocks.Math.MatrixGain gai(K=20*[0.4; 0.4; 0.2])
"Matrix gain to split up heat gain in radiant, convective and latent gain";
Modelica.Blocks.Sources.Constant uSha(k=0)
"Control signal for the shading device";
Modelica.Blocks.Routing.Replicator replicator(nout=1);
BoundaryConditions.WeatherData.Bus weaBus
"Weather bus";
RoomLeakage leaSou(
redeclare package Medium =
Medium, VRoo=568.77,
s=49.91/33.27,
azi=Buildings.Types.Azimuth.S)
"Model for air infiltration through the envelope";
RoomLeakage leaEas(
redeclare package Medium =
Medium, VRoo=360.0785,
s=33.27/49.91,
azi=Buildings.Types.Azimuth.E)
"Model for air infiltration through the envelope";
RoomLeakage leaNor(
redeclare package Medium =
Medium, VRoo=568.77,
s=49.91/33.27,
azi=Buildings.Types.Azimuth.N)
"Model for air infiltration through the envelope";
RoomLeakage leaWes(
redeclare package Medium =
Medium, VRoo=360.0785,
s=33.27/49.91,
azi=Buildings.Types.Azimuth.W)
"Model for air infiltration through the envelope";
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirSou
"Air temperature sensor";
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirEas
"Air temperature sensor";
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirNor
"Air temperature sensor";
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirWes
"Air temperature sensor";
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirPer5
"Air temperature sensor";
Modelica.Blocks.Routing.Multiplex5 multiplex5_1;
Modelica.Blocks.Interfaces.RealOutput TRooAir[5]
"Room air temperatures";
Airflow.Multizone.DoorDiscretizedOpen opeSouCor(
redeclare package Medium =
Medium, wOpe=10)
"Opening between perimeter1 and core";
Airflow.Multizone.DoorDiscretizedOpen opeEasCor(
redeclare package Medium =
Medium, wOpe=10)
"Opening between perimeter2 and core";
Airflow.Multizone.DoorDiscretizedOpen opeNorCor(
redeclare package Medium =
Medium, wOpe=10)
"Opening between perimeter3 and core";
Airflow.Multizone.DoorDiscretizedOpen opeWesCor(
redeclare package Medium =
Medium, wOpe=10)
"Opening between perimeter3 and core";
Modelica.Blocks.Sources.CombiTimeTable intGaiFra(
table=[0,0.05;
3600*8,0.05;
3600*9,0.9;
3600*12,0.9;
3600*12,0.8;
3600*13,0.8;
3600*13,1;
3600*17,1;
3600*19,0.1;
3600*24,0.05],
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic)
"Fraction of internal heat gain";
Fluid.Sensors.RelativePressure senRelPre(
redeclare package Medium =
Medium)
"Building pressure measurement";
Fluid.Sources.Outside out(nPorts=1,
redeclare package Medium =
Medium);
Modelica.Blocks.Interfaces.RealOutput p_rel
"Relative pressure signal of building static pressure";
equation
connect(sou.surf_conBou[1], wes.surf_surBou[2]);
connect(sou.surf_conBou[2], cor.surf_surBou[1]);
connect(sou.surf_conBou[3], eas.surf_surBou[1]);
connect(eas.surf_conBou[1], cor.surf_surBou[2]);
connect(eas.surf_surBou[2], nor.surf_conBou[1]);
connect(nor.surf_conBou[2], cor.surf_surBou[3]);
connect(nor.surf_conBou[3], wes.surf_surBou[1]);
connect(wes.surf_conBou[1], cor.surf_surBou[4]);
connect(uSha.y, replicator.u);
connect(replicator.y, nor.uSha);
connect(replicator.y, wes.uSha);
connect(replicator.y, eas.uSha);
connect(replicator.y, sou.uSha);
connect(replicator.y, cor.uSha);
connect(gai.y, nor.qGai_flow);
connect(gai.y, cor.qGai_flow);
connect(gai.y, sou.qGai_flow);
connect(gai.y, eas.qGai_flow);
connect(gai.y, wes.qGai_flow);
connect(sou.weaBus, weaBus);
connect(eas.weaBus, weaBus);
connect(nor.weaBus, weaBus);
connect(wes.weaBus, weaBus);
connect(cor.weaBus, weaBus);
connect(weaBus, leaSou.weaBus);
connect(weaBus, leaEas.weaBus);
connect(weaBus, leaNor.weaBus);
connect(weaBus, leaWes.weaBus);
connect(multiplex5_1.y, TRooAir);
connect(temAirSou.T, multiplex5_1.u1[1]);
connect(temAirEas.T, multiplex5_1.u2[1]);
connect(temAirNor.T, multiplex5_1.u3[1]);
connect(temAirWes.T, multiplex5_1.u4[1]);
connect(temAirPer5.T, multiplex5_1.u5[1]);
connect(sou.heaPorAir, temAirSou.port);
connect(eas.heaPorAir, temAirEas.port);
connect(nor.heaPorAir, temAirNor.port);
connect(wes.heaPorAir, temAirWes.port);
connect(cor.heaPorAir, temAirPer5.port);
connect(sou.ports[1], portsSou[1]);
connect(sou.ports[2], portsSou[2]);
connect(eas.ports[1], portsEas[1]);
connect(eas.ports[2], portsEas[2]);
connect(nor.ports[1], portsNor[1]);
connect(nor.ports[2], portsNor[2]);
connect(wes.ports[1], portsWes[1]);
connect(wes.ports[2], portsWes[2]);
connect(cor.ports[1], portsCor[1]);
connect(cor.ports[2], portsCor[2]);
connect(leaSou.port_b, sou.ports[3]);
connect(leaEas.port_b, eas.ports[3]);
connect(leaNor.port_b, nor.ports[3]);
connect(leaWes.port_b, wes.ports[3]);
connect(opeSouCor.port_b1, cor.ports[3]);
connect(opeSouCor.port_a2, cor.ports[4]);
connect(opeSouCor.port_a1, sou.ports[4]);
connect(opeSouCor.port_b2, sou.ports[5]);
connect(opeEasCor.port_b1, eas.ports[4]);
connect(opeEasCor.port_a2, eas.ports[5]);
connect(opeEasCor.port_a1, cor.ports[5]);
connect(opeEasCor.port_b2, cor.ports[6]);
connect(opeNorCor.port_b1, nor.ports[4]);
connect(opeNorCor.port_a2, nor.ports[5]);
connect(opeNorCor.port_a1, cor.ports[7]);
connect(opeNorCor.port_b2, cor.ports[8]);
connect(opeWesCor.port_b1, cor.ports[9]);
connect(opeWesCor.port_a2, cor.ports[10]);
connect(opeWesCor.port_a1, wes.ports[4]);
connect(opeWesCor.port_b2, wes.ports[5]);
connect(intGaiFra.y, gai.u);
connect(cor.ports[11], senRelPre.port_b);
connect(out.weaBus, weaBus);
connect(out.ports[1], senRelPre.port_a);
connect(senRelPre.p_rel, p_rel);
end Floor;
Room leakage.