packageFitting

Functions for pipe fitting

Extends from Modelica.Icons.UtilitiesPackage (Icon for utility packages).

Information

Fitting

The functions for defining the pressure drop in various pipe fittings are described here. Due to different constrictions in the pipes, it is of interest to define losses in these fittings. This can be done based on friction pressure drop which can be calculated as:

$$ \Delta p_\mathrm{f} = \frac{1}{2}\varphi\rho v|v| $$

Here, the dimensionless factor φ is the generalized friction factor. For a long, straight pipe, φ = fD L/D.

Types of Fittings

Pressure drop equations are provided for different types of constrictions:

Square Reduction/Expansion Fittings

Square reduction Square expansion

Tapered Reduction/Expansion Fittings

Tapered reduction Tapered expansion

Rounded Reduction/Expansion Fittings

Rounded reduction Rounded expansion

Sharp/Thick Orifice Fittings

Sharp orifice Thick orifice

Implementation

Based on the presented equations for the calculation of the dimensionless factor φ in various fittings, a set of functions is encoded in the Fitting package, such as:

  • SquareReduction
  • SquareExpansion
  • TaperedReduction
  • TaperedExpansion
  • RoundedReduction
  • SharpOrifice
  • ThickOrifice

All these functions receive the Reynolds number NRe, diameters of first and second pipes D1 and D2, and the pipe roughness height ε. Then, based on the appropriate equations, these functions provide value for the dimensionless factor φ.

Example Code

An example of Modelica code for the SquareReduction function:

function SquareReduction
  input Modelica.SIunits.ReynoldsNumber N_Re "Reynolds number";
  input Modelica.SIunits.Height eps "Pipe roughness height";
  input Modelica.SIunits.Diameter D_i, D_o "Pipe diameters";
  output Real phi;
protected
  Real f_D "friction factor";
algorithm
  f_D := Functions.DarcyFriction.fDarcy(N_Re, D_1, eps);
  if N_Re < 2500 then
    phi := (1.2 + 160 / N_Re) * ((D_i / D_o) ^ 4 - 1);
  else
    phi := (0.6 + 0.48 * f_D) * (D_i / D_o) ^ 2 * ((D_i / D_o) ^ 2 - 1);
  end if;
end SquareReduction;

Another function, FittingPhi, calls the specific fitting functions based on a FittingType parameter to provide the dimensionless factor φ for any fitting type.

Contents

NameDescription
FittingPhiCalculates the dimension factor phi based in the fitting type
FittingVariantsSelection of functions for the available fitting variants