You are on page 1of 36

STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2885

Mixing Pipe Flow Tutorial


This tutorial describes in detail how to set up, run and post-process a simple
CFD problem involving flow through a mixing pipe. The problem geometry
is shown below:

The assembly has two inlet pipes, located on the left and center of the above
figure, through which air at different temperatures flows into the interior.
There is also an outlet pipe on the right-hand side through which the fluid
exits. The air stream entering the solution domain at each inlet has a
specified velocity, temperature, turbulence intensity and turbulence length
scale. These properties vary throughout the pipe as the two streams mix.
Adiabatic and no-slip conditions are assumed at the pipe walls.

The tutorial’s Objectives are outlined in the next section.

Objectives
The tutorial gives a detailed account of how to:
• Initiate a STAR-CCM+ session that builds a CFD model for a simple
problem
• Specify turbulence and physical property models
• Specify fluid properties
• Apply boundary conditions
• Perform a CFD analysis using one of the STAR-CCM+ solvers

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2886

• Evaluate the solution results by creating simple vector and contour


plots
• Produce plots of particle tracks
• Combine particle tracks with vector or contour plots

The tutorial starts with Importing the Mesh.

Importing the Mesh


SEE HANDOUT Create a sub-directory for the tutorial called pipe. Copy the file containing
the problem geometry and mesh data (mixing_pipe.ccm) supplied with
the STAR-CCM+ installation into this directory. Users wishing to generate
this mesh from scratch should complete Tutorial 1.1 and Tutorial 1.2 of the
STAR-CD Meshing Tutorials volume.

Start up STAR-CCM+ in a manner that is appropriate to your working


environment and select the New Simulation option from the menu bar.

STAR-CCM+ will create an additional tabbed window for the new


simulation in the Explorer pane and give it the default name Star 1. Import
the supplied mesh file into the simulation:
• Select File > Import from the menu bar
• Navigate to the pipe directory created previously and select file
mixing_pipe.ccm

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2887

• Click the Open button to start the import. The Import Mesh Options
dialog will appear. Select the following options:
• Run mesh diagnostics after import
• Ensure that the Open geometry scene after import and the Don’t show this
dialog during import options are not selected and then click OK.

STAR-CCM+ will give a summary of all data imported from this file in the
Output window (for example, that the mesh contains 82,339 cells). At the
end of the import process, it will also create an initial (default) simulation
tree in the Star 1 window.

To create a file for the simulation and give it a proper name:


• Select File > Save from the menu bar
• Type mixing_pipe in the File Name text box then click Save

Note that the title of the simulation window also changes to mixing_pipe.

The tutorial continues with Checking the Mesh.

Checking the Mesh


SEE HANDOUT A simple but effective method of checking the mesh is to display it on screen
and examine it visually.
• Right-click on the Scenes node and select New Scene > Geometry. This
will create a new node, Geometry Scene 1, in the simulation tree.

The Graphics window will initially show all parts of the mesh as solid,
colored surfaces. To turn on the mesh display:

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2888

• Open the Scenes node, followed by the Geometry Scene 1 node


• In the Displayers node, select the Geometry 1 node
• In the Properties window, tick the Mesh checkbox.
• Examine the mesh more closely by holding and dragging
• the left mouse button to rotate it
• the right button to pan it
• the middle button to zoom in and out
and produce a Graphics window display such as the one shown below:

Verify that no malformed or irregular cells are present on the mesh surface.

We will now inspect the interior mesh structure by creating a cross-sectional


plane that bisects the geometry.
• Click the (Create Planar Section) button in the toolbar and then
define the plane by clicking on the two end-points of a straight line
passing approximately through
• the center of the large inlet pipe at one end, and
• the center of the outlet pipe at the other end.

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2889

• Once you click at the second point, the Please Select Displayer dialog will
appear. Click OK.

Note that a new node, Section Geometry 1, appears in the simulation tree as
soon as this operation is complete.

To check the location of the cross section:


• Open the Geometry 1 node and select the Parts node.

• Click the right half of the Parts property. In the Select Objects dialog,
select the plane section part from the Selected From list on the left-hand

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2890

side of the dialog and move it to the right-hand side, as shown below:

• Click Close and then click the (Make Scene Transparent) button in
the toolbar to see the cross-section trace within the mesh context:

• Use the mouse controls to reposition the mesh so that the viewpoint is

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2891

approximately at right angles to the cross section.

To view the mesh structure on the cross section more clearly:


• Right-click on the Parts node again and deselect all parts other than
plane section by moving them to the left-hand side of the Customizer
dialog
• Click Close

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2892

The Graphics window will display the mesh structure on the cross section,
as shown below. The varying cell size within the trimmed-cell mesh is now
clearly visible.

The next stage in the tutorial is Setting up the Models.

Setting up the Models


SEE HANDOUT This tutorial describes a steady-state problem in which:
• A stationary, three-dimensional grid is employed
• The fluid is a slightly compressible gas (air) that obeys the ideal gas
equation of state
• The flow is turbulent and non-isothermal
• The k-ε model is used for representing turbulence effects
• The problem is to be solved using the segregated flow solver

To specify the above conditions:


• Open the Continua node in the simulation tree, right-click on the

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2893

Physics 1 node and choose item Select models from the pop-up menu.

In the Model Selection dialog, note that the Auto-select recommended models
checkbox is ticked by default. In general, you should accept this setting
unless you have good reasons for needing to make your own special
selections.

Go to each group of options presented by the Model Selection dialog and,


working from top to bottom, select the following options:
• Stationary in the Motion group box
• Gas in the Material group box
• Segregated Flow in the Flow group box
• Ideal Gas in the Equation of State group box
• Steady in the Time group box
• Turbulent in the Viscous Regime group box
• K-Epsilon Turbulence in the Reynolds-Averaged Turbulence group box

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2894

• The remaining modeling options in the dialog are optional and not
required for this problem so click Close to complete the model selection.
• Open the Models node under Physics 1 to verify that it contains nodes
corresponding to each selection made above. These can now be
inspected and edited as necessary to complete the model definitions.

The next step is Setting Material Properties.

Setting Material Properties


SEE HANDOUT To check the currently assigned values for the fluid physical properties
• Open the Physics 1 > Models > Gas > Air > Material Properties node
• Select the Constant node for each of the five physical properties present

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2895

in the tree.

• Inspect the Value displayed in the Properties window, as shown in the


example below. The defaults are suitable for the problem in hand.

The other model of special interest in this tutorial is the turbulence model.
• Select the Realizable Two-Layer K-Epsilon node and inspect the default
values and settings in the Properties window

These are again suitable for the problem in hand.

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2896

Finally, we will inspect the default values and settings shown below for the
Reference Values and Initial Conditions in the fluid continuum and adjust as
necessary.

The only changes to be made in this case are in the initial condition settings.
• Select the Initial Conditions > Turbulence Specification node
• In the Properties window, select option K+Epsilon from the Method
pop-up menu.

• Open the Static Temperature node and then select the Constant node

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2897

In the Properties window, change the initial temperature to 293 K.

• Open node Turbulent Dissipation Rate and then select node Constant
• Check the default value displayed in the Properties window, which is
suitable for this case
• Repeat this check for node Turbulent Kinetic Energy whose default value
is also suitable for this case.

This completes the specification of physical properties and models for the
fluid. The next step is to locate the boundary regions and specify boundary
conditions.

The next step is Checking Boundary Locations.

Checking Boundary Locations


SEE HANDOUT Meshes such as the one used in this tutorial normally include boundary
definitions for all boundary surfaces. To display and check the location of
these boundaries:

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2898

• Open the Geometry 1 node in the simulation tree and select the Parts
node.

• Click the right half of the Parts property. In the Customizer dialog, select
all parts that correspond to boundaries (inlet, inlet2, outlet, wall) and
deselect the plane section part, as shown below.

• Click Close
• Use the mouse controls to select a view similar to that shown earlier in
this tutorial.
• Open the Regions node, then right-click on the Default_Fluid node
• Select Rename... and change the name of the region to Fluid
• Open the Fluid node, followed by the Boundaries node
• Click each of the boundary nodes displayed on the tree in turn.
STAR-CCM+ will highlight and label the currently selected boundary,

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2899

as shown in the example below for the outlet boundary:

Now that we have checked the boundary locations, we can proceed to


Setting Boundary Conditions.

Setting Boundary Conditions


SEE HANDOUT This section describes how to check the current boundary condition defaults
and make adjustments where necessary.
• Select the inlet node in the tree and check that the boundary condition

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2900

Type shown in the Properties window is Velocity Inlet.

• Open the inlet > Physics Conditions node and inspect the three objects
displayed under it on the simulation tree. Ensure that the Method setting
in the Properties window for each of them is as follows:
• Flow Direction Specification — Boundary-Normal
• Velocity Specification — Magnitude + Direction
• Turbulence Specification — Intensity + Length Scale
• Open the Physics Values node and check each of its property sub-nodes
to confirm that the Method setting in the Properties window is Constant
throughout.
• Select each of the Constant nodes in turn and enter the following values
for the inlet conditions in the Properties window:
• Static Temperature — 298 K
• Turbulence Intensity — 0.1
• Turbulent Length Scale — 0.001 m
• Velocity Magnitude — 2.5 m/s
• Repeat the above exercise for inlet 2, which should also be defined as a
Velocity Inlet. The only necessary changes to the current defaults are:
• Turbulence Specification method — Intensity + Length Scale

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2901

• Static Temperature value — 373 K


• Turbulence Intensity value — 0.1
• Turbulent Length Scale value — 0.001 m
• Velocity Magnitude — 10 m/s
• Check the condition on the outlet node and accept the default boundary
Type (Flow-Split Outlet)
• Finally, select the Default_Boundary_Region node and rename it wall.
Confirm that the default boundary conditions are appropriate for this
problem:
• Shear Stress Specification — No-slip
• Tangential Velocity Specification — None
• Thermal Specification — Adiabatic
• Wall Surface Specification — Smooth

The Blended Wall Function values under the Physics Values node (E, Kappa)
are also acceptable.

The last step before running the analysis is Setting Solver Parameters and
Stopping Criteria.

Setting Solver Parameters and Stopping Criteria


SEE HANDOUT For this simple case, it is reasonable to increase the velocity
under-relaxation factor to speed up convergence.
• Select the Solvers > Segregated Flow > Velocity node.

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2902

• In the Properties window, change the Under-Relaxation Factor to 0.9.

Before running the analysis, the maximum number of iterations to be


performed needs to be specified.
• Open the Stopping Criteria node and then select the Maximum Steps node.

100
• In the Properties window, change the Maximum Steps value to 500.

The pre-processing task is now complete. The next step is to run the analysis
using the selected STAR-CCM+ solver, as described in Running the
Simulation.

Running the Simulation


SEE HANDOUT • Click the Run button in the Solution toolbar to run the simulation

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2903

The analysis will now start and the results, in the form of a graph of
residuals vs. iteration number, will be displayed automatically in the
Graphics window, as shown below:

The solution will stop after 500 iterations, as specified previously.

The first post-processing task is Plotting Contours.

Plotting Contours
SEE HANDOUT The remaining sections of this tutorial cover the definition and display of
various plots that help to visualize the solution just obtained.

The first plot to be drawn is a contour plot of temperature on the surface of


the mixing pipe. To create this plot:

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2904

• Right-click on the Scenes node and select New Scene > Scalar.

A new node called Scalar Scene 1 will be created in the simulation tree.
• Select the Scalar Scene 1 > Displayers > Scalar 1 > Parts node
• In the Properties window, click on the right half of the Parts property to
display the Select Objects dialog
• Select those parts corresponding to boundaries (Fluid:inlet, Fluid:inlet2,
Fluid:outlet, Fluid:wall) and then click Close.

• Select the Scalar 1 displayer node


• In the Properties window, click on the right half of the Contour Style
property and then select Smooth Filled from the pop-up menu
• Select the Scalar Field node and, in the Properties window, open the
pop-up menu of the Function property
• Select item Temperature from the list of variables displayed

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2905

After some rotation and repositioning of the geometry, the results should
appear as shown below.

Now plot contours of velocity magnitude on an x-z plane passing through


the origin. One way of doing this is as follows:
• Right-click on the Derived Parts node and select

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2906

New Part > Section > Plane...

A new interactive in-place dialog (Create Section) appears on the left of the
Graphics window to help you define the desired plane. In this dialog:
• Click Input Parts and then select Fluid from the corresponding Select
Object dialog
• Enter appropriate parameters specifying the desired plane, as shown in

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2907

the figure below.

• Click Create

Note that a new node, plane section 2, will now appear as an additional
Derived Parts constituent.
• Right-click on the Scenes node and select New Scene > Scalar

A new node called Scalar Scene 2 will be created in the simulation tree.
• Select the Scalar Scene 2 > Displayers > Scalar 1 > Parts node and, in the
Properties window, click on the right half of the Parts property to display
the Select Objects dialog
• Select only the plane section 2 part created above and then click Close
• Click on the right half of the Contour Style property and select Smooth
Filled from the pop-up menu
• Right-click on the scalar bar that appears in the Graphics window and

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2908

select Velocity: Magnitude in the pop-up menu displayed

After some rotation and repositioning of the mesh, the results should
appear as shown below.

Post-processing continues with Plotting Velocity Vectors.

Plotting Velocity Vectors


Velocity vectors will first be plotted on the mesh surface.
• Right-click on the Scenes node and select New Scene > Vector

A new node called Vector Scene 1 will be created in the simulation tree.

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2909

• Select the Vector Scene 1 > Displayers > Vector 1 > Parts node.

• In the Properties window, click on the right half of the Parts property to
display the Select Objects dialog
• Select the Fluid: inlet, Fluid: inlet2, Fluid: outlet and Fluid: wall parts and then
click Close
• Select the Vector Field node and, in the Properties window, select Cell
Relative Velocity from the Function pop-up menu to display velocities in
the pipe’s interior

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2910

After some rotation and repositioning of the mesh, the results should
appear as shown below.

Note that the flow field pattern cannot be seen very clearly because the
above plot includes far too many vectors. To thin out the vectors and
generally improve the clarity of the plot
• Select node Vector 1 then, in the Properties window, change the value of
the On Ratio property to 7

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2911

The revised plot will now clearly show the flow swirling through the
mixing pipe.

• Click on the Save-Restore button in the toolbar, , and select Store


Current View.

Next, plot velocity vectors in the plane that was previously used for the
velocity magnitude contour plot.
• Right-click on the Scenes node and select New Scene > Vector

A new node called Vector Scene 2 will be created in the simulation tree.
• Select the Vector Scene 2 > Displayers > Vector 1 > Parts node and, in the
Properties window, click on the right half of the Parts property to display
the Select Objects dialog
• Select the plane section 2 part and then click Close

A velocity plot will be displayed by default in the Graphics window.


• Click on the Save-Restore button in the toolbar and select Restore View >

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2912

View 1 to produce the cross-sectional velocity display shown below.

The vectors shown above are too widely spaced at the center of the pipe.
However, this is not the case near the walls where the presence of a finer
mesh results in more vectors being displayed.

A plot with evenly distributed vectors across the plane can be achieved
using the Presentation Grid facility.
• Right-click the Derived Parts node and select New Part > Probe >
Presentation Grid

A new interactive in-place dialog (Create Presentation Grid) appears on the


left of the Graphics window enabling you to define the desired plane.
• In the Create Presentation Grid dialog, click Input Parts and then select
Fluid from the corresponding Select Object dialog
• Use the plane tool to define the presentation grid plane graphically with
the mouse, as shown below. The Create Presentation Grid dialog can be
reduced using the arrow button located at the upper-right corner.
• Adjust the position and orientation of the grid so that it and the plane

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2913

section are approximately coplanar.

• Specify the grid spacing in the X and Y directions by entering 50 in the

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2914

X/Y Resolution boxes, as shown below.

• Click Create in the Create Presentation Grid dialog

Note that a new node, presentation grid, will now appear as an additional
Derived Parts constituent. A second node, Presentation Grid Geometry 1, will
also appear under the Displayers node belonging to Vector Scene 2.
• Click Close
• Select the Parts node in the Vector 1 displayer node of Vector Scene 2
• In the Properties window, click on the right half of the Parts property and
then select the presentation grid part
• Deselect the plane section 2 part, then click Close.

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2915

• Select the displayer node Presentation Grid Geometry 1


• In the Properties window, clear the Surface checkbox to produce a plot
similar to the one shown below.

The final stage of this tutorial is Plotting Streamlines.

Plotting Streamlines
An effective way of visualizing a flow pattern is to draw streamlines, i.e.
tracks of imaginary massless particles introduced into the flow at specified
points. Here we will draw streamlines originating at the smaller inlet.
• Double-click the Geometry Scene 1 node to display the problem
geometry
• Select the Geometry Scene 1 > Displayers > Geometry 1 node
• In the Properties window, clear the Mesh checkbox
• Select the Geometry 1 > Parts node and make sure that the only Parts
selected for display are Fluid: inlet, Fluid: inlet2, Fluid: outlet and Fluid: wall.
• Right-click on the Derived Parts node and select option New Part >

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2916

Streamline

A new interactive in-place dialog appears on the left of the Graphics window
enabling you to define the desired streamlines.
• Accept the default settings for Input Parts (Fluid), Vector Field (Velocity)
and Seed Mode (Part Seed)

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2917

• Click the Seed Parts button to access the list of input parts.

• Select Fluid: inlet 2 in the Select Objects dialog, as shown below, then close
this dialog.

• In the main dialog, click Create, which will immediately display the
desired streamlines, and then Close.

A new node called streamline will also appear in the simulation tree. To
enhance the clarity of the display:
• Open the streamline node and then select node Source Seed
• In the Properties window, change both the U Points and V Points
properties to 2
• Select the Geometry 1 displayer node within the Geometry Scene 1 node
and then change the Opacity property to 0.3. This will display the

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2918

streamline tracks more clearly, as shown below.

The above plot illustrates very clearly the swirling nature of the flow.
Streamlines can also be plotted together with vectors or contours, as in the
following example.
• Open the Scenes node and then double-click the Scalar Scene 2 node to
display the previously produced cross-sectional plot
• Select the Scalar Scene 2 > Displayers > Scalar 1 > Scalar Field node
• In the Properties window, do the following:
• Select Temperature from the Function property’s drop-down list to
produce a temperature plot on the pre-selected cross section
• Clear the checkbox of the Auto Range property to display the values
• Select the Parts node and add the streamline part to the scene. The
streamlines will be displayed in the Graphics window
• Select the Scalar Scene 2 > Displayers > Scalar 1 node and, in the
Properties window, change the Line Width value to 2 to see the

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2919

streamlines more clearly.

Note that the streamlines are colored according to the local temperature
along their path.

This completes the post-processing part of the tutorial. Descriptions of more


complex post-processing operations may be found in some of the other
tutorials in the STAR-CCM+ Training Guide.

A Summary of the steps followed in this tutorial is given next.

Summary
This STAR-CCM+ tutorial introduced the following steps:
• Starting the code and creating a new simulation
• Importing a mesh
• Visualizing and checking the mesh
• Defining the simulation models
• Defining material properties for the selected models
• Visualizing and checking the boundary locations

Version 3.02.006
STAR-CCM+ User Guide Mixing Pipe Flow Tutorial 2920

• Defining boundary conditions


• Setting solver parameters and running the solver
• Analyzing the solution results using contour and vector plots
• Creating and displaying streamlines

Version 3.02.006

You might also like