modelPowerLawResistance
Flow resistance that uses the power law
Extends from Annex60.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy), Annex60.Airflow.Multizone.BaseClasses.ErrorControl (Interface that defines parameters for error control).
Information
This model describes the mass flow rate and pressure difference relation of an orifice in the form
V_flow = k * dp^m,
where k is a variable and
m a parameter.
For turbulent flow, set m=1/2 and
for laminar flow, set m=1.
The model is used as a base for the interzonal air flow models.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | forceErrorControlOnFlow (from ErrorControl) | true | Flag to force error control on m_flow. Set to true if interested in flow rate |
| Modelica.SIunits.Area | A | |Orifice characteristics|Area of orifice | |
| Real | m | Flow exponent, m=0.5 for turbulent, m=1 for laminar | |
| Boolean | useDefaultProperties | true | Set to false to use density and viscosity based on actual medium state, rather than using default values |
| Modelica.SIunits.PressureDifference | dp_turbulent | 0.1 | Pressure difference where laminar and turbulent flow relation coincide. Recommended = 0.1 |
| Modelica.SIunits.Length | lWet | sqrt(A) | Wetted perimeter used for Reynolds number calculation |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Nominal condition | |||
| Modelica.SIunits.MassFlowRate | m_flow_nominal (from PartialTwoPortInterface) | Nominal mass flow rate | |
| Advanced | |||
| Modelica.SIunits.MassFlowRate | m_flow_small (from PartialTwoPortInterface) | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Boolean | homotopyInitialization | true | = true, use homotopy method |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPort) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPort) | Fluid connector b (positive design flow direction is from port_a to port_b) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.SIunits.MassFlowRate | m_flow (from PartialTwoPortInterface) | port_a.m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) |
| Modelica.SIunits.PressureDifference | dp (from PartialTwoPortInterface) | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_a (from PartialTwoPortInterface) | Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) | Medium properties in port_a |
| Medium.ThermodynamicState | sta_b (from PartialTwoPortInterface) | Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) | Medium properties in port_b |
| Modelica.SIunits.VolumeFlowRate | V_flow | Volume flow rate through the component | |
| Modelica.SIunits.Velocity | v | Average velocity | |
| Modelica.SIunits.Density | rho | Fluid density at port_a | |
| Real | Re | Reynolds number |
Revisions
-
January 22, 2016, by Michael Wetter:
Corrected type declaration of pressure difference. This is for #404. -
November 19, 2015, by Michael Wetter:
Removed assignment of parametershowDesignFlowDirectioninextendsstatement. This is for #349. -
January 21, 2015 by Michael Wetter:
Changed type ofmExcasModelica.SIunits.Masssetsmin=0, butmExccan be negative. -
October 8, 2013 by Michael Wetter:
Changed the parameteruseConstantDensitytouseDefaultPropertiesand also applied the parameter to the computation of the dynamic viscosity. The conversion script can be used to update this parameter.
Change model to not use the instancesta_a, as this may be conditionally removed and hence it is not proper Modelica syntax to use it outside of aconnectstatement. -
March 27, 2013 by Michael Wetter:
Added assignment of initial value formExcto avoid error when checking model in pedantic mode with Dymola 2014. -
December 14, 2012 by Michael Wetter:
Renamed protected parameters for consistency with the naming conventions. - December 6, 2011 by Michael Wetter:
Removedfixed=falseattribute of protected parameterk. - 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.