Extends from Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).
Name | Description |
---|---|
ChimneyShaftNoVolume | Test model that demonstrates the chimney effect with a shaft that does not contain an air volume |
ChimneyShaftWithVolume | Test model that demonstrates the chimney effect with a shaft that contains an air volume |
CO2TransportStep | Model that transport CO2 through buoyancy driven flow |
OneDoor | |
OneOpenDoor | |
OpenDoors | |
OneEffectiveAirLeakageArea | |
Orifice | |
ReverseBuoyancy | |
ReverseBuoyancy3Zones | |
Validation0 | |
Validation1 | |
NaturalVentilation | |
ZonalFlow |
model ChimneyShaftNoVolume "Test model that demonstrates the chimney effect with a shaft that does not contain an air volume" import Buildings; package Medium = Modelica.Media.Air.SimpleAir;Fluid.MixingVolumes.MixingVolume roo( nPorts=3, V=2.5*5*5, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=273.15 + 20, redeclare package Medium = Medium, use_HeatTransfer=true, p_start=101325) "Air volume of a room"; Buildings.Airflow.Multizone.Orifice oriChiTop( m=0.5, redeclare package Medium = Medium, A=0.01); Buildings.Fluid.Sources.MassFlowSource_T boundary( redeclare package Medium = Medium, nPorts=1, use_m_flow_in=true, T=293.15); Buildings.Fluid.Sources.Boundary_pT bou0( redeclare package Medium = Medium, T=273.15, nPorts=2); Buildings.Airflow.Multizone.Orifice oriBot( m=0.5, redeclare package Medium = Medium, A=0.01); Modelica.Blocks.Sources.CombiTimeTable mRoo_flow(tableOnFile=false, table=[0, 0.05; 600,0.05; 601,0; 1800,0; 1801,-0.05; 2400,-0.05; 2401,0; 3600,0]) "Mass flow into and out of room to fill the medium column with air of different temperature"; MediumColumn staOut( redeclare package Medium = Medium, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop, h=1.5) "Model for stack effect"; Buildings.Airflow.Multizone.Orifice oriChiBot( m=0.5, redeclare package Medium = Medium, A=0.01); Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHea "Prescribed heat flow"; Buildings.Controls.Continuous.LimPID con( Td=10, yMax=1, yMin=-1, Ti=60, controllerType=Modelica.Blocks.Types.SimpleController.P, k=5) "Controller to maintain volume temperature"; Modelica.Blocks.Sources.Constant TSet(k=293.15) "Temperature set point"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen "Temperature sensor"; Modelica.Blocks.Math.Gain gain(k=3000); inner Modelica.Fluid.System system; Buildings.Airflow.Multizone.MediumColumn sha(redeclare package Medium = Medium, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.actual) "Shaft of chimney"; MediumColumn staOut1( redeclare package Medium = Medium, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom, h=1.5) "Model for stack effect"; equationconnect(boundary.ports[1],roo. ports[1]); connect(TSet.y, con.u_s); connect(temSen.T, con.u_m); connect(gain.u, con.y); connect(gain.y, preHea.Q_flow); connect(sha.port_a, oriChiTop.port_a); connect(sha.port_b, oriChiBot.port_b); connect(staOut.port_b, oriBot.port_a); connect(preHea.port, roo.heatPort); connect(roo.heatPort, temSen.port); connect(bou0.ports[1], oriChiTop.port_b); connect(bou0.ports[2], staOut.port_a); connect(roo.ports[2], oriChiBot.port_a); connect(oriBot.port_b, staOut1.port_a); connect(staOut1.port_b, roo.ports[3]); connect(mRoo_flow.y[1], boundary.m_flow_in); end ChimneyShaftNoVolume;
model ChimneyShaftWithVolume "Test model that demonstrates the chimney effect with a shaft that contains an air volume" import Buildings; package Medium = Modelica.Media.Air.SimpleAir;Fluid.MixingVolumes.MixingVolume roo( nPorts=3, V=2.5*5*5, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=273.15 + 20, redeclare package Medium = Medium, use_HeatTransfer=true, p_start=101325) "Air volume of a room"; Buildings.Airflow.Multizone.Orifice oriChiTop( m=0.5, redeclare package Medium = Medium, A=0.01); Buildings.Fluid.Sources.MassFlowSource_T boundary( redeclare package Medium = Medium, nPorts=1, use_m_flow_in=true, T=293.15); Buildings.Fluid.Sources.Boundary_pT bou0( redeclare package Medium = Medium, T=273.15, nPorts=2); Buildings.Airflow.Multizone.Orifice oriBot( m=0.5, redeclare package Medium = Medium, A=0.01); MediumColumn staOut( redeclare package Medium = Medium, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop, h=3/2) "Model for stack effect"; Buildings.Airflow.Multizone.Orifice oriChiBot( m=0.5, redeclare package Medium = Medium, A=0.01); Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHea "Prescribed heat flow"; Buildings.Controls.Continuous.LimPID con( Td=10, yMax=1, yMin=-1, Ti=60, controllerType=Modelica.Blocks.Types.SimpleController.P, k=5) "Controller to maintain volume temperature"; Modelica.Blocks.Sources.Constant TSet(k=293.15) "Temperature set point"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen "Temperature sensor"; Modelica.Blocks.Math.Gain gain(k=3000); inner Modelica.Fluid.System system; Buildings.Airflow.Multizone.MediumColumnDynamic sha( redeclare package Medium = Medium, V=3) "Shaft of chimney"; MediumColumn staOut1( redeclare package Medium = Medium, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom, h=3/2) "Model for stack effect"; Modelica.Blocks.Sources.CombiTimeTable mRoo_flow(tableOnFile=false, table=[0,0.05; 600,0.05; 601,0; 1800,0; 1801,-0.05; 2400,-0.05; 2401,0; 3600,0]) "Mass flow into and out of room to fill the medium column with air of different temperature"; equationconnect(boundary.ports[1],roo. ports[1]); connect(TSet.y, con.u_s); connect(temSen.T, con.u_m); connect(gain.u, con.y); connect(gain.y, preHea.Q_flow); connect(sha.port_a, oriChiTop.port_a); connect(sha.port_b, oriChiBot.port_b); connect(staOut.port_b, oriBot.port_a); connect(preHea.port, roo.heatPort); connect(roo.heatPort, temSen.port); connect(bou0.ports[1], oriChiTop.port_b); connect(bou0.ports[2], staOut.port_a); connect(roo.ports[2], oriChiBot.port_a); connect(oriBot.port_b, staOut1.port_a); connect(staOut1.port_b, roo.ports[3]); connect(mRoo_flow.y[1], boundary.m_flow_in); end ChimneyShaftWithVolume;
t=3600
, CO2 is added to volWes
.
As time progresses, the CO2 is transported to
the other rooms, and eventually its concentration decays.
model CO2TransportStep "Model that transport CO2 through buoyancy driven flow" package Medium = Modelica.Media.Air.SimpleAir(extraPropertiesNames={"CO2"});Buildings.Fluid.MixingVolumes.MixingVolume volEas( redeclare package Medium = Medium, T_start=273.15 + 20, V=2.5*5*5*1, nPorts=6, use_HeatTransfer=true, energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, traceDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, C_nominal={1E-6}); Buildings.Airflow.Multizone.Orifice oriOutBot( redeclare package Medium = Medium, A=0.01, m=0.5); Buildings.Airflow.Multizone.MediumColumn colOutTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriOutTop( redeclare package Medium = Medium, A=0.01, m=0.5); Buildings.Airflow.Multizone.MediumColumn colEasInTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Fluid.Sources.FixedBoundary volOut( redeclare package Medium = Medium, nPorts=2, p(displayUnit="Pa") = 101325, T=283.15); Buildings.Airflow.Multizone.MediumColumn colEasInBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.MediumColumn colOutBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.MediumColumn colWesBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriWesTop( redeclare package Medium = Medium, m=0.5, A=0.01); Buildings.Airflow.Multizone.MediumColumn colWesTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeClo( redeclare package Medium = Medium, LClo=20*1E-4, wOpe=1, hOpe=2.2, CDOpe=0.78, CDClo=0.78, nCom=10, hA=3/2, hB=3/2, dp_turbulent(displayUnit="Pa") = 0.01) "Discretized door"; Fluid.MixingVolumes.MixingVolume volWes( redeclare package Medium = Medium, T_start=273.15 + 25, nPorts=5, V=2.5*5*5, use_HeatTransfer=true, energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, traceDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, p_start=101325, C_nominal={1E-6}); Modelica.Blocks.Sources.Constant open(k=1); Buildings.Airflow.Multizone.MediumColumn col1EasBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriEasTop( redeclare package Medium = Medium, m=0.5, A=0.01); Buildings.Airflow.Multizone.MediumColumn colEasTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Fluid.MixingVolumes.MixingVolume volTop( redeclare package Medium = Medium, T_start=273.15 + 20, V=2.5*5*10*1, nPorts=3, use_HeatTransfer=true, energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, traceDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, C_nominal={1E-6}); inner Modelica.Fluid.System system; Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TTop(T=293.15) "Fixed temperature"; Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TWes(T=298.15) "Fixed temperature"; Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TEas(T=293.15) "Fixed temperature"; Fluid.Sensors.TraceSubstances CO2SenTop(redeclare package Medium = Medium) "CO2 sensor"; Fluid.Sensors.TraceSubstances CO2SenWes(redeclare package Medium = Medium) "CO2 sensor"; Fluid.Sensors.TraceSubstances CO2SenEas(redeclare package Medium = Medium) "CO2 sensor"; Modelica.Blocks.Sources.Pulse pulse( amplitude=8.18E-6, width=1/24/10, period=86400, startTime=3600); Fluid.Sources.PrescribedExtraPropertyFlowRate prescribedExtraPropertyFlowRate( redeclare package Medium = Medium, use_m_flow_in=true, nPorts=1); equationconnect(open.y, dooOpeClo.y); connect(volWes.ports[1], dooOpeClo.port_b2); connect(volWes.ports[2], dooOpeClo.port_a1); connect(volWes.ports[3], colWesBot.port_b); connect(colWesBot.port_a, oriWesTop.port_b); connect(oriWesTop.port_a, colWesTop.port_b); connect(colWesTop.port_a, volTop.ports[1]); connect(volTop.ports[2], colEasTop.port_a); connect(colEasTop.port_b, oriEasTop.port_b); connect(oriEasTop.port_a, col1EasBot.port_a); connect(dooOpeClo.port_b1, volEas.ports[1]); connect(volEas.ports[2], dooOpeClo.port_a2); connect(colEasInBot.port_a, volEas.ports[3]); connect(volEas.ports[4], colEasInTop.port_b); connect(volEas.ports[5], col1EasBot.port_b); connect(colEasInTop.port_a, oriOutTop.port_a); connect(oriOutTop.port_b, colOutTop.port_a); connect(colOutTop.port_b, volOut.ports[1]); connect(colOutBot.port_a, volOut.ports[2]); connect(colOutBot.port_b, oriOutBot.port_b); connect(oriOutBot.port_a, colEasInBot.port_b); connect(TTop.port, volTop.heatPort); connect(TEas.port, volEas.heatPort); connect(TWes.port, volWes.heatPort); connect(CO2SenTop.port, volTop.ports[3]); connect(CO2SenWes.port, volWes.ports[4]); connect(CO2SenEas.port, volEas.ports[6]); connect(prescribedExtraPropertyFlowRate.m_flow_in, pulse.y); connect(prescribedExtraPropertyFlowRate.ports[1], volWes.ports[5]); end CO2TransportStep;
model OneDoor package Medium = Buildings.Media.PerfectGases.MoistAirUnsaturated;Buildings.Fluid.MixingVolumes.MixingVolume volH( redeclare package Medium = Medium, T_start=273.15 + 50, V=2.5*10*10, nPorts=4, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeClo(redeclare package Medium = Medium, LClo=20*1E-4) "Discretized door"; Modelica.Blocks.Sources.Constant open(k=1); Buildings.Fluid.MixingVolumes.MixingVolume volC( redeclare package Medium = Medium, T_start=273.15 + 0, V=2.5*10*10, nPorts=4, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeClo1(redeclare package Medium = Medium, LClo=20*1E-4) "Discretized door"; Modelica.Blocks.Sources.Constant open1(k=1); inner Modelica.Fluid.System system; equationconnect(open.y, dooOpeClo.y); connect(open1.y, dooOpeClo1.y); connect(volC.ports[1], dooOpeClo.port_a1); connect(volC.ports[2], dooOpeClo.port_b2); connect(dooOpeClo.port_b1, volH.ports[1]); connect(dooOpeClo.port_a2, volH.ports[2]); connect(volC.ports[3], dooOpeClo1.port_a1); connect(volC.ports[4], dooOpeClo1.port_b2); connect(dooOpeClo1.port_b1, volH.ports[3]); connect(dooOpeClo1.port_a2, volH.ports[4]); end OneDoor;
model OneOpenDoor package Medium = Buildings.Media.IdealGases.SimpleAir;Buildings.Airflow.Multizone.DoorDiscretizedOpen dooOpe(redeclare package Medium = Medium) "Discretized door"; Buildings.Fluid.MixingVolumes.MixingVolume volA( redeclare package Medium = Medium, V=2.5*5*5, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nPorts=4); Buildings.Fluid.MixingVolumes.MixingVolume volB( redeclare package Medium = Medium, V=2.5*5*5, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, use_HeatTransfer=true, nPorts=4); Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo; Modelica.Blocks.Sources.Sine heaSou(freqHz=1/3600); Modelica.Blocks.Math.Gain Gain1(k=100); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeClo(redeclare package Medium = Medium, LClo=20*1E-4) "Discretized door"; Modelica.Blocks.Sources.Ramp ramp( duration=120, height=1, offset=0, startTime=1000); inner Modelica.Fluid.System system; equationconnect(Gain1.y, preHeaFlo.Q_flow); connect(heaSou.y, Gain1.u); connect(ramp.y, dooOpeClo.y); connect(preHeaFlo.port, volB.heatPort); connect(volA.ports[1], dooOpeClo.port_b2); connect(volA.ports[2], dooOpeClo.port_a1); connect(volA.ports[3], dooOpe.port_b2); connect(volA.ports[4], dooOpe.port_a1); connect(volB.ports[1], dooOpe.port_b1); connect(volB.ports[2], dooOpe.port_a2); connect(volB.ports[3], dooOpeClo.port_b1); connect(volB.ports[4], dooOpeClo.port_a2); end OneOpenDoor;
model OpenDoors package Medium = Buildings.Media.IdealGases.SimpleAir;Buildings.Airflow.Multizone.DoorDiscretizedOperable dooAB( redeclare package Medium = Medium, LClo=20*1E-4, forceErrorControlOnFlow=true) "Discretized door"; Buildings.Fluid.MixingVolumes.MixingVolume volA( redeclare package Medium = Medium, V=2.5*5*5, nPorts=4, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Buildings.Fluid.MixingVolumes.MixingVolume volB( redeclare package Medium = Medium, V=2.5*5*5, use_HeatTransfer=true, nPorts=4, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow PrescribedHeatFlow1; Modelica.Blocks.Sources.Sine Sine1(freqHz=1/3600); Modelica.Blocks.Math.Gain Gain1(k=100); Buildings.Fluid.MixingVolumes.MixingVolume volC( redeclare package Medium = Medium, V=2.5*5*5, nPorts=4, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooAC( redeclare package Medium = Medium, LClo=20*1E-4, forceErrorControlOnFlow=true) "Discretized door"; Modelica.Blocks.Sources.Constant open(k=0); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooBC( redeclare package Medium = Medium, LClo=20*1E-4, forceErrorControlOnFlow=true) "Discretized door"; equationconnect(Gain1.y, PrescribedHeatFlow1.Q_flow); connect(Sine1.y, Gain1.u); connect(open.y, dooAB.y); connect(open.y, dooAC.y); connect(open.y, dooBC.y); connect(PrescribedHeatFlow1.port, volB.heatPort); connect(volC.ports[1], dooAC.port_b1); connect(volC.ports[2], dooAC.port_a2); connect(volC.ports[3], dooBC.port_b1); connect(volC.ports[4], dooBC.port_a2); connect(volB.ports[1], dooAB.port_b1); connect(volB.ports[2], dooAB.port_a2); connect(volB.ports[3], dooBC.port_a1); connect(volB.ports[4], dooBC.port_b2); connect(volA.ports[1], dooAC.port_b2); connect(volA.ports[2], dooAC.port_a1); connect(volA.ports[3], dooAB.port_b2); connect(volA.ports[4], dooAB.port_a1); end OpenDoors;
model OneEffectiveAirLeakageArea package Medium = Buildings.Media.IdealGases.SimpleAir;Buildings.Fluid.MixingVolumes.MixingVolume volA( redeclare package Medium = Medium, V=2.5*5*5, nPorts=2, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Buildings.Fluid.MixingVolumes.MixingVolume volB( redeclare package Medium = Medium, V=2.5*5*5, use_HeatTransfer=true, nPorts=1, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo; Modelica.Blocks.Sources.Sine Sine1(freqHz=1/3600); Modelica.Blocks.Math.Gain Gain1(k=100); Buildings.Airflow.Multizone.EffectiveAirLeakageArea cra(redeclare package Medium = Medium, L=20E-4); Buildings.Fluid.Sources.MassFlowSource_T sou( redeclare package Medium = Medium, nPorts=1, use_m_flow_in=true); Modelica.Blocks.Sources.Ramp ramSou( duration=3600, height=0.01, offset=0, startTime=1800); inner Modelica.Fluid.System system; equationconnect(sou.ports[1], volA.ports[1]); connect(ramSou.y, sou.m_flow_in); connect(volB.ports[1], cra.port_b); connect(volA.ports[2], cra.port_a); connect(preHeaFlo.port, volB.heatPort); connect(Gain1.y, preHeaFlo.Q_flow); connect(Gain1.u, Sine1.y); end OneEffectiveAirLeakageArea;
model Orifice package Medium = Buildings.Media.PerfectGases.MoistAirUnsaturated;Buildings.Airflow.Multizone.Orifice ori(redeclare package Medium = Medium, A= 0.2); Buildings.Fluid.Sources.Boundary_pT roo1( redeclare package Medium = Medium, use_p_in=true, use_T_in=true, nPorts=1); Buildings.Fluid.Sources.Boundary_pT roo2( redeclare package Medium = Medium, use_p_in=true, use_T_in=true, nPorts=1); Modelica.Blocks.Sources.Ramp Ramp1( duration=0.5, height=2, offset=-1, startTime=0.25); Modelica.Blocks.Sources.Constant Pre(k=100000); Modelica.Blocks.Math.Add Add1; Modelica.Blocks.Sources.Constant Tem1(k=273.15 + 5); Modelica.Blocks.Sources.Constant Tem2(k=273.15 + 20); Buildings.Fluid.Sensors.Density den1(redeclare package Medium = Medium) "Density sensor"; Buildings.Fluid.Sensors.Density den2(redeclare package Medium = Medium) "Density sensor"; inner Modelica.Fluid.System system; equationconnect(Pre.y, Add1.u1); connect(Ramp1.y, Add1.u2); connect(Tem1.y, roo1.T_in); connect(Pre.y, roo1.p_in); connect(Add1.y, roo2.p_in); connect(Tem2.y, roo2.T_in); connect(roo1.ports[1], ori.port_a); connect(ori.port_a, den1.port); connect(ori.port_b, roo2.ports[1]); connect(ori.port_b, den2.port); end Orifice;
model ReverseBuoyancy package Medium = Buildings.Media.IdealGases.SimpleAir;Buildings.Fluid.MixingVolumes.MixingVolume volEas( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=2.5*5*5, T_start=273.15 + 25, nPorts=5); Buildings.Airflow.Multizone.Orifice oriOutBot( redeclare package Medium = Medium, m=0.5, A=0.01, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colOutTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriOutTop( redeclare package Medium = Medium, m=0.5, A=0.01, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colEasInTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Fluid.MixingVolumes.MixingVolume volOut( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=1E12, T_start=273.15 + 15, nPorts=3); Buildings.Airflow.Multizone.Orifice dummy( redeclare package Medium = Medium, m=1, A=100, dp_turbulent=0.1) "to fix absolute pressure"; Buildings.Airflow.Multizone.MediumColumn colEasInBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.MediumColumn colOutBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); MediumColumn colWesBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriWesTop( redeclare package Medium = Medium, m=0.5, A=0.01, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colWesTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeClo( redeclare package Medium = Medium, LClo=20*1E-4, wOpe=1, hOpe=2.2, hA=3/2, hB=3/2, CDOpe=0.78, CDClo=0.78, nCom=10, vZer=0.01, dp_turbulent=0.1) "Discretized door"; Buildings.Fluid.Delays.DelayFirstOrder volWes( redeclare package Medium = Medium, m_flow_nominal=1.2, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=2.5*5*5, p_start=101325, T_start=273.15 + 22, nPorts=3); Modelica.Blocks.Sources.Constant ope(k=1); Buildings.Airflow.Multizone.MediumColumn col1EasBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriEasTop( redeclare package Medium = Medium, m=0.5, A=0.01, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colEasTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Fluid.MixingVolumes.MixingVolume volTopEas( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=2.5*5*10, T_start=273.15 + 21, nPorts=3); Buildings.Fluid.MixingVolumes.MixingVolume volTopWes( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=273.15 + 20, V=2.5*5*10, nPorts=3); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeCloTop( redeclare package Medium = Medium, LClo=20*1E-4, wOpe=1, hOpe=2.2, hA=3/2, hB=3/2, CDOpe=0.78, CDClo=0.78, nCom=10, vZer=0.01, dp_turbulent=0.1) "Discretized door"; Fluid.Sources.FixedBoundary amb( redeclare package Medium = Medium, p=100000, T=283.15, nPorts=1) "Ambient conditions"; inner Modelica.Fluid.System system; equationconnect(ope.y, dooOpeClo.y); connect(ope.y, dooOpeCloTop.y); connect(oriEasTop.port_b, colEasTop.port_b); connect(oriWesTop.port_b, colWesBot.port_a); connect(oriWesTop.port_a, colWesTop.port_b); connect(oriOutBot.port_b, colOutBot.port_b); connect(colEasInBot.port_b, oriOutBot.port_a); connect(colEasInTop.port_a, oriOutTop.port_a); connect(oriOutTop.port_b, colOutTop.port_a); connect(volWes.ports[1], dooOpeClo.port_b2); connect(volWes.ports[2], dooOpeClo.port_a1); connect(colWesBot.port_b, volWes.ports[3]); connect(volTopWes.ports[1], colWesTop.port_a); connect(volTopWes.ports[2], dooOpeCloTop.port_b2); connect(volTopWes.ports[3], dooOpeCloTop.port_a1); connect(volTopEas.ports[1], dooOpeCloTop.port_b1); connect(dooOpeCloTop.port_a2, volTopEas.ports[2]); connect(colEasTop.port_a, volTopEas.ports[3]); connect(oriEasTop.port_a, col1EasBot.port_a); connect(dooOpeClo.port_b1, volEas.ports[1]); connect(dooOpeClo.port_a2, volEas.ports[2]); connect(colEasInBot.port_a, volEas.ports[3]); connect(colEasInTop.port_b, volEas.ports[4]); connect(col1EasBot.port_b, volEas.ports[5]); connect(colOutTop.port_b, volOut.ports[1]); connect(colOutBot.port_a, volOut.ports[2]); connect(dummy.port_a, volOut.ports[3]); connect(amb.ports[1], dummy.port_b); end ReverseBuoyancy;
model ReverseBuoyancy3Zones package Medium = Buildings.Media.IdealGases.SimpleAir;Buildings.Fluid.MixingVolumes.MixingVolume volEas( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=2.5*5*5, T_start=273.15 + 25, nPorts=5); Buildings.Airflow.Multizone.Orifice oriOutBot( redeclare package Medium = Medium, m=0.5, A=0.01, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colOutTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriOutTop( redeclare package Medium = Medium, m=0.5, A=0.01, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colEasInTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Fluid.MixingVolumes.MixingVolume volOut( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=1E12, T_start=273.15 + 15, nPorts=2); Buildings.Airflow.Multizone.MediumColumn colEasInBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.MediumColumn colOutBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.MediumColumn colWesBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriWesTop( redeclare package Medium = Medium, m=0.5, A=0.01, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colWesTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeClo( redeclare package Medium = Medium, LClo=20*1E-4, wOpe=1, hOpe=2.2, hA=3/2, hB=3/2, CDOpe=0.78, CDClo=0.78, nCom=10, vZer=0.01, dp_turbulent=0.1) "Discretized door"; Modelica.Blocks.Sources.Constant ope(k=1); Buildings.Airflow.Multizone.MediumColumn col1EasBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriEasTop( redeclare package Medium = Medium, m=0.5, A=0.01, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colEasTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Fluid.MixingVolumes.MixingVolume volTopEas( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=2.5*5*10, T_start=273.15 + 21, nPorts=3); Buildings.Fluid.MixingVolumes.MixingVolume volTopWes( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=273.15 + 20, V=2.5*5*10, nPorts=3); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeCloTop( redeclare package Medium = Medium, LClo=20*1E-4, wOpe=1, hOpe=2.2, hA=3/2, hB=3/2, CDOpe=0.78, CDClo=0.78, nCom=10, vZer=0.01, dp_turbulent=0.1) "Discretized door"; Buildings.Fluid.MixingVolumes.MixingVolume volWes( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=2.5*5*5, T_start=273.15 + 22, nPorts=3); inner Modelica.Fluid.System system; equationconnect(dooOpeClo.port_b2, volWes.ports[1]); connect(dooOpeClo.port_a1, volWes.ports[2]); connect(dooOpeCloTop.port_b1, volTopEas.ports[1]); connect(dooOpeCloTop.port_a2, volTopEas.ports[2]); connect(dooOpeClo.port_b1, volEas.ports[1]); connect(dooOpeClo.port_a2, volEas.ports[2]); connect(colWesTop.port_a, volTopWes.ports[1]); connect(volTopWes.ports[2], dooOpeCloTop.port_b2); connect(dooOpeCloTop.port_a1, volTopWes.ports[3]); connect(colWesTop.port_b, oriWesTop.port_a); connect(oriWesTop.port_b, colWesBot.port_a); connect(colWesBot.port_b, volWes.ports[3]); connect(volTopEas.ports[3], colEasTop.port_a); connect(colEasTop.port_b, oriEasTop.port_b); connect(oriEasTop.port_a, col1EasBot.port_a); connect(colEasInBot.port_a, volEas.ports[3]); connect(colEasInTop.port_b, volEas.ports[4]); connect(col1EasBot.port_b, volEas.ports[5]); connect(colOutTop.port_b, volOut.ports[1]); connect(volOut.ports[2], colOutBot.port_a); connect(colOutBot.port_b, oriOutBot.port_b); connect(oriOutBot.port_a, colEasInBot.port_b); connect(colEasInTop.port_a, oriOutTop.port_a); connect(oriOutTop.port_b, colOutTop.port_a); connect(dooOpeCloTop.y, ope.y); connect(ope.y, dooOpeClo.y); end ReverseBuoyancy3Zones;
model Validation0 package Medium = Buildings.Media.IdealGases.SimpleAir;Buildings.Fluid.MixingVolumes.MixingVolume volEas( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=273.15 + 20, V=2.5*5*5, nPorts=2); Buildings.Airflow.Multizone.Orifice oriOutBot( redeclare package Medium = Medium, A=0.01, m=0.5); Buildings.Airflow.Multizone.MediumColumn colOutTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriOutTop( redeclare package Medium = Medium, A=0.01, m=0.5); Buildings.Airflow.Multizone.MediumColumn colEasInTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Fluid.MixingVolumes.MixingVolume volOut( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=273.15 + 10, V=1E12, p_start=Medium.p_default, nPorts=2); Buildings.Airflow.Multizone.MediumColumn colEasInBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.MediumColumn colOutBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); inner Modelica.Fluid.System system; equationconnect(colEasInTop.port_a, oriOutTop.port_a); connect(colEasInTop.port_b, volEas.ports[1]); connect(colEasInBot.port_a, volEas.ports[2]); connect(colEasInBot.port_b, oriOutBot.port_a); connect(oriOutBot.port_b, colOutBot.port_b); connect(colOutBot.port_a, volOut.ports[1]); connect(colOutTop.port_b, volOut.ports[2]); connect(colOutTop.port_a, oriOutTop.port_b); end Validation0;
model Validation1 package Medium = Modelica.Media.Air.SimpleAir;Buildings.Fluid.MixingVolumes.MixingVolume volEas( redeclare package Medium = Medium, T_start=273.15 + 20, V=2.5*5*5*1, nPorts=5, use_HeatTransfer=true, energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial); Buildings.Airflow.Multizone.Orifice oriOutBot( redeclare package Medium = Medium, A=0.01, m=0.5); Buildings.Airflow.Multizone.MediumColumn colOutTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriOutTop( redeclare package Medium = Medium, A=0.01, m=0.5); Buildings.Airflow.Multizone.MediumColumn colEasInTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Fluid.Sources.FixedBoundary volOut( redeclare package Medium = Medium, nPorts=2, p(displayUnit="Pa") = 101325, T=283.15); Buildings.Airflow.Multizone.MediumColumn colEasInBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.MediumColumn colOutBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.MediumColumn colWesBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriWesTop( redeclare package Medium = Medium, m=0.5, A=0.01); Buildings.Airflow.Multizone.MediumColumn colWesTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Airflow.Multizone.DoorDiscretizedOperable dooOpeClo( redeclare package Medium = Medium, LClo=20*1E-4, wOpe=1, hOpe=2.2, CDOpe=0.78, CDClo=0.78, nCom=10, hA=3/2, hB=3/2, dp_turbulent(displayUnit="Pa") = 0.01) "Discretized door"; Fluid.MixingVolumes.MixingVolume volWes( redeclare package Medium = Medium, T_start=273.15 + 25, nPorts=3, p_start=101325, V=2.5*5*5, use_HeatTransfer=true, energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial); Modelica.Blocks.Sources.Constant open(k=1); Buildings.Airflow.Multizone.MediumColumn col1EasBot( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriEasTop( redeclare package Medium = Medium, m=0.5, A=0.01); Buildings.Airflow.Multizone.MediumColumn colEasTop( redeclare package Medium = Medium, h=1.5, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromTop); Buildings.Fluid.MixingVolumes.MixingVolume volTop( redeclare package Medium = Medium, T_start=273.15 + 20, V=2.5*5*10*1, nPorts=2, use_HeatTransfer=true, energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial); inner Modelica.Fluid.System system; Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TTop(T=293.15) "Fixed temperature"; Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TWes(T=298.15) "Fixed temperature"; Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TEas(T=293.15) "Fixed temperature"; equationconnect(open.y, dooOpeClo.y); connect(volWes.ports[1], dooOpeClo.port_b2); connect(volWes.ports[2], dooOpeClo.port_a1); connect(volWes.ports[3], colWesBot.port_b); connect(colWesBot.port_a, oriWesTop.port_b); connect(oriWesTop.port_a, colWesTop.port_b); connect(colWesTop.port_a, volTop.ports[1]); connect(volTop.ports[2], colEasTop.port_a); connect(colEasTop.port_b, oriEasTop.port_b); connect(oriEasTop.port_a, col1EasBot.port_a); connect(dooOpeClo.port_b1, volEas.ports[1]); connect(volEas.ports[2], dooOpeClo.port_a2); connect(colEasInBot.port_a, volEas.ports[3]); connect(volEas.ports[4], colEasInTop.port_b); connect(volEas.ports[5], col1EasBot.port_b); connect(colEasInTop.port_a, oriOutTop.port_a); connect(oriOutTop.port_b, colOutTop.port_a); connect(colOutTop.port_b, volOut.ports[1]); connect(colOutBot.port_a, volOut.ports[2]); connect(colOutBot.port_b, oriOutBot.port_b); connect(oriOutBot.port_a, colEasInBot.port_b); connect(TTop.port, volTop.heatPort); connect(TEas.port, volEas.heatPort); connect(TWes.port, volWes.heatPort); end Validation1;
model NaturalVentilation package Medium = Buildings.Media.IdealGases.SimpleAir;Buildings.Fluid.MixingVolumes.MixingVolume volA( redeclare package Medium = Medium, V=2.5*10*5, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=273.15 + 18, use_HeatTransfer=true, nPorts=2); Buildings.Airflow.Multizone.Orifice oriOutBot( redeclare package Medium = Medium, A=0.1, m=0.5, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colOut( redeclare package Medium = Medium, h=3, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Airflow.Multizone.Orifice oriOutTop( redeclare package Medium = Medium, A=0.1, m=0.5, dp_turbulent=0.1); Buildings.Airflow.Multizone.MediumColumn colRooTop( redeclare package Medium = Medium, h=3, densitySelection=Buildings.Airflow.Multizone.Types.densitySelection.fromBottom); Buildings.Fluid.MixingVolumes.MixingVolume volOut( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, V=1E10, T_start=273.15 + 20, nPorts=2); Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo; Modelica.Blocks.Sources.Step q_flow( height=-100, offset=100, startTime=3600); inner Modelica.Fluid.System system; equationconnect(q_flow.y, preHeaFlo.Q_flow); connect(oriOutBot.port_b, volOut.ports[1]); connect(preHeaFlo.port, volA.heatPort); connect(volA.ports[1], oriOutBot.port_a); connect(volA.ports[2], colRooTop.port_b); connect(colRooTop.port_a, oriOutTop.port_a); connect(volOut.ports[2], colOut.port_b); connect(colOut.port_a, oriOutTop.port_b); end NaturalVentilation;
Type | Name | Default | Description |
---|---|---|---|
Volume | volA | 100 | Volume of room A [m3] |
Volume | volB | 1 | Volume of room B [m3] |
model ZonalFlow package Medium = Buildings.Media.PerfectGases.MoistAirUnsaturated; parameter Modelica.SIunits.Volume volA=100 "Volume of room A"; parameter Modelica.SIunits.Volume volB=1 "Volume of room B";Buildings.Fluid.MixingVolumes.MixingVolume rooA( V=volA, redeclare package Medium = Medium, X_start={0.015,0.985}, T_start=303.15, nPorts=2) "Room A"; Buildings.Fluid.MixingVolumes.MixingVolume rooB( V=volB, redeclare package Medium = Medium, X_start={0.01,0.99}, T_start=293.15, nPorts=2) "Room B"; Modelica.Blocks.Sources.Constant ACS_con(k=5/3600); ZonalFlow_ACS zonFlo(redeclare package Medium = Medium, V=min(volA, volB)); inner Modelica.Fluid.System system; equationconnect(rooA.ports[1], zonFlo.port_a1); connect(zonFlo.port_b1, rooB.ports[1]); connect(zonFlo.port_b2, rooA.ports[2]); connect(zonFlo.port_a2, rooB.ports[2]); connect(zonFlo.ACS, ACS_con.y); end ZonalFlow;