Package Modelica.​Fluid.​Pipes.​BaseClasses.​WallFriction
Different variants for pressure drops due to pipe wall friction

Information

This package provides functions to compute pressure losses due to wall friction in a pipe. Every correlation is defined by a package that is derived by inheritance from the package WallFriction.PartialWallFriction. The details of the underlying pipe wall friction model are described in the UsersGuide. Basically, different variants of the equation

   dp = λ(Re,D)*(L/D)*ρ*v*|v|/2

are used, where the friction loss factor λ is shown in the next figure:

PipeFriction1.png

Extends from Modelica.​Icons.​Package (Icon for standard packages).

Package Contents

NameDescription
DetailedPipe wall friction for laminar and turbulent flow (detailed characteristic)
LaminarPipe wall friction for laminar flow in circular tubes (linear correlation)
LaminarAndQuadraticTurbulentPipe wall friction for laminar and turbulent flow in circular tubes (simple characteristic)
NoFrictionNo pipe wall friction, no static head
PartialWallFrictionPartial wall friction characteristic (base package of all wall friction characteristics)
QuadraticTurbulentPipe wall friction for turbulent flow in circular tubes (simple characteristic, mu not used)
TestWallFrictionAndGravityPressure loss in pipe due to wall friction and gravity (only for test purposes; if needed use Pipes.StaticPipe instead)

Model Modelica.​Fluid.​Pipes.​BaseClasses.​WallFriction.​TestWallFrictionAndGravity
Pressure loss in pipe due to wall friction and gravity (only for test purposes; if needed use Pipes.StaticPipe instead)

Information

This model describes pressure losses due to wall friction in a pipe and due to gravity. It is assumed that no mass or energy is stored in the pipe. Correlations of different complexity and validity can be selected via the replaceable package WallFriction (see parameter menu below). The details of the pipe wall friction model are described in the UsersGuide. Basically, different variants of the equation

   dp = λ(Re,D)*(L/D)*ρ*v*|v|/2

are used, where the friction loss factor λ is shown in the next figure:

PipeFriction1.png

By default, the correlations are computed with media data at the actual time instant. In order to reduce non-linear equation systems, parameter use_nominal provides the option to compute the correlations with constant media values at the desired operating point. This might speed-up the simulation and/or might give a more robust simulation.

Extends from Modelica.​Fluid.​Interfaces.​PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy).

Parameters

TypeNameDefaultDescription
BooleanallowFlowReversalsystem.​allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
AbsolutePressuredp_startdp_fric_nominal + system.g * height_ab * rho_nominalGuess value of dp = port_a.p - port_b.p
MassFlowRatem_flow_startsystem.​m_flow_startGuess value of m_flow = port_a.m_flow
MassFlowRatem_flow_smallif system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_smallSmall mass flow rate for regularization of zero flow
Booleanshow_Ttrue= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flowtrue= true, if volume flow rate at inflowing port is computed
Lengthlength Length of pipe
Diameterdiameter Inner (hydraulic) diameter of pipe
AreacrossArea0.25 * (Modelica.Constants.pi * diameter * diameter)Inner cross section area
Lengthheight_ab0Height(port_b) - Height(port_a)
Lengthroughness2.5e-5Absolute roughness of pipe (default = smooth steel pipe)
MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_smallNominal mass flow rate
Booleanuse_nominalfalse= true, if mu_nominal and rho_nominal are used, otherwise computed from medium
DynamicViscositymu_nominalMedium.dynamicViscosity(Medium.setState_pTX(Medium.p_default, Medium.T_default, Medium.X_default))Nominal dynamic viscosity (e.g., mu_liquidWater = 1e-3, mu_air = 1.8e-5)
Densityrho_nominalMedium.density_pTX(Medium.p_default, Medium.T_default, Medium.X_default)Nominal density (e.g., rho_liquidWater = 995, rho_air = 1.2)
Booleanshow_Refalse= true, if Reynolds number is included for plotting
Booleanfrom_dptrue= true, use m_flow = f(dp), otherwise dp = f(m_flow)

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Generated 2018-12-12 12:13:24 EST by MapleSim.