Sei sulla pagina 1di 44

Tutorial 4.

Modeling Unsteady Compressible Flow

Introduction
In this tutorial, FLUENTs coupled implicit solver is used to predict the time-dependent
flow 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 flow rate at
the nozzle exit.
In this tutorial you will learn how to:

Calculate a steady-state solution (using the coupled implicit solver) as an initial


condition for a transient flow prediction

Define an unsteady boundary condition using a user-defined function (UDF)

Use dynamic mesh adaption for both steady-state and transient flows

Calculate a transient solution using the second-order implicit unsteady formulation


and the coupled implicit solver

Create an animation of the unsteady flow 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 flow
area. Due to symmetry, only half of the nozzle is modeled.


c Fluent Inc. January 11, 2005 4-1
Modeling Unsteady Compressible Flow

plane of symmetry

0.2 m p (t )
exit

p = 0.9 atm p = 0.7369 atm


inlet
exit

Figure 4.1: Problem Specification

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 directory (as
described in Tutorial 1).

2. Unzip unsteady_compressible.zip.
nozzle.msh and pexit.c can be found in the /unsteady compressible folder cre-
ated after unzipping the file.

3. Start the 2D version of FLUENT.

4-2
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

Step 1: Grid
1. Read in the mesh file 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 window. Pay particular attention to the reported minimum volume. Make
sure this is a positive number.

3. Display the grid.


Display Grid...

To make the view more realistic, you will need to mirror it across the centerline.


c Fluent Inc. January 11, 2005 4-3
Modeling Unsteady Compressible Flow

4. Mirror the view across the centerline.


Display Views...

(a) Select symmetry under Mirror Planes.


(b) Click Apply.
The grid for the nozzle is shown in Figure 4.2.

Grid
FLUENT 6.2 (2d, segregated, lam)

Figure 4.2: 2D Nozzle Mesh Display

4-4
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

Step 2: Units
1. For convenience, define new units for pressure.
The pressure for this problem is specified in atm, which is not the default unit. You
will need to redefine the pressure unit as atm.
Define Units...

(a) Select pressure under Quantities, and atm under Units.


Hint: Use the scroll bar to access pressure, which is not initially visible in the
list.
(b) Close the panel.


c Fluent Inc. January 11, 2005 4-5
Modeling Unsteady Compressible Flow

Step 3: Models
1. Select the coupled implicit solver.
The coupled implicit solver is the solver of choice for compressible, transonic flows
without significant regions of low-speed flow. In cases with significant low-speed
flow regions, the segregated solver is preferred. Also, for transient cases with trav-
eling shocks, the coupled explicit solver with explicit time stepping may be the most
efficient.
Define Models Solver...

Note: Initially, solve for the steady flow through the nozzle. Later, after obtaining
the steady flow as a starting point, this panel to enable an unsteady calculation.

2. Enable the energy equation.


Define Models Energy...

4-6
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

3. Enable the Spalart-Allmaras turbulence model.


Define 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 specifically for aerospace applications involving wall-bounded flows and
has been shown to give good results for boundary layers subjected to adverse pressure
gradients.


c Fluent Inc. January 11, 2005 4-7
Modeling Unsteady Compressible Flow

Step 4: Materials
1. Set the properties for air, the default fluid material.
Define Materials...

(a) Select the ideal-gas law to compute Density.


Note: FLUENT will automatically enable solution of the energy equation when
the ideal gas law is used. You do not need to visit the Energy panel to turn
it on.
(b) Retain the default values for all other properties.

Do not forget to click the Change/Create button to save your change.


!

4-8
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

Step 5: Operating Conditions


1. Set the operating pressure to 0 atm.
Define Operating Conditions...

Here, the operating pressure is set to zero and boundary condition inputs for pressure
will be defined in terms of absolute pressures. Boundary condition inputs should
always be relative to the value used for operating pressure.


c Fluent Inc. January 11, 2005 4-9
Modeling Unsteady Compressible Flow

Step 6: Boundary Conditions


Define Boundary Conditions...

1. Set the conditions for the nozzle inlet (inlet).

(a) Set the Gauge Total Pressure to 0.9 atm.


(b) Set the Supersonic/Initial Gauge Pressure to 0.7369 atm.
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) In the Turbulence Specification Method drop-down list, select Turbulent Viscosity
Ratio.
(d) Set the Turbulent Viscosity Ratio to 1.
For low to moderate inlet turbulence, a viscosity ratio of 1 is recommended.

4-10
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

2. Set the conditions for the nozzle exit (outlet).

(a) Set the Gauge Pressure to 0.7369 atm.


(b) In the Turbulence Specification Method drop-down list, select Turbulent Viscosity
Ratio.
(c) Accept the default value of 10 for Backflow Turbulent Viscosity Ratio.
If substantial backflow occurs at the outlet, you may need to adjust the backflow
values to levels close to the actual exit conditions.


c Fluent Inc. January 11, 2005 4-11
Modeling Unsteady Compressible Flow

Step 7: Solution: Steady Flow


1. Initialize the solution.
Solve Initialize Initialize...

(a) Select inlet in the Compute From drop-down list.


(b) Click Init, and Close the panel.

4-12
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

2. Set the solution parameters.


Solve Controls Solution...

(a) Under Discretization, select Second Order Upwind for Modified Turbulent Vis-
cosity.
Second-order discretization provides optimum accuracy.
We will now activate dynamic adaption. Our purpose here is to have the solver
periodically refine the mesh in the vicinity of the shocks as the iterations progress.
We identify the shocks by looking for large gradients of the pressure.


c Fluent Inc. January 11, 2005 4-13
Modeling Unsteady Compressible Flow

3. Perform gradient adaption to refine the mesh.


Adapt Gradient

(a) Under Method, select Gradient.


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) Under Gradients Of, make sure that Pressure... and Static Pressure are selected.
(c) Under Normalization, select Scale.
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 refine thresholds. In this case, the scaled gradient is
used.
(d) Set the Coarsen Threshold to 0.3.
(e) Set Refine Threshold to 0.7.
As the refined regions of the mesh get larger, the coarsen and refine thresholds
should get smaller. A coarsen threshold of 0.3 and a refine threshold of 0.7
result in a medium to strong mesh refinement in combination with the
scaled gradient.

4-14
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

(f) Turn on the Dynamic option under Dynamic and set the Interval to 100.
For steady-state flows, it is sufficient to only seldomly adapt the meshin
this case an interval of 100 iterations is chosen. For time-dependent flows, a
considerably smaller interval must be used.
(g) Click Apply to store the information.
(h) Click on Controls... to modify the adaption controls.

i. Make sure that fluid is selected under Zones.


ii. Set the Max # of Cells to 20000.
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 refine
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 refinement.
iii. Click OK.


c Fluent Inc. January 11, 2005 4-15
Modeling Unsteady Compressible Flow

4. Enable the plotting of residuals.


Solve Monitors Residual...

(a) Under Options, select Plot.


(b) Click OK.
5. Enable the plotting of mass flow rate at the flow exit.
Solve Monitors Surface...

4-16
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

(a) Increase the number of Surface Monitors to 1.


(b) Turn on the Plot and Write options for monitor-1.
Note: When the Write option is selected in the Surface Monitors panel, the
mass flow rate history will be written to a file. If you do not select the
write option, the history information will be lost when you exit FLUENT.
(c) Click on Define... to specify the surface monitor parameters in the Define
Surface Monitor panel.

i. Select Mass Flow Rate in the Report Type drop-down list.


ii. Select outlet in the Surfaces list.
iii. In the File Name field, enter the name noz ss.out.
iv. Click on OK to define the monitor.
(d) Click on OK in the Surface Monitors panel to enable the monitor.

6. Save the case file (noz ss.cas).


File Write Case...


c Fluent Inc. January 11, 2005 4-17
Modeling Unsteady Compressible Flow

7. Start the calculation by requesting 2000 iterations.


Solve Iterate...

The mass flow rate history is shown in Figure 4.3. It shows that the solution is
converged after around 1800 iterations.

-13.5000

-14.0000

-14.5000

-15.0000

Mass
Flow -15.5000
Rate
(kg/s)
-16.0000

-16.5000

-17.0000
0 200 400 600 800 1000 1200 1400 1600 1800 2000

Iteration

Convergence history of Mass Flow Rate on outlet (in SI units)


FLUENT 6.2 (2d, coupled imp, S-A)

Figure 4.3: Mass Flow Rate History

8. Save the data file (noz ss.dat).


File Write Data...

4-18
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

9. Check the mass flux balance.


Report Fluxes...

Although the mass flow rate history indicates that the solution is con-
! verged, you should also check the mass fluxes through the domain to ensure
that mass is being conserved.

(a) Keep the default Mass Flow Rate option.


(b) Select inlet and outlet in the Boundaries list.
(c) Click Compute.

The net mass imbalance should be a small fraction (say, 0.5%) of the total
!
flux through the system. If a significant imbalance occurs, you should
decrease your residual tolerances by at least an order of magnitude and
continue iterating.


c Fluent Inc. January 11, 2005 4-19
Modeling Unsteady Compressible Flow

10. Display the steady-flow velocity vectors (Figure 4.4).


Display Vectors...

(a) Change the Scale to 10.


(b) In the Surfaces list, select all of the surfaces.
(c) Click Display.
The steady flow prediction shows the expected form, with peak velocity of about 335
m/s through the nozzle.

4-20
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

3.45e+02
3.27e+02
3.10e+02
2.93e+02
2.76e+02
2.59e+02
2.41e+02
2.24e+02
2.07e+02
1.90e+02
1.73e+02
1.55e+02
1.38e+02
1.21e+02
1.04e+02
8.64e+01
6.92e+01
5.20e+01
3.48e+01
1.76e+01
3.72e-01

Velocity Vectors Colored By Velocity Magnitude (m/s)


FLUENT 6.2 (2d, coupled imp, S-A)

Figure 4.4: Velocity Vectors (Steady Flow)


c Fluent Inc. January 11, 2005 4-21
Modeling Unsteady Compressible Flow

11. Display the steady flow contours of static pressure (Figure 4.5).
Display Contours...

(a) Under Options, select Filled.


(b) Click Display.
The steady flow prediction shows the expected pressure distribution, with low pres-
sure near the nozzle throat.

4-22
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

7.84e-01
7.66e-01
7.47e-01
7.28e-01
7.09e-01
6.90e-01
6.71e-01
6.53e-01
6.34e-01
6.15e-01
5.96e-01
5.77e-01
5.59e-01
5.40e-01
5.21e-01
5.02e-01
4.83e-01
4.65e-01
4.46e-01
4.27e-01
4.08e-01

Contours of Static Pressure (atm)


FLUENT 6.2 (2d, coupled imp, S-A)

Figure 4.5: Contours of Static Pressure (Steady Flow)


c Fluent Inc. January 11, 2005 4-23
Modeling Unsteady Compressible Flow

Step 8: Enable Time Dependence and Set Unsteady Conditions


In this step you will define a transient flow by specifying an unsteady pressure condition
for the nozzle.

1. Enable a time-dependent flow calculation.


Define Models Solver...

(a) Under Time, select Unsteady.


(b) Under Unsteady Formulation, select 2nd-Order Implicit.
Implicit (dual) time-stepping allows you to set the physical time step used for the
transient flow 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 first-order
option.

4-24
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

2. Define the unsteady condition for the nozzle exit (outlet).


The pressure at the outlet is defined as a wave-shaped profile, and is described by
the following equation:

pexit (t) = 0.12 sin(t) + pexit (4.1)

where
= circular frequency of unsteady pressure (rad/s)
pexit = mean exit pressure (atm)
In this case, = 2200 rad/s, and pexit = 0.7369 atm.
A user-defined function (pexit.c) has been written to define the equation (Equa-
tion 4.1) required for the pressure profile.
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 affect the
displayed results.
See the separate UDF Manual for details about user-defined functions..
(a) Read in the user-defined function.
Define User-Defined Functions Interpreted...

i. Enter pexit.c as the Source File Name.


ii. Click Interpret.
The user-defined function has already been defined, but it needs to be com-
piled within FLUENT before it can be used in the solver.
iii. Close the Interpreted UDFs panel.


c Fluent Inc. January 11, 2005 4-25
Modeling Unsteady Compressible Flow

(b) Set the unsteady boundary conditions at the exit.

i. Select udf unsteady pressure (the user-defined function) in the Gauge Pres-
sure drop-down list.

3. Update the gradient adaption parameters for the transient case.


Adapt Gradient
(a) Reset the Coarsen Threshold to 0.3.
(b) Reset the Refine Threshold to 0.7.
The refine 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.
(c) Under Dynamic, set the Interval to 1.
For the transient case, the mesh adaption will be done every time step.
(d) Click Apply to store the values.
(e) Click on Controls... to modify the adaption controls.
i. In the Grid Adaption Controls panel, set the Min # of Cells to 8000.
ii. Set the Max # of Cells to 30000 and click OK.
The maximum number of cells is increased to try to avoid readjustment
of the coarsen and refine thresholds. Additionally, the minimum number
of cells has been limited to 8000 because it is not desired to have a coarse
mesh during the computation (the current mesh has about 10000 cells).

4-26
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

Step 9: Solution: Unsteady Flow


1. Set the time step parameters.
The selection of the time step is critical for accurate time-dependent flow predic-
tions. Using a time step of 2.85596 105 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) Set the Time Step Size to 2.85596e-5 s.


(b) Set the Number of Time Steps to 600.
(c) Set the Max Iterations per Time Step to 30.
(d) Click Apply.


c Fluent Inc. January 11, 2005 4-27
Modeling Unsteady Compressible Flow

2. Modify the plotting of the mass flow 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) For monitor-1, select Time Step in the drop-down list under Every.
(b) Click Define... to modify the surface monitor parameters.
i. In the Define Surface Monitor panel, change the File Name to noz uns.out.
ii. In the X Axis drop-down list, select Time Step.
iii. Click OK.
(c) Click OK in the Surface Monitors panel.

3. Save the transient solution case file (noz uns.cas).


File Write Case...

4-28
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

4. Start the transient calculation.


Solve Iterate...

Calculation of 600 time steps will require significant CPU resources (about
!
three hours on a single CPU with a 2.6 GHz clock speed). Instead of
calculating, you can read the data file saved after the iterations have been
completed:

noz uns.dat

(The data file is available in the same directory where you found the mesh
and UDF files.)
By requesting 600 time steps, you are asking FLUENT to compute six pressure
cycles. The mass flow rate history is shown in Figure 4.6.

Monitors
monitor-1
-4.0000

-6.0000

-8.0000

-10.0000

Mass -12.0000
Flow
Rate -14.0000
(kg/s)
-16.0000

-18.0000

-20.0000
0 100 200 300 400 500 600

Time Step

Convergence history of Mass Flow Rate on outlet (Time=1.7136e-02)


FLUENT 6.2 (2d, coupled imp, S-A, unsteady)

Figure 4.6: Mass Flow Rate History (Unsteady Flow)

5. Save the transient solution data file (noz uns.dat).


File Write Data...


c Fluent Inc. January 11, 2005 4-29
Modeling Unsteady Compressible Flow

Step 10: Saving and Postprocessing Time-Dependent Data Sets


The solution has reached a time-periodic state. To study how the flow 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 files 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 saving of case and data files every 10 time steps.


File Write Autosave...

(a) Set the Autosave Case File Frequency and Autosave Data File Frequency to 10.
(b) In the Filename field, enter noz anim.
(c) Click OK.
If you have constraints on the disc space, you can restrict the number of files
saved by FLUENT using the Maximum Number of Files at Any Instance field.
After saving the specified number of files, FLUENT will overwrite the earliest
existing file. The default value of zero will save all the files.
When FLUENT saves a file, it will append the time step value to the file
name prefix (noz anim). The standard extensions (.cas and .dat) will also
be appended. This will yield file 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 file name (e.g.,
noz anim.gz), which will instruct FLUENT to save the case and data files in
compressed format, yielding file names of the form noz anim0640.cas.gz.

4-30
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

2. Create animation sequences for the nozzle pressure and Mach number contour plots.
Solve Animate Define...

(a) Increase the number of Animation Sequences to 2.


(b) Under Name, enter pressure for the first sequence and mach-number for the
second sequence.
(c) In the When drop-down lists, select Time Step.
With the default value of 1 for Every, this instructs FLUENT to update the
animation sequence at every time step.


c Fluent Inc. January 11, 2005 4-31
Modeling Unsteady Compressible Flow

3. Define the animation sequence for pressure.


(a) Click Define... on the line for pressure to set the parameters for the pressure
sequence.
The Animation Sequence panel will open.

(b) Under Storage Type, select In Memory.


The Memory option is acceptable for a small 2D case such as this. For larger
2D or 3D cases, saving animation files with either the Metafile or PPM Image
option is preferable to avoid using too much of your machines memory.
(c) Increase the Window number to 2 and click Set.
Graphics window number 2 will open.
(d) Under Display Type, select Contours.
The Contours panel will open.

4-32
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

i. In the Contours panel, keep the default selections of Pressure... and Static
Pressure.
ii. Make sure that Filled is selected under Options, and deselect Auto Range.
iii. Enter 0.25 under Min and 1.25 under Max.
This will set a fixed range for the contour plot and subsequent animation.
iv. In the Surfaces list, select all of the surfaces.
v. Click Display.
Figure 4.7 shows the contours of static pressure in the nozzle after 600 time
steps.
(e) Click OK in the Animation Sequence panel.


c Fluent Inc. January 11, 2005 4-33
Modeling Unsteady Compressible Flow

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

Contours of Static Pressure (atm) (Time=1.7136e-02)


FLUENT 6.2 (2d, coupled imp, S-A, unsteady)

Figure 4.7: Pressure Contours at t = 0.01714 s

4-34
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

4. Define the animation sequence for Mach number.


(a) In the Solution Animation panel, click Define... on the line for mach-number to
set the parameters for the Mach number sequence.
(b) Under Storage Type in the Animation Sequence panel, select In Memory.
(c) Increase the Window number to 3 and click Set.
Graphics window number 3 will open.
(d) Under Display Type, select Contours.
i. In the Contours panel, select Velocity... and Mach Number.
ii. Make sure that Filled is selected under Options, and deselect Auto Range.
iii. Enter 0.00 under Min and 1.30 under Max.
iv. In the Surfaces list, make sure that all of the surfaces are selected.
v. Click Display.
Figure 4.8 shows the Mach number contours in the nozzle after 600 time steps.

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

Contours of Mach Number (Time=1.7136e-02)


FLUENT 6.2 (2d, coupled imp, S-A, unsteady)

Figure 4.8: Mach Number Contours at t = 0.01714 s

(e) Click OK in the Animation Sequence panel.


(f) Click OK in the Solution Animation panel.


c Fluent Inc. January 11, 2005 4-35
Modeling Unsteady Compressible Flow

5. Continue the calculation by requesting 100 time steps.


Requesting 100 time steps will march the solution through an additional 0.0028
seconds, or roughly one pressure cycle. This will take about 30 minutes. With the
autosave and animation features active (as defined above), the case and data files
will be saved approximately every 0.00028 seconds; animation files will be saved
every 0.000028 seconds.
Solve Iterate...

When the calculation finishes, you will have ten pairs of case and data files 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 files.

4-36
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

6. Change the display options to include double buffering.


Double buffering will allow for a smoother transition between the frames of the
animations.
Display Options...

(a) Under Rendering, select Double Buffering.


(b) Click Apply.


c Fluent Inc. January 11, 2005 4-37
Modeling Unsteady Compressible Flow

7. Play back the animation of the pressure contours.


Solve Animate Playback...

(a) Under Sequences, select pressure.


The playback control buttons now become active.
(b) Keep the default settings in the rest of the panel and click the play button
(the second from the right in the group of buttons under Playback).
Examples of pressure contours at t = 0.01799 s (630th time step) and t = 0.0191 s
(670th time step) are shown in Figures 4.9 and 4.10.

8. Repeat steps 6 and 7, selecting the appropriate active window and sequence name
for the Mach number contours.
Examples of Mach number contours at t = 0.01799 s and t = 0.0191 s are shown
in Figures 4.11 and 4.12.

4-38
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

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

Contours of Static Pressure (atm) (Time=1.7993e-02)


FLUENT 6.2 (2d, coupled imp, S-A, unsteady)

Figure 4.9: Pressure Contours at t = 0.01799 s

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

Contours of Static Pressure (atm) (Time=1.9135e-02)


FLUENT 6.2 (2d, coupled imp, S-A, unsteady)

Figure 4.10: Pressure Contours at t = 0.0191 s


c Fluent Inc. January 11, 2005 4-39
Modeling Unsteady Compressible Flow

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

Contours of Mach Number (Time=1.7993e-02)


FLUENT 6.2 (2d, coupled imp, S-A, unsteady)

Figure 4.11: Mach Number Contours at t = 0.01799 s

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

Contours of Mach Number (Time=1.9135e-02)


FLUENT 6.2 (2d, coupled imp, S-A, unsteady)

Figure 4.12: Mach Number Contours at t = 0.0191 s

4-40
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

Extra: FLUENT gives you the option of exporting an animation as an MPEG file
or as a series of files in any of the hardcopy formats available in the Graphics
Hardcopy panel (including TIFF and PostScript).
To save an MPEG file, select MPEG from the Write/Record Format drop-down
list in the Playback panel and then click the Write button. The MPEG file will
be saved in your working directory. 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 files, select Hardcopy
Frames in the Write/Record Format drop-down list in the Playback panel. Click
on the Hardcopy Options... button to open the Graphics Hardcopy panel and set
the appropriate parameters for saving the hardcopy files. Click Apply in the
Graphics Hardcopy panel to save your modified settings. In the Playback panel,
click the Write button. FLUENT will replay the animation, saving each frame
to a separate file in your working directory.
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 to one of the formats described above. Note
that only the animation-frame format can be read back into the Playback
panel for display in a later FLUENT session.

9. Display velocity vectors after 60 time steps (Figure 4.13).


(a) Read case and data files for the 660th time step (noz anim0660.cas and
noz anim0660.dat) into FLUENT.
File Read Case & Data...
(b) Plot vectors at t = 0.01885 s.
Display Vectors...


c Fluent Inc. January 11, 2005 4-41
Modeling Unsteady Compressible Flow

i. Change the Scale to 10.


ii. Click Display.
The unsteady flow prediction shows the expected form, with peak velocity of
about 241 m/s through the nozzle at t = 0.01885 seconds.

10. Repeat step 9 using case and data files saved for other time steps of interest.

4-42
c Fluent Inc. January 11, 2005
Modeling Unsteady Compressible Flow

2.42e+02
2.30e+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.75e+01
8.54e+01
7.34e+01
6.13e+01
4.92e+01
3.71e+01
2.50e+01
1.30e+01
8.97e-01

Velocity Vectors Colored By Velocity Magnitude (m/s) (Time=1.8849e-02)


FLUENT 6.2 (2d, coupled imp, S-A, unsteady)

Figure 4.13: Velocity Vectors at t = 0.01885 s

Summary
In this tutorial, you modeled the transient flow 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 file saving and graphical postprocessing for time-
dependent flows, using file 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.


c Fluent Inc. January 11, 2005 4-43
Modeling Unsteady Compressible Flow

4-44
c Fluent Inc. January 11, 2005