model Occupancy
Modelica.Blocks.Sources.CombiTimeTable office1(
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
tableOnFile=false,
table=[-6,0.0;
8,2;
9,3;
12,2;
13,6;
15,3;
16,4;
18,0],
timeScale=3600) ;
Modelica.Blocks.Sources.CombiTimeTable office2(
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
tableOnFile=false,
table=[-6,0.0;
8,2;
9,3;
12,2;
13,5;
15,3;
16,6;
18,0],
timeScale=3600) ;
Modelica.Blocks.Sources.CombiTimeTable cla1(
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
tableOnFile=false,
table=[-6,0.0;
8,25;
9,20;
10,30;
12,0;
13,30;
15,40;
16,20;
18,0],
timeScale=3600) ;
Modelica.Blocks.Sources.CombiTimeTable cla2(
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
tableOnFile=false,
table=[-6,0.0;
8,20;
9,10;
10,20;
11,15;
12,0;
13,30;
15,20;
16,25;
18,0],
timeScale=3600) ;
Modelica.Blocks.Sources.CombiTimeTable smaRoo1(
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
tableOnFile=false,
table=[-6,0.0;
8,0.4;
9,1;
12,1;
13,0.5;
14,1.0;
16,0.5;
18,0],
timeScale=3600) ;
Modelica.Blocks.Sources.CombiTimeTable smaRoo2(
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
tableOnFile=false,
table=[-6,0.0;
8,0.4;
9,1;
10,0.4;
12,1;
13,0.3;
14,0.4;
16,0.2;
18,0],
timeScale=3600) ;
Modelica.Blocks.Interfaces.RealOutput y1[2]
;
Modelica.Blocks.Interfaces.RealOutput y2[2]
;
Modelica.Blocks.Interfaces.RealOutput y3[2]
;
Modelica.Blocks.Math.Gain sca1(k=2) ;
Modelica.Blocks.Math.Gain sca2(k=3) ;
Modelica.Blocks.Math.Gain sca3(k=3) ;
Modelica.Blocks.Math.Gain sca4(k=2) ;
Modelica.Blocks.Math.Gain sca5(k=3) ;
Modelica.Blocks.Math.Gain sca6(k=3) ;
equation
connect(cla1.y[1], sca1.u);
connect(cla2.y[1], sca4.u);
connect(office1.y[1], sca2.u);
connect(office2.y[1], sca5.u);
connect(smaRoo1.y[1], sca3.u);
connect(smaRoo2.y[1], sca6.u);
connect(sca1.y, y1[1]);
connect(sca4.y, y1[2]);
connect(sca2.y, y2[1]);
connect(sca5.y, y2[2]);
connect(sca3.y, y3[1]);
connect(sca6.y, y3[2]);
end Occupancy;
Room leakage used in the MIT system model.
Model of a room and a plenum. CO2 is injected into the room.
An air damper controls how much air flows into the room to track
the CO2 level.
Model of a suite consisting of five rooms for the MIT system model.
model Suite
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium ;
Modelica.Blocks.Interfaces.RealInput p ;
Modelica.Fluid.Interfaces.FluidPort_b port_aSup(
redeclare package Medium =
Medium);
parameter Real scaM_flow ;
parameter Modelica.SIunits.MassFlowRate m0Tot_flow=
scaM_flow*(5.196+2.8428+1.0044+0.9612+0.3624+0.1584);
Buildings.Fluid.FixedResistances.Junction spl34(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{1,-1,-1},
dp_nominal={0.176,-0.844,-0.0662},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Junction mix55(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{-1,1,1},
dp_nominal=1E3*{-0.263200E-02,0.999990E-03,0.649000E-03},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.PressureDrop res13(
m_flow_nominal=scaM_flow*1,
dp_nominal=0.1E3,
redeclare package Medium =
Medium);
Buildings.Fluid.FixedResistances.PressureDrop res14(
m_flow_nominal=scaM_flow*1,
dp_nominal=0.1E3,
redeclare package Medium =
Medium);
Buildings.Fluid.FixedResistances.PressureDrop res15(
m_flow_nominal=scaM_flow*1,
dp_nominal=0.1E3,
redeclare package Medium =
Medium);
Buildings.Fluid.FixedResistances.PressureDrop res16(
m_flow_nominal=scaM_flow*1,
dp_nominal=0.1E3,
redeclare package Medium =
Medium);
Buildings.Fluid.FixedResistances.PressureDrop res17(
m_flow_nominal=scaM_flow*1,
dp_nominal=0.1E3,
redeclare package Medium =
Medium);
Buildings.Fluid.FixedResistances.Junction spl35(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{1,-1,-1},
dp_nominal=1E3*{0.371000E-04,-0.259000E-02,-0.131000E-02},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Junction spl36(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{1,-1,-1},
dp_nominal=1E3*{0.211000E-03,-0.128000E-01,-0.223000E-02},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Junction spl37(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{1,-1,-1},
dp_nominal=1E3*{0.730000E-03,-0.128000E-01,-0.938000E-02},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Junction spl38(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{1,-1,-1},
dp_nominal=1E3*{0.731000E-02,-0.895000E-01,-0.942000E-01},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Junction mix54(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{-1,1,1},
dp_nominal=1E3*{-0.653000E-02,0.271000E-03,0.402000E-04},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Junction mix53(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{-1,1,1},
dp_nominal=1E3*{-0.566000E-01,0.541000E-02,0.749000E-04},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Junction mix52(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{-1,1,1},
dp_nominal=1E3*{-0.353960,0.494000E-03,0.922000E-03},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.FixedResistances.Junction mix51(
redeclare package Medium =
Medium,
m_flow_nominal=scaM_flow*{-1,1,1},
dp_nominal=1E3*{-0.847600E-01,1.89750,0.150000E-02},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial);
Modelica.Fluid.Interfaces.FluidPort_b port_bExh(
redeclare package Medium =
Medium);
Buildings.Fluid.FixedResistances.PressureDrop res1(
m_flow_nominal=scaM_flow*1,
dp_nominal=0.1E3,
redeclare package Medium =
Medium);
RoomVAV roo45(
redeclare package Medium =
Medium,
ADam=scaM_flow*0.49,
m_flow_nominal=scaM_flow*5.196,
VRoo=1820,
VPle=396) ;
RoomVAV roo46(
redeclare package Medium =
Medium,
ADam=scaM_flow*0.245,
m_flow_nominal=scaM_flow*2.8428,
VRoo=1210,
VPle=330) ;
RoomVAV roo47(
redeclare package Medium =
Medium,
ADam=scaM_flow*0.128,
m_flow_nominal=scaM_flow*1.0044,
VRoo=647,
VPle=125) ;
RoomVAV roo48(
redeclare package Medium =
Medium,
ADam=scaM_flow*0.128,
m_flow_nominal=scaM_flow*0.9612,
VRoo=385,
VPle=107) ;
RoomVAV roo49(
redeclare package Medium =
Medium,
ADam=scaM_flow*0.0494,
m_flow_nominal=scaM_flow*0.3624,
VRoo=48,
VPle=13) ;
RoomVAV roo50(
redeclare package Medium =
Medium,
ADam=scaM_flow*0.024,
m_flow_nominal=scaM_flow*0.1584,
VRoo=155,
VPle=43) ;
Occupancy occ ;
Buildings.Fluid.Sensors.RelativePressure dpMea(
redeclare package Medium =
Medium) ;
Modelica.Blocks.Interfaces.RealOutput p_rel ;
Modelica.Blocks.Interfaces.RealOutput yDam[6] ;
Buildings.Fluid.Sensors.Pressure pRoo(
redeclare package Medium =
Medium)
;
Modelica.Blocks.Math.Feedback feeBac;
Modelica.Blocks.Interfaces.RealOutput dPRoo ;
equation
connect(spl38.port_2, roo50.portSup);
connect(port_aSup, spl34.port_1);
connect(spl34.port_2, spl35.port_1);
connect(spl35.port_2, spl36.port_1);
connect(spl36.port_2, spl37.port_1);
connect(spl37.port_2, spl38.port_1);
connect(dpMea.port_a, spl38.port_1);
connect(pRoo.p, feeBac.u2);
connect(roo50.portRoo2, pRoo.port);
connect(spl34.port_3, roo45.portSup);
connect(spl35.port_3, roo46.portSup);
connect(spl36.port_3, roo47.portSup);
connect(spl37.port_3, roo48.portSup);
connect(spl38.port_3, roo49.portSup);
connect(dpMea.port_b, res16.port_b);
connect(p, feeBac.u1);
connect(dPRoo, feeBac.y);
connect(dpMea.p_rel, p_rel);
connect(roo45.yDam, yDam[1]);
connect(roo46.yDam, yDam[2]);
connect(roo47.yDam, yDam[3]);
connect(roo48.yDam, yDam[4]);
connect(roo49.yDam, yDam[5]);
connect(roo50.yDam, yDam[6]);
connect(occ.y1[1], roo45.nPeo);
connect(occ.y1[2], roo46.nPeo);
connect(occ.y2[1], roo47.nPeo);
connect(occ.y2[2], roo48.nPeo);
connect(occ.y3[1], roo49.nPeo);
connect(occ.y3[2], roo50.nPeo);
connect(port_bExh, mix55.port_1);
connect(mix55.port_2, mix54.port_1);
connect(mix54.port_2, mix53.port_1);
connect(mix53.port_2, mix52.port_1);
connect(mix52.port_2, mix51.port_1);
connect(mix51.port_2, roo50.portRet);
connect(roo48.portRet, mix51.port_3);
connect(mix52.port_3, roo49.portRet);
connect(roo47.portRet, mix53.port_3);
connect(roo46.portRet, mix54.port_3);
connect(roo45.portRet, mix55.port_3);
connect(res1.port_b, roo45.portRoo1);
connect(roo45.portRoo2, res13.port_a);
connect(res13.port_b, roo46.portRoo1);
connect(roo46.portRoo2, res14.port_a);
connect(res14.port_b, roo47.portRoo1);
connect(roo47.portRoo2, res15.port_a);
connect(res15.port_b, roo48.portRoo1);
connect(roo48.portRoo2, res16.port_a);
connect(res16.port_b, roo49.portRoo1);
connect(roo49.portRoo2, res17.port_a);
connect(res17.port_b, roo50.portRoo1);
connect(roo50.portRoo2, res1.port_a);
end Suite;