modelBaseModel
Extends from Modelica.Fluid.Interfaces.PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy), Modelica.Fluid.Interfaces.PartialLumpedFlow (Base class for a lumped momentum balance).
Information
This model computes the pressure loss of a pipe segment (orifice, bending etc.) with a minimum amount of data provided via parameter data. If available, data should be provided for both flow directions, i.e., flow from port_a to port_b and from port_b to port_a, as well as for the laminar and the turbulent region. It is also an option to provide the loss factor only for the turbulent region for a flow from port_a to port_b.
The following equations are used:
Δp = 0.5*ζ*ρ*v*|v|
= 0.5*ζ/A^2 * (1/ρ) * m_flow*|m_flow|
Re = |v|*D*ρ/μ
| flow type | ζ = | flow region |
| turbulent | zeta1 = const. | Re ≥ Re_turbulent, v ≥ 0 |
| zeta2 = const. | Re ≥ Re_turbulent, v < 0 | |
| laminar | c0/Re | both flow directions, Re small; c0 = const. |
where
- Δp is the pressure drop: Δp = port_a.p - port_b.p
- v is the mean velocity.
- ρ is the density.
- ζ is the loss factor that depends on the geometry of
the pipe. In the turbulent flow regime, it is assumed that
ζ is constant and is given by "zeta1" and
"zeta2" depending on the flow direction.
When the Reynolds number Re is below "Re_turbulent", the flow is laminar for small flow velocities. For higher velocities there is a transition region from laminar to turbulent flow. The loss factor for laminar flow at small velocities is defined by the often occurring approximation c0/Re. If c0 is different for the two flow directions, the mean value has to be used (c0 = (c0_ab + c0_ba)/2). - The equation "Δp = 0.5*ζ*ρ*v*|v|" is either with respect to port_a or to port_b, depending on the definition of the particular loss factor ζ (in some references loss factors are defined with respect to port_a, in other references with respect to port_b).
- Re = |v|*D_Re*ρ/μ = |m_flow|*D_Re/(A_Re*μ) is the Reynolds number at the smallest cross section area. This is often at port_a or at port_b, but can also be between the two ports. In the record, the diameter D_Re of this smallest cross section area has to be provided, as well, as Re_turbulent, the absolute value of the Reynolds number at which the turbulent flow starts. If Re_turbulent is different for the two flow directions, use the smaller value as Re_turbulent.
- D is the diameter of the pipe. If the pipe has not a circular cross section, D = 4*A/P, where A is the cross section area and P is the wetted perimeter.
- A is the cross section area with A = π(D/2)^2.
- μ is the dynamic viscosity.
The laminar and the transition region is usually of not much technical interest because the operating point is mostly in the turbulent regime. For simplification and for numerical reasons, this whole region is described by two polynomials of third order, one polynomial for m_flow ≥ 0 and one for m_flow < 0. The polynomials start at Re = |m_flow|*4/(π*D_Re*μ), where D_Re is the smallest diameter between port_a and port_b. The common derivative of the two polynomials at Re = 0 is computed from the equation "c0/Re". Note, the pressure drop equation above in the laminar region is always defined with respect to the smallest diameter D_Re.
If no data for c0 is available, the derivative at Re = 0 is computed in such a way, that the second derivatives of the two polynomials are identical at Re = 0. The polynomials are constructed, such that they smoothly touch the characteristic curves in the turbulent regions. The whole characteristic is therefore continuous and has a finite, continuous first derivative everywhere. In some cases, the constructed polynomials would "vibrate". This is avoided by reducing the derivative at Re=0 in such a way that the polynomials are guaranteed to be monotonically increasing. The used sufficient criteria for monotonicity follows from:
- Fritsch F.N. and Carlson R.E. (1980):
- Monotone piecewise cubic interpolation. SIAM J. Numerc. Anal., Vol. 17, No. 2, April 1980, pp. 238-246
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| LossFactorData | data | Loss factor data | |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
| Advanced | |||
| Medium.AbsolutePressure | dp_start (from PartialTwoPortTransport) | 0.01*system.p_start | Guess value of dp = port_a.p - port_b.p |
| Medium.MassFlowRate | m_flow_start (from PartialTwoPortTransport) | system.m_flow_start | Guess value of m_flow = port_a.m_flow |
| Medium.MassFlowRate | m_flow_small (from PartialTwoPortTransport) | if system.use_eps_Re then system.eps_m_flow*system.m_flow_nominal else system.m_flow_small | Small mass flow rate for regularization of zero flow |
| Boolean | use_Re | system.use_eps_Re | = true, if turbulent region is defined by Re, otherwise by m_flow_small |
| Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortTransport) | true | = true, if temperatures at port_a and port_b are computed |
| Boolean | show_V_flow (from PartialTwoPortTransport) | true | = true, if volume flow rate at inflowing port is computed |
| Boolean | show_Re | false | = true, if Reynolds number is included for plotting |
| Assumptions › Dynamics | |||
| Modelica.Fluid.Types.Dynamics | momentumDynamics (from PartialLumpedFlow) | system.momentumDynamics | Formulation of momentum balance |
| Nominal operating point | |||
| SI.MassFlowRate | m_flow_nominal | if system.use_eps_Re then system.m_flow_nominal else 1e2*system.m_flow_small | Nominal mass flow rate |
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.Fluid.System | system (from PartialTwoPort) | System wide properties | |
| Medium.MassFlowRate | m_flow (from PartialTwoPortTransport) | Mass flow rate in design flow direction | |
| SI.Pressure | dp (from PartialTwoPortTransport) | Pressure difference between port_a and port_b (= port_a.p - port_b.p) | |
| SI.VolumeFlowRate | V_flow (from PartialTwoPortTransport) | m_flow/Modelica.Fluid.Utilities.regStep(m_flow, Medium.density(state_a), Medium.density(state_b), m_flow_small) | Volume flow rate at inflowing port (positive when flow from port_a to port_b) |
| Medium.Temperature | port_a_T (from PartialTwoPortTransport) | Modelica.Fluid.Utilities.regStep(port_a.m_flow, Medium.temperature(state_a), Medium.temperature(Medium.setState_phX(port_a.p, port_a.h_outflow, port_a.Xi_outflow)), m_flow_small) | Temperature close to port_a, if show_T = true |
| Medium.Temperature | port_b_T (from PartialTwoPortTransport) | Modelica.Fluid.Utilities.regStep(port_b.m_flow, Medium.temperature(state_b), Medium.temperature(Medium.setState_phX(port_b.p, port_b.h_outflow, port_b.Xi_outflow)), m_flow_small) | Temperature close to port_b, if show_T = true |
| SI.Length | pathLength (from PartialLumpedFlow) | Length flow path | |
| SI.Momentum | I (from PartialLumpedFlow) | Momenta of flow segments | |
| SI.Force | Ib_flow (from PartialLumpedFlow) | Flow of momentum across boundaries | |
| SI.Force | F_p (from PartialLumpedFlow) | Pressure force | |
| SI.Force | F_fg (from PartialLumpedFlow) | Friction and gravity force | |
| SI.ReynoldsNumber | Re | Modelica.Fluid.Pipes.BaseClasses.CharacteristicNumbers.ReynoldsNumber_m_flow(m_flow, noEvent(if m_flow > 0 then Medium.dynamicViscosity(state_a) else Medium.dynamicViscosity(state_b)), data.D_Re) | Reynolds number at diameter data.D_Re |
| SI.Pressure | dp_fg | Pressure loss due to friction and gravity | |
| SI.Area | A_mean | Modelica.Constants.pi/4*(data.diameter_a^2 + data.diameter_b^2)/2 | Mean cross flow area |