Skip to content

Commit

Permalink
interzonal airflow documentation for #1066
Browse files Browse the repository at this point in the history
revised parameter names
  • Loading branch information
Mathadon committed Jun 2, 2021
1 parent f9f98f5 commit 541896d
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 23 deletions.
37 changes: 37 additions & 0 deletions IDEAS/BoundaryConditions/SimInfoManager.mo
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,43 @@ IDEAS uses TMY3 input files.
The default weather file 'Brussels.mos' contains weather information from IWEC for the Brussels region.
For detailed documentation see
<a href=\"modelica://IDEAS.BoundaryConditions.WeatherData.ReaderTMY3\">IDEAS.BoundaryConditions.WeatherData.ReaderTMY3</a>.
<h4>Interzonal airflow</h4>
<p>
IDEAS supports several levels of detail for simulating interzonal airflow and air infiltration,
which can be selected by setting the value of the parameter <code>interzonalAirFlowType</code>.
By default, <code>interzonalAirFlowType = None</code> and a fixed n50 value is assumed.
The corresponding <b>fixed</b> mass flow rate is pushed
into (with ambient properties) and extracted from each zone model.
In practice, air infiltration however depends on the wind pressure
and occurs only for zones that have an exterior/outer wall
or windows.
</p>
<p>
The other <code>interzonalAirFlowType</code> options model this effect in more detail.
By default, the <code>OuterWall</code> and <code>Window</code> leakage coefficients are computed
using the zone n50 values. The volume and n50 value of each zone are used to compute the total
nominal air infiltration at 50 Pa pressure difference. The total exterior wall and window surface
area are used to compute an average air leakage coefficient
(<code>q50</code> value) such that this total air infiltration
is obtained at 50 Pa pressure difference.
Using these coefficients and the static wind pressures,
a flow network is configured that computes the mass flow rates through
each wall and window.
When a custom q50 value for a wall or window is known, it can be
assigned by the user using the parameters <code>use_custom_q50</code> and <code>custom_q50</code>.
The algorithm considers these q50 values as known and recomputes all remaining q50 values
such that the n50 value is reached.
In a similar way, the total n50 value for one zone can be forced by using
the zone parameters <code>use_custom_n50<code> and <code>n50</code>.
In this case, only the remaining zones contribute to the total building
air leakage, which is subsequently attributed to the surfaces of only those zones.
</p>
<p>
In case <code>interzonalAirFlowType=OnePort</code> then one port is used to model the air exchange through each surface.
When <code>interzonalAirFlowType=TwoPorts</code> two ports are used,
which adds a bit of detail at the cost of having to solve
a more complex flow network.
</p>
</html>", revisions="<html>
<ul>
<li>
Expand Down
4 changes: 2 additions & 2 deletions IDEAS/Buildings/Components/Interfaces/DummyConnection.mo
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ equation

connect(zero.y, zoneBus.v50) annotation (Line(points={{-59,-40},{100.1,-40},{100.1,
-1.9}}, color={0,0,127}));
connect(custom_n50.y, zoneBus.custom_n50) annotation (Line(points={{-59,-90},{
100.1,-90},{100.1,-1.9}}, color={255,0,255}));
connect(custom_n50.y, zoneBus.use_custom_n50) annotation (Line(points={{-59,-90},
{100.1,-90},{100.1,-1.9}},color={255,0,255}));
connect(q50_zone.y, zoneBus.q50_zone) annotation (Line(points={{-59,-70},{100.1,
-70},{100.1,-1.9}}, color={0,0,127}));
connect(custom_q50.y, zoneBus.use_custom_q50) annotation (Line(points={{-59,
Expand Down
6 changes: 3 additions & 3 deletions IDEAS/Buildings/Components/Interfaces/PartialSurface.mo
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ partial model PartialSurface "Partial model for building envelope component"
parameter Boolean use_custom_q50=false
"set to true to disable the default q50 computation and to assign a custom q50 value"
annotation (Dialog(tab="Airflow", group="Airtightness"), Evaluate=true);
parameter Real q50_val = 2
parameter Real custom_q50 = 2
"Envelope air tightness"
annotation (Dialog(enable=use_custom_q50,tab="Airflow", group="Airtightness"));
final parameter Real q50_internal(fixed=false)
Expand Down Expand Up @@ -275,7 +275,7 @@ model Q50_parameterToConnector "Converts parameter values into connectors for pr
fillPattern=FillPattern.Forward)}));
end Q50_parameterToConnector;
initial equation
q50_internal=if use_custom_q50 then q50_val else q50_zone.q50_zone;
q50_internal=if use_custom_q50 then custom_q50 else q50_zone.q50_zone;

equation
connect(prescribedHeatFlowE.port, propsBusInt.E);
Expand Down Expand Up @@ -338,7 +338,7 @@ equation
-43},{79.4,-44},{56.09,-44},{56.09,19.91}}, color={0,0,127}));
connect(q50_zone.using_custom_q50, propsBusInt.use_custom_q50) annotation (Line(points={{79,-52},
{56.09,-52},{56.09,19.91}}, color={0,0,127}));
connect(setArea.custom_n50, propsBusInt.custom_n50) annotation (Line(points={{79.4,
connect(setArea.use_custom_n50, propsBusInt.use_custom_n50) annotation (Line(points={{79.4,
-91},{79.4,-90.5},{56.09,-90.5},{56.09,19.91}}, color={255,0,255}));
connect(setArea.v50, propsBus_a.v50) annotation (Line(points={{79.4,-83.2},{
79.4,-82},{56,-82},{56,0},{100.1,0},{100.1,19.9}}, color={0,0,127}));
Expand Down
18 changes: 9 additions & 9 deletions IDEAS/Buildings/Components/Interfaces/PartialZone.mo
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ model PartialZone "Building zone model"
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium "Medium in the component"
annotation (choicesAllMatching = true);
parameter Boolean custom_n50=sim.interZonalAirFlowType==IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None and not sim.useN50BuildingComputation
parameter Boolean use_custom_n50=sim.interZonalAirFlowType==IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None and not sim.useN50BuildingComputation
"if true, a custom n50 value is used instead of a globally computed n50 value" annotation(Dialog(tab="Airflow", group="Airtightness"));

parameter Real n50(unit="1/h",min=0.01)= sim.n50 "Optional n50 input"
annotation(Dialog(tab="Airflow", group="Airtightness"));
final parameter Real n50_computed(unit="1/h",min=0.01) = if custom_n50 and not setq50.allSurfacesCustom then n50 else n50_int "Computed n50 value";
final parameter Real n50_computed(unit="1/h",min=0.01) = if use_custom_n50 and not setq50.allSurfacesCustom then n50 else n50_int "Computed n50 value";

protected
parameter Real n50_int(unit="1/h",min=0.01,fixed= false)
"n50 value cfr airtightness, i.e. the ACH at a pressure diffence of 50 Pa"
annotation(Dialog(enable=custom_n50,tab="Airflow", group="Airtightness"));
annotation(Dialog(enable=use_custom_n50,tab="Airflow", group="Airtightness"));

public
parameter Boolean allowFlowReversal=true
Expand Down Expand Up @@ -228,7 +228,7 @@ protected
n50=n50_int,
V=V,
q50_corr=sim.q50_def,
use_custom_n50=custom_n50)
use_custom_n50=use_custom_n50)
annotation (Placement(transformation(extent={{-60,-100},{-40,-80}})));

model Setq50 "q50 computation for zones"
Expand Down Expand Up @@ -260,7 +260,7 @@ model Setq50 "q50 computation for zones"
Modelica.Blocks.Interfaces.RealInput Area[nSurf]
"Surface areas"
annotation (Placement(transformation(extent={{-126,-6},{-86,34}})));
Modelica.Blocks.Interfaces.BooleanOutput custom_n50s[nSurf]
Modelica.Blocks.Interfaces.BooleanOutput use_custom_n50s[nSurf]
"Equals true if the surfaces connected to this zone should use the custom q50 value"
annotation (Placement(transformation(extent={{-98,-38},{-118,-18}})));
Modelica.Blocks.Interfaces.RealOutput q50_zone[nSurf]
Expand All @@ -276,7 +276,7 @@ initial equation
allSurfacesCustom = max(Modelica.Constants.small, sum(defaultArea)) <= Modelica.Constants.small;

equation
custom_n50s=fill(use_custom_n50,nSurf);
use_custom_n50s=fill(use_custom_n50,nSurf);

if use_custom_n50 then
q50_zone=fill((((n50*V) - sum(v50_custom))/max(Modelica.Constants.small, sum(defaultArea))), nSurf);
Expand All @@ -295,7 +295,7 @@ end Setq50;
initial equation


n50_int = if custom_n50 and not setq50.allSurfacesCustom then n50 else sum(propsBusInt.v50)/V;
n50_int = if use_custom_n50 and not setq50.allSurfacesCustom then n50 else sum(propsBusInt.v50)/V;

Q_design=QInf_design+QRH_design+QTra_design; //Total design load for zone (additional ventilation losses are calculated in the ventilation system)

Expand Down Expand Up @@ -496,8 +496,8 @@ end for;
connect(setq50.use_custom_q50, propsBusInt.use_custom_q50) annotation (Line(points={{-60.6,
-82},{-80,-82},{-80,39.9},{-80.1,39.9}},
color={0,0,127}));
connect(setq50.custom_n50s, propsBusInt.custom_n50) annotation (Line(points={{-60.8,
-92.8},{-60,-92.8},{-60,-92},{-80.1,-92},{-80.1,39.9}}, color={
connect(setq50.use_custom_n50s, propsBusInt.use_custom_n50) annotation (Line(points={{-60.8,
-92.8},{-60,-92.8},{-60,-92},{-80,-92},{-80,40}}, color={
255,0,255}));
annotation (Placement(transformation(extent={{
140,48},{100,88}})),
Expand Down
6 changes: 3 additions & 3 deletions IDEAS/Buildings/Components/Interfaces/SetArea.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ model SetArea "Block for communicating the surface area of the surface to the Si
Modelica.Blocks.Interfaces.RealInput v50
"v50 value"
annotation (Placement(transformation(extent={{-126,48},{-86,88}})));
Modelica.Blocks.Interfaces.BooleanInput custom_n50
Modelica.Blocks.Interfaces.BooleanInput use_custom_n50
"Is the zones n50 custom?"
annotation (Placement(transformation(extent={{-126,-30},{-86,10}})));

Expand All @@ -21,7 +21,7 @@ protected
parameter Modelica.SIunits.Area A_def_q50 = if use_custom_q50 then 0 else A;

initial equation
if not use_custom_q50 and not custom_n50 then
if not use_custom_q50 and not use_custom_n50 then
v50_custom=0;
else
v50_custom=v50;
Expand All @@ -30,7 +30,7 @@ initial equation

equation
areaPort.A = A;
areaPort.A_def = (if custom_n50 then 0 else A_def_q50); // if surface is not custom, then the area is communicated, else 0
areaPort.A_def = (if use_custom_n50 then 0 else A_def_q50); // if surface is not custom, then the area is communicated, else 0
areaPort.v50 = v50_custom;

end SetArea;
2 changes: 1 addition & 1 deletion IDEAS/Buildings/Components/Interfaces/ZoneBus.mo
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ connector ZoneBus
IDEAS.Buildings.Components.Interfaces.RealConnector v50(final unit="m3/h") "v50 if the surface has a custome q50 value" annotation ();
IDEAS.Buildings.Components.Interfaces.RealConnector q50_zone(final unit="m3/(h.m2)") "v50 of the surface" annotation ();
IDEAS.Buildings.Components.Interfaces.BooleanConnector use_custom_q50 "true if custome q50 value is assigned to surface" annotation ();
IDEAS.Buildings.Components.Interfaces.BooleanConnector custom_n50 "true if the zone n50 is a custom value";
IDEAS.Buildings.Components.Interfaces.BooleanConnector use_custom_n50 "true if the zone n50 is a custom value";
annotation (Documentation(info="<html>
<p>
Connector that contains a weather bus and further
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ model ZoneBusVarMultiplicator "Component to scale all flows from the zone propsB
outer BoundaryConditions.SimInfoManager sim
"Simulation information manager for climate data"
annotation (Placement(transformation(extent={{72,122},{92,142}})));
Modelica.Blocks.Routing.BooleanPassThrough custom_n50
Modelica.Blocks.Routing.BooleanPassThrough use_custom_n50
annotation (Placement(transformation(extent={{8,-324},{-12,-304}})));
protected
IDEAS.Fluid.BaseClasses.MassFlowRateMultiplier massFlowRateMultiplier2(
Expand Down Expand Up @@ -157,9 +157,9 @@ equation
connect(use_custom_q50.y, propsBus_b.use_custom_q50) annotation (Line(points={{9,-286},
{100,-286},{100,-0.1},{100.1,-0.1}},
color={0,0,127}));
connect(custom_n50.u, propsBus_b.custom_n50) annotation (Line(points={{10,-314},
connect(use_custom_n50.u, propsBus_b.use_custom_n50) annotation (Line(points={{10,-314},
{100.1,-314},{100.1,-0.1}},color={255,0,255}));
connect(custom_n50.y, propsBus_a.custom_n50) annotation (Line(points={{-13,
connect(use_custom_n50.y, propsBus_a.use_custom_n50) annotation (Line(points={{-13,
-314},{-100,-314},{-100,0.1},{-100.1,0.1}},
color={255,0,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-180},
Expand Down
2 changes: 1 addition & 1 deletion IDEAS/Buildings/Components/InternalWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ within IDEAS.Buildings.Components;
model InternalWall "interior opaque wall between two zones"
extends IDEAS.Buildings.Components.Interfaces.PartialOpaqueSurface(
final use_custom_q50=true,
final q50_val=2,
final custom_q50=2,
final nWin=1,
dT_nominal_a=1,
E(y=if sim.computeConservationOfEnergy then layMul.E else 0),
Expand Down
2 changes: 1 addition & 1 deletion IDEAS/Buildings/Components/SlabOnGround.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
within IDEAS.Buildings.Components;
model SlabOnGround "opaque floor on ground slab"
extends IDEAS.Buildings.Components.Interfaces.PartialOpaqueSurface(
final q50_val=0,
final custom_q50=0,
final use_custom_q50=true,
final nWin=1,
QTra_design=UEqui*A*(273.15 + 21 - sim.Tdes),
Expand Down

0 comments on commit 541896d

Please sign in to comment.