# Pipe (TL)

Closed conduit that transports fluid between thermal liquid components

Libraries:
Simscape / Fluids / Thermal Liquid / Pipes & Fittings

## Description

The Pipe (TL) block represents thermal liquid flow through a pipe. The block finds the temperature across the pipe from the differential between ports, pipe elevation, and any additional heat transfer at port H.

The pipe can have a constant or varying elevation between ports A and B. For a constant elevation differential, use the Elevation gain from port A to port B parameter. You can specify a variable elevation by setting Elevation gain specification to `Variable`. This exposes physical signal port EL.

You can choose to include the effects of fluid dynamic compressibility, inertia, and wall flexibility. When the block includes these phenomena, it calculates the flow properties for each number of pipe segments that you specify.

### Pipe Geometry

Use the Cross-sectional geometry parameter to specify the shape of the pipe.

Circular

The nominal hydraulic diameter, DN, and the pipe diameter, dcircle, are both equal to the is the value of the Pipe diameter parameter. The pipe cross-sectional area is ${S}_{N}=\frac{\pi }{4}{d}_{circle}^{2}.$

Annular

The nominal hydraulic diameter is the difference between the Pipe outer diameter and Pipe inner diameter parameters DN = douterdinner. The pipe cross-sectional area is ${S}_{N}=\frac{\pi }{4}\left({d}_{outer}^{2}-{d}_{inner}^{2}\right).$

Rectangular

The nominal hydraulic diameter is

`${D}_{N}=\frac{2hw}{h+w},$`

where:

• h is the is the value of the Pipe height parameter.

• w is the is the value of the Pipe width parameter.

The pipe cross-sectional area is ${S}_{N}=wh.$

Elliptical

The nominal hydraulic diameter is

`${D}_{N}=2{a}_{maj}{b}_{min}\frac{\left(64-16{\left(\frac{{a}_{maj}-{b}_{min}}{{a}_{maj}+{b}_{min}}\right)}^{2}\right)}{\left({a}_{maj}+{b}_{min}\right)\left(64-3{\left(\frac{{a}_{maj}-{b}_{min}}{{a}_{maj}+{b}_{min}}\right)}^{4}\right)},$`

where:

• amaj is the is the value of the Pipe major axis parameter.

• bmin is the is the value of the Pipe minor axis parameter.

The pipe cross-sectional area is ${S}_{N}=\frac{\pi }{4}{a}_{maj}{b}_{min}.$

Isosceles Triangular

The nominal hydraulic diameter is

`${D}_{N}={l}_{side}\frac{\mathrm{sin}\left(\theta \right)}{1+\mathrm{sin}\left(\frac{\theta }{2}\right)},$`

where:

• lside is the is the value of the Pipe side length parameter.

• θ is the is the value of the Pipe vertex angle parameter.

The pipe cross-sectional area is ${S}_{N}=\frac{{l}_{side}^{2}}{2}\mathrm{sin}\left(\theta \right).$

Custom

When the Cross-sectional geometry parameter is `Custom`, you can specify the pipe cross-sectional area with the Cross-sectional area parameter. The nominal hydraulic diameter is the value of the Hydraulic diameter parameter.

### Pipe Flexibility

You can model flexible walls for all cross-sectional geometries. When you set Pipe wall specification to `Flexible`, the block assumes uniform expansion along all directions and preserves the defined cross-sectional shape. This setting may not result in physical results for noncircular cross-sectional areas undergoing high pressure relative to atmospheric pressure. When you model flexible walls, you can use the Volumetric expansion specification parameter to specify the volumetric expansion of the pipe cross-sectional area.

When the Volumetric expansion specification parameter is `Cross-sectional area vs. pressure`, the change in volume is

`$\stackrel{˙}{V}=L\left(\frac{A-S}{\tau }\right),$`

where:

• $A={S}_{N}+{K}_{ps}\left(p-{p}_{atm}\right).$

• L is the Pipe length parameter.

• SN is the nominal pipe cross-sectional area defined for each shape.

• S is the current pipe cross-sectional area.

• p is the internal pipe pressure.

• patm is the atmospheric pressure.

• Kps is the Static gauge pressure to cross-sectional area gain parameter.

To calculate Kps assuming uniform elastic deformation of a thin-walled, open-ended cylindrical pipe, use

`${K}_{ps}=\frac{\Delta D}{\Delta p}=\frac{\pi {D}_{N}^{3}}{4tE},$`

where t is the pipe wall thickness and E is Young's modulus.

• τ is the Volumetric expansion time constant.

When the Volumetric expansion specification parameter is `Cross-sectional area vs. pressure - Tabulated`, the block uses the same equation for $\stackrel{˙}{V}$ as the ```Cross-sectional area vs. pressure``` setting. The block calculates A with the table lookup function

`$A={S}_{N}+tablelookup\left({p}_{ps},{A}_{ps},\left(p-{p}_{atm}\right),interpolation=linear,extrapolation=linear\right),$`

where pps is the Static gauge pressure vector parameter and Aps is the Cross sectional area gain vector parameter.

When the Volumetric expansion specification parameter is `Hydraulic diameter vs. pressure`, the change in volume is

`$\stackrel{˙}{V}=\frac{\pi }{2}DL\left(\frac{{D}_{static}-D}{\tau }\right),$`

where:

• ${D}_{static}={D}_{N}+{K}_{pd}\left(p-{p}_{atm}\right).$

• DN is the nominal hydraulic diameter defined for each shape.

• D is the current pipe hydraulic diameter.

• Kpd is the Static gauge pressure to hydraulic diameter gain parameter. To calculate Kps assuming uniform elastic deformation of a thin-walled, open-ended cylindrical pipe, use

`${K}_{pd}=\frac{\Delta D}{\Delta p}=\frac{{D}_{N}^{2}}{2tE}.$`

When the Volumetric expansion specification parameter is `Based on material properties`, the block uses the same equation for $\stackrel{˙}{V}$ as the `Hydraulic diameter vs. pressure` setting but calculates Dstatic depending on the value of the Material behavior parameter

`${\text{D}}_{static}={D}_{N}\left(1+{ϵ}_{hoop}\right).$`

This parameterization assumes a cylindrical thin-walled pressure vessel where ${\sigma }_{radial}=0.$

When the Material behavior parameter is ```Linear elastic```,

`${ϵ}_{hoop}=\frac{1}{E}\left[{\sigma }_{hoop}-v{\sigma }_{longitudinal}\right],$`

where:

• E is the value of the Young's modulus parameter.

• v is the value of the Poisson's ratio parameter.

• ${\sigma }_{hoop}=\frac{pD}{2t}$, where t is the value of the Pipe wall thickness parameter.

• ${\sigma }_{longitudinal}=\frac{pD}{4t}.$

When the Material behavior parameter is `Multilinear elastic`, the block calculates the von Mises stress, σv, which simplifies to ${\sigma }_{v}=\sqrt{\frac{3}{4}}\frac{pD}{2t}$, to determine the equivalent strain. The hoop strain is

`${ϵ}_{hoop}={ϵ}_{hoop}^{elastic}+{ϵ}_{hoop}^{plastic}$`
`$\begin{array}{l}{ϵ}_{hoop}^{elastic}=\frac{1}{E}\left[{\sigma }_{hoop}-v{\sigma }_{longitudinal}\right]\\ {ϵ}_{hoo{p}_{i,j}}^{plastic}=\frac{3}{2}\left(\frac{1}{{E}_{s}}-\frac{1}{E}\right){S}_{i,j}\end{array}$`

where:

• The block calculates the Young's Modulus, E, from the first elements of the Stress vector and Strain vector parameters.

• ${E}_{S}=\frac{{\sigma }_{total}}{{ϵ}_{total}}$, where σtotal and εtotal are the equivalent total stress and the equivalent total strain, respectively. The block calculates the equivalent total strain from the von Mises stress and the stress-strain curve.

• ${\text{S}}_{i,j}={\sigma }_{i,j}-\left[\frac{{\sigma }_{hoop}+{\sigma }_{longitudinal}+{\sigma }_{radial}}{3}\right]{\delta }_{i,j},$ where σi,j are the elements of the Cauchy stress tensor.

If you do not model flexible walls, SN = S and DN = D.

Pipe Wall Thermal Expansion

If you select Pipe thermal expansion, the block models the thermal expansion of the pipe wall using these assumptions:

• The pipe material is isotropic.

• The Biot number of the pipe is less than 0.1 and the pipe can be modeled with lumped thermal capacitance.

• The temperature change and pipe deformations are small enough that a first order approximation for area expansion is accurate.

When the Material behavior parameter is `Cross-sectional area vs. pressure`, `Cross-sectional area vs. pressure - Tabulated`, or `Hydraulic diameter vs. pressure` and you select Pipe thermal expansion, the block adds a thermal expansion term when calculating area or diameter.

When Material behavior is ```Cross-sectional area vs. pressure```,

`$A={S}_{N}+{K}_{ps}\left(p-{p}_{atm}\right)+{S}_{N}2\alpha \Delta T,$`

where:

• ɑ is the value of the Coefficient of thermal expansion parameter.

• $\Delta T={T}_{I}-{T}_{ref}.$

• TI is the fluid temperature at the internal node of the block.

• Tref is the value of the Thermal expansion reference temperature parameter.

When Material behavior is ```Cross-sectional area vs. pressure - Tabulated```,

`$A={S}_{N}+tablelookup\left({p}_{ps},{A}_{ps},\left(p-{p}_{atm}\right),interpolation=linear,extrapolation=linear\right)+{S}_{N}2\alpha \Delta T.$`

When Material behavior is ```Hydraulic diameter vs. pressure``` ,

`${D}_{static}={D}_{N}+{K}_{pd}\left(p-{p}_{atm}\right)+{D}_{N}\alpha \Delta T.$`

When the Material behavior parameter is `Multilinear elastic` and you select Pipe thermal expansion, the block calculates Dstatic as

`${D}_{static}={D}_{N}\left(1+{ϵ}_{hoop}+{ϵ}_{thermal}\right),$`

where ${ϵ}_{thermal}=\alpha \Delta T.$

### Heat Transfer at the Pipe Wall

You can include heat transfer to and from the pipe walls in multiple ways. There are two analytical models: the `Gnielinski correlation`, which models the Nusselt number as a function of the Reynolds and Prandtl numbers with predefined coefficients, and the ```Dittus-Boelter correlation - Nusselt = a*Re^b*Pr^c```, which models the Nusselt number as a function of the Reynolds and Prandtl numbers with user-defined coefficients.

The ```Nominal temperature differential vs. nominal mass flow rate```, ```Tabulated data - Colburn factor vs. Reynolds number```, and ```Tabulated data - Nusselt number vs. Reynolds number & Prandtl number``` are lookup table parameterizations based on user-supplied data.

Heat transfer between the fluid and pipe wall occurs through convection, QConv and conduction, QCond, where the net heat flow rate, QH is QH=QConv+QCond.

Heat transfer due to conduction is:

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

where:

• D is the nominal hydraulic diameter, DN, if the pipe walls are rigid, and is the pipe steady-state diameter, DS, if the pipe walls are flexible.

• kI is the thermal conductivity of the thermal liquid, defined internally for each pipe segment.

• SH is the surface area of the pipe wall.

• TH is the pipe wall temperature.

• TI is the fluid temperature at the internal node of the block.

Heat transfer due to convection is:

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

where:

• cp, Avg is the average fluid specific heat which the block calculates using a lookup table.

• $\stackrel{˙}{m}$Avg is the average mass flow rate through the pipe.

• TIn is the fluid inlet port temperature.

• h is the pipe heat transfer coefficient.

The heat transfer coefficient h is:

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

except when parameterizing by ```Nominal temperature differential vs. nominal mass flow rate```, where kAvg is the average thermal conductivity of the thermal liquid over the entire pipe and Nu is the average Nusselt number in the pipe.

Analytical Parameterizations

When Heat transfer parameterization is set to `Gnielinski correlation` and the flow is turbulent, the average Nusselt number is calculated as:

where:

• f is the average Darcy friction factor, according to the Haaland correlation:

`$f={\left\{-1.8{\text{log}}_{\text{10}}\left[\frac{6.9}{\text{Re}}+{\left(\frac{{ϵ}_{\text{R}}}{3.7D}\right)}^{1.11}\right]\right\}}^{\text{-2}},$`

where εR is the pipe Internal surface absolute roughness.

• Re is the Reynolds number.

• Pr is the Prandtl number.

When the flow is laminar, the data from [1] determines how the Nusselt number depends on the Cross-sectional geometry parameter:

• When Cross-sectional geometry is `Circular`, the Nusselt number is 3.66.

• When Cross-sectional geometry is `Annular`, the block calculates the Nusselt number from tabulated data using a lookup table with linear interpolation and nearest extrapolation.

$\frac{{D}_{inner}}{{D}_{outer}}$Nusselt number
1/2017.46
1/1011.56
1/47.37
1/25.74
14.86

The block adjusts the calculated Nusselt number with a correction factor

• When Cross-sectional geometry is `Rectangular`, the block calculates the Nusselt number from tabulated data using a lookup table with linear interpolation and nearest extrapolation.

$\frac{\mathrm{min}\left(h,w\right)}{\mathrm{max}\left(h,w\right)}$Nusselt number
07.54
1/85.60
1/65.14
1/44.44
1/33.96
1/23.39
12.98

• When Cross-sectional geometry is `Elliptical`, the block calculates the Nusselt number from tabulated data using a lookup table with linear interpolation and nearest extrapolation.

$\frac{{b}_{min}}{{a}_{maj}}$Nusselt number
1/163.65
1/83.72
1/43.79
1/23.74
13.66

• When Cross-sectional geometry is `Isosceles triangular`, the block calculates the Nusselt number from tabulated data using a lookup table with linear interpolation and nearest extrapolation.

θNusselt number
10π/1801.61
30π/1802.26
60π/1802.47
90π/1802.34
120π/1802.00

• When Cross-sectional geometry is `Custom`, the Nusselt number is the value of the Nusselt number for laminar flow heat transfer parameter.

When Heat transfer parameterization is set to `Dittus-Boelter correlation` and the flow is turbulent, the average Nusselt number is calculated as:

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

where:

• a is the value of the Coefficient a parameter.

• b is the value of the Exponent b parameter.

• c is the value of the Exponent c parameter.

The block default Dittus-Boelter correlation is:

`$\text{Nu}=0.023{\text{Re}}_{}^{0.8}{\text{Pr}}_{}^{0.4}.$`

When the flow is laminar, the Nusselt number depends on the Cross-sectional geometry parameter.

Parameterization By Tabulated Data

When the Heat transfer parameterization parameter is set to ```Tabulated data - Colburn factor vs. Reynolds number```, the average Nusselt number is calculated as:

`$\text{Nu}={\text{J}}_{\text{M}}\left(\text{Re}\right){\text{RePr}}_{}^{1/3}.$`

where JM is the Colburn-Chilton factor.

When the Heat transfer parameterization parameter is set to ```Tabulated data - Nusselt number vs. Reynolds number & Prandtl number```, the Nusselt number is interpolated from the three-dimensional array of average Nusselt number as a function of both average Reynolds number and average Prandtl number:

`$\text{Nu}=\text{Nu}\left(\text{Re},\text{Pr}\right).$`

When the Heat transfer parameterization parameter is set to ```Nominal temperature difference vs. nominal mass flow rate``` and the flow is turbulent, the heat transfer coefficient is calculated as:

`$h=\frac{{h}_{\text{N}}{D}_{\text{N}}^{1.8}}{{\stackrel{˙}{m}}_{\text{N}}^{0.8}}\frac{{\stackrel{˙}{m}}_{\text{Avg}}^{0.8}}{{D}^{1.8}},$`

where:

• $\stackrel{˙}{m}$N is the value of the Nominal mass flow rate parameter.

• $\stackrel{˙}{m}$Avg is the average mass flow rate:

`${\stackrel{˙}{m}}_{Avg}=\frac{{\stackrel{˙}{m}}_{\text{A}}-{\stackrel{˙}{m}}_{\text{B}}}{2}.$`

• hN is the nominal heat transfer coefficient, which is calculated as:

where:

• SH,N is the nominal wall surface area.

• TH,N is the value of the Nominal wall temperature parameter.

• TIn,N is the value of the Nominal inflow temperature parameter.

• TOut,N is the value of the Nominal outflow temperature parameter.

This relationship is based on the assumption that the Nusselt number is proportional to the Reynolds number:

`$\frac{hD}{k}\propto {\left(\frac{\stackrel{˙}{m}D}{S\mu }\right)}^{0.8}.$`

If the pipe walls are rigid, the expression for the heat transfer coefficient becomes:

`$h=\frac{{h}_{\text{N}}}{{\stackrel{˙}{m}}_{\text{N}}^{0.8}}{\stackrel{˙}{m}}_{Avg}^{0.8}.$`

### Pressure Loss Due to Friction

Haaland Correlation

The analytical Haaland correlation models losses due to wall friction either by aggregate equivalent length, which accounts for resistances due to nonuniformities as an added straight-pipe length that results in equivalent losses, or by local loss coefficient, which directly applies a loss coefficient for pipe nonuniformities.

When the Local resistances specification parameter is set to `Aggregate equivalent length` and the flow in the pipe is lower than the Laminar flow upper Reynolds number limit, the pressure loss over all pipe segments is:

`$\Delta {p}_{f,A}=\frac{\upsilon \lambda }{2{D}^{2}S}\frac{L+{L}_{add}}{2}{\stackrel{˙}{m}}_{A},$`

`$\Delta {p}_{f,B}=\frac{\upsilon \lambda }{2{D}^{2}S}\frac{L+{L}_{add}}{2}{\stackrel{˙}{m}}_{B},$`

where:

• ν is the fluid kinematic viscosity.

• λ is the value of the parameter, which you can define when the Cross-sectional geometry parameter is `Custom` and is otherwise equal to 64.

• D is the pipe hydraulic diameter.

• Ladd is the value of the Aggregate equivalent length of local resistances parameter.

• $\stackrel{˙}{m}$A is the mass flow rate at port A.

• $\stackrel{˙}{m}$B is the mass flow rate at port B.

When the Reynolds number is greater than the Turbulent flow lower Reynolds number limit, the pressure loss in the pipe is:

`$\Delta {p}_{f,A}=\frac{f}{2{\rho }_{I}{S}^{2}}\frac{L+{L}_{add}}{2}{\stackrel{˙}{m}}_{A}|{\stackrel{˙}{m}}_{A}|,$`

`$\Delta {p}_{f,B}=\frac{f}{2{\rho }_{I}{S}^{2}}\frac{L+{L}_{add}}{2}{\stackrel{˙}{m}}_{B}|{\stackrel{˙}{m}}_{B}|,$`

where:

• f is the Darcy friction factor. This is approximated by the empirical Haaland equation and is based on the Surface roughness specification, ε, and pipe hydraulic diameter:

`$f={\left\{-1.8{\mathrm{log}}_{10}\left[\frac{6.9}{\mathrm{Re}}+{\left(\frac{\epsilon }{3.7{D}_{h}}\right)}^{1.11}\right]\right\}}^{-2},$`

Pipe roughness for brass, lead, copper, plastic, steel, wrought iron, and galvanized steel or iron are provided as ASHRAE standard values. You can also supply your own Internal surface absolute roughness with the `Custom` setting.

• ρI is the internal fluid density.

When the Local resistances specification parameter is set to `Local loss coefficient` and the flow in the pipe is lower than the Laminar flow upper Reynolds number limit, the pressure loss over all pipe segments is:

`$\Delta {p}_{f,A}=\frac{\upsilon \lambda }{2{D}^{2}S}\frac{L}{2}{\stackrel{˙}{m}}_{A}.$`

`$\Delta {p}_{f,B}=\frac{\upsilon \lambda }{2{D}^{2}S}\frac{L}{2}{\stackrel{˙}{m}}_{B}.$`

When the Reynolds number is greater than the Turbulent flow lower Reynolds number limit, the pressure loss in the pipe is:

`$\Delta {p}_{f,A}=\left(\frac{f\frac{L}{2}}{D}+{C}_{loss,total}\right)\frac{1}{2{\rho }_{I}{S}^{2}}{\stackrel{˙}{m}}_{A}|{\stackrel{˙}{m}}_{A}|,$`

`$\Delta {p}_{f,B}=\left(\frac{f\frac{L}{2}}{D}+{C}_{loss,total}\right)\frac{1}{2{\rho }_{I}{S}^{2}}{\stackrel{˙}{m}}_{B}|{\stackrel{˙}{m}}_{B}|,$`

where Closs,total is the loss coefficient, which can be defined in the Total local loss coefficient parameter as either a single coefficient or the sum of all loss coefficients along the pipe.

Nominal Pressure Drop vs. Nominal Mass Flow Rate

The Nominal Pressure Drop vs. Nominal Mass Flow Rate parameterization characterizes losses with a loss coefficient for rigid or flexible walls. When the fluid is incompressible, the pressure loss over the entire pipe due to wall friction is:

`$\Delta {p}_{f,A}={K}_{p}{\stackrel{˙}{m}}_{A}\sqrt{{\stackrel{˙}{m}}_{A}^{2}+{\stackrel{˙}{m}}_{th}^{2}},$`

where Kp is:

`${K}_{p}=\frac{\Delta {p}_{N}}{{\stackrel{˙}{m}}_{N}^{2}},$`

where:

• ΔpN is the Nominal pressure drop, which can be defined either as a scalar or a vector.

• ${\stackrel{˙}{m}}_{N}$ is the Nominal mass flow rate, which can be defined either as a scalar or a vector.

When the you supply the Nominal pressure drop and Nominal mass flow rate parameters as vectors, the scalar value Kp is determined from a least-squares fit of the vector elements.

Tabulated Data – Darcy Friction Factor vs. Reynolds Number

Pressure losses due to viscous friction can also be determined from user-provided tabulated data of the Darcy friction factor vector and the Reynolds number vector for turbulent Darcy friction factor parameters. Linear interpolation is employed between data points.

### Momentum Balance

The pressure differential over the pipe is due to the pressure at the pipe ports, friction at the pipe walls, and hydrostatic changes due to any change in elevation:

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

where:

• pA is the pressure at a port A.

• pB is the pressure at a port B.

• Δpf is the pressure differential due to viscous friction, Δpf,A+Δpf,B.

• g is the value of the Gravitational acceleration parameter or the signal at port G.

• Δz the elevation differential between port A and port B, or zA - zB.

• ρI is the internal fluid density, which is measured at each pipe segment. If fluid dynamic compressibility is not modeled, this is:

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

When fluid inertia is not modeled, the momentum balance between port A and internal node I is:

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

When fluid inertia is not modeled, the momentum balance between port B and internal node I is:

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

When fluid inertia is modeled, the momentum balance between port A and internal node I is:

`${p}_{\text{A}}-{p}_{\text{I}}=\Delta {p}_{f,A}+{\rho }_{\text{I}}g\frac{\Delta z}{2}+\frac{{\stackrel{¨}{m}}_{\text{A}}}{S}\frac{L}{2},$`

where:

• $\stackrel{¨}{m}$A is the fluid inertia at port A.

• L is the value of the Pipe length parameter.

• S is the value of the Nominal cross-sectional area parameter.

When fluid inertia is modeled, the momentum balance between port B and internal node I is:

`${p}_{\text{B}}-{p}_{\text{I}}=\Delta {p}_{f,B}-{\rho }_{\text{I}}g\frac{\Delta z}{2}+\frac{{\stackrel{¨}{m}}_{\text{B}}}{S}\frac{L}{2},$`

where

$\stackrel{¨}{m}$B is the fluid inertia at port B.

### Pipe Discretization

You can divide the pipe into multiple segments. If a pipe has more than one segment, the mass flow, energy flow, and momentum balance equations are calculated for each segment. Having multiple pipe segments can allow you to track changes to variables such as fluid density when fluid dynamic compressibility is modeled.

If you would like to capture specific phenomena in your application, such as water hammer, choose a number of segments that provides sufficient resolution of the transient. The following formula, from the Nyquist sampling theorem, provides a rule of thumb for pipe discretization into a minimum of N segments:

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

where:

• L is the Pipe length.

• f is the transient frequency.

• c is the speed of sound.

For some applications, you may need to connect Pipe (TL) blocks in series. For example, you may require multiple pipe segments to define a thermal boundary condition along the length of a pipe. In this case, model the pipe segments by using a Pipe (TL) block for each segment and use the thermal ports to set the thermal boundary condition.

### Mass Balance

For a rigid pipe with an incompressible fluid, the pipe mass conversation equation is:

`${\stackrel{˙}{m}}_{\text{A}}+{\stackrel{˙}{m}}_{\text{B}}=0,$`

where:

• $\stackrel{˙}{m}$A is the mass flow rate at port A.

• $\stackrel{˙}{m}$B is the mass flow rate at port B.

For a flexible pipe with an incompressible fluid, the pipe mass conservation equation is:

`${\stackrel{˙}{m}}_{\text{A}}+{\stackrel{˙}{m}}_{\text{B}}={\rho }_{\text{I}}\stackrel{˙}{V},$`

where:

• ρI is the thermal liquid density at internal node I. Each pipe segment has an internal node.

• $\stackrel{˙}{V}$ is the rate of deformation of the pipe volume.

For a flexible pipe with a compressible fluid, the mass within the pipe can change with pressure and temperature. The bulk modulus and thermal expansion coefficient of the thermal liquid account for this dependence and the pipe mass conservation equation is:

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

where:

• pI is the thermal liquid pressure at the internal node I.

• $\stackrel{˙}{T}$I is the rate of change of the thermal liquid temperature at the internal node I.

• βI is the thermal liquid bulk modulus.

• αI is the liquid thermal expansion coefficient.

### Energy Balance

The energy accumulation rate in the pipe at internal node I is defined as:

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

where:

• ϕA is the energy flow rate at port A.

• ϕB is the energy flow rate at port B.

• QH is the heat transfer through the pipe wall.

If the fluid is incompressible, the expression for energy accumulation rate is

`$\stackrel{˙}{E}={\rho }_{\text{I}}{c}_{{p}_{I}}V\frac{d{T}_{I}}{dt},$`

where:

• cpI is the fluid specific heat at the internal node of the block.

• V is the pipe volume.

If the fluid is compressible, the expression for energy accumulation rate is

`$\stackrel{˙}{E}={\frac{\partial \left({\rho }_{\text{I}}{u}_{I}\right)}{\partial p}|}_{T}\frac{d{p}_{I}}{dt}V+{\frac{\partial \left({\rho }_{\text{I}}{u}_{I}\right)}{\partial T}|}_{p}\frac{d{T}_{I}}{dt}V,$`

where:

`$\begin{array}{l}{\frac{\partial \left({\rho }_{\text{I}}{u}_{I}\right)}{\partial p}|}_{T}=\left(\frac{{\rho }_{I}{h}_{I}}{{\beta }_{I}}-{T}_{I}{\alpha }_{I}\right)V\\ {\frac{\partial \left({\rho }_{\text{I}}{u}_{I}\right)}{\partial T}|}_{p}=\left({c}_{{p}_{I}}-{h}_{I}{\alpha }_{I}\right)V\end{array}$`

and hI is the specific enthalpy at the internal node of the block.

If the fluid is compressible and the pipe walls are flexible, the expression for energy accumulation rate is

`$\stackrel{˙}{E}={\frac{\partial \left({\rho }_{\text{I}}{u}_{I}\right)}{\partial p}|}_{T}\frac{d{p}_{I}}{dt}V+{\frac{\partial \left({\rho }_{\text{I}}{u}_{I}\right)}{\partial T}|}_{p}\frac{d{T}_{I}}{dt}V+{\rho }_{\text{I}}{h}_{I}\frac{dV}{dt}.$`

## Ports

### Input

expand all

Variable elevation differential between port A and B, specified as a physical signal. The block bounds the signal value at EL between -L and L, where L is the value of the parameter.

#### Dependencies

To enable this port, set Elevation gain specification to `Variable`.

Variable gravitational acceleration, specified as a physical signal.

#### Dependencies

To enable this port, set Gravitational acceleration specification to `Variable`.

### Conserving

expand all

Liquid entry or exit port to the pipe.

Liquid entry or exit port to the pipe.

Pipe wall temperature.

## Parameters

expand all

### Configuration

Whether to model any change in fluid density due to fluid compressibility. When you select Fluid compressibility, changes due to the mass flow rate into the block are calculated in addition to density changes due to changes in pressure.

Whether to account for acceleration in the mass flow rate due to the mass of the fluid.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility.

Number of pipe divisions. Each division represents an individual segment over which pressure is calculated, depending on the pipe inlet pressure, fluid compressibility, and wall flexibility, if applicable. The fluid volume in each segment remains fixed.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility.

Total pipe length across all pipe segments.

Cross-sectional pipe geometry. A nominal hydraulic diameter and nominal cross-sectional area is calculated based on the cross-sectional geometry.

Diameter for circular cross-sectional pipes.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Circular`.

Inner diameter for annular pipe flow, or flow between two concentric pipes.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Annular`.

Outer diameter for annular pipe flow, or flow between two concentric pipes.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Annular`.

Width of rectangular pipe.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Rectangular`.

Height of rectangular pipe.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Rectangular`.

Major axis for elliptical pipes.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Elliptical`.

Minor axis for elliptical pipes.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Elliptical`.

Length of the two equal sides of isosceles-triangular pipes.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to ```Isosceles triangular```.

Vertex angle for triangular pipes. The value must be less than 180 degrees.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to ```Isosceles triangular```.

Cross-sectional area of the pipe without deformations.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Custom`.

Effective diameter used in heat transfer, momentum balance, and pipe flexibility equations. For noncircular pipes, the hydraulic diameter is the effective diameter of the fluid in the pipe. For circular pipes, the hydraulic diameter and pipe diameter are the same.

#### Dependencies

To enable this parameter, either:

• Clear the Fluid dynamic compressibility check box and set Cross-sectional geometry to `Custom`.

• Select Fluid dynamic compressibility, set the Pipe wall specification parameter to `Rigid` and set Cross-sectional geometry to `Custom`.

Set the pipe elevation as either `Constant` or `Variable`. Selecting `Variable` exposes the physical signal port EL.

Elevation differential for constant-elevation pipes.

#### Dependencies

To enable this parameter, set Elevation gain specification to `Constant`.

Whether the gravitational acceleration is constant or variable.

Constant of the gravitational acceleration at the mean elevation of the pipe.

#### Dependencies

To enable this parameter, set Gravitational acceleration specification to `Constant`.

### Viscous Friction

Parameterization of pressure losses due to wall friction. Both analytical and tabular formulations are available.

Method for quantifying pressure losses due to pipe nonuniformities.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Haaland correlation```.

Loss coefficient associated with each pipe nonuniformity. You can input a single loss coefficient or the sum of all loss coefficients along the pipe.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Haaland correlation``` and Local resistance specifications to ```Local loss coefficient```.

Length of pipe that would produce the equivalent hydraulic losses as would a pipe with bends, area changes, or other nonuniformities. The effective length of the pipe is the sum of the Pipe length and the Aggregate equivalent length of local resistances.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Haaland correlation``` and Local resistances specification to ```Aggregate equivalent length```.

Absolute surface roughness based on pipe material. The provided values are ASHRAE standard roughness values. You can also input your own value by setting Surface roughness specification to `Custom`.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Haaland correlation```.

Pipe wall absolute roughness. This parameter is used to determine the Darcy friction factor, which contributes to pressure loss in the pipe.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Haaland correlation``` and Surface roughness specification `Custom`.

Friction constant for laminar flows. The Darcy friction factor captures the contribution of wall friction in pressure loss calculations. If Cross-sectional geometry is not set to `Custom`, this parameter is internally set to 64.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Custom`.

Reynolds number below which the flow is laminar. Above this threshold, the flow transitions to turbulent, reaching the turbulent regime at the Turbulent flow lower Reynolds number limit setting.

Reynolds number above which the flow is turbulent. Below this threshold, the flow gradually transitions to laminar, reaching the laminar regime at the Laminar flow upper Reynolds number limit setting.

Pipe nominal mass flow rate used to calculate the pressure loss coefficient, specified as a scalar or a vector. All nominal values must be greater than 0 and have the same number of elements as the Nominal pressure drop parameter. When this parameter is supplied as a vector, the scalar value Kp is determined as a least-squares fit of the vector elements.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Nominal pressure drop vs. nominal mass flow rate```.

Pipe nominal pressure drop used to calculate the pressure loss coefficient, specified as a scalar or a vector. All nominal values must be greater than 0 and have the same number of elements as the Nominal mass flow rate parameter. When this parameter is supplied as a vector, the scalar value Kp is determined as a least-squares fit of the vector elements.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Nominal pressure drop vs. nominal mass flow rate```.

Mass flow rate threshold for reversed flow. A transition region is defined around 0 kg/s between the positive and negative values of the mass flow rate threshold. Within this transition region, numerical smoothing is applied to the flow response. The threshold value must be greater than 0.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Nominal pressure drop vs. nominal mass flow rate```.

Vector of Reynolds numbers for the tabular parameterization of the Darcy friction factor. The vector elements form an independent axis with the Darcy friction factor vector parameter. The vector elements must be listed in ascending order and must be greater than 0.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Tabulated data - Darcy friction factor vs. Reynolds number```.

Vector of Darcy friction factors for the tabular parameterization of the Darcy friction factor. The vector elements must correspond one-to-one with the elements in the Reynolds number vector for turbulent Darcy friction factor parameter, and must be unique and greater than or equal to 0.

#### Dependencies

To enable this parameter, set Viscous friction parameterization to ```Tabulated data - Darcy friction factor vs. Reynolds number```.

### Pipe Wall

Wall flexibility of the pipe. This parameter is independent of pipe cross-sectional geometry. The `Flexible` setting preserves the initial pipe shape and applies equal expansion of the cross-sectional area. The `Flexible` setting may not be accurate for non-circular cross-sectional geometry under high deformation.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility.

Linear expansion correlation. The settings correlate the new cross-sectional area or hydraulic diameter to the pipe pressure.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility and set Pipe wall specification to `Flexible`.

Coefficient for calculating pipe deformation. The block multiplies the value of this parameter by the pressure differential between the segment pressure and atmospheric pressure.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and set Volumetric expansion specification to ```Cross-sectional area vs. pressure```.

Vector that contains the gauge pressures. The block uses this vector in a table lookup to calculate the pipe cross-sectional area. The vector entries must be strictly positive and monotonically increasing and the vector must be the same length as the Cross sectional area gain vector parameter.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and set Volumetric expansion specification to ```Cross-sectional area vs. pressure - Tabulated```.

Vector that contains the pipe cross-sectional areas. The block uses this vector in a table lookup to calculate the pipe cross sectional-area at other pressures. The vector entries must be strictly positive and monotonically increasing and the vector must be the same length as the Static gauge pressure vector parameter.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and set Volumetric expansion specification to ```Cross-sectional area vs. pressure - Tabulated```.

Coefficient for calculating the pipe deformation. The block multiplies the value of this parameter by the pressure differential between the segment pressure and atmospheric pressure.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and set Volumetric expansion specification to ```Hydraulic diameter vs. pressure```.

Method the block uses to calculate the material behavior.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and set Volumetric expansion specification to `Based on material properties`.

Thickness of the pipe wall. The block uses this value to calculate stress.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and set Volumetric expansion specification to `Based on material properties`.

Young's modulus of the material that makes up the pipe wall.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, and set Pipe wall specification to `Flexible`, Volumetric expansion specification to `Based on material properties`, and Material behavior to ```Linear Elastic```.

Poisson's ratio of the material that makes up the pipe wall.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and set Volumetric expansion specification to `Based on material properties`.

Vector containing the stress values for the material that makes up the pipe wall.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility and set Pipe wall specification to `Flexible`, Volumetric expansion specification to `Based on material properties`, and Material behavior to `Multilinear Elastic`.

Vector containing the strain values for the material that makes up the pipe wall.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility and set Pipe wall specification to `Flexible`, Volumetric expansion specification to `Based on material properties`, and Material behavior to `Multilinear Elastic`.

Whether the block does nothing, generates a warning, or generates an error when the stress is above the maximum stress specified by the Maximum allowable stress parameter.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility and set Pipe wall specification to `Flexible`, Volumetric expansion specification to `Based on material properties`, and Material behavior to `Multilinear Elastic`.

Maximum stress the block allows on the pipe wall. Control what the block does if the stress exceeds this value with the Check if stress exceeds specified allowable level parameter.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility and set Pipe wall specification to `Flexible`, Volumetric expansion specification to `Based on material properties`, Material behavior to `Multilinear Elastic` and Check if stress exceeds specified allowable level to `Warning` or `Error`.

Time required for the wall to reach steady-state after pipe deformation. This parameter impacts the dynamic change in pipe volume.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility and set Pipe wall specification to `Flexible`.

Whether to account for expansion in the pipe due to temperature changes.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility and set Pipe wall specification to `Flexible`.

Coefficient of linear thermal expansion for the pipe material. This value is the fractional change in size per degree change in temperature at a constant pressure.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and select Pipe thermal expansion.

Reference temperature the block uses when calculating the thermal expansion of the pipe.

#### Dependencies

To enable this parameter, select Fluid dynamic compressibility, set Pipe wall specification to `Flexible`, and select Pipe thermal expansion.

### Heat Transfer

Method of calculating the heat transfer coefficient between the fluid and the pipe wall. Analytical and tabulated data parameterizations are available.

Ratio of convective to conductive heat transfer in the laminar flow regime. The fluid Nusselt number influences the heat transfer rate.

#### Dependencies

To enable this parameter, set Cross-sectional geometry to `Custom` and set Heat transfer parameterization to either:

• ```Gnielinski correlation```.

• ```Nominal temperature differential vs. nominal mass flow rate```.

• ```Dittus-Boelter correlation```.

Pipe nominal mass flow rate used to calculate the heat transfer coefficient, specified as a scalar or a vector. All nominal values must be greater than 0 and have the same number of elements as the Nominal inflow temperature parameter. When this parameter is supplied as a vector, the scalar value hp is determined as a least-squares fit of the vector elements.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Nominal temperature differential vs. nominal mass flow rate```.

Nominal fluid inlet temperature used to calculate the heat transfer coefficient, specified as a scalar or a vector. All nominal values must be greater than 0 and have the same number of elements as the Nominal mass flow rate parameter. When this parameter is supplied as a vector, the scalar value h is determined as a least-squares fit of the vector elements.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Nominal temperature differential vs. nominal mass flow rate```.

Nominal fluid outlet temperature used to calculate the heat transfer coefficient, specified as a scalar or a vector. All nominal values must be greater than 0 and have the same number of elements as the Nominal mass flow rate parameter. When this parameter is supplied as a vector, the scalar value h is determined as a least-squares fit of the vector elements.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Nominal temperature differential vs. nominal mass flow rate```.

Nominal fluid inlet pressure used to calculate the heat transfer coefficient, specified as a scalar or a vector. All nominal values must be greater than 0 and have the same number of elements as the Nominal mass flow rate parameter. When this parameter is supplied as a vector, the scalar value h is determined as a least-squares fit of the vector elements.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Nominal temperature differential vs. nominal mass flow rate```.

Pipe wall temperature used to calculate the heat transfer coefficient, specified as a scalar or a vector. All nominal values must be greater than 0 and have the same number of elements as the Nominal mass flow rate parameter. When this parameter is supplied as a vector, the scalar value h is determined as a least-squares fit of the vector elements.

#### Dependencies

To enable this temperature, set Heat transfer parameterization to ```Nominal temperature differential vs. nominal mass flow rate```.

Empirical constant a to use in the Dittus-Boelter correlation. The correlation relates the Nusselt number in turbulent flows to the heat transfer coefficient.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Dittus-Boelter correlation```.

Empirical constant b to use in the Dittus-Boelter correlation. The correlation relates the Nusselt number in turbulent flows to the heat transfer coefficient.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Dittus-Boelter correlation```.

Empirical constant c to use in the Dittus-Boelter correlation. The correlation relates the Nusselt number in turbulent flows to the heat transfer coefficient. The default value reflects heat transfer to the fluid.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Dittus-Boelter correlation```.

Vector of Reynolds numbers for the tabular parameterization of the Colburn factor. The vector elements form an independent axis with the Colburn factor vector parameter. The vector elements must be listed in ascending order and must be greater than 0. This parameter must have the same number of elements as the Colburn factor vector. For reversed flows, or flows from B to A, the same data is applied in the opposite direction.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Tabulated data - Colburn factor vs. Reynolds number```.

Vector of Colbrun factors for the tabular parameterization of the Colburn factor. The vector elements form an independent axis with the Reynolds number vector for Colburn factor parameter. This parameter must have the same number of elements as the Reynolds number vector for Colburn factor.

#### Dependencies

This parameter is active when the Heat transfer parameterization block parameter is set to ```Tabulated data - Colburn factor vs. Reynolds number```.

Vector of Reynolds numbers for the tabular parameterization of Nusselt number. This vector forms an independent axis with the Prandtl number vector for Nusselt number parameter for the 2-D dependent Nusselt number table. The vector elements must be listed in ascending order and must be greater than 0.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Tabulated data - Nusselt number vs. Reynolds number & Prandtl number```.

Vector of Prandtl numbers for the tabular parameterization of Nusselt number. This vector forms an independent axis with the Reynolds number vector for Nusselt number parameter for the 2-D dependent Nusselt number table. The vector elements must be listed in ascending order.

#### Dependencies

To enable this parameter, set Heat transfer parameterization to ```Tabulated data - Nusselt number vs. Reynolds number & Prandtl number```.

M-by-N matrix of Nusselt numbers at the specified Reynolds and Prandtl numbers. Linear interpolation is employed between table elements. M and N are the sizes of the corresponding vectors:

• M is the number of vector elements in the Reynolds number vector for Nusselt number parameter.

• N is the number of vector elements in the parameter.

#### Dependencies

To enable this parameter, Heat transfer parameterization to ```Tabulated data - Nusselt number vs. Reynolds number & Prandtl number```.

### Initial Conditions

Liquid temperature at the start of the simulation, specified as a scalar or vector. A vector n elements long defines the liquid temperature for each of n pipe segments. If the vector is two elements long, the temperature along the pipe is linearly distributed between the two element values. If the vector is three or more elements long, the initial temperature in the nth segment is set by the nth element of the vector.

Absolute liquid pressure at the start of the simulation, specified as a scalar or vector. A vector n elements long defines the liquid pressure for each of n pipe segments. If the vector is two elements long, the pressure along the pipe is linearly distributed between the two element values. If the vector is three or more elements long, the initial pressure in the nth segment is set by the nth element of the vector.

## References

[1] Budynas R. G. Nisbett J. K. & Shigley J. E. (2004). Shigley's mechanical engineering design (7th ed.). McGraw-Hill.

[2] Cengel, Y.A. Heat and Mass Transfer: A Practical Approach (3rd edition). New York, McGraw-Hill, 2007

[3] Ju Frederick D., Butler Thomas A., Review of Proposed Failure Criteria for Ductile Materials (1984) Los Alamos National Laboratory.

[4] Hencky H (1924) Zur Theorie plastischer Deformationen und der hierdurch im Material hervorgerufenen Nachspannungen. Z Angew Math Mech 4:323–335

[5] Jahed H, “A Variable Material Property Approach for Elastic-Plastic Analysis of Proportional and Non-proportional Loading, (1997) University of Waterloo

## Version History

Introduced in R2016a

expand all