packageFlowModels
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Information
This package contains basic flow models that are used by the various models that compute pressure drop.
Assumption and limitations
Because the density does not change signficantly in heating, ventilation and air conditioning systems for buildings, the flow models compute the pressure drop based on the mass flow rate and not the volume flow rate. This typically leads to simpler equations because it does not require the mass density, which changes when the flow is reversed. Although, for conceptual design of building energy system, there is in general not enough information available that would warrant a more detailed pressure drop calculation. If a more detailed computation of the flow resistance is needed, then a user can use models from the Modelica.Fluid library.
All functions have an argument m_flow_turbulent that determines where the
flow transitions to fully turbulent flow. For smaller mass flow rates,
the power-law relation is replaced by a function that has a finite slope
near zero pressure drop. This is done for numerical reasons, and to approximate
laminar flow, although the implementation does not use a linear function.
Implementation
The four main functions are
- Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp,
- Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow,
- Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp, and
- Buildings.Fluid.BaseClasses.FlowModels.powerLaw_m_flow.
These functions compute the mass flow rate or the pressure drop, respectively.
The first two functions assume that the flow resistance is quadratic in the mass flow rate,
and the other two functions allow for a flow exponent between 1 and 2.
All these functions are two times continuously differentiable.
First and second order derivatives are provided
in the function that have the suffix _der and _der2.
For the powerLaw functions, the coefficients that are an argument to the
functions can be computed using the function
Buildings.Fluid.BaseClasses.FlowModels.powerLawData.
This computation is done outside the above functions because the arguments generally
are all parameters, and hence precomputing them avoid repetitive evaluation.
Contents
| Name | Description |
|---|---|
| Function that computes mass flow rate for given pressure drop | |
| 1st derivative of function that computes mass flow rate for given pressure drop | |
| 2nd derivative of function that computes mass flow rate for given pressure drop | |
| Function that computes pressure drop for given mass flow rate | |
| 1st derivative of function that computes pressure drop for given mass flow rate | |
| 2nd derivative of function that computes pressure drop for given mass flow rate | |
| Function that computes the coefficients used by powerLaw_dp and powerLaw_m_flow | |
| Power law used in pressure drop equations when the flow exponent is constant and may be different from 2 | |
| 1st derivative of function that computes mass flow rate for given pressure drop | |
| 2nd derivative of function that computes mass flow rate for given pressure drop | |
| Inverse of power law used in pressure drop equations when the flow exponent is constant and may be different from 2 | |
| 1st derivative of function that computes pressure drop for given mass flow rate | |
| 2nd derivative of function that computes pressure drop for given mass flow rate | |
| Collection of validation models |
Revisions
-
June 15, 2026, by Michael Wetter:
Updated documentation.
This is for Buildings, #4620. -
April 10, 2009 by Michael Wetter:
First implementation.