WOLFRAM NOTEBOOK

Part 2—Pipe Example

This is part 2 of a 5 part series on modeling a fluid circuit using the Modelica Fluid library. Please go through the previous part, if you have not done it already:
In this post, we will model transport of fluid through a pipe. Using this model we will compare pipes of different materials and understand effect of dimensions of a pipe.
Model to determine the pressure difference across a pipe.

Steps

  • Create a new model
  • Drag the following components from the Modelica standard library:
  • Fluid.Sources.MassFlowSource_T: Generates fluid flow at a constant mass flow rate
  • Fluid.System
  • Fluid.Sources.FixedBoundary
  • Fluid.Pipes.StaticPipe
  • Define the parameters of the pipe:
  • Medium (This parameter cannot be left blank)
  • Select a fluid from the drop-down. Eg: “Extension of the standard water package”
  • length
  • Total length of the pipe
  • isCircular
  • You can chose between circular and non-circular
  • If isCircular is set to false then crossArea and perimeter parameter have to be defined. Note that it is assumed that the cross-sectional area is constant throughout the length.
  • diameter
  • Diameter of the circular pipe
  • roughness
  • Roughness of the inner pipe surface
  • This is a pipe material property, so common materials and their roughness values are listed below:
  • PVC: 0.0015—0.007 mm
  • Stainless steel: 0.001—0.006 mm
  • Ordinary concrete: 0.3-1 mm
  • Data was taken from this reference: https://www.engineeringtoolbox.com/surface-roughness-ventilation-ducts-d_209.html
  • height_ab
  • Difference in height between the outlet (port_b) and inlet (port_a). Check the arrow direction of the pipe to determine inlet and outlet.
  • Define the parameters of the boundary (mass flow source):
  • Medium
  • Select a fluid from the drop-down. Eg: “Extension of the standard water package”
  • nPorts
  • As the boundary is only connected to the pipe, set this value to 1
  • m_flow
  • Provide a value for the mass flow rate
  • Define the parameters of the ambient:
  • Medium
  • Select a fluid from the drop-down. Eg: “Extension of the standard water package”
  • nPorts
  • As the ambient is only connected to the pipe, set this value to 1
  • Connect the components:
  • Provide a simulation time in the Experiment Setup and simulate:
  • Plot the pressure drop across the pipe
  • Pressure drop across the pipe can be obtained from the following variable: pipe.flowModel.dps_fg[1]
  • Comparing pipes of different materials
  • If all the dimensions are kept the same, then the only difference between the pipes is the internal roughness value. Rerun the experiment with the following pipe.roughness values and compare the pressure drop.
  • PVC: 0.0015 mm
    Stainless steel: 0.001 mm
    Ordinary concrete: 0.3 mm
  • PVC and Stainless steel pipes have the similar pressure drop, while the pressure drop across the concrete pipe is considerably more (45 % more in our example). This means it will need more energy (less efficient) to transport fluid using a concrete pipe.
  • Comparing pipes of different diameters
  • Let’s compare 2 PVC pipes (roughness = 0.0015 mm) of diameter 0.127 m (5 inch) and 0.254 m (10 inch)
  • Rerun the experiment with the above two diameters and compare the pressure drop.
  • Doubling the pipe diameter lead to the reduction of pressured drop by 96%. So it is more energy efficient to transport fluid in a higher diameter pipe.
  • In this post, we saw how we can use the pipe component to automatically calculate pressure drop due to friction. In the next post, we will learn how to model a pump using the power characteristics, flow characteristics and head characteristics.
    Other posts in this series can be found here:
    Wolfram Cloud

    You are using a browser not supported by the Wolfram Cloud

    Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


    I understand and wish to continue anyway »

    You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.