Collection of validation models
Information
This package contains validation models for the classes in
Buildings.Airflow.Multizone.
Note that most validation models contain simple input data
which may not be realistic, but for which the correct
output can be obtained through an analytic solution.
The examples plot various outputs, which have been verified against these
solutions. These model outputs are stored as reference data and
used for continuous validation whenever models in the library change.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
DoorOpenClosed
|
Model with operable door and door that is always open |
OpenDoorBuoyancyDynamic
|
Model with open door and buoyancy driven flow only |
OpenDoorBuoyancyPressureDynamic
|
Model with open door and buoyancy and pressure driven flow |
OpenDoorPressure
|
Model with one open door and only pressure-driven flow |
OpenDoorTemperature
|
Model with one open door and only temperature-driven flow |
ThreeRoomsContam
|
Model with three rooms for the validation of the multizone air exchange models |
ThreeRoomsContamDiscretizedDoor
|
Model with three rooms for the validation of the multizone air exchange models |
Model with operable door and door that is always open
Information
This model validates the door model that takes as an input a signal
that determines whether the door is open or closed.
In this validation, the instance dooOpeClo
is either open or closed,
depending on its input signal y
.
If the door is open, its air flow rate is identical to the air flow rate of the
instance doo
.
If the door is closed, its air flow rate is identical to the air flow rate of the
instance lea
.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model DoorOpenClosed
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air ;
Fluid.Sources.Boundary_pT bouA(
redeclare package Medium = Medium,
p(displayUnit="Pa") = 101330,
T=294.15,
nPorts=5) ;
Fluid.Sources.Boundary_pT bouB(
redeclare package Medium = Medium,
p(displayUnit="Pa") = 101325,
T=293.15,
nPorts=5) ;
Buildings.Airflow.Multizone.DoorOpen doo(
redeclare package Medium = Medium)
;
EffectiveAirLeakageArea lea(
redeclare package Medium = Medium,
m=0.65,
dp_turbulent=0.01,
L=20*1E-4) ;
DoorOperable dooOpeClo(
redeclare package Medium = Medium,
LClo=20*1E-4)
;
Modelica.Blocks.Sources.Step yDoo(startTime=0.5) ;
Fluid.Sensors.MassFlowRate senMasFlo1(
redeclare package Medium = Medium)
;
Fluid.Sensors.MassFlowRate senMasFlo2(
redeclare package Medium = Medium)
;
Modelica.Blocks.Math.Add mNet_flow(y(
final unit="kg/s"))
;
Modelica.Blocks.Sources.Step yDooCom(
height=-1,
offset=1,
startTime=0.5) ;
Modelica.Blocks.Math.Product mNetClo_flow(y(
final unit="kg/s"))
;
equation
connect(bouA.ports[1], doo.port_a1);
connect(bouA.ports[2], doo.port_b2);
connect(bouA.ports[3], lea.port_a);
connect(bouA.ports[4], dooOpeClo.port_a1);
connect(bouA.ports[5], dooOpeClo.port_b2);
connect(doo.port_b1, bouB.ports[1]);
connect(doo.port_a2, bouB.ports[2]);
connect(lea.port_b, bouB.ports[3]);
connect(yDoo.y, dooOpeClo.y);
connect(dooOpeClo.port_b1, senMasFlo1.port_a);
connect(senMasFlo1.port_b, bouB.ports[4]);
connect(dooOpeClo.port_a2,senMasFlo2. port_a);
connect(senMasFlo2.port_b, bouB.ports[5]);
connect(senMasFlo1.m_flow, mNet_flow.u1);
connect(senMasFlo2.m_flow, mNet_flow.u2);
connect(yDooCom.y, mNetClo_flow.u2);
connect(mNet_flow.y, mNetClo_flow.u1);
end DoorOpenClosed;
Model with open door and buoyancy driven flow only
Information
This model validates the door model for the situation where there is only buoyancy-driven air flow.
Initially the volume is at a different temperature than the pressure source, leading to an airflow that eventually decays to zero.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model OpenDoorBuoyancyDynamic
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air ;
Buildings.Airflow.Multizone.DoorOpen doo(
redeclare package Medium = Medium)
;
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=1) ;
Fluid.MixingVolumes.MixingVolume bouA(
redeclare package Medium = Medium,
T_start=292.15,
V=2.5*5*5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=0.01,
nPorts=3) ;
Buildings.Fluid.MixingVolumes.MixingVolume bouB(
redeclare package Medium = Medium,
T_start=294.15,
V=2.5*5*5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=0.01,
nPorts=2) ;
DoorDiscretizedOpen dooDis(
forceErrorControlOnFlow=false,
redeclare package Medium = Medium,
vZer=0.000001) ;
Fluid.Sources.Boundary_pT bou1(
redeclare package Medium = Medium,
nPorts=1) ;
Fluid.MixingVolumes.MixingVolume bouADis(
redeclare package Medium = Medium,
T_start=292.15,
V=2.5*5*5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=0.01,
nPorts=3) ;
Fluid.MixingVolumes.MixingVolume bouBDis(
redeclare package Medium = Medium,
T_start=294.15,
V=2.5*5*5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=0.01,
nPorts=2) ;
equation
connect(doo.port_b1, bouB.ports[1]);
connect(doo.port_a2, bouB.ports[2]);
connect(doo.port_a1, bouA.ports[1]);
connect(doo.port_b2, bouA.ports[2]);
connect(bou.ports[1], bouA.ports[3]);
connect(bou1.ports[1], bouADis.ports[1]);
connect(dooDis.port_a1, bouADis.ports[2]);
connect(dooDis.port_b2, bouADis.ports[3]);
connect(dooDis.port_b1, bouBDis.ports[1]);
connect(dooDis.port_a2, bouBDis.ports[2]);
end OpenDoorBuoyancyDynamic;
Model with open door and buoyancy and pressure driven flow
Information
This model validates the door model for the situation where there is air flow due to buoyancy and static pressure difference.
Initially the volumes are at a different temperatures and pressure, leading to an airflow that eventually decays to zero.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model OpenDoorBuoyancyPressureDynamic
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air ;
Buildings.Airflow.Multizone.DoorOpen doo(
redeclare package Medium = Medium)
;
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=1) ;
Fluid.MixingVolumes.MixingVolume bouA(
redeclare package Medium = Medium,
T_start=292.15,
V=2.5*5*5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=0.01,
nPorts=3) ;
Buildings.Fluid.MixingVolumes.MixingVolume bouB(
redeclare package Medium = Medium,
T_start=294.15,
p_start=101320,
V=2.5*5*5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=0.01,
nPorts=2) ;
DoorDiscretizedOpen dooDis(
redeclare package Medium = Medium) ;
Fluid.Sources.Boundary_pT bouDis(
redeclare package Medium = Medium, nPorts=1)
;
Fluid.MixingVolumes.MixingVolume bouADis(
redeclare package Medium = Medium,
T_start=292.15,
V=2.5*5*5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=0.01,
nPorts=3) ;
Fluid.MixingVolumes.MixingVolume bouBDis(
redeclare package Medium = Medium,
T_start=294.15,
p_start=101320,
V=2.5*5*5,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
m_flow_nominal=0.01,
nPorts=2) ;
equation
connect(doo.port_b1, bouB.ports[1]);
connect(doo.port_a2, bouB.ports[2]);
connect(doo.port_a1, bouA.ports[1]);
connect(doo.port_b2, bouA.ports[2]);
connect(bou.ports[1], bouA.ports[3]);
connect(dooDis.port_b1, bouBDis.ports[1]);
connect(dooDis.port_a2, bouBDis.ports[2]);
connect(dooDis.port_a1, bouADis.ports[1]);
connect(dooDis.port_b2, bouADis.ports[2]);
connect(bouDis.ports[1], bouADis.ports[3]);
end OpenDoorBuoyancyPressureDynamic;
Model with one open door and only pressure-driven flow
Information
This model validates the door model for the situation where there is only pressure-driven air flow.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model OpenDoorPressure
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air ;
Buildings.Airflow.Multizone.DoorOpen doo(
redeclare package Medium = Medium)
;
Fluid.Sources.Boundary_pT bouA(
redeclare package Medium = Medium,
p(displayUnit="Pa") = 101325,
nPorts=4) ;
Fluid.Sources.Boundary_pT bouB(
redeclare package Medium = Medium,
use_p_in=true,
p(displayUnit="Pa"),
nPorts=4) ;
DoorDiscretizedOpen dooDis(
redeclare package Medium = Medium,
hA=2.1/2,
hB=2.1/2) ;
Modelica.Blocks.Sources.TimeTable bouPre(
table=[
0.0,0;
1,0;
1,5;
2,5;
2,10;
3,10;
3,15;
4,15;
4,20;
5,20;
5,25;
6,25;
6,30;
7,30;
7,35;
8,35;
8,40;
24,40],
timeScale=3600,
offset=101325-20) ;
equation
connect(doo.port_b1, bouB.ports[1]);
connect(doo.port_a2, bouB.ports[2]);
connect(doo.port_a1, bouA.ports[1]);
connect(doo.port_b2, bouA.ports[2]);
connect(bouA.ports[3], dooDis.port_a1);
connect(bouA.ports[4], dooDis.port_b2);
connect(dooDis.port_b1, bouB.ports[3]);
connect(dooDis.port_a2, bouB.ports[4]);
connect(bouPre.y, bouB.p_in);
end OpenDoorPressure;
Model with one open door and only temperature-driven flow
Information
This model validates the door model for the situation where there is only temperature-driven air flow.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model OpenDoorTemperature
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air ;
Buildings.Airflow.Multizone.DoorOpen doo(
redeclare package Medium = Medium)
;
Fluid.Sources.Boundary_pT bouA(
redeclare package Medium = Medium,
nPorts=4) ;
Fluid.Sources.Boundary_pT bouB(
redeclare package Medium = Medium,
use_T_in=true,
nPorts=4) ;
DoorDiscretizedOpen dooDis(
redeclare package Medium = Medium,
hA=2.1/2,
hB=2.1/2) ;
Modelica.Blocks.Sources.TimeTable bouTem(
table=[
0.0,0;
1,0;
1,5;
2,5;
2,10;
3,10;
3,15;
4,15;
4,20;
5,20;
5,25;
6,25;
6,30;
7,30;
7,35;
8,35;
8,40;
24,40],
timeScale=3600,
offset=273.15) ;
equation
connect(doo.port_b1, bouB.ports[1]);
connect(doo.port_a2, bouB.ports[2]);
connect(doo.port_a1, bouA.ports[1]);
connect(doo.port_b2, bouA.ports[2]);
connect(bouA.ports[3], dooDis.port_a1);
connect(bouA.ports[4], dooDis.port_b2);
connect(dooDis.port_b1, bouB.ports[3]);
connect(dooDis.port_a2, bouB.ports[4]);
connect(bouTem.y, bouB.T_in);
end OpenDoorTemperature;
Model with three rooms for the validation of the multizone air exchange models
Information
This is a model of three rooms that exchange air among each based
on density difference between the air in the rooms and the outside.
The model implements the configuration shown below.
For the model that has been used for a comparative model validation between CONTAM and
the Buildings
library in Wetter (2006), see
Buildings.Airflow.Multizone.Validation.ThreeRoomsContamDiscretizedDoor.
References
Michael Wetter.
Multizone Airflow Model in Modelica.
Proc. of the 5th International Modelica Conference, p. 431-440. Vienna, Austria, September 2006.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
DoorOpen | dooOpeClo | dooOpeClo(redeclare package ... | Door |
Modelica definition
model ThreeRoomsContam
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air(extraPropertiesNames={"CO2"});
Buildings.Fluid.MixingVolumes.MixingVolume volEas(
redeclare package Medium = Medium,
T_start=273.15 + 20,
V=2.5*5*5*1,
nPorts=5,
m_flow_nominal=0.001,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
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.Sources.Boundary_pT 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)
;
replaceable DoorOpen dooOpeClo(
redeclare package Medium = Medium,
wOpe=1,
hOpe=2.2,
dp_turbulent(displayUnit="Pa") = 0.01,
CD=0.78,
m=0.5)
constrainedby Fluid.Interfaces.PartialFourPortInterface
;
Buildings.Fluid.MixingVolumes.MixingVolume volWes(
redeclare package Medium = Medium,
T_start=273.15 + 25,
nPorts=3,
V=2.5*5*5,
m_flow_nominal=0.001,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
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,
m_flow_nominal=0.001,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Buildings.HeatTransfer.Sources.FixedTemperature TTop(T=293.15)
;
Buildings.HeatTransfer.Sources.FixedTemperature TWes(T=298.15)
;
Buildings.HeatTransfer.Sources.FixedTemperature TEas(T=293.15)
;
Modelica.Thermal.HeatTransfer.Components.ThermalConductor conTop(G=1E9)
;
Modelica.Thermal.HeatTransfer.Components.ThermalConductor conWes(G=1E9)
;
Modelica.Thermal.HeatTransfer.Components.ThermalConductor conEas(G=1E9)
;
equation
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, conTop.port_a);
connect(conTop.port_b, volTop.heatPort);
connect(TWes.port, conWes.port_a);
connect(conWes.port_b, volWes.heatPort);
connect(TEas.port, conEas.port_a);
connect(conEas.port_b, volEas.heatPort);
end ThreeRoomsContam;
Model with three rooms for the validation of the multizone air exchange models
Information
This model is identical to
Buildings.Airflow.Multizone.Validation.ThreeRoomsContam
except that it uses a different door model.
This model has been used for a comparative model validation between CONTAM and
the Buildings
library.
See Wetter (2006) for details of the validation.
References
Michael Wetter.
Multizone Airflow Model in Modelica.
Proc. of the 5th International Modelica Conference, p. 431-440. Vienna, Austria, September 2006.
Extends from Buildings.Airflow.Multizone.Validation.ThreeRoomsContam (Model with three rooms for the validation of the multizone air exchange models).
Modelica definition
model ThreeRoomsContamDiscretizedDoor
extends Buildings.Airflow.Multizone.Validation.ThreeRoomsContam(
redeclare 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));
Modelica.Blocks.Sources.Constant open1(k=1)
;
equation
connect(open1.y, dooOpeClo.y);
end ThreeRoomsContamDiscretizedDoor;