modelPipe

Model of a pipe

Extends from OpenHPL.Icons.Pipe (Pipe icon), OpenHPL.Interfaces.TwoContacts (Model of two connectors), Types.FrictionSpec (Reusable friction specification with multiple input methods).

Information

Simple Pipe Model

The simple model of the pipe gives possibilities for easy modelling of different conduit: intake race, penstock, tail race, etc. The model assumes incompressible water and inelastic walls since there are only small pressure variations.

Figure: Model for flow through a pipe.

Mass and Momentum Balance

Mass Balance: For incompressible water, the mass in the filled pipe is constant:

$$ \frac{\mathrm{d}m_\mathrm{c}}{\mathrm{d}t} = \dot{m}_\mathrm{c,in} - \dot{m}_\mathrm{c,out} = 0 $$

Momentum Balance: The momentum balance is expressed as:

$$ \frac{\mathrm{d}M_\mathrm{c}}{\mathrm{d}t} = \dot{M}_\mathrm{c,in} - \dot{M}_\mathrm{c,out} + F_\mathrm{p,c} + F_\mathrm{g,c} + F_\mathrm{f,c} $$

where:

  • Mc = mc vc is the momentum
  • Fp,c is the pressure force due to inlet/outlet pressure difference
  • Fg,c = mc g cos θc is the gravity force
  • Ff,c is the friction force calculated using the Darcy friction factor

This model is described by the momentum differential equation, which depends on pressure drop through the pipe together with friction and gravity forces. The main defined variable is volumetric flow rate Vdot.

In this pipe model, the flow rate changes simultaneously in the whole pipe (information about the speed of wave propagation is not included). Water pressures are shown at the pipe boundaries (inlet and outlet pressure from connectors).

Features

It should be noted that this pipe model provides possibilities for modelling of pipes with both positive and negative slopes (positive or negative height difference).

If the pipe is slightly tapered then this can be taken into account by adjusting K_c based on your taper geometry: 0.05–0.15 for gentle cones, up to 0.6 for sharp contractions.

Friction Specification

Friction is specified via the inherited FrictionSpec base class, which supports pipe roughness, Moody friction factor, and Manning coefficient methods.

Initialization

By default, the pipe provides an initial equation for the flow rate: either der(mdot) = 0 (steady state) or Vdot = Vdot_0. When the pipe is connected to a component that already imposes the flow (e.g., VolumeFlowSource), these initial equations become redundant and may cause an over-determined initialization problem in some tools (e.g., Dymola). Set useInitialFlow = false to disable the initial equation in such cases.

More Information

More info about the pipe model can be found in [Vytvytskyi2017] and [Splavska2017a].

Parameters

TypeNameDefaultDescription
Icon
Booleanslanted (from Pipe)falseDisplay slanted icon instead
Friction
Types.FrictionMethodFrictionMethod (from FrictionSpec)data.FrictionMethodMethod for specifying pipe friction
SI.Heightp_eps_input (from FrictionSpec)data.p_epsPipe roughness height (absolute)
Realf_moody (from FrictionSpec)data.f_moodyMoody friction factor (dimensionless, typically 0.01-0.05)
Realm_manning (from FrictionSpec)data.m_manningManning M (Strickler) coefficient M=1/n (typically 60-110 for steel, 30-60 for rock tunnels)
Booleanuse_n (from FrictionSpec)data.use_nIf true, use Mannings coefficient n (=1/M) instead of Manning's M (Strickler)
Realn_manning (from FrictionSpec)data.n_manningManning's n coefficient (typically 0.009-0.017 for steel/concrete, 0.017-0.030 for rock tunnels)
SI.DiameterD_h (from FrictionSpec)Hydraulic diameter used for friction conversion
Geometry
SI.LengthH0Height difference from the inlet to the outlet
SI.LengthL1000Length of the pipe
SI.DiameterD_i1.0Diameter of the inlet side
SI.DiameterD_oD_iDiameter of the outlet side
Initialization
BooleanSteadyStatedata.SteadyStateIf true, starts in steady state
SI.VolumeFlowRateVdot_0data.Vdot_0Initial flow rate of the pipe
BooleanuseInitialFlowtrueIf false, skip initial equation for flow (e.g., when flow is imposed by a source)

Connectors

TypeNameDefaultDescription
Contact_ii (from TwoContacts)Inlet contact (positive design flow direction is from i to o)
Contact_oo (from TwoContacts)Outlet contact (positive design flow direction is from i to o)

Components

TypeNameDefaultDescription
DatadataUsing standard data set
SI.VelocityvAverage Water velocity
SI.ForceF_fFriction force
SI.Pressurep_iInlet pressure
SI.Pressurep_oOutlet pressure
SI.Pressuredpp_o - p_iPressure difference across the pipe
SI.MassFlowRatemdotMass flow rate
SI.VolumeFlowRateVdotVolume flow rate