Professional Documents
Culture Documents
0 Release
Learning Aims:
This workshop
‒ Checking for round off error - Solving a compressible flow
‒ Checking for iteration error - Comparison with experimental data
‒ Checking for mesh independence on a hierarchy of meshes
Learning Objectives:
• To understand how to assess solver accuracy (applicable to any CFD simulation), how to solve
compressible flow and how to compute lift and drag in external aerodynamics applications
• The case considered here is flow around over a NACA 0012 airfoil at a 1.55° angle
of attach and free stream Mach number of 0.7
• The airfoil drag and lift coefficients are the primary quantities of interest
Computational
Domain
y
α
x
Select naca0012-
2. coarse.msh.gz and click Open.
Geometry and mesh cells
change to reflect imported
mesh
7 © 2017 ANSYS, Inc. May 17, 2017
Launch Fluent
• Double click Setup and launch
Fluent
– Use Serial
For compressible flows, the solver needs to use the absolute values in the
calculation. Therefore it is sometimes convenient to set the operating
pressure equal to zero so that the absolute pressures can be used as boundary
conditions.
Name = cd-report
The drag coefficient is the normalized Report Type = Drag Coefficient
force on the selected surfaces in the Surfaces = both airfoils
direction of the flow: Force Vector (0.99978,0.020795)
Report Plot = check
Fdrag Create Output Parameter =
Cd
1 check
V 2 A
2
21 © 2017 ANSYS, Inc. May 17, 2017
Solving: Report Definition for Lift Coefficient
Name = cd-report
The drag coefficient is the normalized Report Type = Drag Coefficient
force on the selected surfaces in the Surfaces = both airfoils
direction perpendicular to the flow: Force Vector (0.99978,0.020795)
Report Plot = check
Flift Create Output Parameter =
Cl
1 check
V 2 A
2
22 © 2017 ANSYS, Inc. May 17, 2017
Reference Values for Drag and Lift Coefficients
• Double click Reference Values in
the Tree to open the Reference
Values Task Page
• Select farfield under Compute from
The density, velocity and area values used by Fluent to compute drag
and lift coefficients are based on the entries in Reference Values.
1. Click Initialize
‒ Remember the message about the
hybrid initialization is just a
warning, not an error, and it is ok to
proceed
2. Enter 100 iterations and
click Calculate
3. When iterations complete,
File > Save Project
The lift coefficient in the lower right
plot is still changing, so more
iterations will be required even
though the residuals have reached
the convergence criteria.
24 © 2017 ANSYS, Inc. May 17, 2017
Solving: Residuals
• To perform more iterations, open the
residuals panel and reduce the criterion
for the equation with the highest value,
here continuity, by one order of
magnitude
• Click Calculate
There are not distinct inlets and outlets in this problem, just the far field boundary. It
would be negligent to simply decide that .0005 kg/s must be ok because it looks like a
small number. The extent of the computational domain in the y-direction is 60 m, as seen
to the left. A better way to evaluate the imbalance is to use the boundary values for
density (≈.90 kg/m³) and velocity (≈240 m/s) (the origin of these values is shown in slide
23, or it would also be possible to compute average values in surface integrals) such that
the mass flow through a 60 m cross section is 60 m x 1 m (z-direction) x 240 m/s x .90
kg/m³ ≈ 13,000 kg/s. Here, the imbalance is several orders of magnitude lower, so the
solution has achieved a good mass balance.
The .xy plot file format is described in the User’s Guide but standard practice is to write a .xy plot file using the Write to
File option on this panel and using a text editor to paste the experimental data over the original contents.
• Remember that discretization errors represent the difference between the solution of the discretized CFD
equations on the current mesh and what the solution of the discretized equations would be on an
infinitely fine mesh
• It is normally not possible to quantify the level of discretization error in a given problem
• Instead, discretization error is considered to be negligible when the mesh is fine enough that the solution
does not change under further mesh refinement, which is known as mesh independence
• In order to study mesh independence, three meshes have been created for this problem:
5,043 cells 18,720 cells 76,314 cells
1. Click Initialize
‒ Unlike the other messages, this is an
error and it is not
2. Numerous error messages
are reported in the console
In any case, such as this one, with very high aspect ratio cells,
and the panel there is a possibility the solution might diverge with single
‒ Unlike the other messages, this is an precision. Here it did not even make it to solution – even the
error and something must be done initialization diverged. The problem definition is identical to all
in order to proceed the other cases – all that has changed is the grid and the
precision. Even though single precision was fine on the coarse
3. Close Fluent and return to grid, that does not guarantee it is ok for all grids. So it is logical to
switch to double precision and see what happens.
the Project Schematic in
Workbench
38 © 2017 ANSYS, Inc. May 17, 2017
Relaunch Fluent with Double Precision
• Right click Setup (D3) and
choose Edit
• Activate Double Precision
and launch Fluent
• One of the most important things to remember in your own work, before even starting the
ANSYS software, is to think WHY you are performing the simulation
– What information are you looking for?
– What do you know about the boundary conditions?
In this case the goal was to calculate flow around an airfoil and determine the lift and drag coefficients
under specified free stream conditions and angle of attack. Since these coefficients were identified as
key output before doing any CFD, they could be used to make assessments of possible numerical
errors.
47 © 2017 ANSYS, Inc. May 17, 2017