modelPipe
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
| Type | Name | Default | Description |
|---|---|---|---|
| Icon | |||
| Boolean | slanted (from Pipe) | false | Display slanted icon instead |
| Friction | |||
| Types.FrictionMethod | FrictionMethod (from FrictionSpec) | data.FrictionMethod | Method for specifying pipe friction |
| SI.Height | p_eps_input (from FrictionSpec) | data.p_eps | Pipe roughness height (absolute) |
| Real | f_moody (from FrictionSpec) | data.f_moody | Moody friction factor (dimensionless, typically 0.01-0.05) |
| Real | m_manning (from FrictionSpec) | data.m_manning | Manning M (Strickler) coefficient M=1/n (typically 60-110 for steel, 30-60 for rock tunnels) |
| Boolean | use_n (from FrictionSpec) | data.use_n | If true, use Mannings coefficient n (=1/M) instead of Manning's M (Strickler) |
| Real | n_manning (from FrictionSpec) | data.n_manning | Manning's n coefficient (typically 0.009-0.017 for steel/concrete, 0.017-0.030 for rock tunnels) |
| SI.Diameter | D_h (from FrictionSpec) | Hydraulic diameter used for friction conversion | |
| Geometry | |||
| SI.Length | H | 0 | Height difference from the inlet to the outlet |
| SI.Length | L | 1000 | Length of the pipe |
| SI.Diameter | D_i | 1.0 | Diameter of the inlet side |
| SI.Diameter | D_o | D_i | Diameter of the outlet side |
| Initialization | |||
| Boolean | SteadyState | data.SteadyState | If true, starts in steady state |
| SI.VolumeFlowRate | Vdot_0 | data.Vdot_0 | Initial flow rate of the pipe |
| Boolean | useInitialFlow | true | If false, skip initial equation for flow (e.g., when flow is imposed by a source) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Contact_i | i (from TwoContacts) | Inlet contact (positive design flow direction is from i to o) | |
| Contact_o | o (from TwoContacts) | Outlet contact (positive design flow direction is from i to o) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Data | data | Using standard data set | |
| SI.Velocity | v | Average Water velocity | |
| SI.Force | F_f | Friction force | |
| SI.Pressure | p_i | Inlet pressure | |
| SI.Pressure | p_o | Outlet pressure | |
| SI.Pressure | dp | p_o - p_i | Pressure difference across the pipe |
| SI.MassFlowRate | mdot | Mass flow rate | |
| SI.VolumeFlowRate | Vdot | Volume flow rate |