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. 

Schematic view of the model

Figure 1 Schematic view of the model

Building Geometry (Step 1)

How to create a new geometry

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.

How to create a sketch

Figure 3 Create a new sketch

Create a sketch by right-clicking on the XY plane and select “Create Sketch”.

Grid spacing adjustment of the sketch

Figure 4 Grid spacing adjustment of the sketch

For our convenience, we will set the grid spacing of the sketch to 10 mm.

Draw a rectangle in sketch

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.

Apply length dimension

Figure 6 Apply length dimension

Right-click on the lines and select “Apply Length Dimension” to specify the length.

Dimensions of the rectangle

Figure 7 Dimensions of the rectangle

Set the length to 3 m in x-direction and 0.1 m in y-direction.

Exit sketch mode

Figure 8 Exit sketch mode

Click “ok” to exit the sketch.

Extrusion of 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.

Dimensions of the rectangle

Figure 10 Dimensions of the rectangle

The extruded geometry is the shaded area shown in the figure.

Exit the 3D-CAD mode

Figure 11 Exit the 3D-CAD mode

Close 3D-CAD and go back to the main panel.

Rename the 3D-CAD

Figure 12 Rename the 3D-CAD

Rename the body in the 3D-CAD to “Fluid”. 

Topology (Step 2)

Creating a new geometry part

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.

Create a geometry scene

Figure 14 Create a geometry scene

Create a geometry scene from the toolbar.

Split the default surface

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.

Setting up the boundary surfaces

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”.

Badge for 2D meshing

Figure 17 Badge for 2D meshing

Right-click on “Fluid” in “Parts” and select “Badge for 2D Meshing” and click ok. 

Execution of badge for 2D meshing

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.

Creating simulation region

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”. 

Creating mesh operation

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)”.

Mesh model selection

Figure 21 Mesh model selection

Select “Surface Remesher” and “Trimmed Cell Mesher” as the meshing models.

Change the base size of the mesh

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 (%)

Generating mesh

Figure 23 Generating mesh

Click on the icon in the toolbar to generate the mesh.

Create a mesh scene

Figure 24 Create a mesh scene

Replace with your text
Final mesh

Figure 25 Final mesh

The final mesh can be visualized in the mesh scene.

Physics Models and Boundary Conditions (Step 4)

Physics model selection

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
Air properties

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.

Thermal specification at the wall

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”. 

Thermal specification at the wall

Figure 29 Thermal specification at the wall

Change the type of the interface to “Fully Developed Interface” and the topology to “Periodic”.

Fully developed flow option

Figure 30 Fully developed flow option

Changed the “Fully Developed Flow Option” to “Mass Flow Rate”.

Thermal specification at the wall

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.

Under-relaxation factor

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.

Axis boundary condition

Figure 33 Axis boundary condition

At the axis boundary, change the type of the boundary to “Axis”.

Wall boundary condition

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.

Create a scalar scene

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.

Select the function of scalar scene

Figure 36 Select the function of scalar scene

In the scalar scene, right-click on the legend and select velocity magnitude function.

Velocity vector scene

Figure 37 Velocity vector scene

The velocity vector can be seen in the vector scene.

Deactivation of maximum iteration steps

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.

Create new converging criterion from monitor

Figure 39 Create new converging criterion from monitor

Right-click on “Stopping Criteria” and create new criterion from monitor.

The minimum converging limit for continuity criteria

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. 

Create new converging criteria from monitor

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. 

Solution initialization

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.

Run 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.

Residual plot

Figure 44 Residual plot

The velocity contour would be shown in the scalar scene.

Velocity contour

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.

Smooth filled temperature contour

Figure 46 Smooth filled temperature contour

The velocity vector can be shown in the vector scene. 

Smooth filled temperature contour

Figure 47 Smooth filled temperature contour

To check the velocity at the inlet and outlet, right-click on “Report” and select “Surface Average”.

Surface average report

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”.

Create a report for mass flow rate

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.

Mass flow rate at the 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”.

Create a line probe

Figure 51 Create a line probe

Right-click on “Plot” and create a XY plot.

Plot for the values on the line probe

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.

Select the parts for plot

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”.

Settings of x-axis and y-axis

Figure 54 Settings of x-axis and y-axis

Expand “Y Types” and select velocity magnitude in the scalar function for velocity profile.

Scalar function selection for the plot

Figure 55 Scalar function selection for the plot

The final velocity profile will show in the plot.

Velocity profiles

Figure 56 Velocity profiles

To obtain the average pressure at the inlet and outlet, right-click on “Report” and select “Surface Average”.

Surface average report

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”.

Create a report for average pressure

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.

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