modelTwoWayFlowElement
Flow resistance that uses the power law
Extends from Buildings.Fluid.Interfaces.PartialFourPortInterface, Buildings.Airflow.Multizone.BaseClasses.ErrorControl.
Information
This is a partial model for models that describe the bi-directional air flow through large openings.
Models that extend this model need to compute
mAB_flow and mBA_flow,
or alternatively VAB_flow and VBA_flow,
and the face area area.
The face area is a variable to allow this partial model to be used
for doors that can be open or closed as a function of an input signal.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Velocity | vZer | 0.001 | Minimum velocity to prevent zero flow. Recommended: 0.001 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.VolumeFlowRate | VAB_flow | Volume flow rate from A to B if positive | |
| Modelica.Units.SI.VolumeFlowRate | VBA_flow | Volume flow rate from B to A if positive | |
| Modelica.Units.SI.MassFlowRate | mAB_flow | Mass flow rate from A to B if positive | |
| Modelica.Units.SI.MassFlowRate | mBA_flow | Mass flow rate from B to A if positive | |
| Modelica.Units.SI.Velocity | vAB | Average velocity from A to B | |
| Modelica.Units.SI.Velocity | vBA | Average velocity from B to A | |
| Modelica.Units.SI.Density | rho_a1_inflow | Density of air flowing in from port_a1 | |
| Modelica.Units.SI.Density | rho_a2_inflow | Density of air flowing in from port_a2 | |
| Modelica.Units.SI.Area | A | Face area |
Contents
| Name | Description |
|---|---|
| Medium | Medium in the component |
Revisions
-
September 22, 2025, by Michael Wetter:
Setunbounded=trueformExcAB_flowandmExcBA_flowto avoid spikes inport_a.m_flowin Buildings.Airflow.Multizone.Examples.OneOpenDoor.
This is for Buildings, #4360. -
September 19, 2025, by Michael Wetter:
Refactored implementation of underlying function that computes the flow rate to allow function to be inlined. This leads to a 20% faster simulation of Buildings.Airflow.Multizone.Examples.OneOpenDoor compared to the previous implementation.
This is for IBPSA, #2043. -
May 12, 2020, by Michael Wetter:
Changed assignment ofm1_flow_smallandm2_flow_smalltofinal. These quantities are not used in this model and models that extend from it. Hence there is no need for the user to change the value. -
January 18, 2019, by Jianjun Hu:
Limited the media choice to moist air only. See #1050. -
September 13, 2018, by Michael Wetter:
SetallowFlowReversal=trueas the flow can be slightly negative due to the regularization, in which case them_flow(min=0)that is set in the base class Buildings.Fluid.Interfaces.PartialFourPort is violated.
See #937. -
November 3, 2016, by Michael Wetter:
Removed start values for inflowing density to simplify the parameter window, and because this can usually be computed from the state variables.
This is for #552. -
February 24, 2015 by Michael Wetter:
Changed model to use Buildings.Utilities.Psychrometrics.Functions.density_pTX for the density computation as Buildings.Media.Air.density does not depend on temperature. - June 18, 2014 by Michael Wetter:
Added start values andfixed=trueattribute formExcABandmExcBA. This avoids a warning during translation. - July 20, 2010 by Michael Wetter:
Migrated model to Modelica 3.1 and integrated it into the Buildings library. - February 4, 2005 by Michael Wetter:
Released first version.