modelWallFrictionAndGravity

Pressure loss in pipe due to wall friction and gravity (only for test purposes; if needed use Pipes.StaticPipe instead)

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

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,Δ)*(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.

Parameters

TypeNameDefaultDescription
SI.LengthlengthLength of pipe
SI.DiameterdiameterInner (hydraulic) diameter of pipe
SI.AreacrossAreaModelica.Constants.pi*diameter*diameter/4Inner cross section area
SI.Lengthheight_ab0.0Height(port_b) - Height(port_a)
Modelica.Fluid.Types.Roughnessroughness2.5e-5Absolute roughness of pipe (default = smooth steel pipe)
Booleanuse_nominalfalse= true, if mu_nominal and rho_nominal are used, otherwise computed from medium
SI.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)
SI.Densityrho_nominalMedium.density_pTX(Medium.p_default, Medium.T_default, Medium.X_default)Nominal density (e.g., rho_liquidWater = 995, rho_air = 1.2)
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)system.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
Medium.AbsolutePressuredp_start (from PartialTwoPortTransport)0.01*system.p_startGuess value of dp = port_a.p - port_b.p
Medium.MassFlowRatem_flow_start (from PartialTwoPortTransport)system.m_flow_startGuess value of m_flow = port_a.m_flow
Medium.MassFlowRatem_flow_small (from PartialTwoPortTransport)if system.use_eps_Re then system.eps_m_flow*system.m_flow_nominal else system.m_flow_smallSmall mass flow rate for regularization of zero flow
Booleanshow_Refalse= true, if Reynolds number is included for plotting
Booleanfrom_dptrue= true, use m_flow = f(dp), otherwise dp = f(m_flow)
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortTransport)true= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flow (from PartialTwoPortTransport)true= true, if volume flow rate at inflowing port is computed
Nominal operating point
SI.MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 1e2*system.m_flow_smallNominal mass flow rate

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)

Components

TypeNameDefaultDescription
Modelica.Fluid.Systemsystem (from PartialTwoPort)System wide properties
Medium.MassFlowRatem_flow (from PartialTwoPortTransport)Mass flow rate in design flow direction
SI.Pressuredp (from PartialTwoPortTransport)Pressure difference between port_a and port_b (= port_a.p - port_b.p)
SI.VolumeFlowRateV_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.Temperatureport_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.Temperatureport_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.ReynoldsNumberReModelica.Fluid.Pipes.BaseClasses.CharacteristicNumbers.ReynoldsNumber_m_flow(m_flow, noEvent(if m_flow > 0 then mu_a else mu_b), diameter)Reynolds number of pipe flow

Contents

NameDescription
WallFriction