modelPressureDrop
Extends from IBPSA.Fluid.BaseClasses.PartialResistance (Partial model for a hydraulic resistance).
Information
Model of a flow resistance with a fixed flow coefficient. The mass flow rate is
ṁ = k √ΔP,
where
k is a constant and
ΔP is the pressure drop.
The constant k is equal to
k=m_flow_nominal/sqrt(dp_nominal),
where m_flow_nominal and dp_nominal
are parameters.
Assumptions
In the region
abs(m_flow) < m_flow_turbulent,
the square root is replaced by a differentiable function
with finite slope.
The value of m_flow_turbulent is
computed as
m_flow_turbulent = deltaM * abs(m_flow_nominal),
where deltaM=0.3 and
m_flow_nominal are parameters that can be set by the user.
The figure below shows the pressure drop for the parameters
m_flow_nominal=5 kg/s,
dp_nominal=10 Pa and
deltaM=0.3.
Important parameters
The parameter from_dp is used to determine
whether the mass flow rate is computed as a function of the
pressure drop (if from_dp=true), or vice versa.
This setting can affect the size of the nonlinear system of equations.
If the parameter linearized is set to true,
then the pressure drop is computed as a linear function of the
mass flow rate.
Setting allowFlowReversal=false can lead to simpler
equations. However, this should only be set to false
if one can guarantee that the flow never reverses its direction.
This can be difficult to guarantee, as pressure imbalance after
the initialization, or due to medium expansion and contraction,
can lead to reverse flow.
If the parameter
show_T is set to true,
then the model will compute the
temperature at its ports. Note that this can lead to state events
when the mass flow rate approaches zero,
which can increase computing time.
Notes
For more detailed models that compute the actual flow friction,
models from the package
Modelica.Fluid
can be used and combined with models from the
IBPSA library.
For a model that uses the hydraulic parameter and flow velocity at nominal conditions as a parameter, use IBPSA.Fluid.FixedResistances.HydraulicDiameter.
Implementation
The pressure drop is computed by calling a function in the package IBPSA.Fluid.BaseClasses.FlowModels, This package contains regularized implementations of the equation
m = sign(Δp) k √ Δp
and its inverse function.
To decouple the energy equation from the mass equations, the pressure drop is a function of the mass flow rate, and not the volume flow rate. This leads to simpler equations.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.SIunits.MassFlowRate | m_flow_turbulent (from PartialResistance) | Turbulent flow if |m_flow| >= m_flow_turbulent | |
| Real | k | if computeFlowResistance then m_flow_nominal_pos/sqrt(dp_nominal_pos) else 0 | Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2) |
| 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 | |
| Modelica.SIunits.PressureDifference | dp_nominal (from PartialResistance) | Pressure drop at 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 | from_dp (from PartialResistance) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Boolean | homotopyInitialization (from PartialResistance) | true | = true, use homotopy method |
| Boolean | linearized (from PartialResistance) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
| Transition to laminar | |||
| Real | deltaM | 0.3 | Fraction of nominal mass flow rate where transition to turbulent occurs |
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 |
Revisions
-
September 21, 2018, by Michael Wetter:
Decrease value ofdeltaM(min=...)attribute. See #1026. -
February 3, 2018, by Filip Jorissen:
Revised implementation of pressure drop equation such that it depends onfrom_dpwhenlinearized=true. See #884. -
December 1, 2016, by Michael Wetter:
Simplified model by removing the geometry dependent parameters into the new model IBPSA.Fluid.FixedResistances.HydraulicDiameter. -
November 23, 2016, by Filip Jorissen:
Removeddp_nominalandm_flow_nominallabels from icon. -
October 14, 2016, by Michael Wetter:
Updated comment for parameteruse_dh. -
November 26, 2014, by Michael Wetter:
Added the requiredannotation(Evaluate=true)so that the system of nonlinear equations in IBPSA.Fluid.FixedResistances.Validation.PressureDropsExplicit remains the same. -
November 20, 2014, by Michael Wetter:
Rewrote the warning message using anassertwithAssertionLevel.warningas this is the proper way to write warnings in Modelica. -
August 5, 2014, by Michael Wetter:
Corrected error in documentation of computation ofk. -
May 29, 2014, by Michael Wetter:
Removed undesirable annotationEvaluate=true. -
October 8, 2013, by Michael Wetter:
Removed parametershow_V_flow. -
December 14, 2012 by Michael Wetter:
Renamed protected parameters for consistency with the naming conventions. -
January 16, 2012 by Michael Wetter:
To simplify object inheritance tree, revised base classesIBPSA.Fluid.BaseClasses.PartialResistance,IBPSA.Fluid.Actuators.BaseClasses.PartialTwoWayValve,IBPSA.Fluid.Actuators.BaseClasses.PartialDamperExponential,IBPSA.Fluid.Actuators.BaseClasses.PartialActuatorand modelIBPSA.Fluid.FixedResistances.PressureDrop. -
May 30, 2008 by Michael Wetter:
Added parametersuse_dhanddeltaMfor easier parameterization. -
July 20, 2007 by Michael Wetter:
First implementation.