Closed conduit for the transport of fluid between thermal liquid components

**Library:**Simscape / Fluids / Thermal Liquid / Pipes & Fittings

The Pipe (TL) block models the flow of a thermal liquid through a closed conduit such as a pipe. The wall of the conduit can be rigid or flexible, the latter case allowing for expansion and contraction in the radial direction, as a compliant hose or, in the life sciences, an artery might. The thermal liquid ports can be at different elevations and the vertical distance between them can be controlled (via physical signal), for example to capture the banking of an aircraft changing course.

The pressure loss across the pipe is determined as a function of friction between the fluid and the pipe and of the rise or drop in height between the ports. For enhanced precision in models with rapid flow changes (such as those associated with the water hammer effect) the block can be configured to capture the dynamic compressibility of the fluid and its inertia. Note that such effects can reduce the speed of simulation and should be used only when necessary.

The temperature change across the pipe is determined from the energy exchanges between
the pipe and the remainder of the model. These exchanges include those attributed to
advection and conduction of internal energy through the thermal liquid ports (**A** and **B**) and to convection
of heat through the thermal port (**H**). The calculation
captures also the differences in elevation and static pressure established during
simulation between the thermal liquid ports.

If the thermal liquid is treated as compressible, the pipe can be discretized into equal segments, each containing a portion of the total fluid volume. Internal fluid volumes such as these serve a special purpose in the thermal liquid domain: they provide the computational nodes at which to compute the domain and component variables during simulation. The greater the number of pipe segments, the finer the discretization, and the more accurate the simulation results (albeit at reduced simulation speed).

To capture the rise in port elevation, the block provides two variants. The
default option treats this quantity as a constant (specified via the
**Elevation gain from port A to port B** block parameter). The
alternative variant treats it as a variable (controlled by physical signal port
**El**). To change block variants, right-click the block and,
from its context-sensitive menu, select **Simscape** + **Block Choices**. Click the desired variant: ```
Constant
elevation
```

or `Variable elevation`

.

To model the friction losses using the data best suited for a particular application, the block provides an array of friction parameterizations. Some are based on analytical expressions requiring only a small number of empirical constants; the Haaland correlation is one such expression. Others are based on tabulated data relating various quantities of interest—the Darcy friction factor against the Reynolds number, for example, or the nominal pressure drop to the nominal mass flow rate.

Analytical and tabulated parameterizations are provided also for the heat transfer between the thermal liquid and the pipe wall. Analytical parameterizations include those based on the empirical correlations of Gnielinski and Dittus-Boelter. Tabulated parameterizations include those based on data relating the Colburn factor to the Reynolds number, the Nusselt number to the Reynolds and Prandtl numbers, or the nominal temperature differential to the nominal mass flow rate.

If the pipe is segmented so that it contains more than one fluid volume, then the total mass, momentum, and energy accumulation within its span are determined as sums over the volumes that the pipe contains. Segmented pipes are treated as assemblies of smaller pipes, each pipe associated with a separate instance of this block (each block configured to provide one fluid volume). The calculations described for this block apply to a pipe with a single fluid volume.

The appropriate number of pipe segments to use in a model depends partly on the time scales over which temperature and pressure disturbances tend to propagate through the pipe. Pressure waves travel the fastest (they do so at the speed of sound in the fluid) and are often the rate-limiting factor to consider. In accordance with the Nyquist sampling theorem, in order to capture an elementary sinusoidal disturbance, at least two computational nodes—and therefore pipe segments—must be available for sampling within one wavelength:

$$\frac{c}{f}=2\frac{L}{N},$$

where *c* is the speed of sound,
*f* is the frequency of the disturbance (in Hertz),
*L* is the total length of the pipe, and *N*
is the number of pipe segments. The left-hand side represents the wavelength of the
pressure disturbance and the right-hand side the length of a pipe segment—each
providing one computational node to the pipe. To capture those pressure disturbances
with frequencies up to a maximum *f*_{Max}, the
number of segments in the pipe must therefore be at least:

$$N=2L\frac{f}{c},$$

Use this expression as a loose guideline in setting the discretization of the pipe. Other modeling constraints may factor into the decision of how many pipe segments to use and even of how to model them. More pipe segments may be required, for example, to properly define a thermal boundary condition along the length of the pipe; the pipe segments are in such a case more adequately modeled explicitly, using a separate Pipe (TL) block for each (and employing its thermal port to set the thermal boundary condition).

Use Simscape data logging to access the thermal liquid properties and states at the various nodes corresponding to the pipe segments.

The thermal liquid flow enters and exits the pipe via thermal liquid ports
**A** and **B**. In the default case of a
rigid pipe, the volume of fluid contained between these ports is fixed. If the
thermal liquid is treated as incompressible, its density (at a given operating
condition) is fixed also and its mass within the pipe cannot vary with time. The
mass balance between the ports is, in this simple case:

$${\dot{m}}_{\text{A}}+{\dot{m}}_{\text{B}}=0,$$

where $$\dot{m}$$ denotes a mass flow rate into the pipe and the subscript denotes
the port at which its value is defined. If the pipe is given a radially compliant
wall—that is, if the **Pipe wall specification** block parameter is
changed to `Flexible`

—the thermal liquid mass contained
within its bounds is free to vary, in a measure always directly proportional to the
volume of the pipe:

$${\dot{m}}_{\text{A}}+{\dot{m}}_{\text{B}}={\rho}_{\text{I}}\dot{V},$$

where *ρ* is the thermal density inside the pipe
volume (subscript `I`

), denoted *V*. If in
addition the thermal liquid is made compressible—if the **Fluid dynamic
compressibility** block parameter is changed to
`On`

—its mass within the pipe must change with pressure
and temperature also. This dependence is captured by the bulk modulus and thermal
expansion coefficient of the thermal liquid:

$${\dot{m}}_{\text{A}}+{\dot{m}}_{\text{B}}={\rho}_{\text{I}}\dot{V}+{\rho}_{\text{I}}V\left(\frac{{\dot{p}}_{\text{I}}}{{\beta}_{\text{I}}}-{\alpha}_{\text{I}}{\dot{T}}_{\text{I}}\right),$$

where *p* and *T* denote the
pressure and temperature within the pipe volume and *β* and
*α* denote the bulk modulus and thermal expansion coefficient
(as provided to the thermal liquid network by the Thermal Liquid Settings (TL)
or Thermal Liquid
Properties (TL) block).

The thermal liquid flow is subjected to different forces as it traverses the pipe. These arise due to static pressure at the ports, viscous friction along the pipe wall, and gravity on the volume of the pipe. The inertial force on the fluid is by default ignored, a suitable approximation at the large time scales over which changes to flow typically occur. The pipe is then treated as a quasi-steady component and its momentum balance—expressed as a pressure difference between its ports—becomes:

$${p}_{\text{A}}-{p}_{\text{B}}={p}_{\text{F,A}}-{p}_{\text{F,B}}+{\rho}_{\text{I}}g\Delta z,$$

where *p* is the pressure at a port and
*p*_{F} the pressure loss due to friction
in half of the pipe volume; *g* is the gravitational acceleration
and *Δz* the rise in elevation from port **A** to
port **B**. The subscripts denote a port (**A** or
**B**) or the computational node corresponding to the internal
fluid volume (**I**). Pressure is assumed in this
simple case to vary linearly between the ports. Its value at the internal node—that
used in the table lookup of *ρ*_{I}—is for this
reason defined as the arithmetic mean of the pressures at the ports:

$${p}_{\text{I}}=\frac{{p}_{\text{A}}+{p}_{\text{B}}}{2}.$$

If the flow is treated as compressible—if the **Fluid dynamic
compressibility** block parameter is changed to
`On`

—the pressure in the pipe can vary nonlinearly
between the ports. Its value is no longer a simple arithmetic mean and it must be
obtained explicitly by another means. To carry out this calculation, the momentum
balance is split over two control volumes, one each for half of the pipe volume.
Between port **A** and the internal node:

$${p}_{\text{A}}-{p}_{\text{I}}={p}_{\text{F,A}}+{\rho}_{\text{I}}g\frac{\Delta z}{2}.$$

Between port **B** and the internal node:

$${p}_{\text{B}}-{p}_{\text{I}}={p}_{\text{F,B}}-{\rho}_{\text{I}}g\frac{\Delta z}{2}.$$

If, in addition, the inertia of the fluid is factored into the calculations—that
is, if the **Fluid inertia** block parameter is set to
`On`

—then changes to flow momentum are no longer
assumed to be instantaneous. The transient phase between old and new steady states
becomes gradual, with a short but nonzero time scale that depends in part on the
system modeled. The momentum balance becomes, in the control volume adjacent to port
**A**:

$${p}_{\text{A}}-{p}_{\text{I}}={p}_{\text{F,A}}+{\rho}_{\text{I}}g\frac{\Delta z}{2}+\frac{{\ddot{m}}_{\text{A}}}{S}\frac{L}{2},$$

where *L* is the length of the pipe and
*S* is the cross-sectional area of the flow through the same.
Reversing the sign of the elevation term gives for the control volume adjacent to
port **B**:

$${p}_{\text{B}}-{p}_{\text{I}}={p}_{\text{F,B}}-{\rho}_{\text{I}}g\frac{\Delta z}{2}+\frac{{\ddot{m}}_{\text{B}}}{S}\frac{L}{2},$$

The calculation of the major pressure loss (due to friction in the pipe) varies
with the viscous friction parameterization. For all parameterizations but
`Nominal pressure drop vs. nominal mass flow rate`

, the
calculation is based on the Darcy-Weisbach equation:

$${p}_{\text{F},j}={f}_{\text{D},j}\frac{1}{4}\frac{{L}_{\text{E}}{\dot{m}}_{j}\left|{\dot{m}}_{j}\right|}{{\rho}_{\text{I}}D{S}^{2}},$$

where *f*_{D} is the Darcy
friction factor and the subscript *j* denotes the pipe half—that
adjacent to port **A** or to port **B**.
*L*_{E} is the effective length of the pipe
and *D* is the hydraulic diameter of the same. The effective pipe
length is as the sum of the true pipe length and the aggregate equivalent length of
all local resistances (those due to elbows, unions, fittings, and other local
sources of friction).

When the flow is laminar, the friction factor (for a given pipe geometry) is a function of the Reynolds number alone:

$${f}_{\text{D},j}=\frac{\lambda}{{\text{Re}}_{j}},$$

where *λ* is the shape factor of the pipe, an
empirical constant used to encode the effect of pipe geometry on the major pressure
loss; its value is `64`

in circular pipes and
`48`

–`96`

in noncircular ones. The Reynolds
number at port k is defined as:

$${\text{Re}}_{j}=\frac{{\dot{m}}_{j}D}{{\mu}_{\text{I}}S},$$

where *μ* is the dynamic viscosity obtained from
the Thermal Liquid Settings (TL) or
Thermal Liquid Properties (TL) block. The actual
pressure loss calculation in the laminar flow regime is carried out as:

$${p}_{\text{F},j}=\frac{1}{4}\frac{\lambda {\mu}_{\text{I}}{L}_{\text{E}}{\dot{m}}_{j}}{{\rho}_{\text{I}}{D}^{2}S},$$

When the flow is turbulent, the friction factor is a function also of the pipe
diameter and surface roughness. If the viscous friction parameterization is set to
`Haaland correlation`

, the friction factor is
calculated from the empirical expression:

$$\frac{1}{\sqrt{{f}_{\text{D},j}}}=-1.8\text{log}\left[{\left(\frac{\raisebox{1ex}{$\u03f5$}\!\left/ \!\raisebox{-1ex}{$D$}\right.}{3.7}\right)}^{1.11}+\frac{6.9}{{\text{Re}}_{j}}\right],$$

where *ε* is the absolute roughness of the pipe,
a measure of the height of the bumps at the pipe-fluid interface; typical roughness
values range from 0.0015 mm for certain plastic and glass tubes to 3 mm for larger
concrete pipes. If the viscous friction parameterization is set to
```
Tabulated data – Darcy friction factor vs. Reynolds
number
```

, the friction factor is obtained from the tabulated data as
a function of the Reynolds number:

$${f}_{\text{D}}=f(\text{Re}).$$

If the viscous friction parameterization is set to ```
Nominal pressure
drop vs. nominal mass flow rate
```

, the major pressure loss is
calculated for each pipe half from the expression:

$${p}_{\text{F},j}=\frac{1}{2}{K}_{\text{p}}{\dot{m}}_{j}\sqrt{{\dot{m}}_{j}^{2}+{\dot{m}}_{\text{Th}}^{2}}$$

where $${\dot{m}}_{\text{Th}}$$ is a threshold mass flow rate, a small value specified in the
block dialog box that is used for numerical smoothing purposes;
*K*_{p} is a pressure loss coefficient,
computed for rigid pipes as:

$${K}_{\text{p}}=\frac{{p}_{\text{F,N}}}{{\dot{m}}_{\text{N}}^{2}},$$

where the subscript `N`

denotes a value
specified at some nominal operating conditions. The nominal pressure and mass flow
rate can be specified as scalars (in which case the pressure loss coefficient is
fixed throughout simulation) or as a vector (in which case the pressure loss
coefficient is determined as a variable, by interpolation or extrapolation of the
tabulated data). The pressure loss coefficient is redefined for flexible pipes (with
a slight change in physical units) as:

$${K}_{\text{p}}=\frac{{p}_{\text{F,N}}}{{\dot{m}}_{\text{N}}^{2}}{D}_{\text{N}}.$$

The hydraulic diameter is a measure of width for pipes whose cross sections may not be circular. Note that only rigid pipes are allowed to be noncircular in cross section. The diameter of a flexible pipe can vary during simulation as a function of pressure, with such changes assumed to be uniform throughout the length of the pipe. The deformation of the pipe proceeds at a rate set in part by a viscoelastic time constant:

$$\dot{D}=\frac{{D}_{\text{S}}-{D}_{\text{N}}}{\tau},$$

where *τ* is the time constant and the
subscripts `S`

and `N`

denote the values at
steady-state and nominal conditions, respectively. The nominal value gives the
diameter at zero gauge pressure (when the pressure in the component is equal to
atmospheric pressure). The steady-state value gives the diameter at the actual
gauge pressure after the transient response has ceased:

$${D}_{\text{S}}={K}_{c}\frac{p-{p}_{\text{0}}}{\tau},$$

where *K*_{c} is the
elastic compliance of the pipe wall, a number indicating the extent to which a
change in pressure affects the diameter of the pipe. This parameter can be
calculated if necessary from other elastic properties of the wall:

$${K}_{\text{c}}=\frac{{D}_{\text{0,Int}}}{E}\left(\frac{{D}_{\text{0,Ext}}^{2}+{D}_{\text{0,Int}}^{2}}{{D}_{\text{0,Ext}}^{2}-{D}_{\text{0,Int}}^{2}}+\nu \right),$$

where *E* and *ν* are the
modulus of elasticity and Poisson ratio of the pipe wall material. The subscript
`0`

denotes an initial value, corresponding to the
conditions in the model at the start of simulation (not to be confused with
nominal conditions at which *D*_{N} is
specified). The subscripts `Int`

and `Ext`

refer to the internal and external circumferences of the pipe wall.

The nominal pipe diameter (used in the calculation of the pipe deformation rate) is computed as:

$${D}_{\text{N}}=\sqrt{\frac{4S}{\pi}},$$

where *S* is the specified cross-sectional
area of the pipe (a nominal value in pipes that are treated as flexible).

The energy of the fluid in the pipe can change by a variety of processes. These
include advection and conduction through the ends of the pipe (thermal liquid ports
**A** and **B**), convection at the pipe-fluid
interface (thermal port **H**), and, in pipes that are set at an
angle, longitudinal changes in elevation. Expressing the energy balance in terms of
the energy accumulation rate in the pipe gives:

$$\stackrel{.}{{E}_{\text{I}}}={\varphi}_{\text{A}}+{\varphi}_{\text{B}}+{\varphi}_{\text{H}}-\stackrel{.}{{m}_{\text{I}}}g\Delta z,$$

where $$\dot{E}$$ is the energy accumulation rate and *ϕ* is the
energy flow rate through a port—smoothed and upwinded in the thermal liquid ports,
as described in Energy Flows in Thermal Liquid Networks. As in the mass and momentum calculations, the
subscript I denotes a value defined at the internal computational node. The mass
flow rate in the potential energy term is the average of those established at the
thermal liquid ports:

$${\dot{m}}_{\text{I}}=\frac{{\dot{m}}_{\text{A}}+{\dot{m}}_{\text{B}}}{2}.$$

The total energy of the internal fluid volume is defined in terms of the specific internal energy as:

$${E}_{\text{I}}={\rho}_{\text{I}}{u}_{\text{I}}V,$$

where *u* is the specific internal energy of the
fluid, obtained as a function of temperature and pressure from the
Thermal Liquid Settings (TL) or
Thermal Liquid Properties (TL) block, and
*V* is the internal volume of the pipe. If the flow is treated
as compressible—if the **Flow dynamic compressibility** block
parameter is set to `On`

—then the energy accumulation rate
in the pipe is computed as:

$${\dot{E}}_{\text{I}}={\rho}_{\text{I}}V{\left(\frac{du}{dp}\frac{dp}{dt}+\frac{du}{dT}\frac{dT}{dt}\right)}_{\text{I}},$$

If in addition the pipe is given a compliant wall—if the **Pipe wall
specification** block parameter is set to
`Flexible`

—then the volume of thermal liquid within its
bounds is free to vary. The energy accumulation rate becomes:

$${\dot{E}}_{\text{I}}={\rho}_{\text{I}}V{\left(\frac{du}{dp}\frac{dp}{dt}+\frac{du}{dT}\frac{dT}{dt}\right)}_{\text{I}}+\left({\rho}_{\text{I}}{u}_{\text{I}}+{p}_{\text{I}}\right){\left(\frac{dV}{dt}\right)}_{\text{I}},$$

The heat flow rate between the thermal liquid and the pipe wall is assumed to result from a convective exchange and a purely conductive exchange:

$${\varphi}_{\text{H}}={Q}_{\text{Conv}}+{Q}_{\text{Cond}}.$$

The heat flow rate due to conduction is computed as:

$${Q}_{\text{Cond}}=\frac{{k}_{\text{I}}{S}_{\text{H}}}{D}\left({T}_{\text{H}}-{T}_{\text{I}}\right),$$

where *k* is the thermal conductivity of the
thermal liquid and *S*_{H} is the surface
area of the pipe wall (the product of the perimeter and length of the pipe, not
to be confused with the cross-sectional area of the same). The subscripts
`H`

and `I`

denote the pipe wall and the
internal fluid volume, respectively.

The heat flow rate due to convection is computed as:

$${Q}_{\text{Conv}}={c}_{\text{p,Avg}}\left|{\dot{m}}_{\text{Avg}}\right|\left({T}_{\text{H}}-{T}_{\text{In}}\right)\left[1-\text{exp}\left(-\frac{h{S}_{\text{H}}}{{c}_{\text{p,Avg}}\left|{\dot{m}}_{\text{Avg}}\right|}\right)\right],$$

where *c*_{p} is the
specific heat of the thermal liquid, _{h} is the heat
transfer coefficient of the pipe. The subscript In denotes the pipe inlet (port
**A** or **B** depending on flow
direction). Parameters with the subscript Avg are evaluated at the average
temperature of the pipe. This expression is based on the assumption that
temperature varies exponentially between the ends of the pipe.

For all heat transfer parameterizations but ```
Nominal temperature
differential vs. nominal mass flow rate
```

, the heat transfer
coefficient is computed from the expression:

$$h=\frac{{\text{Nu}}_{\text{Avg}}{k}_{\text{Avg}}}{D},$$

where *Nu* is the Nusselt number and
*k* the thermal conductivity in the pipe, both obtained at
the average temperature inside it. The Nusselt number calculation varies with
the parameterization selected:

`Gnielinski correlation`

:In the turbulent regime:

$${\text{Nu}}_{\text{Avg}}=\frac{\raisebox{1ex}{${f}_{\text{Avg}}$}\!\left/ \!\raisebox{-1ex}{$8$}\right.\left({\text{Re}}_{\text{Avg}}-1000\right){\text{Pr}}_{\text{Avg}}}{1+12.7{\left(\text{}\raisebox{1ex}{${f}_{\text{Avg}}$}\!\left/ \!\raisebox{-1ex}{$8$}\right.\right)}^{1/2}\left({\text{Pr}}_{\text{Avg}}^{2/3}-1\right)},$$

where

*Pr*is the Prandtl number. In the laminar flow regime, in which the correlation does not apply, the Nusselt number is obtained as a constant (denoted*Nu*_{L}) from the**Nusselt number for laminar flow heat transfer**block parameter:$${\text{Nu}}_{\text{Avg}}={\text{Nu}}_{\text{L}},$$

`Dittus-Boelter correlation`

:In the turbulent regime:

$${\text{Nu}}_{\text{Avg}}=a{\text{Re}}_{\text{Avg}}^{b}{\text{Pr}}_{\text{Avg}}^{c},$$

where

*a*,*b*, and*c*are empirical constants specific to the system considered. The default values specified in the block are those used in the exact form of the Dittus-Boelter expression for a fluid being warmed by the pipe wall:$${\text{Nu}}_{\text{Avg}}=0.023{\text{Re}}_{\text{Avg}}^{0.8}{\text{Pr}}_{\text{Avg}}^{0.4}.$$

As with the Gnielinski correlation, in the laminar flow regime, in which the correlation does not apply, the Nusselt number is obtained as a constant (denoted

*Nu*_{L}) from the**Nusselt number for laminar flow heat transfer**block parameter.`Tabulated data - Colburn factor vs. Reynolds number`

:In all flow regimes:

$${\text{Nu}}_{\text{Avg}}={\text{J}}_{\text{M,Avg}}({\text{Re}}_{\text{Avg}}){\text{Re}}_{\text{Avg}}{\text{Pr}}_{\text{Avg}}^{1/3}.$$

where

*J*_{M}is the Colburn-Chilton factor.`Tabulated data - Nusselt number vs. Reynolds number & Prandtl number`

:In all flow regimes:

$${\text{Nu}}_{\text{Avg}}=\text{Nu}({\text{Re}}_{\text{Avg}},{\text{Pr}}_{\text{Avg}}).$$

The calculations differ slightly in the case of the ```
Nominal
temperature difference vs. nominal mass flow rate
```

parameterization. In the laminar flow regime, the heat transfer coefficient is
the same constant specified in other parameterizations (**Nusselt number
for laminar flow heat transfer** block parameter). In the turbulent
flow regime, it is calculated as a function of mass flow rate, with the
proportionality between the two fixed by a form of the Dittus-Boelter correlation:

$$\text{Nu}\propto {\text{Re}}^{0.8},$$

or:

$$\frac{hD}{k}\propto {\left(\frac{\dot{m}D}{S\mu}\right)}^{0.8}$$

Rearranging terms:

$$h={K}_{\text{H,Avg}}\frac{{\dot{m}}_{\text{Avg}}^{0.8}}{{D}^{1.8}},$$

where *K*_{H} is a
proportionality constant created by lumping all parameters but those retained in
the final expression (with the fluid properties defined at the average
temperature in the pipe). The constant is computed from nominal values obtained
for *h*, *D*, and $$\dot{m}$$ as:

$${K}_{\text{H,Avg}}=\frac{{h}_{\text{N}}{D}_{\text{N}}^{1.8}}{{\dot{m}}_{\text{N}}^{0.8}},$$

The heat transfer coefficient for the ```
Nominal temperature
difference vs. nominal mass flow rate
```

parameterization is therefore:

$$h=\frac{{h}_{\text{N}}{D}_{\text{N}}^{1.8}}{{\dot{m}}_{\text{N}}^{0.8}}\frac{{\dot{m}}_{\text{I}}^{0.8}}{{D}^{1.8}},$$

or, in the simpler case of pipe treated as rigid (and therefore assumed to be constant in diameter):

$${h}_{\text{I}}=\frac{{h}_{\text{N}}}{{\dot{m}}_{\text{N}}^{0.8}}{\dot{m}}_{\text{I}}^{0.8}.$$

The nominal mass flow rate is obtained from the tabulated data specified via
the **Nominal mass flow rate** block parameter. The nominal
heat transfer coefficient is calculated from various nominal parameters as:

$${h}_{\text{N}}=\frac{{\dot{m}}_{\text{N}}{c}_{\text{p,N}}}{{S}_{\text{H,N}}}\text{ln}\left(\frac{{T}_{\text{H,N}}-{T}_{\text{In,N}}}{{T}_{\text{H,N}}-{T}_{\text{Out,N}}}\right),$$

where *c*_{p} is the specific heat at
constant pressure and the subscripts `H`

,
`In`

, and `Out`

denote the wall, the inlet
(whichever of the thermal liquid ports happens to be it at a given moment), and
the outlet. The nominal surface area of the pipe wall
(*S*_{{H,N}}) is computed as the
product of the pipe circumference and the pipe length:

$${S}_{\text{H,N}}=\frac{4S}{D}L,$$

The hydraulic diameter (*D*) is a constant if the pipe is
rigid but a function of pressure if the pipe is flexible. Its value is obtained
from the **Hydraulic diameter** block parameter if the
**Pipe wall specification** parameter is set to
`Rigid`

and computed from the **Nominal
cross-sectional area** parameter otherwise, giving, for the
flexible pipe: