Laminar Pipe Flow Example
Learning Outcome
Students would be able to simulate a fully developed flow in a circular pipe with axisymmetric and periodic boundary conditions.
Introduction
Flow in a circular pipe is a classic problem in fluid mechanics. In this example, fully developed flow in a circular pipe is simulated. Because the flow is axisymmetric at the center of the flow cross-section, the model can be simplified by using axisymmetric boundary condition at the centerline. In addition, the entrance effect is excluded using periodic boundary conditions at inlet and outlet surfaces.
Building Geometry (Step 1)
To begin with, the geometry of the fluid domain needs to be created. Right-click on the 3D-CAD Models and select “New” to start building a CAD model.
Create a sketch by right-clicking on the XY plane and select “Create Sketch”.
For our convenience, we will set the grid spacing of the sketch to 10 mm.
Draw a rectangle that starts from the origin and right-click to apply the fixation constraint at the sketch origin so that the location of the bottom left corner of the rectangle will be fixed.
Right-click on the lines and select “Apply Length Dimension” to specify the length.
Set the length to 3 m in x-direction and 0.1 m in y-direction.
Click “ok” to exit the sketch.
Extrude the sketch with the thickness of 10 mm. The thickness can be arbitrary since the simulation is only two-dimensional.
The extruded geometry is the shaded area shown in the figure.
Close 3D-CAD and go back to the main panel.
Rename the body in the 3D-CAD to “Fluid”.
Topology (Step 2)
In the topology, the flow domain and the boundary faces would be determined in this step. Right-click on the Fluid and select “New Geometry part” and click ok to agree with the default settings.
Create a geometry scene from the toolbar.
Rename “Body1” to “Fluid” and expand the “Surfaces” under the fluid. Right-click on “Default” and select “Split by Patch”. Be sure you have created the geometry scene before you execute this command.
Name each boundary by selecting the surface from the numbers or from the geometry scene. Set the surface that lies on the xy-plane as “Domain”.
Right-click on “Fluid” in “Parts” and select “Badge for 2D Meshing” and click ok.
Right-click on “Badge for 2D Meshing” and select “Execute”. The flow domain will now be converted to 2D. The solid icon under the “Surfaces” represents the flow domain and the empty icon represents the boundary. The “Default” surface will not be used in the future simulation.
Assigned parts to regions and make a change on the boundary option. A “Region” would be created under “Region” folder. Rename the “Region” under to “Fluid”.
Before simulation, the flow domain needs to be discretized, and this step is also called meshing. We can do it by creating the mesh from “Fluid” under “Parts”. Use “Automated mesh” instead of “Automated mesh (2D)”.
Select “Surface Remesher” and “Trimmed Cell Mesher” as the meshing models.
“Automated Mesh” will be created under “Operations”.
Base size = 0.1 m (radius)
Target Surface Size = 5 (%)
Minimum Surface size = 5 (%)
Click on the icon in the toolbar to generate the mesh.
The final mesh can be visualized in the mesh scene.
Physics Models and Boundary Conditions (Step 4)
In this section, physics models for the simulation and the boundary conditions would be determined. To enable the required physics models, double click on “Models” under “Continua” and deactivate “Two Dimensional” and select the following models in the order of:
- Axisymmetric
- Steady
- Gas
- Segregated flow
- Constant density
- Laminar
After finishing the selection of physics models, change the air density and dynamic viscosity to 1 kg/m3 and 2×10-3, respectively.
The boundary conditions need to be specified in each surface. The default settings of all the boundaries would be wall, so we have to change them accordingly. In order to simulate the fully developed flow, the inlet and outlet boundaries have to be specified as periodic boundaries. Select Fluid.Inlet and use ctrl to select Fluid.Outlet and right-click to select “Create Interface”.
Change the type of the interface to “Fully Developed Interface” and the topology to “Periodic”.
Changed the “Fully Developed Flow Option” to “Mass Flow Rate”.
Specify the mass flow rate under “Physics Values”. With the velocity of 1 m/s, the mass flow rate under axisymmetric condition can be calculated as follows:
where ρ is the density, vm is the mean velocity, and A is the flow area.
The Reynolds number for this exercise can be achieved as
where μ is the dynamic viscosity.
To get a better convergence for periodic boundary condition, go to “Solvers” and change the “Under-Relaxation Factor” of velocity and pressure to 0.9 and 0.1, respectively.
At the axis boundary, change the type of the boundary to “Axis”.
Leave the wall boundary as default.
Preparing Simulation (Step 5)
Further action is required to make this video accessible
The below criteria must be satisfied:
- Affirm Accessibility must be checked AND
- Kaltura or embed is selected, or YouTube or Vimeo is selected and a title is entered.
The video will not display on the live site until the issue above is resolved.
In this step, we will set up the scenes and monitors. This will allow us to check the results while running and after the simulation is finished. To visualize the velocity contour, create a scalar scene from the tool bar.
In the scalar scene, right-click on the legend and select velocity magnitude function.
The velocity vector can be seen in the vector scene.
Before running the simulation, the stopping criteria needs to be set. The maximum step of the “Stopping Criteria” can be set to 5000 so that the number of iterations would not exceed this value.
Right-click on “Stopping Criteria” and create new criterion from monitor.
Choose continuity in the list. After that, set the “Logical Rule” to “And” and set the minimum limit for “Continuity Criterion” to 1E-6.
Repeat the previous steps and create other three monitors for “X-momentum”, and “Y-momentum”. Set the “Logical Rule” to “And”. Set the minimum limit for these criteria to 1E-6 as well.
From the settings in the stopping criteria, the simulation will stop when the maximum iteration step is reached or all of the residuals are below 10-6. Before running the simulation, initial values should be given. Go to “Initial Condition” and set the intial velocity as [1.0, 0.0], which is the same as the velocity for periodic boundary condition. Then select the icon in tool bar and initialize the solution.
Click run to start the calculation.
Post Processing (Step 6)
Further action is required to make this video accessible
The below criteria must be satisfied:
- Affirm Accessibility must be checked AND
- Kaltura or embed is selected, or YouTube or Vimeo is selected and a title is entered.
The video will not display on the live site until the issue above is resolved.
Post processing is rather important because we need to examine the result and further analyze it. After finishing the simulation, check the residual plot and see if all the converging criteria are satisfied.
The velocity contour would be shown in the scalar scene.
To include the boundary velocity (velocity at the wall) in the contour, change the contour style to “Smooth Filled”. The range of the legend would become 0 m/s to 1.9918 m/s.
The velocity vector can be shown in the vector scene.
To check the velocity at the inlet and outlet, right-click on “Report” and select “Surface Average”.
Under the newly created “Surface Average 1”, assigned velocity magnitude to “Field Function” and assigned Fluid.Inlet [Interface 1] and Fluid.Outlet [Interface 1] to “Parts”.
Double click on “Surface Average 1” than you can get the mean velocity at inlet and outlet.
For further examination, we can create a line probe and see how the velocity varies in the radial direction. Right-click on “Derived Parts” and create a line from the menu. Set the coordinate of point 1 and point 2 to (3 m, 0 m, 0 m) and (3 m, 0.1 m, 0 m), respectively. Select “No Displayer”.
Right-click on “Plot” and create a XY plot.
Create a new XY Plot and assign the “Line Probe” to the parts in the plot properties.
Assign x-axis to left axis and change the “Vector Quantity” of x-axis to (0, 1, 0). Likewise, assign y-axis to bottom axis. Also click on “Smooth Values”.
Expand “Y Types” and select velocity magnitude in the scalar function for velocity profile.
The final velocity profile will show in the plot.
To obtain the average pressure at the inlet and outlet, right-click on “Report” and select “Surface Average”.
Under the newly created “Surface Average 2”, assigned static pressure to “Field Function” and assigned Fluid.Inlet [Interface 1] and Fluid.Outlet [Interface 1] to “Parts”.
Double click on “Surface Average 2” than you can get the average pressure at inlet and outlet.
The pressure drop between inlet and outlet can be expressed as
where
ΔP is the pressure drop, f is the Darcy friction factor, L is the simulated pipe length, D is the pipe diameter, ρ is the density, and vm is the mean velocity. Therefore, Darcy friction factor can be derived as
Compare the result with the theoretical friction factor for pipe flow in laminar regime, which can be obtained from