Pipe Example
Drag-in Components | Define Ambient Parameters |
Define Pipe Parameters | Connect and Simulate |
Define Boundary Parameters | Analyze |
In this part, transport of fluid through a pipe is modeled. Using this model, you will compare pipes of different materials and understand effect of the dimensions of a pipe.
Model to determine the pressure difference across a pipe.
Drag-in Components
Create a new model and drag the following components from the Modelica standard library:
- MassFlowSource_T: Generates fluid flow at a constant mass flow rate. Rename it as boundary.
- FixedBoundary: Rename it as ambient.
Define Pipe Parameters
Medium (This parameter cannot be left blank.) Select a fluid from the drop-down menu, e.g. “Extension of the StandardWater package.”
Length: Total length of the pipe
isCircular: You can choose between circular and non-circular. If isCircular is set to false, then crossArea and perimeter parameters 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:
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 Boundary Parameters
nPorts: As the boundary is only connected to the pipe, set this value to 1.
Medium: Select a fluid from the drop-down menu, e.g. “Extension of the StandardWater package.”
m_flow: Provide a value for the mass flow rate.
Define Ambient Parameters
nPorts: As the ambient is only connected to the pipe, set this value to 1.
Medium: Select a fluid from the drop-down menu, e.g. “Extension of the StandardWater package.”
Connect and Simulate
Provide a simulation time in the Experiment Setup and simulate:
Analyze
Compare Pipes of Different Materials
Plot the pressure drop across the pipe. Pressure drop across the pipe can be obtained from the following variable: pipe.flowModel.dps_fg[1]:
If all the dimensions are kept the same, then the only difference between the pipes is the internal roughness value. Duplicate the experiment and rerun it with the following pipe.roughness values and compare the pressure drop:
PVC and stainless steel pipes have a similar pressure drop, while the pressure drop across the concrete pipe is considerably more (45 % more in this example). This means it will need more energy (less efficient) to transport fluid using a concrete pipe.
Compare Pipes of Different Sizes
Compare two PVC pipes (roughness = 0.0015 mm) of diameter 0.127 m (5 inch) and 0.254 m (10 inch). Duplicate the experiment and rerun it with the above two diameters and compare the pressure drop.
Doubling the pipe diameter leads to the reduction of pressure drop by 96%. So it is more energy efficient to transport fluid in a higher-diameter pipe.