Академический Документы
Профессиональный Документы
Культура Документы
FLUENT
Page 1 of 81
1 INTRODUCTION.......................................3
2COMPUTATIONAL FLUID DYNAMICS
(CFD)..............................................................7
3HEAT TRANSFER MODELLING............39
4TRANSIENT FLOW MODELLING.........46
5CFD EXERCISE.........................................51
Problem Specification..........................................................................................................72
Results76
Plot Velocity Vectors...........................................................................................................76
Page 2 of 81
CHAPTER 1
INTRODUCTION
1.1
FLUID DYNAMICS:
Fluid dynamics is the science of fluid motion. Fluid flow is commonly studied in one
of three ways:
Towing tank, wave tank, large circulation channel, cavitation tunnel, flume,
Page 3 of 81
Page 4 of 81
1.3
FLOW CLASSIFICATIONS:
Page 5 of 81
The fluid which obeys NEWTONS LAW OF VISCOSITY( shear stress is directly
proportional to shear strain) is called Newtonians fluids.
1.3.1.6. NON NEWTONIANS FLUID:
The fluid which does not obeys NEWTONS LAW OF VISCOSITY( shear stress is
directly proportional to shear strain) is called Non Newtonians fluids.
1.3.1.7. INCOMPRESSIBLE FLOW:
A flow is said to be incompressible flow if the density is constant in a flow field. For
all practical purposes liquids can be regarded as incompressible, because the pressure and
temperature changes have little effect on their volume.
1.3.1.8. COMPRESSIBLE FLOW:
A flow is said to be compressible if the density changes from point to point due
pressure and temperature.
Mathematically, is not equal to constant.
1.3.1.9. SINGLE PHASE FLOW:
The flow in which there is no change of phase. In this, there is only one phase of
fluid flow(either liquid or gas).
1.3.1.10. MULTI PHASE FLOW:
The flow in which there is change of phase is called multiphase flow. In this, there is
a mixture of phase flows(liquid-gas, liquid-solid, gas-solid).
Page 6 of 81
CHAPTER 2
transfer, mass transfer, chemical reactions, and related phenomena by solving the
mathematical equations which govern these processes using a numerical process.
The result of CFD analyses is relevant engineering data used in:
Troubleshooting.
Redesign.
1.5
matter, momentum, and energy must be satisfied throughout the region of interest. Fluid
properties are modeled empirically. Simplifying assumptions are made in order to make the
problem tractable (e.g., steady-state, incompressible, inviscid, two dimensional). Provide
appropriate initial and boundary conditions for the problem. CFD applies numerical methods
(called discretization) to develop approximations of the governing equations of fluid
mechanics in the fluid region of interest.
The set of algebraic equations are solved numerically (on a computer) for
the flow field variables at each node or cell.
Page 7 of 81
1.6
APPLICATIONS OF CFD:
Applications of CFD are numerous!
Using physical experiments and tests to get essential engineering data for
design can be expensive.
Speed
Many flow and heat transfer processes can not be (easily) tested, e.g.
hypersonic flow.
Page 8 of 81
CFD allows great control over the physical process, and provides the
ability to isolate specific phenomena for study. Example: a heat transfer
process can be idealized with adiabatic, constant heat flux, or constant
temperature boundaries.
Comprehensive information.
1.8
LIMITATIONS OF CFD:
Physical models:
CFD solutions rely upon physical models of real world processes (e.g.
turbulence, compressibility, chemistry, multiphase flow, etc.).
Numerical errors:
Boundary conditions:
Page 9 of 81
1.9
DISCRETIZATION
The art of subdividing a structure into a convenient number of smaller
2.6.1. GRID:
Page 10 of 81
The grid is nothing but the domain that is descretized into a finite set of control volumes
or cells. The degree of grid resolution is also necessary to find solution for a problem in each
region of the domain.
There are three different types of grids in general:
Formal
grids.(triangle,
tetrahedron,
pyramid,
prism,
hexahedron,
quadrilateral )
Hybrid grids.
Page 11 of 81
Page 12 of 81
1.10 TERMINOLOGY:
Page 13 of 81
Page 14 of 81
Page 15 of 81
increases. The conclusion of many researches is that the aspect ratio should be close to
unity as possible. Equal to 1 (ideal) for an equilateral triangle or a square.
geomentry, do necessary decomposition and /or pre mesh the edges and faces and remesh the
element.
MINIMIZE EQUI-ANGLE SKEW:
Page 16 of 81
Page 17 of 81
Page 18 of 81
High skewness.
Page 19 of 81
Conservation of mass.
The fluid which is treated as a continuum. For length scales of, say, 1m
and larger. The molecular structure and motions may be ignored.
2.12.1. LAGRANGIAN DESCRIPTION:
This approach is otherwise called as particle approach. A fluid flow field can be
thought of as being comprised of a large number of finite sized fluid particles which have
mass, momentum, internal energy, and other properties. Mathematical laws can then be
written for each fluid particle. Fluids in material volume (system) will move, distort, and
change size and shape, but always consists of the same fluid particles.
pathline
Figure
2.12 Lagrangian
Model
2.12.2.
EULERIAN
DESCRIPTION:
This is otherwise called as field approach. In this model individual are not labeled
and not distinguished from one another. In the Eulerian description of fluid motion, we
Page 20 of 81
consider how flow properties change at a fluid element that is fixed in space and time
(x,y,z,t), rather than following individual fluid particles.
Page 21 of 81
In x-direction,
considering the gravity, pressure and viscosity forces are known as navier-stokes equation.
Fx = (Fg)x + (Fp)x + (Fv)x, for x direction.
FY = (Fg)y + (Fp)y + (Fv)y, for y direction.
FZ = (Fg)z + (Fp)z + (Fv)z, for z direction.
where,
Fg gravity force.
Fp - pressure force.
Fv - viscous force.
Although, The Navier-Stokes equations form a coupled system of
nonlinear PDEs describing the conservation of mass, momentum and energy for a fluid. For
a Newtonian fluid in one dimension, they can be written as
Page 22 of 81
is the fluid density, u is the velocity, e is the total energy per unit volume, p is the pressure,
T is the temperature, is the coefficient of viscosity, and is the thermal conductivity. The
total energy e includes internal energy per unit volume e (where e is the internal energy
per unit mass) and kinetic energy per unit volume u2/2.
Page 23 of 81
prescribes the gradient normal to the boundary of a variable at the boundary, e.g. nu(x) =
constant. When using a mixed boundary condition a function of the form au(x)+bu(x) =
constant is applied. Note that at a given boundary, different types of boundary conditions
can be used for different variables.
Select boundary location and shape such that flow either goes in
or out. Not mandatory, but will typically result in better
convergence.
Page 24 of 81
.
2.16.3. PRESSURE BOUNDARY CONDITIONS:
Pressure boundary conditions require static gauge pressure inputs. The operating
pressure input is set separately. This boundary conditions will be useful when Neither the
flow rate nor the velocity are known (e.g. buoyancy-driven flows). And a free boundary in
an external or unconfined flow needs to be defined.
Page 25 of 81
Page 26 of 81
Structural problems.
Non-structural problems.
ADVANTAGES:
DISADVANTAGES:
Page 27 of 81
This method does not limit cell shape and mass, momentum, energy conserved
even on coarse grids.
DISADVANTAGES:
Solutions are converged when the flow field and scalar fields are no longer
changing.
Page 28 of 81
converged. Final residuals are often higher with higher order discretization schemes than
with first order discretization. That does not mean that the first order solution is better.
Residuals can be monitored graphically also.
Page 29 of 81
the pressure correction p is derived, in a form similar to the equations derived for the
convection-diffusion equations:
app' = anb p' + b'.
where, p pressure correction.
b continuity imbalance.
Each iteration, the pressure field is updated by applying the pressure correction. The
source term b is the continuity imbalance. The other coefficients depend on the mesh and the
flow field.
2.19.1. PRINCIPLE BEHIND SIMPLE:
The principle behind SIMPLE is quite simple. It is based on the premise that fluid
flows from regions with high pressure to low pressure. In this first, Start with an initial
pressure field then Look at a cell. If continuity is not satisfied because there is more mass
flowing into that cell than out of the cell, the pressure in that cell compared to the
neighboring cells must be too low. Thus the pressure in that cell must be increased relative to
the neighboring cells. The reverse is true for cells where more mass flows out than in. Repeat
this process iteratively for all cells. The trick is in finding a good equation for the pressure
correction as a function of mass imbalance.
2.19.2. IMPROVEMENTS ON SIMPLE:
SIMPLE is the default algorithm in most commercial finite volume codes. Improved
versions are,
All these algorithms can speed up convergence because they allow for the use of larger under
relaxation factors than SIMPLE. All of these will eventually converge to the same solution.
Page 30 of 81
The differences are in speed and stability. Which algorithm is fastest depends on the flow and
there is no single algorithm that is always faster than the other ones.
Page 31 of 81
Where
t - time step.
CFL Courant-Friedrich-Levy number.
u - Local velocity.
L - size of the cell.
Appendix
Characteristics of Turbulence
Instantaneous fluctuations are random (unpredictable) both in space and in time. But
statistical averaging of turbulence fluctuations results in accountable transport
mechanisms
Wide range of length scales (vortices or eddies) exist in all turbulent flows (from very
small to very large).
Page 32 of 81
Unsteady, aperiodic motion in which all three velocity components fluctuate, mixing
matter, momentum, and energy. Decompose velocity into mean and fluctuating parts:
Ui(t) Ui + ui(t).
2.21.1. TRANSITION IN BOUNDARY LAYER FLOW OVER FLAT PLATE
Page 33 of 81
Page 34 of 81
u-Velocity of fluid.
Page 35 of 81
Page 36 of 81
Description
A single transport equation model solving directly for a modified turbulent viscosity.
Allmaras
Standard k
flows.
The baseline two-transport-equation model solving for k and . This is the default k
model. Coefficients are empirically derived; valid for fully turbulent flows only.
Options to account for viscous heating, buoyancy, and compressibility are shared with
RNG k
other k models.
A variant of the standard k model. Equations and coefficients are analytically
derived. Significant changes in the equation improves the ability to model highly
strained flows.
number flows.
Realizable k A variant of the standard k model. Its realizability stems from changes that allow
certain mathematical constraints to be obeyed which ultimately improves the
Standard k
SST k
flows.
A variant of the standard k model. Combines the original Wilcox model for use
near walls and the standard k model away from walls using a blending function.
Also limits turbulent viscosity to guarantee that T ~ k. The transition and shearing
Model
Page 37 of 81
Quadratic
Spalart
Economical for large meshes. Performs poorly for 3D flows, free shear
Allmaras
flows, flows with strong separation. Suitable for mildly complex (quasi-2D)
external/internal flows and boundary layer flows under pressure gradient
Standard k
RNG k
SST k
Page 38 of 81
Unsteady
Conduction
Conduction
Species
Diffusion
Viscous
Dissipation
Enthalpy
Source/Sink
Pressure work and kinetic energy are always accounted for with
compressible flows or when using the density-based solvers. For the
pressure-based solver, they are omitted and can be added through the
text command:
The TUI command define/models/energy? Will give more options
when enabling the energy equation.
h is the sensible
enthalpy:
Anisotropic conductivity
in solids (pressure-based
solver only)
Page 39 of 81
Grid
Velocity Vectors
Temperature Contours
Page 40 of 81
Air outlet
Symmetry
Planes
Top wall
(externally cooled)
h = 1.5 W/m2K
T = 298 K
Air inlet
V = 0.5 m/s
T = 298 K
Electronic Component
(one half is modeled)
k = 1.0 W/mK
Heat generation rate of 2
watts (each component)
Page 41 of 81
Wall zone
(with shadow)
Fluid zone
Solid zone
Wall zone
(no shadow)
Fluid zone
Page 42 of 81
Natural Convection
Natural convection occurs when heat
is added to fluid and fluid density
varies with temperature.
Flow is induced by force of gravity
acting on density variation.
When gravity term is included,
pressure gradient and body force term
in the momentum equation are rewritten as:
where
This pressure transformation avoids round off error when gravity is
enabled.
Page 43 of 81
Valid when density variations are small (i.e., small variations in temperature).
Page 44 of 81
Radiation
Radiation effects should be accounted for when
is of
comparable magnitude as the convection and conduction heat transfer rates.
is the Stefan-Boltzmann constant, 5.6710-8 W/(m2K4)
Accuracy
DTRM and DOM are the most
accurate.
Optical thickness
Use DTRM/DOM for optically thin
media (L << 1)
Use P1 for optically thick media.
Use S2S for zero optical thickness.
Scattering
Scattering is accounted for only with P1 and DO.
Particulate effects
P1 and DOM account for radiation exchange between gas and particulates.
Page 45 of 81
Your goal may also be simply to analyze the flow over a prescribed time
interval.
Free surface flows
Moving shock waves
Etc.
Forced transients
Time-dependent boundary conditions, source terms drive the transient flow field
Examples: pulsing flow in a nozzle, rotor-stator interaction in a turbine stage
Page 46 of 81
Before performing iterations, you will need to set some additional controls.
Solver settings
Animations
Data export / Autosave options
Page 47 of 81
Time step size estimate can also be chosen so that the transient
characteristics of the flow can be resolved (e.g. flow within a known
period of fluctuations)
Time-averaged statistics
Particularly useful for LES turbulence
calculations
Page 48 of 81
Page 49 of 81
Performing Iterations
The most common time advancement
scheme is the iterative scheme.
The solver converges the current time
step and then advances time.
Time is advanced when Max
Iterations/Time Step is reached or
convergence criteria are satisfied.
Time steps are converged sequentially
until the Number of Time Steps is
reached.
Convergence Behavior
Residual plots for transient simulations are not always indicative of a
converged solution.
A residual plot for a simple transient calculation is shown here.
You should select the time step size such that the residuals reduce
by around three orders of magnitude within one time step.
This will ensure accurate resolution of transient behavior.
Page 50 of 81
5 CFD EXERCISE
1.23 Fluid Flow and Heat Transfer in a Mixing Tee
Start in Workbench
If starting from a ready-made mesh file (*.meshdat),
start Workbench and import the file (see screenshot below)
and save the project
Welcome!
Introductory tutorial for FLUENT
starting from existing mesh (generated in earlier tutorial)
model set-up, solution and post-processing
Page 51 of 81
then Update the mesh (via Right-click) to convert the mesh format
FLUENT interface
The main commands
are reached from the
navigation pane
Some useful
commands have
toolbar buttons
Page 52 of 81
Display geometry
Press Display
select Edge Type to be Feature, and press Display and then Close
mesh has scaled, so press Fit to Window
Page 53 of 81
Activate models
Double-click (or click and press Edit...) these models:
Energy Equation: On
Viscous model: k-epsilon, Realizable
Turbulence modeling is a
complicated area. The choice of
model depends on the application.
Here, the Realizable k-epsilon model
is used. This is an improvement on
the well-established Standard
k-epsilon model. Accept the
remaining default settings.
Page 54 of 81
Page 55 of 81
Boundary Conditions
In Boundary Conditions, double-click the zone called inlet-y
Velocity Magnitude 5m/s
Hydraulic Diameter 0.15m
Turbulent Intensity 5%
Temperature 10C
Inlet flows bring
turbulence with them.
The quantities depend
on the upstream
conditions, so they are
user inputs. For flow in
pipes, turbulent
intensity is typically 5%
to 10%, and the lengthscale of the turbulence
can be deduced from
the pipe diameter.
Boundary Conditions
Still in Boundary Conditions:
Double-click the zone called inlet-z
Velocity Magnitude 3m/s
Hydraulic Diameter 0.10m
Turbulent Intensity 5%
Temperature 90C
Turbulent Intensity 5%
Temperature 30C
The simulation may predict that flow enters the model through
parts of the outlet. This backflow will bring turbulence and
energy back into the model, but the model cannot predict how
much (because the flow is coming from outside of the model).
So, it is necessary to specify backflow conditions.
Ideally, the geometry should be selected such that flow enters
the model only at well-defined inlets. The backflow settings then
do not affect the final solution (although they may be used in
intermediate iterations).
Page 56 of 81
Second-order discretization
In Solution methods
Discretization Second Order for pressure
Discretization Third Order MUSCL for all other quantities
Monitors
In Monitors, press Create... for a Surface Monitor
Name p-inlet-y
Area-Weighted Average
Plot in window 2
Pressure
inlet-y
Page 57 of 81
Monitors
In Monitors, press Create... for a Surface Monitor
Name p-inlet-z
Area-Weighted Average
Plot in window 2
Pressure
inlet-z
Plot in window 3
Temperature
outlet
Here is an instance
where FLUENT does not
convert units. Click OK.
Initialization
In Solution Initialization
select Compute from to be inlet-y
press Initialize
Page 58 of 81
Calculating
While calculating, review residuals and monitors
change graphic windows using the drop-down box
An alternative way to
stop calculation is to
press CTRL-C.
In this case, 200
iterations (or fewer) are
enough to reach low
residuals and stable
values of monitors.
Most cases require
many more.
Calculate
In Run Calculation
press Check Case...
see No recommendations to make at this time
Page 59 of 81
Preliminary post-processing
In Graphics and Animations, select Contours, press Set Up...
select Filled contours of Turbulence...Wall Yplus on wall-fluid
press Display note almost all values are between 30 and 200
Yplus is a measure of
whether mesh near the
walls captures the
turbulent effects. This
range is acceptable.
Page 60 of 81
where z is the average velocity at the inlet, which is 1 m/s in this case.
Solve this problem using FLUENT via ANSYS Workbench. Plot the centerline velocity, wall
skin-friction coefficient, and velocity profile at the outlet. Validate your results.
Note: The values used for the inlet velocity and flow properties are chosen for convenience
rather than to reflect reality. The key parameter value to focus on is the Reynolds number.
Define Solver Properties
In this section the various solver properties will be specified in order to obtain the
proper solution for the laminar pipe flow. First, the axisymmetric nature of the geometry
must be specified. Under General > Solver > 2D Space select Axisymmetric.
Next, the Viscous Model parameters will be specified. In order to open the Viscous
Model Options Models > Viscous - Laminar > Edit.... By default, the Viscous Model options
are set to laminar, so no changes are needed. Click Cancel to exit the menu.
Now, the Energy Model parameters will be specified. In order to open the Energy Model
Options Models > Energy-Off > Edit.... For incompressible flow, the energy equation is
decoupled from the continuity and momentum equations. We need to solve the energy
equation only if we are interested in determining the temperature distribution. We will not
deal with temperature in this example. So leave the Energy Equation set to off and click
Cancel to exit the menu.
Page 61 of 81
Page 62 of 81
Page 63 of 81
Consider a fluid flowing across a flat plate, as illustrated above. Obtain the velocity
and pressure distribution when the Reynolds number based on the plate length is
10,000.
This Reynolds number is obtained by using the following settings.
o
The density of the fluid is 1 kg/m^3 and the viscosity is 1 x 10 ^(-4) kg/(m-s).
Note that these values are not necessarily physical. They have been picked to
yield the desired Reynolds number.
For an external flow like this, one needs to determine where to place the outer
boundary. A rectangular domain will be used for this simulation.
The height of the rectangular domain will be determined by the expected boundary
layer thickness.
For a flat plate boundary layer, one can use the following approximation to find the
boundary layer thickness.
When x = L,
= 0.05m.
Page 64 of 81
The height of the domain will be set to ten times the boundary layer thickness. Thus,
the height of the boundary will be set to 0.5m. The following figure shows the
dimensions of the domain, and the boundary labels which will be used to set the
boundary conditions.
Page 65 of 81
Page 66 of 81
We'll create a straight vertical line from (x0,y0)=(0.5,0) to (x1,y1)=(0.5,0.5). Select Line
Tool under Options. Enter x0=0.5, y0=0,x1=0.5, y1=0.5. Enter line1 under New
Surface Name. Your Line/Rake Surface menu should look exactly like the following image.
Next, click Create. Now, that the vertical line has been created we can proceed to the
plotting. Click on Plots, then double click XY Plot to open the Solution XY Plot menu. In the
Solution XY Plot menu, use the settings that were used from the section above, except select
line1 under Surfaces and deselect any other geometry sections. Make sure that Write to File
is not selected, then click Plot. You should obtain the following output.
Page 67 of 81
Consider the steady state case of a fluid flowing past a cylinder, as illustrated above.
Obtain the velocity and pressure distributions when the Reynolds number is chosen to
be 20.
In order to simplify the computation, the diameter of the pipe is set to 1 m, the x
component of the velocity is set to 1 m/s and the density of the fluid is set to 1
kg/m^3. Thus, the dynamic viscosity must be set to 0.05 kg/m*s in order to obtain the
desired Reynolds number.
Page 68 of 81
Boundary Conditions
First, we will specify a velocity inlet boundary condition. We will set the left half of
the outer boundary as a velocity inlet with a velocity of 1 m/s in the x direction. Next, we
will use a pressure outlet boundary condition for the left half of the outer boundary with a
gauge pressure of 0 Pa. Lastly, we will apply a no slip boundary condition to the cylinder
wall. The aforementioned boundary conditions are illustrated below.
Setup (Physics)
Double Precision:Select Double Precision.
Solution: Second Order Upwind Momentum Scheme
Solution > Solution Methods > Spatial Discretization.Set Momentum to Second Order
Upwind
Convergence Criterion
Solution
>
Monitors
>
Residuals
>
Set the Absolute Criteria for , x-velocity and y-velocity all to 1e-6. Click ok
Solution > Monitors > Drag > Edit....
Then check Print to Console and Plot. Next, click
cylinderwall, which is located under Wall Zones.
Lastly, click ok
Results
Vorticity:Results > Graphics and Animations >
Contours > Set Up...
Page 69 of 81
Edit....
Consider the unsteady state case of a fluid flowing past a cylinder, as illustrated
above. For this tutorial we will use a Reynolds Number of 120. In order to simplify
the computation, the diameter of the pipe is set to 1 m, the x component of the
velocity is set to 1 m/s and the density of the fluid is set to 1 kg/m^3. Thus, the
dynamic viscosity must be set to 8.333x10^-3 kg/m*s in order to obtain the desired
Reynolds number.
For this Unsteady Case, the governing equation becomes non linear due to the
addition of a time derivative term:
The methods implemented by FLUENT to solve a time dependent system are very
similar to those used in a steady-state case. In this case, the domain and boundary
conditions will be the same as the Steady Flow Past a Cylinder.
However, because this is a transient system, initial conditions at t=0 are required. To
solve the system, we need to input the desired time range and time step into
FLUENT. The program will then compute a solution for the first time step, iterating
until convergence or a limit of iterations is reached, then will proceed to the next time
step, "marching" through time until the end time is reached.
1. Setup (Physics)
Duplicate Steady Flow Project
First, complete the Steady Flow Past a Cylinder Tutorial. In the Workbench Project Page of
your steady flow project, (Right Click) Solution > Duplicate
Launch Fluent.
(Double Click) Setup in the duplicate project. Select Double Precision. Then click OK
Transient
In this step here we will, tell FLUENT to solve for the unsteady flow. As you can see, by
default FLUENT will solve for the steady flow.
Problem Setup > General. Set Time to Transient.
Specify Material Properties
Problem Setup > Materials > Fluid > Create/Edit.... Set the viscosity to 8.333*10^-3
kg/m*s. Click Change/Create then click close
Page 70 of 81
2. Solution
Convergence Criterion: Turn off Drag, Turn on Lift
Solution > Monitors > Drag > Edit.... Then uncheck Print to Console and uncheck Plot.
Click ok.
Solution > Monitors > Lift > Edit.... Then check Print to Console, Plot and Write. Click ok.
The last option writes the lift coefficient data to a file that is buried in one of the subfolders
that FLUENT creates in the working folder. You'll have to dig around to find it.
Solution Initialization
Adapt > Region.... Then set X Min to 0.5 m, set X Max to 32 m, set Y Min to 0 m, and set Y
Max to 32m. Click Mark then click Close.
Solution > Solution Initialization. Set Compute From to farfield1.. Click Initialize. Next,
click Patch. Complete the patching menu as shown below.
Page 71 of 81
Problem Specification
Consider a 15 angle wedge at zero angle of attack. The incoming flow conditions
are: M1=3, p1=1 atm, T1=300 K.
Page 72 of 81
Use FLUENT to obtain the flowfield over the wedge. Compare the pressure
coefficient on the wedge surface with the corresponding analytical result for an
oblique shock.
Click OK. This means the solver will neglect the viscous terms in the governing equations.
Models > Energy
Double click on Energy - Off
In compressible flow, the energy equation is coupled to the continuity and momentum
equations. So we need to solve the energy equation for our problem.
To turn on the energy equation, check the box next to Energy Equation and click OK.
Problem Setup > Materials
Make sure air is selected under Fluid. Double click air, set Density to ideal-gas and
make sure Cp is constant and equal to 1006.43 j/kg-k. Also make sure the Molecular Weight
is constant and equal to 28.966 kg/kgmol. Selecting the ideal gas option means that FLUENT
will use the ideal-gas equation of state to relate density to the static pressure and
temperature.
Define > Operating Conditions
Page 73 of 81
To understand what the Operating Pressure is, read through the short-and-sweet
section 8.14.2 in the user's guide. We see that for all flows, FLUENT uses the gauge pressure
internally in order to minimize round-off errors. Any time an absolute pressure is needed, as
in the ideal gas law, it is generated by adding the operating pressureto the gauge pressure:
absolute pressure = gauge pressure + operating pressure
Round-off errors occur when pressure changes p in the flow are much smaller than
the pressure values p. One then gets small differences of large numbers. For our supersonic
flow, we'll get significant variation in the absolute pressure so that pressure changes p are
comparable to pressure levels p. So we can work in terms of absolute pressure without being
hassled by pesky round-off errors. To have FLUENT work in terms of the absolute pressure,
set the Operating Pressure to 0.
Thus, in our case, there is no difference between the gauge and absolute pressures. Click OK.
Define > Boundary Conditions
Set the boundary condition for the pressure_farfield surface (aka zone) to the
boundary type pressure-far-field by clicking on the drop-down list. Select Yesin the pop-up
window asking if it's "OK to change pressure_farfield's type from wall to pressure-far-field.
Set the Gauge Pressure to 101325. Set the Mach Number to 3. Under X-Component
of Flow Direction, enter a value of 1 (i.e. the farfield flow is in the X direction).
Next, click on the Thermal Tab. Change the temperature to 300K.
Page 74 of 81
Click OK. The pressure-far-field boundary type effectively imposes that there is no
upstream propagation of disturbances if the flow at the boundary is supersonic. See section
7.9 of the FLUENT help for more details about this boundary type.
Similarly, change the boundary condition for the symmetry surface to the symmetry boundary
type. No user input is required for the symmetry boundary type. At any boundary set to the
symmetry type, FLUENT internally sets
normal velocity = 0
normal gradients of all variables = 0
Solve:
Solve > Controls or Solutions > Solution Controls
Click on the Equations button and select Flow, then click OK. Also, set the Courant
Number to 0.1.
Solve > Methods or Solutions > Solution Methods
We'll use a second-order discretization scheme. Under Spatial Discretization, set Flow to
Second Order Upwind.
Page 75 of 81
Click Initialize. Now, for each cell in the mesh, M=3, p=1 atm, T=300 K. These values will
of course get updated as we iterate the solution below.
FLUENT reports a residual for each governing equation being solved. The residual is a
measure of how well the current solution satisfies the discrete form of each governing
equation. We'll iterate the solution until the residual for each equation falls below 1e-6.
Solve > Monitors
Select Residuals - Print and click Edit. Set Absolute Criteria for all equationsto 1e-6.
Also, click on Plot. This will plot the residuals in the graphics window as they are calculated;
giving you a visual feel for if/how the iterations are proceeding to convergence.
Click OK.
Main Menu > File > Write > Case...
This will save your FLUENT settings and the mesh to a "case" file. Type in
wedge.cas for Case File. Click OK.
Solve > Run Calculation...
Set the Number of Iterations to 1000. Click Calculate.
The residuals for each iteration are printed out as well as plotted in the graphics
window as they are calculated. The residuals after 1000 iterations are not below the
convergence criterion of 1e-6 specified before. So run the solution for 1000 more iterations.
The solution converges in about 1510 iterations; the residuals for all the governing equations
are below 1e-6 at this point.
Results
Plot Velocity Vectors
Display > Graphics and Animations or Results > Graphics and Animations
Select Vectors, click on the Set up button. Under Color by, select Mach Number in
place of Velocity Magnitude since the former is of greater interest in compressible flow. The
colors of the velocity vectors will indicate the Mach number. Use the default settings by
clicking Display.
This draws an arrow at the center of each cell. The direction of the arrow indicates the
velocity direction and the magnitude is proportional to the velocity magnitude (not Mach
Page 76 of 81
number, despite the previous setting). The color indicates the corresponding Mach number
value. The arrows show up a little more clearly if we reduce their lengths. Change Scale to
0.2. Click Display.
1.29 Compressible Flow in a Nozzle
Problem Specification
Page 77 of 81
pressure-based
density-based
Both solvers can be used for a broad range of flows, but in some cases one formulation
may perform better (i.e., yield a solution more quickly or resolve certain flow features better)
than the other. The pressure-based and density-based approaches differ in the way that the
continuity, momentum, and (where appropriate) energy and species equations are solved, as
described in this section in the separate +Theory Guide.+The pressure-based solver
traditionally has been used for incompressible and mildly compressible flows. The densitybased approach, on the other hand, was originally designed for high-speed compressible
flows. Both approaches are now applicable to a broad range of flows (from incompressible to
highly compressible), but the origins of the density-based formulation may give it an
accuracy (i.e. shock resolution) advantage over the pressure-based solver for high-speed
compressible flows.
Since we are solving a high-speed compressible flow, let's pick the density-based solver.
In the Solver menu, select Density Based.
Under Space, choose Axisymmetric. This will solve the axisymmetric form of the governing
equations.
Page 78 of 81
Click OK.
This means the solver will neglect the viscous terms in the governing equations.
Define > Materials
Select air under Fluid materials and click the Create/Edit... button. Under
Properties, choose Ideal Gas next to Density. You should see the window expand. This
means FLUENT uses the ideal gas equation of state to relate density to the static pressure and
temperature.
Click OK.
It is important that you set the operating pressure correctly in compressible flow calculations
since FLUENT uses it to compute the absolute pressure used in the ideal gas law.
Define > Boundary Conditions
Set boundary conditions for the following surfaces: inlet, outlet, centerline, wall.
Select inlet under Zone and pick pressure-inlet under Type as its boundary condition.
Automatically, the Pressure Inlet window should come up.
Set the total pressure (noted as Gauge Total Pressure in FLUENT) at the inlet to
101,325 Pa as specified in the problem statement. For a subsonic inlet, Supersonic/Initial
Gauge Pressure is the initial guess value for the static pressure. This initial guess value can
be calculated from the 1D analysis since we know the area ratio at the inlet. This value is
99,348 Pa. Note that this value will be updated by the code. After you have entered the
values check that under the Thermal tab, the Total Temperature is 300K. Then click OK to
close the window.
Page 79 of 81
Using the same steps as above, pick pressure-outlet as the boundary condition for the
outlet surface. Then, when the Pressure Outlet window comes up, set the pressure to 3738.9
as specified in the problem statement. Click OK.
Set the centerline zone to axis boundary type. Accept any prompts that might appear
and leave the name as centerline if you'd like.
Make sure that wall zone is set to wall boundary type.
Solution:
Under Solution > Solution Methods
We'll just use the defaults. Note that a second-order Upwind scheme will be used. Click OK.
Set Initial Guess
Main Menu > Solve > Initialization
As you may recall from the previous tutorials, this is where we set the initial guess
values for the iterative solution. We'll set these values to be the ones at the inlet, so under
Compute From select inlet.This will automatically set the initial values for all the cells. You
can also type the values by hand and the results will be equivalent.
Click Initialize. This completes the initialization.
Set Convergence Criteria
FLUENT reports a residual for each governing equation being solved during the
iterative process. The residual is a measure of how well the current solution satisfies the
discrete form of each governing equation. We'll iterate the solution until the residual for each
equation falls below 1e-6.
Main Menu > Solve > Monitors or Under Solution > Monitors select Residual > Edit
Change the residual under Convergence Criterion for continuity, x-velocity, y-velocity and
energy to 1e-6.
Also, under Options select Plot if is not selected yet. This will plot the residuals in the
graphics window as they are calculated.
Page 80 of 81
Results
Pressure Contour Plot
Let's look at how pressure changes in the nozzle.
Display > Graphics and Animations > Contours > Set up
Select Pressure... and Static Pressure under Contours of. Use Levels of 30
Page 81 of 81