Tutorial 03 Flow Around A Blunt Body
Tutorial 03 Flow Around A Blunt Body
Tutorial 03 Flow Around A Blunt Body
• Solving and postprocessing a case where the geometry has been omitted on one side of a symmetry plane.
• Using free-slip wall boundaries as a compromise between accurate flow modeling and computational grid
size.
• Accurately modeling the near-wall flow using Shear Stress Transport (SST) turbulence model.
• Creating vector plots in CFD-Post with uniform spacing between the vectors.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 149
Flow Around a Blunt Body
The goal of this tutorial is to set up, simulate, and then visualize the flow around the body. Since both
the geometry and the flow are symmetric about a vertical plane, you will only use half of the geometry
to find the solution. You will use free-slip wall boundaries on some sides of the domain to model ex-
ternal flow. The flow near the body is modeled using Shear Stress Transport. Since compressibility effects
are not expected to be significant, you can model this as incompressible flow.
If this is the first tutorial you are working with, it is important to review the following topics before
beginning:
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
150 of ANSYS, Inc. and its subsidiaries and affiliates.
Defining the Case Using CFX-Pre
ANSYS CFX uses a working directory as the default location for loading and saving files for a par-
ticular session or project.
• BluntBodyMesh.gtm
The tutorial input files are available from the ANSYS Customer Portal. To access tutorials and their
input files on the ANSYS Customer Portal, go to http://support.ansys.com/training.
For details, see Setting the Working Directory and Starting ANSYS CFX in Stand-alone Mode (p. 3).
5. Click Save.
Setting Value
File name BluntBodyMesh.gtm
3. Click Open.
As stated in the overview, this tutorial models incompressible flow. Incompressible flow is specified by
choosing an incompressible fluid. You will use Air at 25 C as the incompressible fluid.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 151
Flow Around a Blunt Body
As part of the domain settings, you will specify a reference pressure. CFX requires this when modeling
incompressible flow.
> Fluid 1
Domain Models
> Pressure
a. Click the Ellipsis icon if the required material does not appear in the
drop-down menu.
3. Click OK.
1. From the main menu, select Insert > Regions > Composite Region.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
152 of ANSYS, Inc. and its subsidiaries and affiliates.
Defining the Case Using CFX-Pre
4. Click beside the Region List dialog box, to display the Selection Dialog. Hold down the Ctrl key and
select Free1 and Free2.
1. Click Boundary .
Turbulence
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 153
Flow Around a Blunt Body
4. Click OK.
3. Click OK.
• On free-slip walls the shear stress is set to zero so that the fluid is not retarded.
This boundary is an approximation that may not accurately represent the true flow conditions. By using
a free-slip wall boundary, the flow modeling will be less accurate but the computational grid size can
be reduced by modeling less of the surroundings. If this case were modeling a wind tunnel experiment,
the geometry would match the size and shape of the wind tunnel and use no-slip walls. If this case
were modeling a blunt body open to the atmosphere, a much larger domain would be used to minimize
the effect of the far-field boundary, and the far-field boundary type would be set to either a free-slip
wall or a pressure-specified entrainment opening.
You will apply a single boundary to both walls by using the composite region defined earlier.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
154 of ANSYS, Inc. and its subsidiaries and affiliates.
Defining the Case Using CFX-Pre
3. Click OK.
3. Click OK.
3. Click OK.
The remaining 2D regions (in this case, just the low Z face) will be assigned the default boundary which
is an adiabatic, no-slip wall condition. In this case, the name of the default boundary is BluntBody
Default. Although the boundaries Body and BluntBody Default are identical (except for their locations),
the Body boundary was created so that, during postprocessing, its location can be conveniently distin-
guished from the other adiabatic, no-slip wall surfaces.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 155
Flow Around a Blunt Body
>U 15 [m s^-1]
Initial Conditions
>V 0 [m s^-1]
Initial Conditions
>W 0 [m s^-1]
3. Click OK.
3. Click OK.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
156 of ANSYS, Inc. and its subsidiaries and affiliates.
Obtaining the Solution Using CFX-Solver Manager
Setting Value
File name BluntBody.def
3. Click Save.
CFX-Solver Manager automatically starts and, on the Define Run dialog box, Solver Input File is
set.
4. If using stand-alone mode, quit CFX-Pre, saving the simulation (.cfx) file at your discretion.
Note
The results produced will be identical, whether produced by a parallel or serial run.
If you do not want to solve this tutorial in parallel (on more than one processor) or you do not have a
license to run the CFX-Solver in parallel, proceed to Obtaining a Solution in Serial (p. 157).
If you do not know if you have a license to run the CFX-Solver in parallel, you should either ask your
system administrator, or query the license server (see the ANSYS, Inc. Licensing Guide (which is installed
with the ANSYS License Manager) for details). Alternatively proceed to Obtaining a Solution in Seri-
al (p. 157).
If you would like to solve this tutorial in parallel on the same machine, proceed to Obtaining a Solution
with Local Parallel (p. 158).
If you would like to solve this tutorial in parallel across different machines, proceed to Obtaining a
Solution with Distributed Parallel (p. 159).
2. When CFX-Solver is finished, select the check box next to Post-Process Results.
3. If using stand-alone mode, select the check box next to Shut down CFX-Solver Manager.
4. Click OK. Continue this tutorial from Viewing the Results Using CFD-Post (p. 162).
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 157
Flow Around a Blunt Body
A number of events occur when you set up a parallel run and then ask the CFX-Solver to calculate the
solution:
• Your mesh will be divided into the number of partitions that you have chosen.
• The CFX-Solver runs separately on each of the partitions on the selected machine(s).
• The results that one CFX-Solver process calculates affects the other CFX-Solver processes at the interface
between the different sections of the mesh.
• All of the CFX-Solver processes are required to communicate with each other and this is handled by the
master process.
• The master process always runs on the machine that you are logged into when the parallel run starts. The
other CFX-Solver processes are slave processes and may be run on other machines.
• After the problem has been solved, a single results file is written. It will be identical to a results file from the
same problem run as a serial process, with one exception: an extra variable Real partition number
will be available for the parallel run. This variable will be used later in this tutorial during post processing.
If Type of Run was instead set to Partitioner Only, your mesh would be split into a number
of partitions but would not be run in the CFX-Solver afterwards.
2. Set Run Mode to a parallel mode suitable for your configuration; for example, IBM MPI Local Par
allel.
Ideally, the number of partitions should not exceed the number of available processor cores.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
158 of ANSYS, Inc. and its subsidiaries and affiliates.
Obtaining the Solution Using CFX-Solver Manager
Your model will be divided into a number of sections, with each section running in its own CFX-
Solver process. The default is the MeTiS partitioner because it produces more efficient partitions
than either Recursive Coordinate Bisection or User Specified Direction.
8. When CFX-Solver is finished, select the check box next to Post-Process Results.
9. If using stand-alone mode, select the check box next to Shut down CFX-Solver Manager.
Continue this tutorial from Text Output when Running in Parallel (p. 160).
In CFX-Solver Manager, the Define Run dialog box should already be open.
If Type of Run was instead set to Partitioner Only, your mesh would be split into a number
of partitions but would not be run in the CFX-Solver afterwards.
2. Set Run Mode to a parallel mode suitable for your environment; for example, IBM MPI Distributed
Parallel.
The name of the machine that you are currently logged into should be in the Host Name list. You
are going to run with two partitions on two different machines, so another machine must be added.
• The Select Parallel Hosts dialog box is displayed. This is where you choose additional machines to run
your processes.
• Your system administrator should have set up a hosts file containing a list of the machines that are
available to run the parallel CFX-Solver.
• The third shows the relative processor speed: a processor on a machine with a relative speed of 1 would
typically be twice as fast as a machine with a relative speed of 0.5.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 159
Flow Around a Blunt Body
• This information is read from the hosts file; if any information is missing or incorrect your system ad-
ministrator should correct the hosts file.
Note
The # processors, relative speed and system information does not have to be specified
to be able to run on a host.
5. Click Add.
Note
Ensure that the machine that you are currently logged into is in the Hosts Name list in
the Define Run dialog box.
Your model will be divided into two sections, with each section running in its own CFX-Solver
process. The default is the MeTiS partitioner because it produces more efficient partitions than
either Recursive Coordinate Bisection or User Specified Direction.
12. When CFX-Solver is finished, select the check box next to Post-Process Results.
13. If using stand-alone mode, select the check box next to Shut down CFX-Solver Manager.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
160 of ANSYS, Inc. and its subsidiaries and affiliates.
Obtaining the Solution Using CFX-Solver Manager
+------------------------------+------+--------+----------+----------+
| Host | Mesh | PID | Job Started |
| | Part | | DD/MM/YY | hh:mm:ss |
+------------------------------+------+--------+----------+----------+
| fastmachine1 | 1 | 5952 | 19/02/13 | 10:50:09 |
+------------------------------+------+--------+----------+----------+
This tells you that the information following is concerned with the partitioning. After the partitioning
job has finished, you will find:
+--------------------------------------------------------------------+
| Partitioning Information |
+--------------------------------------------------------------------+
+------------------+------------------------+-----------------+
| Elements | Vertices | Faces |
+------+------------------+------------------------+-----------------+
| Part | Number % | Number % %Ovlp | Number % |
+------+------------------+------------------------+-----------------+
| Full | 131878 | 37048 | 11318 |
+------+------------------+------------------------+-----------------+
| 1 | 67873 50.4 | 19431 50.4 4.0 | 5705 49.5 |
| 2 | 66865 49.6 | 19151 49.6 4.0 | 5820 50.5 |
+------+------------------+------------------------+-----------------+
| Sum | 134738 100.0 | 38582 100.0 4.0 | 11525 100.0 |
+------+------------------+------------------------+-----------------+
+--------------------------------------------------------------------+
| Partitioning CPU-Time Requirements |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| Job Information at End of Run |
+--------------------------------------------------------------------+
+---------------------------+------+----------+----------+-----------+
| Host | Mesh | Job Finished | CPU |
| | Part | DD/MM/YY | hh:mm:ss | seconds |
+---------------------------+------+----------+----------+-----------+
| fastmachine1 | 1 | 19/02/13 | 10:50:09 | 8.020E-01 |
+---------------------------+------+----------+----------+-----------+
This marks the end of the partitioning job. The CFX-Solver now begins to solve your parallel run:
+--------------------------------------------------------------------+
| Job Information at Start of Run |
+--------------------------------------------------------------------+
+------------------------------+------+--------+----------+----------+
| Host | Mesh | PID | Job Started |
| | Part | | DD/MM/YY | hh:mm:ss |
+------------------------------+------+--------+----------+----------+
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 161
Flow Around a Blunt Body
The machine that you are logged into runs the master process, and controls the overall simulation. The
second machine selected will run the slave process. If you had more than two processes, each additional
process is run as a slave process.
The master process in this example is running on the mesh partition number 1 and the slave is running
on partition number 2. You can find out which nodes and elements are in each partition by using CFD-
Post later on in the tutorial.
When the CFX-Solver finishes, the output file displays the job information and a dialog box to indicate
completion of the run.
• Create a vector plot that shows how the flow behaves around the body
• Create a pressure plot that shows the pressure distribution on the body
• Make a surface streamline that shows the path of air along the surface of the body
• Examine the values of the dimensionless wall distance to make sure that the mesh is sufficiently fine near
the walls
• Right-click a blank area in the viewer and select Predefined Camera > View From +X.
1. Click Location > Plane and set the name to Reflection Plane.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
162 of ANSYS, Inc. and its subsidiaries and affiliates.
Viewing the Results Using CFD-Post
3. Click Apply.
This creates a plane at y=0, the same location as the symmetry plane defined in CFX-Pre. Now the
instance transform can be created using this plane:
4. From the main menu, select Insert > Instance Transform and accept the default name.
6. Click Apply.
1. Under the Outline tab, in User Locations and Plots, configure the following setting(s) of
Wireframe:
2. Click Apply.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 163
Flow Around a Blunt Body
In this case, you created a new instance transform and applied it to the wireframe. This caused only
the wireframe object to be mirrored. If you had modified the default transform instead of creating a
new one, then all graphics (including those not yet made) would be mirrored by default.
1. Right-click a blank area in the viewer and select Predefined Camera > View From +Y.
3. Configure the following setting(s) to create a sampling plane that is parallel to the ZX plane and located
at x= 6 m, y= 0.001 m and z= 1 m relative to blunt object:
> Normal 0, 1, 0
Plane Bounds
> X Samples 20
Plane Type
> Y Samples 20
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
164 of ANSYS, Inc. and its subsidiaries and affiliates.
Viewing the Results Using CFD-Post
4. Click Apply.
You can zoom in on the sampling plane to see the location of the sampling points (where lines
intersect). There are a total of 400 (20 * 20) sampling points on the plane. A vector can be created
at each sampling point.
3. Click Apply.
4. Zoom until the vector plot is roughly the same size as the viewer.
You should be able to see a region of recirculation behind the blunt body.
5. Ignore the vertices on the sampling plane and increase the density of the vectors by applying the following
settings:
6. Click Apply.
7. Change the location of the Vector plot by applying the following setting:
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 165
Flow Around a Blunt Body
8. Click Apply.
2. Click Apply.
4. Click Apply.
You will be able to see the mesh around the blunt body, with the mesh length scale decreasing
near the body, but still coarse in the region of recirculation. By zooming in, you will be able to see
the layers of inflated elements near the body.
8.6.4. Creating Surface Streamlines to Display the Path of Air along the Surface
of the Body
In order to show the path of air along the surface of the blunt body, surface streamlines can be made
as follows:
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
166 of ANSYS, Inc. and its subsidiaries and affiliates.
Viewing the Results Using CFD-Post
4. Click Apply.
5. Right-click a blank area in the viewer and select Predefined Camera > Isometric View (Z up).
This hides the plane from view, although the plane still exists.
9. Click Apply.
The surface streamlines appear on half of the surface of the blunt body. They start near the upstream
end because the starting points were formed by projecting nodes from the plane to the blunt body.
2. Select the Single Select mouse pointer from the Selection Tools toolbar.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 167
Flow Around a Blunt Body
3. In the viewer, click the Starter plane to select it, then drag it along the X axis.
Notice that the streamlines are redrawn as the plane moves. The rate at which the streamlines are
redrawn is dependent on your computer's speed. If the streamlines are updated infrequently, you
may find it useful to move the mouse very slowly.
One indicator of the closeness of the first node to the wall is the dimensionless wall distance . It is
good practice to examine the values of at the end of your simulation. At the lower limit, a value of
less than or equal to 11 indicates that the first node is within the laminar sublayer of the boundary
flow. Values larger than this indicate that an assumed logarithmic shape of the velocity profile is being
used to model the boundary layer portion between the wall and the first node. Ideally you should
confirm that there are several nodes (3 or more) resolving the boundary layer profile. If this is not ob-
served, it is highly recommended that more nodes be added near the wall surfaces in order to improve
simulation accuracy. In this tutorial, a coarse mesh is used to reduce the run time. Thus, the grid is far
too coarse to resolve any of the boundary layer profile, and the solution is not highly accurate.
A surface plot is one which colors a surface according to the values of a variable: in this case, .A
surface plot of can be obtained as follows:
a. Click the Ellipsis icon to the right of the Variable dropdown menu to view
a full list of variables, including Yplus.
3. Click Apply.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
168 of ANSYS, Inc. and its subsidiaries and affiliates.
Viewing the Results Using CFD-Post
5. Click Apply.
The two isosurfaces show the edges of the two partitions. The gap between the two plots shows the
overlap nodes. These were contained in both partitions 1 and 2.
Release 18.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 169