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.
Figure 1 Schematic view of the model
Building Geometry (Step 1)
Figure 2 Create a new geometry
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.
Figure 3 Create a new sketch
Create a sketch by right-clicking on the XY plane and select “Create Sketch”.
Figure 4 Grid spacing adjustment of the sketch
For our convenience, we will set the grid spacing of the sketch to 10 mm.
Figure 5 Draw a rectangle in sketch
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.
Figure 6 Apply length dimension
Right-click on the lines and select “Apply Length Dimension” to specify the length.
Figure 7 Dimensions of the rectangle
Set the length to 3 m in x-direction and 0.1 m in y-direction.
Figure 8 Exit sketch mode
Click “ok” to exit the sketch.
Figure 9 Extrusion of the sketch
Extrude the sketch with the thickness of 10 mm. The thickness can be arbitrary since the simulation is only two-dimensional.
Figure 10 Dimensions of the rectangle
The extruded geometry is the shaded area shown in the figure.
Figure 11 Exit the 3D-CAD mode
Close 3D-CAD and go back to the main panel.
Figure 12 Rename the 3D-CAD
Rename the body in the 3D-CAD to “Fluid”.
Topology (Step 2)
Figure 13 Creating a new geometry part
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.
Figure 14 Create a geometry scene
Create a geometry scene from the toolbar.
Figure 15 Split the default surface
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.
Figure 16 Setting up the boundary surfaces
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”.
Figure 17 Badge for 2D meshing
Right-click on “Fluid” in “Parts” and select “Badge for 2D Meshing” and click ok.
Figure 18 Execution of badge for 2D meshing
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.
Figure 19 Creating simulation region
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”.
Figure 20 Creating mesh operation
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)”.
Figure 21 Mesh model selection
Select “Surface Remesher” and “Trimmed Cell Mesher” as the meshing models.
Figure 22 Change the base size of the mesh
“Automated Mesh” will be created under “Operations”.
Base size = 0.1 m (radius)
Target Surface Size = 5 (%)
Minimum Surface size = 5 (%)
Figure 23 Generating mesh
Click on the icon in the toolbar to generate the mesh.
Figure 24 Create a mesh scene
Figure 25 Final mesh
The final mesh can be visualized in the mesh scene.
Physics Models and Boundary Conditions (Step 4)
Figure 26 Physics model selection
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
Figure 27 Air properties
After finishing the selection of physics models, change the air density and dynamic viscosity to 1 kg/m3 and 2×10-3, respectively.
Figure 28 Thermal specification at the wall
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”.
Figure 29 Thermal specification at the wall
Change the type of the interface to “Fully Developed Interface” and the topology to “Periodic”.
Figure 30 Fully developed flow option
Changed the “Fully Developed Flow Option” to “Mass Flow Rate”.
Figure 31 Thermal specification at the wall
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.
Figure 32 Under-relaxation factor
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.
Figure 33 Axis boundary condition
At the axis boundary, change the type of the boundary to “Axis”.
Figure 34 Wall boundary condition
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.
Figure 35 Create a scalar scene
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.
Figure 36 Select the function of scalar scene
In the scalar scene, right-click on the legend and select velocity magnitude function.
Figure 37 Velocity vector scene
The velocity vector can be seen in the vector scene.
Figure 38 Deactivation of maximum iteration steps
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.
Figure 39 Create new converging criterion from monitor
Right-click on “Stopping Criteria” and create new criterion from monitor.
Figure 40 The minimum converging limit for continuity criteria
Choose continuity in the list. After that, set the “Logical Rule” to “And” and set the minimum limit for “Continuity Criterion” to 1E-6.
Figure 41 Create new converging criteria from monitor
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.
Figure 42 Solution initialization
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.
Figure 43 Run 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.
Figure 44 Residual plot
The velocity contour would be shown in the scalar scene.
Figure 45 Velocity contour
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.
Figure 46 Smooth filled temperature contour
The velocity vector can be shown in the vector scene.
Figure 47 Smooth filled temperature contour
To check the velocity at the inlet and outlet, right-click on “Report” and select “Surface Average”.
Figure 48 Surface average report
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”.
Figure 49 Create a report for mass flow rate
Double click on “Surface Average 1” than you can get the mean velocity at inlet and outlet.
Figure 50 Mass flow rate at the 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”.
Figure 51 Create a line probe
Right-click on “Plot” and create a XY plot.
Figure 52 Plot for the values on the line probe
Create a new XY Plot and assign the “Line Probe” to the parts in the plot properties.
Figure 53 Select the parts for plot
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”.
Figure 54 Settings of x-axis and y-axis
Expand “Y Types” and select velocity magnitude in the scalar function for velocity profile.
Figure 55 Scalar function selection for the plot
The final velocity profile will show in the plot.
Figure 56 Velocity profiles
To obtain the average pressure at the inlet and outlet, right-click on “Report” and select “Surface Average”.
Figure 57 Surface average report
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”.
Figure 58 Create a report for average pressure
Double click on “Surface Average 2” than you can get the average pressure at inlet and outlet.
Figure 59 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