Modeling Unsteady Compressible Flow

Similar documents
Modeling External Compressible Flow

Using Multiple Rotating Reference Frames

Using a Single Rotating Reference Frame

Calculate a solution using the pressure-based coupled solver.

Using Multiple Rotating Reference Frames

Tutorial 1. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow

Modeling Flow Through Porous Media

Modeling Evaporating Liquid Spray

The purpose of this tutorial is to illustrate how to set up and solve a problem using the. Moving Deforming Mesh (MDM) using the layering algorithm.

Use 6DOF solver to calculate motion of the moving body. Create TIFF files for graphic visualization of the solution.

Simulation of Flow Development in a Pipe

This tutorial illustrates how to set up and solve a problem involving solidification. This tutorial will demonstrate how to do the following:

Modeling Evaporating Liquid Spray

Grid. Apr 09, 1998 FLUENT 5.0 (2d, segregated, lam) Grid. Jul 31, 1998 FLUENT 5.0 (2d, segregated, lam)

Lab 9: FLUENT: Transient Natural Convection Between Concentric Cylinders

Supersonic Flow Over a Wedge

Tutorial: Simulating a 3D Check Valve Using Dynamic Mesh 6DOF Model And Diffusion Smoothing

Compressible Flow in a Nozzle

Non-Newtonian Transitional Flow in an Eccentric Annulus

Tutorial: Hydrodynamics of Bubble Column Reactors

Tutorial: Riser Simulation Using Dense Discrete Phase Model

Tutorial 2. Modeling Periodic Flow and Heat Transfer

Express Introductory Training in ANSYS Fluent Workshop 08 Vortex Shedding

Revolve 3D geometry to display a 360-degree image.

Using the Eulerian Multiphase Model for Granular Flow

Tutorial 17. Using the Mixture and Eulerian Multiphase Models

Express Introductory Training in ANSYS Fluent Workshop 04 Fluid Flow Around the NACA0012 Airfoil

Tutorial: Heat and Mass Transfer with the Mixture Model

Flow in an Intake Manifold

Module D: Laminar Flow over a Flat Plate

Using the Discrete Ordinates Radiation Model

Modeling Supersonic Jet Screech Noise Using Direct Computational Aeroacoustics (CAA) 14.5 Release

Tutorial: Modeling Domains with Embedded Reference Frames: Part 2 Sliding Mesh Modeling

Express Introductory Training in ANSYS Fluent Workshop 07 Tank Flushing

Introduction to ANSYS CFX

Tutorial: Modeling Liquid Reactions in CIJR Using the Eulerian PDF transport (DQMOM-IEM) Model

Advanced ANSYS FLUENT Acoustics

Express Introductory Training in ANSYS Fluent Workshop 06 Using Moving Reference Frames and Sliding Meshes

Introduction to CFX. Workshop 2. Transonic Flow Over a NACA 0012 Airfoil. WS2-1. ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

A B C D E. Settings Choose height, H, free stream velocity, U, and fluid (dynamic viscosity and density ) so that: Reynolds number

Solution Recording and Playback: Vortex Shedding

FLUENT Secondary flow in a teacup Author: John M. Cimbala, Penn State University Latest revision: 26 January 2016

Cold Flow Simulation Inside an SI Engine

Fluent User Services Center

Step 1: Create Geometry in GAMBIT

ANSYS AIM Tutorial Compressible Flow in a Nozzle

Isotropic Porous Media Tutorial

and to the following students who assisted in the creation of the Fluid Dynamics tutorials:

Verification of Laminar and Validation of Turbulent Pipe Flows

Simulation and Validation of Turbulent Pipe Flows

Simulation of Turbulent Flow around an Airfoil

Middle East Technical University Mechanical Engineering Department ME 485 CFD with Finite Volume Method Fall 2017 (Dr. Sert)

TUTORIAL#3. Marek Jaszczur. Boundary Layer on a Flat Plate W1-1 AGH 2018/2019

Prerequisites: This tutorial assumes that you are familiar with the menu structure in FLUENT, and that you have solved Tutorial 1.

Simulation of Laminar Pipe Flows

The Spalart Allmaras turbulence model

Simulation of Turbulent Flow over the Ahmed Body

ANSYS AIM Tutorial Turbulent Flow Over a Backward Facing Step

Appendix: To be performed during the lab session

The Level Set Method THE LEVEL SET METHOD THE LEVEL SET METHOD 203

Application of Wray-Agarwal Turbulence Model for Accurate Numerical Simulation of Flow Past a Three-Dimensional Wing-body

c Fluent Inc. May 16,

Verification and Validation of Turbulent Flow around a Clark-Y Airfoil

Simulation of Turbulent Flow around an Airfoil

Aero-Vibro Acoustics For Wind Noise Application. David Roche and Ashok Khondge ANSYS, Inc.

NUMERICAL 3D TRANSONIC FLOW SIMULATION OVER A WING

Flow and Heat Transfer in a Mixing Elbow

Introduction to C omputational F luid Dynamics. D. Murrin

Simulating Sinkage & Trim for Planing Boat Hulls. A Fluent Dynamic Mesh 6DOF Tutorial

Verification and Validation of Turbulent Flow around a Clark-Y Airfoil

Simulation of Turbulent Flow in an Asymmetric Diffuser

Introduction to ANSYS SOLVER FLUENT 12-1

THE EFFECTS OF THE PLANFORM SHAPE ON DRAG POLAR CURVES OF WINGS: FLUID-STRUCTURE INTERACTION ANALYSES RESULTS

CFD MODELING FOR PNEUMATIC CONVEYING

Wall thickness= Inlet: Prescribed mass flux. All lengths in meters kg/m, E Pa, 0.3,

TUTORIAL#4. Marek Jaszczur. Turbulent Thermal Boundary Layer on a Flat Plate W1-1 AGH 2018/2019

Aerodynamic Study of a Realistic Car W. TOUGERON

November c Fluent Inc. November 8,

Simulation of Turbulent Flow over the Ahmed Body

Using the Boundary Wrapper

ANSYS AIM Tutorial Steady Flow Past a Cylinder

Shape optimisation using breakthrough technologies

and to the following students who assisted in the creation of the Fluid Dynamics tutorials:

STAR-CCM+ User Guide 6922

Heat transfer and Transient computations

Workbench Tutorial Minor Losses, Page 1 Tutorial Minor Losses using Pointwise and FLUENT

Stream Function-Vorticity CFD Solver MAE 6263

Introduction To FLUENT. David H. Porter Minnesota Supercomputer Institute University of Minnesota

Workbench Tutorial Flow Over an Airfoil, Page 1 ANSYS Workbench Tutorial Flow Over an Airfoil

Optimization of under-relaxation factors. and Courant numbers for the simulation of. sloshing in the oil pan of an automobile

Free Convection Cookbook for StarCCM+

STAR-CCM+: Wind loading on buildings SPRING 2018

The viscous forces on the cylinder are proportional to the gradient of the velocity field at the

Viscous Hybrid Mesh Generation

First Steps - Conjugate Heat Transfer

SOLIDWORKS Flow Simulation Options

First Steps - Ball Valve Design

Turbulencja w mikrokanale i jej wpływ na proces emulsyfikacji

SolidWorks Flow Simulation 2014

An Introduction to SolidWorks Flow Simulation 2010

Transcription:

Tutorial 4. Modeling Unsteady Compressible Flow Introduction In this tutorial, FLUENT s density-based implicit solver is used to predict the timedependent 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. 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 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 density-based implicit solver. Create an animation of the unsteady flow using FLUENT s unsteady solution animation 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. September 21, 2006 4-1

plane of symmetry 0.2 m p (t ) exit p = 0.9 atm inlet p = 0.7369 atm 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 folder (as described in Tutorial 1). 2. Unzip unsteady_compressible.zip. The files nozzle.msh and pexit.c can be found in the unsteady compressible folder created after unzipping the file. 3. Start the 2D (2d) version of FLUENT. 4-2 c Fluent Inc. September 21, 2006

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. 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

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

Step 2: Units 1. For convenience, change the unit of measurement for pressure. The pressure for this problem is specified in atm, which is not the default unit in FLUENT. You will need to redefine the pressure unit as atm. Define Units... (a) Select pressure from the Quantities selection list. Scroll down the list to find pressure. (b) Select atm from the Units selection list. (c) Close the Set Units panel. c Fluent Inc. September 21, 2006 4-5

Step 3: Models 1. Specify the solver settings. The density-based implicit solver is the solver of choice for compressible, transonic flows without significant regions of low-speed flow. In cases with significant lowspeed flow 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 efficient. Define 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 flow 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

2. Enable the energy equation. Define Models Energy... 3. Enable the standard 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. September 21, 2006 4-7

Step 4: Materials 1. Set the properties for air, the default fluid material. Define 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

Step 5: Operating Conditions 1. Set the operating pressure. Define 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 define 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

Step 6: Boundary Conditions Define 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

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 Specification 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 Specification Method drop-down list in the Turbulence group box. (c) Retain the default entry 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. (d) Click OK to close the Pressure Outlet panel. 3. Close the Boundary Conditions panel. c Fluent Inc. September 21, 2006 4-11

Step 7: Solution: Steady Flow In this step, you will generate a steady-state flow 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

2. Set the solution parameters. Solve Controls Solution... (a) Select Second Order Upwind from the Modified 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

3. Perform gradient adaption to refine the mesh. You will activate dynamic adaption so that the solver periodically refines the mesh in the vicinity of the shocks as the iterations progress. The shocks are identified 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 readjustment of the coarsen and refine 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 flows, it is sufficient to only seldomly adapt the mesh in this case an interval of 100 iterations is chosen. For time-dependent flows, a considerably smaller interval must be used. 4-14 c Fluent Inc. September 21, 2006

(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 Refine Threshold. 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. (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 fluid from the Zones selection list. ii. Enter 20000 for Max # of Cells. To restrict the mesh adaption, the maximum number of cells can be limited. If this limit is violated during the adaption, the coarsen and refine thresholds are adjusted to respect the maximum number of cells. Additional restrictions can be placed on the minimum cell volume, minimum number of cells, and maximum level of refinement. iii. Click OK to close the Grid Adaption Controls panel. (j) Close the Gradient Adaption panel. c Fluent Inc. September 21, 2006 4-15

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 flow rate at the flow exit. Solve Monitors Surface... 4-16 c Fluent Inc. September 21, 2006

(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 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 the Define... button to open the Define 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 Define Surface Monitor panel. (d) Click OK to close the Surface Monitors panel. 6. Save the case file (noz ss.cas). File Write Case... c Fluent Inc. September 21, 2006 4-17

7. Start the calculation by requesting 2000 iterations. Solve Iterate... monitor-1-14.0000-14.5000-15.0000 Mass Flow Rate (kg/s) -15.5000-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 FLUENT 6.3 (2d, dbns imp, S-A) Figure 4.3: Mass Flow Rate History The mass flow rate history shows that the solution is converged after around 1800 iterations. 8. Save the case and data files (noz ss.cas and noz ss.dat). File Write Case & Data... 4-18 c Fluent Inc. September 21, 2006

9. Check the mass flux balance. Report Fluxes...! Although the mass flow rate history indicates that the solution is converged, you should also check the mass flux 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 flux through the system. The imbalance is displayed in the lower right field under kg/s. If a significant 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

10. Display the steady-flow 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 flow 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

Figure 4.4: Velocity Vectors (Steady Flow) c Fluent Inc. January 2, 2007 4-21

11. Display the steady flow 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 flow 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

Figure 4.5: Contours of Static Pressure (Steady Flow) c Fluent Inc. January 2, 2007 4-23

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) 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 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. September 21, 2006

2. Read in the user-defined function (pexit.c), in preparation for defining the unsteady condition for the nozzle exit. The pressure at the outlet is defined as a wave-shaped profile, 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-defined function (pexit.c) has been written to define the equation (Equation 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.. Define User-Defined Functions Interpreted... (a) Enter pexit.c for Source File Name. (b) Click Interpret. The user-defined function has already been defined, 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

3. Set the unsteady boundary conditions at the nozzle exit (outlet). Define Boundary Conditions... (a) Select udf unsteady pressure (the user-defined 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 Refine Threshold. 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. (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 readjustment of the coarsen and refine thresholds. Additionally, you need to limit 4-26 c Fluent Inc. September 21, 2006

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 flow predictions. 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

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) Select Time Step from the When drop-down list for monitor-1. (b) Click the Define... button to open the Define 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 Define Surface Monitors panel. (c) Click OK to close the Surface Monitors panel. 4-28 c Fluent Inc. September 21, 2006

3. Save the transient solution case file (noz uns.cas). File Write Case... 4. Start the transient calculation. Solve Iterate...! Calculating 600 time steps will require significant CPU resources. Instead of calculating the solution, you can read the data file (noz uns.dat.gz) with the precalculated solution. This data file can be found in the folder 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. monitor-1-4.0000-6.0000-8.0000 Mass Flow Rate (kg/s) -10.0000-12.0000-14.0000-16.0000-18.0000 0 100 200 300 400 Time Step 500 600 Convergence history of Mass Flow Rate on outlet (Time=1.7136e-02) FLUENT 6.3 (2d, dbns imp, S-A, unsteady) Figure 4.6: Mass Flow Rate History (Unsteady Flow) 5. Save the transient case and data files (noz uns.cas and noz uns.dat). File Write Case & Data... c Fluent Inc. September 21, 2006 4-29

Step 10: Saving and Postprocessing Time-Dependent Data Sets At this point, 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 FLUENT s 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 the saving of case and data files 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 dropdown list. (d) Enter noz anim for File Name. 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. (e) Click OK to close the Autosave Case/Data panel. 4-30 c Fluent Inc. September 21, 2006

Extra: If you have constraints on disk space, you can restrict the number of files 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 specified number of files, FLUENT will overwrite the earliest existing file. 2. Create animation sequences for the nozzle pressure and Mach number contour plots. Solve Animate Define... (a) Set Animation Sequences to 2. (b) Enter pressure for the Name of the first 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

(d) Click the Define... button for pressure to open the associated Animation Sequence 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 files with either the Metafile or PPM Image option is preferable, to avoid using too much of your machine s 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

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 fixed range for the contour plot and subsequent animation. 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 pressure sequence. (e) Click the Define... 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

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.3 (2d, dbns imp, S-A, unsteady) 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 machnumber sequence. (f) Click OK to close the Solution Animation panel. 4-34 c Fluent Inc. September 21, 2006

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.3 (2d, dbns imp, S-A, unsteady) Figure 4.8: Mach Number Contours at t = 0.017136 s c Fluent Inc. September 21, 2006 4-35

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 defined previously), the case and data files will be saved approximately every 0.00028 seconds of the solution time; animation files will be saved every 0.000028 seconds of the solution time. 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. September 21, 2006

4. 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) Disable the Wireframe Animation option in the Rendering group box. (b) Enable the Double Buffering 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

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 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.3 (2d, dbns imp, S-A, unsteady) Figure 4.9: Pressure Contours at t = 0.017993 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.3 (2d, dbns imp, S-A, unsteady) Figure 4.10: Pressure Contours at t = 0.019135 s c Fluent Inc. September 21, 2006 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.3 (2d, dbns imp, S-A, unsteady) Figure 4.11: Mach Number Contours at t = 0.017993 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.3 (2d, dbns imp, S-A, unsteady) Figure 4.12: Mach Number Contours at t = 0.019135 s 4-40 c Fluent Inc. September 21, 2006

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 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 files, 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 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 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 files 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

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 flow 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 files saved for other time steps of interest and display the vectors. 4-42 c Fluent Inc. September 21, 2006

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 Velocity Vectors Colored By Velocity Magnitude (m/s) (Time=1.8849e-02) FLUENT 6.3 (2d, dbns imp, S-A, unsteady) Figure 4.13: Velocity Vectors at t = 0.018849 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 timedependent flows, using file autosaving to automatically save solution information as the transient calculation proceeds. Finally, you learned how to use FLUENT s 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

4-44 c Fluent Inc. September 21, 2006