You are on page 1of 44

Tutorial 4.

Modeling Unsteady Compressible Flow


Introduction
In this tutorial, FLUENTs density-based implicit solver is used to predict the time-
dependent ow through a two-dimensional nozzle. As an initial condition for the transient
problem, a steady-state solution is generated to provide the initial values for the mass
ow rate at the nozzle exit.
This tutorial demonstrates how to do the following:
Calculate a steady-state solution (using the density-based implicit solver) as an
initial condition for a transient ow prediction.
Dene an unsteady boundary condition using a user-dened function (UDF).
Use dynamic mesh adaption for both steady-state and transient ows.
Calculate a transient solution using the second-order implicit unsteady formulation
and the density-based implicit solver.
Create an animation of the unsteady ow using FLUENTs unsteady solution ani-
mation feature.
Prerequisites
This tutorial assumes that you are familiar with the menu structure in FLUENT and that
you have completed Tutorial 1. Some steps in the setup and solution procedure will not
be shown explicitly.
Problem Description
The geometry to be considered in this tutorial is shown in Figure 4.1. Flow through a
simple nozzle is simulated as a 2D planar model. The nozzle has an inlet height of 0.2 m,
and the nozzle contours have a sinusoidal shape that produces a 10% reduction in ow
area. Due to symmetry, only half of the nozzle is modeled.
c Fluent Inc. September 21, 2006 4-1
Modeling Unsteady Compressible Flow
p = 0.9 atm
inlet
p = 0.7369 atm
exit
0.2 m
plane of symmetry
p (t )
exit
Figure 4.1: Problem Specication
Setup and Solution
Preparation
1. Download unsteady_compressible.zip from the Fluent Inc. User Services Center
or copy it from the FLUENT documentation CD to your working folder (as described
in Tutorial 1).
2. Unzip unsteady_compressible.zip.
The les nozzle.msh and pexit.c can be found in the unsteady compressible
folder created after unzipping the le.
3. Start the 2D (2d) version of FLUENT.
4-2 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Step 1: Grid
1. Read in the mesh le nozzle.msh.
File Read Case...
2. Check the grid.
Grid Check
FLUENT will perform various checks on the mesh and will report the progress in
the console. Make sure that the reported minimum volume is a positive number.
3. Display the grid.
Display Grid...
(a) Retain the default settings.
(b) Click Display and close the Grid Display panel.
To make the view more realistic, you will mirror it across the centerline in the step
that follows.
c Fluent Inc. September 21, 2006 4-3
Modeling Unsteady Compressible Flow
4. Mirror the view across the centerline (Figure 4.2).
Display Views...
(a) Select symmetry from the Mirror Planes selection list.
(b) Click Apply and close the Views panel.
Grid
FLUENT 6.3 (2d, pbns, lam)
Figure 4.2: 2D Nozzle Mesh Display with Mirroring
4-4 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Step 2: Units
1. For convenience, change the unit of measurement for pressure.
The pressure for this problem is specied in atm, which is not the default unit in
FLUENT. You will need to redene the pressure unit as atm.
Dene Units...
(a) Select pressure from the Quantities selection list.
Scroll down the list to nd pressure.
(b) Select atm from the Units selection list.
(c) Close the Set Units panel.
c Fluent Inc. September 21, 2006 4-5
Modeling Unsteady Compressible Flow
Step 3: Models
1. Specify the solver settings.
The density-based implicit solver is the solver of choice for compressible, transonic
ows without signicant regions of low-speed ow. In cases with signicant low-
speed ow regions, the pressure-based solver is preferred. Also, for transient cases
with traveling shocks, the density-based explicit solver with explicit time stepping
may be the most ecient.
Dene Models Solver...
(a) Select Density Based from the Solver list.
(b) Retain the default selection of Implicit from the Formulation list.
(c) Retain the default selection of Steady from the Time list.
Note: You will solve for the steady ow through the nozzle initially. In later
steps, you will use these initial results as a starting point for an unsteady
calculation.
(d) Click OK to close the Solver panel.
4-6 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
2. Enable the energy equation.
Dene Models Energy...
3. Enable the standard Spalart-Allmaras turbulence model.
Dene Models Viscous...
The Spalart-Allmaras model is a relatively simple one-equation model that solves
a modeled transport equation for the kinematic eddy (turbulent) viscosity. This
embodies a class of one-equation models in which it is not necessary to calculate a
length scale related to the local shear layer thickness. The Spalart-Allmaras model
was designed specically for aerospace applications involving wall-bounded ows and
has been shown to give good results for boundary layers subjected to adverse pressure
gradients.
c Fluent Inc. September 21, 2006 4-7
Modeling Unsteady Compressible Flow
Step 4: Materials
1. Set the properties for air, the default uid material.
Dene Materials...
(a) Select ideal-gas from the Density drop-down list, so that the ideal gas law is
used to calculate density.
Note: FLUENT automatically enables the solution of the energy equation when
the ideal gas law is used, in case you did not already enable it manually
in the Energy panel.
(b) Retain the default values for all other properties.
(c) Click the Change/Create button to save your change.
(d) Close the Materials panel.
4-8 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Step 5: Operating Conditions
1. Set the operating pressure.
Dene Operating Conditions...
(a) Enter 0 atm for Operating Pressure.
(b) Click OK to close the Operating Conditions panel.
Since you have set the operating pressure to zero, you will specify the boundary
condition inputs for pressure in terms of absolute pressures when you dene them
in the next step. Boundary condition inputs for pressure should always be relative
to the value used for operating pressure.
c Fluent Inc. September 21, 2006 4-9
Modeling Unsteady Compressible Flow
Step 6: Boundary Conditions
Dene Boundary Conditions...
1. Set the boundary conditions for the nozzle inlet (inlet).
(a) Enter 0.9 atm for Gauge Total Pressure.
(b) Enter 0.7369 atm for Supersonic/Initial Gauge Pressure.
4-10 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
The inlet static pressure estimate is the mean pressure at the nozzle exit. This
value will be used during the solution initialization phase to provide a guess
for the nozzle velocity.
(c) Select Turbulent Viscosity Ratio from the Specication Method drop-down list
in the Turbulence group box.
(d) Enter 1 for Turbulent Viscosity Ratio.
For low to moderate inlet turbulence, a viscosity ratio of 1 is recommended.
(e) Click OK to close the Pressure Inlet panel.
2. Set the boundary conditions for the nozzle exit (outlet).
(a) Enter 0.7369 atm for Gauge Pressure.
(b) Select Turbulent Viscosity Ratio from the Specication Method drop-down list
in the Turbulence group box.
(c) Retain the default entry of 10 for Backow Turbulent Viscosity Ratio.
If substantial backow occurs at the outlet, you may need to adjust the backow
values to levels close to the actual exit conditions.
(d) Click OK to close the Pressure Outlet panel.
3. Close the Boundary Conditions panel.
c Fluent Inc. September 21, 2006 4-11
Modeling Unsteady Compressible Flow
Step 7: Solution: Steady Flow
In this step, you will generate a steady-state ow solution that will be used as an initial
condition for the time-dependent solution.
1. Initialize the solution.
Solve Initialize Initialize...
(a) Select inlet in the Compute From drop-down list.
(b) Click Init and close the Solution Initialization panel.
4-12 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
2. Set the solution parameters.
Solve Controls Solution...
(a) Select Second Order Upwind from the Modied Turbulent Viscosity drop-down
list in the Discretization group box.
Second-order discretization provides optimum accuracy.
(b) Click OK to close the Solution Controls panel.
c Fluent Inc. September 21, 2006 4-13
Modeling Unsteady Compressible Flow
3. Perform gradient adaption to rene the mesh.
You will activate dynamic adaption so that the solver periodically renes the mesh
in the vicinity of the shocks as the iterations progress. The shocks are identied by
their large pressure gradients.
Adapt Gradient...
(a) Select Gradient from the Method list.
The mesh adaption criterion can either be the gradient or the curvature (second
gradient). Because strong shocks occur inside the nozzle, the gradient is used
as the adaption criterion.
(b) Select Scale from the Normalization list.
Mesh adaption can be controlled by the raw (or standard) value of the gradient,
the scaled value (by its average in the domain), or the normalized value (by its
maximum in the domain). For dynamic mesh adaption, it is recommended to
use either the scaled or normalized value because the raw values will probably
change strongly during the computation, which would necessitate a readjust-
ment of the coarsen and rene thresholds. In this case, the scaled gradient is
used.
(c) Enable the Dynamic option in the Dynamic group box.
(d) Enter 100 for the Interval.
For steady-state ows, it is sucient to only seldomly adapt the meshin
this case an interval of 100 iterations is chosen. For time-dependent ows, a
considerably smaller interval must be used.
4-14 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
(e) Retain the default selection of Pressure... and Static Pressure from the Gradients
of drop-down lists.
(f) Enter 0.3 for Coarsen Threshold.
(g) Enter 0.7 for Rene Threshold.
As the rened regions of the mesh get larger, the coarsen and rene thresholds
should get smaller. A coarsen threshold of 0.3 and a rene threshold of 0.7
result in a medium to strong mesh renement in combination with the
scaled gradient.
(h) Click Apply to store the information.
(i) Click the Controls... button to open the Grid Adaption Controls panel.
i. Retain the default selection of uid from the Zones selection list.
ii. Enter 20000 for Max # of Cells.
To restrict the mesh adaption, the maximum number of cells can be lim-
ited. If this limit is violated during the adaption, the coarsen and rene
thresholds are adjusted to respect the maximum number of cells. Addi-
tional restrictions can be placed on the minimum cell volume, minimum
number of cells, and maximum level of renement.
iii. Click OK to close the Grid Adaption Controls panel.
(j) Close the Gradient Adaption panel.
c Fluent Inc. September 21, 2006 4-15
Modeling Unsteady Compressible Flow
4. Enable the plotting of residuals.
Solve Monitors Residual...
(a) Enable Plot in the Options group box.
(b) Click OK to close the Residual Monitors panel.
5. Enable the plotting of mass ow rate at the ow exit.
Solve Monitors Surface...
4-16 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
(a) Set Surface Monitors to 1.
(b) Enable the Plot and Write options for monitor-1.
Note: When the Write option is selected in the Surface Monitors panel, the
mass ow rate history will be written to a le. If you do not select the
write option, the history information will be lost when you exit FLUENT.
(c) Click the Dene... button to open the Dene Surface Monitor panel.
i. Select Mass Flow Rate in the Report Type drop-down list.
ii. Enter noz ss.out for File Name.
iii. Select outlet in the Surfaces list.
iv. Click OK to close the Dene Surface Monitor panel.
(d) Click OK to close the Surface Monitors panel.
6. Save the case le (noz ss.cas).
File Write Case...
c Fluent Inc. September 21, 2006 4-17
Modeling Unsteady Compressible Flow
7. Start the calculation by requesting 2000 iterations.
Solve Iterate...
Convergence history of Mass Flow Rate on outlet
FLUENT 6.3 (2d, dbns imp, S-A)
Iteration
(kg/s)
Rate
Flow
Mass
2000 1800 1600 1400 1200 1000 800 600 400 200 0
-14.0000
-14.5000
-15.0000
-15.5000
-16.0000
-16.5000
-17.0000
monitor-1
Figure 4.3: Mass Flow Rate History
The mass ow rate history shows that the solution is converged after around 1800
iterations.
8. Save the case and data les (noz ss.cas and noz ss.dat).
File Write Case & Data...
4-18 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
9. Check the mass ux balance.
Report Fluxes...
!
Although the mass ow rate history indicates that the solution is con-
verged, you should also check the mass ux throughout the domain to
ensure that mass is being conserved.
(a) Retain the default selection of the Mass Flow Rate option.
(b) Select inlet and outlet in the Boundaries selection list.
(c) Click Compute and examine the values displayed in the panel.
!
The net mass imbalance should be a small fraction (e.g., 0.2%) of the total
ux through the system. The imbalance is displayed in the lower right
eld under kg/s. If a signicant imbalance occurs, you should decrease
your residual tolerances by at least an order of magnitude and continue
iterating.
(d) Close the Flux Reports panel.
c Fluent Inc. September 21, 2006 4-19
Modeling Unsteady Compressible Flow
10. Display the steady-ow velocity vectors (Figure 4.4).
Display Vectors...
(a) Enter 10 for Scale.
(b) Select all of the surfaces from the Surfaces selection list, by clicking the shaded
icon above the right corner of the list.
(c) Click Display and close the Vectors panel.
The steady ow prediction in Figure 4.4 shows the expected form, with peak velocity
of approximately 336 m/s through the nozzle.
4-20 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Velocity Vectors Colored By Velocity Magnitude (m/s)
FLUENT 6.3 (2d, dbns imp, S-A)
3.36e+02
3.20e+02
3.03e+02
2.86e+02
2.69e+02
2.52e+02
2.36e+02
2.19e+02
2.02e+02
1.85e+02
1.69e+02
1.52e+02
1.35e+02
1.18e+02
1.01e+02
8.46e+01
6.78e+01
5.10e+01
3.42e+01
1.74e+01
6.02e-01
Figure 4.4: Velocity Vectors (Steady Flow)
c Fluent Inc. September 21, 2006 4-21
Modeling Unsteady Compressible Flow
11. Display the steady ow contours of static pressure (Figure 4.5).
Display Contours...
(a) Enable Filled in the Options group box.
(b) Click Display and close the Contours panel.
The steady ow prediction in Figure 4.5 shows the expected pressure distribution,
with low pressure near the nozzle throat.
4-22 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Contours of Static Pressure (atm)
FLUENT 6.3 (2d, dbns imp, S-A)
7.84e-01
7.66e-01
7.48e-01
7.30e-01
7.12e-01
6.94e-01
6.76e-01
6.57e-01
6.39e-01
6.21e-01
6.03e-01
5.85e-01
5.67e-01
5.49e-01
5.31e-01
5.12e-01
4.94e-01
4.76e-01
4.58e-01
4.40e-01
4.22e-01
Figure 4.5: Contours of Static Pressure (Steady Flow)
c Fluent Inc. September 21, 2006 4-23
Modeling Unsteady Compressible Flow
Step 8: Enable Time Dependence and Set Unsteady Conditions
In this step you will dene a transient ow by specifying an unsteady pressure condition
for the nozzle.
1. Enable a time-dependent ow calculation.
Dene Models Solver...
(a) Select Unsteady from the Time list.
(b) Select 2nd-Order Implicit from the Unsteady Formulation list.
(c) Click OK to close the Solver panel.
Implicit (dual) time-stepping allows you to set the physical time step used for the
transient ow prediction (while FLUENT continues to determine the time step used
for inner iterations based on a Courant condition). Here, second-order implicit
time-stepping is enabled: this provides higher accuracy in time than the rst-order
option.
4-24 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
2. Read in the user-dened function (pexit.c), in preparation for dening the un-
steady condition for the nozzle exit.
The pressure at the outlet is dened as a wave-shaped prole, and is described by
the following equation:
p
exit
(t) = 0.12 sin(t) + p
exit
(4.1)
where
= circular frequency of unsteady pressure (rad/s)
p
exit
= mean exit pressure (atm)
In this case, = 2200 rad/s, and p
exit
= 0.7369 atm.
A user-dened function (pexit.c) has been written to dene the equation (Equa-
tion 4.1) required for the pressure prole.
Note: To input the value of Equation 4.1 in the correct units, the function pexit.c
has been multiplied by a factor of 101325 to convert from the chosen pressure
unit (atm) to the SI unit required by FLUENT (Pa). This will not aect the
displayed results.
See the separate UDF Manual for details about user-dened functions..
Dene User-Dened Functions Interpreted...
(a) Enter pexit.c for Source File Name.
(b) Click Interpret.
The user-dened function has already been dened, but it needs to be compiled
within FLUENT before it can be used in the solver.
(c) Close the Interpreted UDFs panel.
c Fluent Inc. September 21, 2006 4-25
Modeling Unsteady Compressible Flow
3. Set the unsteady boundary conditions at the nozzle exit (outlet).
Dene Boundary Conditions...
(a) Select udf unsteady pressure (the user-dened function) from the Gauge Pressure
drop-down list.
(b) Click OK to close the Pressure Outlet panel.
4. Update the gradient adaption parameters for the transient case.
Adapt Gradient...
(a) Enter 1 for Interval in the Dynamic group box.
For the transient case, the mesh adaption will be done every time step.
(b) Enter 0.3 for Coarsen Threshold.
(c) Enter 0.7 for Rene Threshold.
The rene and coarsen thresholds have been changed during the steady-state
computation to meet the limit of 20000 cells. Therefore, you need to reset
these parameters to their original values.
(d) Click Apply to store the values.
(e) Click Controls... to open the Grid Adaption Controls panel.
i. Enter 8000 for Min # of Cells.
ii. Enter 30000 for Max # of Cells.
You need to increase the maximum number of cells to try to avoid readjust-
ment of the coarsen and rene thresholds. Additionally, you need to limit
4-26 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
the minimum number of cells to 8000, because it is not desired to have a
coarse mesh during the computation (the current mesh has approximately
10000 cells).
iii. Click OK to close the Grid Adaption Controls panel.
(f) Close the Gradient Adaption panel.
Step 9: Solution: Unsteady Flow
1. Set the time step parameters.
The selection of the time step is critical for accurate time-dependent ow predic-
tions. Using a time step of 2.85596 10
5
seconds, 100 time steps are required for
one pressure cycle. The pressure cycle begins and ends with the initial pressure at
the nozzle exit.
Solve Iterate...
(a) Enter 2.85596e-5 s for Time Step Size.
(b) Enter 600 for Number of Time Steps.
(c) Enter 30 for Max Iterations per Time Step.
(d) Click Apply and close the Iterate panel.
c Fluent Inc. September 21, 2006 4-27
Modeling Unsteady Compressible Flow
2. Modify the plotting of the mass ow rate at the nozzle exit.
Because each time step requires 30 iterations, a smoother plot will be generated by
plotting at every time step.
Solve Monitors Surface...
(a) Select Time Step from the When drop-down list for monitor-1.
(b) Click the Dene... button to open the Dene Surface Monitors panel.
i. Select Time Step from the X Axis drop-down list.
ii. Enter noz uns.out for File Name.
iii. Click OK to close the Dene Surface Monitors panel.
(c) Click OK to close the Surface Monitors panel.
4-28 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
3. Save the transient solution case le (noz uns.cas).
File Write Case...
4. Start the transient calculation.
Solve Iterate...
!
Calculating 600 time steps will require signicant CPU resources. Instead
of calculating the solution, you can read the data le (noz uns.dat.gz)
with the precalculated solution. This data le can be found in the folder
where you found the mesh and UDF les.
By requesting 600 time steps, you are asking FLUENT to compute six pressure
cycles. The mass ow rate history is shown in Figure 4.6.
Convergence history of Mass Flow Rate on outlet (Time=1.7136e-02)
FLUENT 6.3 (2d, dbns imp, S-A, unsteady)
Time Step
(kg/s)
Rate
Flow
Mass
600 500 400 300 200 100 0
-4.0000
-6.0000
-8.0000
-10.0000
-12.0000
-14.0000
-16.0000
-18.0000
monitor-1
Figure 4.6: Mass Flow Rate History (Unsteady Flow)
5. Save the transient case and data les (noz uns.cas and noz uns.dat).
File Write Case & Data...
c Fluent Inc. September 21, 2006 4-29
Modeling Unsteady Compressible Flow
Step 10: Saving and Postprocessing Time-Dependent Data Sets
At this point, the solution has reached a time-periodic state. To study how the ow
changes within a single pressure cycle, you will now continue the solution for 100 more
time steps. You will use FLUENTs solution animation feature to save contour plots of
pressure and Mach number at each time step, and the autosave feature to save case and
data les every 10 time steps. After the calculation is complete, you will use the solution
animation playback feature to view the animated pressure and Mach number plots over
time.
1. Request the saving of case and data les every 10 time steps.
File Write Autosave...
(a) Enter 10 for Autosave Case File Frequency.
(b) Enter 10 for Autosave Data File Frequency.
(c) Retain the default selection of time-step from the Append File Name with drop-
down list.
(d) Enter noz anim for File Name.
When FLUENT saves a le, it will append the time step value to the le
name prex (noz anim). The standard extensions (.cas and .dat) will also
be appended. This will yield le names of the form noz anim0640.cas and
noz anim0640.dat, where 0640 is the time step number.
Optionally, you can add the extension .gz to the end of the le name (e.g.,
noz anim.gz), which will instruct FLUENT to save the case and data les in
compressed format, yielding le names of the form noz anim0640.cas.gz.
(e) Click OK to close the Autosave Case/Data panel.
4-30 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Extra: If you have constraints on disk space, you can restrict the number of
les saved by FLUENT by enabling the Overwrite Existing Files option and
setting the Maximum Number of Each File Type to a nonzero number. After
saving the specied number of les, FLUENT will overwrite the earliest
existing le.
2. Create animation sequences for the nozzle pressure and Mach number contour plots.
Solve Animate Dene...
(a) Set Animation Sequences to 2.
(b) Enter pressure for the Name of the rst sequence and mach-number for the
second sequence, as shown in the previous panel.
(c) Select Time Step from the When drop-down lists for both sequences.
With the default value of 1 for Every, this instructs FLUENT to update the
animation sequence at every time step.
c Fluent Inc. September 21, 2006 4-31
Modeling Unsteady Compressible Flow
(d) Click the Dene... button for pressure to open the associated Animation Se-
quence panel.
i. Select In Memory from the Storage Type list.
The In Memory option is acceptable for a small 2D case such as this. For
larger 2D or 3D cases, saving animation les with either the Metale or
PPM Image option is preferable, to avoid using too much of your machines
memory.
ii. Set Window to 2.
iii. Click the Set button to open the FLUENT [2] graphics window.
4-32 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
iv. Select Contours in the Display Type group box.
The Contours panel will open.
A. Make sure that Filled is selected under Options.
B. Deselect Auto Range.
C. Retain the default selections of Pressure... and Static Pressure from
the Contours of drop-down lists.
D. Enter 0.25 atm for Min and 1.25 atm for Max.
This will set a xed range for the contour plot and subsequent anima-
tion.
E. Select all of the surfaces from the Surfaces selection list by clicking
the shaded icon above the right corner of the list.
F. Click Display and close the Contours panel.
Figure 4.7 shows the contours of static pressure in the nozzle after 600
time steps.
v. Click OK to close the Animation Sequence panel associated with the pres-
sure sequence.
(e) Click the Dene... button for mach-number to open the associated Animation
Sequence panel.
i. Make sure that In Memory is selected in the Storage Type list.
ii. Set Window to 3.
c Fluent Inc. September 21, 2006 4-33
Modeling Unsteady Compressible Flow
Contours of Static Pressure (atm) (Time=1.7136e-02)
FLUENT 6.3 (2d, dbns imp, S-A, unsteady)
1.25e+00
1.20e+00
1.15e+00
1.10e+00
1.05e+00
1.00e+00
9.50e-01
9.00e-01
8.50e-01
8.00e-01
7.50e-01
7.00e-01
6.50e-01
6.00e-01
5.50e-01
5.00e-01
4.50e-01
4.00e-01
3.50e-01
3.00e-01
2.50e-01
Figure 4.7: Pressure Contours at t = 0.017136 s
iii. Click the Set button to open the FLUENT [3] graphics window.
iv. Select Contours in the Display Type group box.
The Contours panel will open.
A. Select Velocity... and Mach Number in the Contours of drop-down list.
B. Make sure that Filled is selected under Options.
C. Deselect Auto Range.
D. Enter 0.00 for Min and 1.30 for Max.
E. Make sure that all of the surfaces are selected in the Surfaces selection
list.
F. Click Display and close the Contours panel.
Figure 4.8 shows the Mach number contours in the nozzle after 600
time steps.
v. Click OK to close the Animation Sequence panel associated with the mach-
number sequence.
(f) Click OK to close the Solution Animation panel.
4-34 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Contours of Mach Number (Time=1.7136e-02)
FLUENT 6.3 (2d, dbns imp, S-A, unsteady)
1.30e+00
1.23e+00
1.17e+00
1.11e+00
1.04e+00
9.75e-01
9.10e-01
8.45e-01
7.80e-01
7.15e-01
6.50e-01
5.85e-01
5.20e-01
4.55e-01
3.90e-01
3.25e-01
2.60e-01
1.95e-01
1.30e-01
6.50e-02
0.00e+00
Figure 4.8: Mach Number Contours at t = 0.017136 s
c Fluent Inc. September 21, 2006 4-35
Modeling Unsteady Compressible Flow
3. Continue the calculation by requesting 100 time steps.
By requesting 100 time steps, you will march the solution through an additional
0.0028 seconds, or roughly one pressure cycle. With the autosave and animation
features active (as dened previously), the case and data les will be saved approx-
imately every 0.00028 seconds of the solution time; animation les will be saved
every 0.000028 seconds of the solution time.
Solve Iterate...
When the calculation nishes, you will have ten pairs of case and data les and
there will be 100 pairs of contour plots stored in memory. In the next few steps,
you will play back the animation sequences and examine the results at several time
steps after reading in pairs of newly saved case and data les.
4-36 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
4. Change the display options to include double buering.
Double buering will allow for a smoother transition between the frames of the
animations.
Display Options...
(a) Disable the Wireframe Animation option in the Rendering group box.
(b) Enable the Double Buering option.
(c) Set Active Window to 2.
(d) Click the Set button.
(e) Click Apply and close the Display Options panel.
c Fluent Inc. September 21, 2006 4-37
Modeling Unsteady Compressible Flow
5. Play the animation of the pressure contours.
Solve Animate Playback...
(a) Retain the default selection of pressure from the Sequences selection list.
(b) Click the play button (the second from the right in the group of buttons in
the Playback group box).
(c) Close the Playback panel.
Examples of pressure contours at t = 0.017993 s (the 630th time step) and t =
0.019135 s (the 670th time step) are shown in Figures 4.9 and 4.10.
6. In a similar manner to steps 4. and 5., select the appropriate active window and
sequence name for the Mach number contours.
Examples of Mach number contours at t = 0.017993 s and t = 0.019135 s are shown
in Figures 4.11 and 4.12.
4-38 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Contours of Static Pressure (atm) (Time=1.7993e-02)
FLUENT 6.3 (2d, dbns imp, S-A, unsteady)
1.25e+00
1.20e+00
1.15e+00
1.10e+00
1.05e+00
1.00e+00
9.50e-01
9.00e-01
8.50e-01
8.00e-01
7.50e-01
7.00e-01
6.50e-01
6.00e-01
5.50e-01
5.00e-01
4.50e-01
4.00e-01
3.50e-01
3.00e-01
2.50e-01
Figure 4.9: Pressure Contours at t = 0.017993 s
Contours of Static Pressure (atm) (Time=1.9135e-02)
FLUENT 6.3 (2d, dbns imp, S-A, unsteady)
1.25e+00
1.20e+00
1.15e+00
1.10e+00
1.05e+00
1.00e+00
9.50e-01
9.00e-01
8.50e-01
8.00e-01
7.50e-01
7.00e-01
6.50e-01
6.00e-01
5.50e-01
5.00e-01
4.50e-01
4.00e-01
3.50e-01
3.00e-01
2.50e-01
Figure 4.10: Pressure Contours at t = 0.019135 s
c Fluent Inc. September 21, 2006 4-39
Modeling Unsteady Compressible Flow
Contours of Mach Number (Time=1.7993e-02)
FLUENT 6.3 (2d, dbns imp, S-A, unsteady)
1.30e+00
1.23e+00
1.17e+00
1.11e+00
1.04e+00
9.75e-01
9.10e-01
8.45e-01
7.80e-01
7.15e-01
6.50e-01
5.85e-01
5.20e-01
4.55e-01
3.90e-01
3.25e-01
2.60e-01
1.95e-01
1.30e-01
6.50e-02
0.00e+00
Figure 4.11: Mach Number Contours at t = 0.017993 s
Contours of Mach Number (Time=1.9135e-02)
FLUENT 6.3 (2d, dbns imp, S-A, unsteady)
1.30e+00
1.23e+00
1.17e+00
1.11e+00
1.04e+00
9.75e-01
9.10e-01
8.45e-01
7.80e-01
7.15e-01
6.50e-01
5.85e-01
5.20e-01
4.55e-01
3.90e-01
3.25e-01
2.60e-01
1.95e-01
1.30e-01
6.50e-02
0.00e+00
Figure 4.12: Mach Number Contours at t = 0.019135 s
4-40 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Extra: FLUENT gives you the option of exporting an animation as an MPEG le
or as a series of les in any of the hardcopy formats available in the Graphics
Hardcopy panel (including TIFF and PostScript).
To save an MPEG le, select MPEG from the Write/Record Format drop-down
list in the Playback panel and then click the Write button. The MPEG le will
be saved in your working folder. You can view the MPEG movie using an
MPEG player (e.g., Windows Media Player or another MPEG movie player).
To save a series of TIFF, PostScript, or other hardcopy les, select Hardcopy
Frames in the Write/Record Format drop-down list in the Playback panel. Click
the Hardcopy Options... button to open the Graphics Hardcopy panel and set
the appropriate parameters for saving the hardcopy les. Click Apply in the
Graphics Hardcopy panel to save your modied settings. In the Playback panel,
click the Write button. FLUENT will replay the animation, saving each frame
to a separate le in your working folder.
If you want to view the solution animation in a later FLUENT session, you
can select Animation Frames as the Write/Record Format and click Write.
!
Since the solution animation was stored in memory, it will be lost if you exit
FLUENT without saving it in one of the formats described previously. Note
that only the animation-frame format can be read back into the Playback
panel for display in a later FLUENT session.
7. Read the case and data les for the 660th time step (noz anim0660.cas and
noz anim0660.dat) into FLUENT.
File Read Case & Data...
c Fluent Inc. September 21, 2006 4-41
Modeling Unsteady Compressible Flow
8. Plot vectors at t = 0.018849 s (Figure 4.13).
Display Vectors...
(a) Make sure that 10 is entered for Scale.
(b) Click Display and close the Vectors panel.
The unsteady ow prediction in Figure 4.13 shows the expected form, with peak
velocity of approximately 243 m/s through the nozzle at t = 0.018849 seconds.
9. In a similar manner to step 7. and 8., read in the case and data les saved for other
time steps of interest and display the vectors.
4-42 c Fluent Inc. September 21, 2006
Modeling Unsteady Compressible Flow
Velocity Vectors Colored By Velocity Magnitude (m/s) (Time=1.8849e-02)
FLUENT 6.3 (2d, dbns imp, S-A, unsteady)
2.43e+02
2.31e+02
2.18e+02
2.06e+02
1.94e+02
1.82e+02
1.70e+02
1.58e+02
1.46e+02
1.34e+02
1.22e+02
1.10e+02
9.74e+01
8.53e+01
7.32e+01
6.11e+01
4.90e+01
3.69e+01
2.48e+01
1.27e+01
5.97e-01
Figure 4.13: Velocity Vectors at t = 0.018849 s
Summary
In this tutorial, you modeled the transient ow of air through a nozzle. You learned how
to generate a steady-state solution as an initial condition for the unsteady case, and how
to set solution parameters for implicit time-stepping.
You also learned how to manage the le saving and graphical postprocessing for time-
dependent ows, using le autosaving to automatically save solution information as the
transient calculation proceeds.
Finally, you learned how to use FLUENTs solution animation tool to create animations
of transient data, and how to view the animations using the playback feature.
Further Improvements
This tutorial guides you through the steps to generate a second-order solution. You may
be able to increase the accuracy of the solution even further by using an appropriate
higher-order discretization scheme and by adapting the grid further. Grid adaption can
also ensure that the solution is independent of the grid. These steps are demonstrated
in Tutorial 1.
c Fluent Inc. September 21, 2006 4-43
Modeling Unsteady Compressible Flow
4-44 c Fluent Inc. September 21, 2006

You might also like