You are on page 1of 46

Mutli-Species Flow and Postprocessing

1. Introduction
This workshop will show how to set up a multi-species problem. The domain will contain a blend of
several different gases (nitrogen, oxygen, carbon dioxide, and water vapor). You will learn how Fluent
can be used to simulate mixtures of fluids and account for buoyancy effects. A multi-species problem
like this assumes that the components are mixed at a molecular level (as normally happens with gases).
The alternative, when there is an identifiable boundary between components (either droplets / particles
/ bubbles, or a free-surface) would be a multi-phase problem.

This workshop will also show how to do the following:

• Including gravitational (buoyancy) effects

• Setting a momentum source term to account for a jet fan

• Advanced postprocessing in CFD-Post:

– Creating surface groups

– Creating isosurfaces

– Creating line graphs

– Creating expressions (CEL)

– Creating portable (.cvf ) images

– Performing integrals

– Volume rendering

2. Prerequisites
This tutorial assumes that you are already familiar with the ANSYS Workbench interface and its project
workflow. This tutorial also assumes that you have completed the first workshop and that you are famil-
iar with the ANSYS Fluent tree and ribbon structure. Some steps in the setup and solution procedure
will not be shown explicitly.

3. Problem Description
In this workshop, you will analyze the release of heat and combustion gases from a car with an engine
fire in a ventilated parking garage. The simulation will be run steady state assuming the fire has reached
a stable developed stage.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 1
Mutli-Species Flow and Postprocessing

The simulation physics & boundary conditions are as follows:

• Mixture of N2, O2, CO2 and H20

• 6 m/s exhaust, 0.1 kg/s combustion gases (H2O and CO2) at 1200 K

• 80 N/m3 momentum source in jets

4. Setup and Solution


This workshop can be completed in two ways.

• In the longer option, you will learn how to set up a mutli-species simulation of a car fire. This includes
all the steps listed in the workshop. Once the model is set up, you can choose to wait for it to converge,
or else replace your results with the supplied data file.

• In the shorter option, you will only learn how to do postprocessing in CFD-Post. Copy the files
car_and_garage-r17-1-01000.dat.gz, and car_and_garage-r17-1.cas.gz to your
working folder. Go to Displaying Results in CFD-Post (p. 23)

4.1. Loading a Mesh and Starting Fluent


1. Copy the file car_and_garage-r17.msh to your working folder.

2. Start ANSYS Workbench.

3. Drag a Fluent Component System to the Project Schematic.

4. Right-click on Setup, cell 2, and select Import Fluent Case → Browse.

5. In the window that opens, from the drop-down list next to File name, select FLUENT Mesh File.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
2 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

6. Select the file car_and_garage-r17.msh and click Open.

7. Save the project as 03_Multi-Species_Flow.

File → Save

8. Double-click Setup, cell 2, of the Fluent system to open Fluent Launcher.

a. In the Fluent Launcher dialog box, enable Double Precision under Options.

b. Click OK in the Fluent Launcher dialog box to open ANSYS Fluent.

Note

IF HPC licenses are available, you can select Parallel under Processing Options
and enter the number of processes.

4.2. Setting Up Domain


Check the mesh.

Setting Up Domain → Mesh → Check

Note

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

4.3. Setting Up Physics


1. In the Solver group of the Setting Up Physics ribbon tab, retain the default selection of the Steady from
Time.

Setting Up Physics → Solver

2. Set up your models for the CFD simulation using the Models group of the Setting Up Physics ribbon
tab.

• Enable the - epsilon model.

Setting Up Physics → Models → Viscous...

i. In the Viscous Model dialog box, select k-epsilon from the Model list.

ii. Select Realizable from the k-epsilon Model group.

iii. Select Enhanced Wall Treatment from the Near-Wall Treatment group.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 3
Mutli-Species Flow and Postprocessing

iv. Retain the other default settings and click OK to accept the model and close the Viscous Model
dialog box.

Note

Turbulence modeling, as with all physics modeling, is a complex area. There are many
application specific options. The k-epsilon model is a simple but robust model. For more
information, refer to the Fluent User's Guide.

3. Specify the species model.

Setting Up Physics → Models → Species...

a. In the Species Model dialog box, select Species Transport from the Model list.

b. Retain the other default settings and click OK to accept the model and close the Species Model
dialog box.

Note

The species model requires the definition of a mixture representing the chemical
species of interest. The default mixture contains nitrogen, oxygen and water vapor.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
4 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

c. A dialog box opens, informing about the changes in material properties. Click OK.

Note

This setup will enable the tracking of non-reacting chemical species.

Note

In this workshop, the products of combustion (heat & gases) will be modeled rather
than the reaction itself. You can see in the dialog box that if it was desired to model
fire by including the reactions, there are several combustion models available.

4. Specify the mixture properties.

Setting Up Physics → Materials → Create/Edit...

a. In the Create/Edit Materials dialog box, the Material Type selected is mixture.

i. In the Create/Edit Materials dialog box, click Fluent Database....

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 5
Mutli-Species Flow and Postprocessing

A. In the Fluent Database Materials dialog box, select fluid from the Material Type drop-
down list.

B. Select carbon-dioxide (co2) from the list of Fluent Fluid Materials.

C. Click Copy and close the Fluent Database Materials dialog box.

ii. In the Create/Edit Materials dialog box, select mixture from the Material Type drop-down
list.

iii. Click Edit... next to Mixture Species.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
6 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

A. In the Species dialog box, select carbon-dioxide (co2) from Available Materials and click
Add.

Note

This adds CO2 to the mixture.

B. Select n2 from the list of Selected Species and click Remove.

C. Select nitrogen (n2) from Available Materials and click Add.

Note

This places N2 as the last species in the list. The order of the species listed
under Selected Species is important. The most abundant species should
be listed last.

D. Click OK to close the Species dialog box.

iv. In the Create/Edit Materials dialog box, select mass-weighted-mixing-law from the Thermal
Conductivity (w/m-k) and Viscosity (kg/m-s) drop-down lists.

v. Click Change/Create in the Create/Edit Materials dialog box.

b. Select solid from the Material Type drop-down list.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 7
Mutli-Species Flow and Postprocessing

The default material is aluminum.

i. Enter concrete for Name.

ii. Delete the entry for Chemical Formula.

iii. Enter 2400 for Density (kg/m3).

iv. Enter 1000 for Cp (Specific Heat) (j/kg-k).

v. Enter 1.2 for Thermal Conductivity (w/m-k).

vi. Click Change/Create.

vii. Click No in the Question dialog box that asks if you want to overwrite aluminum.

Note

Selecting No preserves the original material (aluminum) and adds the new
material.

c. Close the Create/Edit Materials dialog box.

5. Set the cell zone conditions.

Setting Up Physics → Zones → Cell Zones → All

a. In the Cell Zone Conditions task page, select fluid_jet_fan and click Edit....

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
8 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

b. In the Fluid dialog box, enable Source Terms.

c. In the Source Terms tab, click Edit... next to Y Momentum.

i. In the Y Momentum sources dialog box, enter 1 for Number of Y Momentum sources.

ii. Select constant for 1. (n/m3).

iii. Enter -80 for 1. (n/m3).

iv. Click OK.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 9
Mutli-Species Flow and Postprocessing

d. Click OK to close the Fluid dialog box.

Note

You need to account for the air movement produced by the ceiling jet fan. You have
done this by adding momentum to the cell zone local to the jet. The advantage of this
technique (over using a pair of velocity boundary conditions) is that you preserve the
species (smoke) concentration through the fan. If you had used velocity boundary con-
ditions, you would need a UDF to find the concentration at the intake to the jet fan and
apply it to the jet fan discharge.

6. Set up the boundary conditions for the CFD analysis using the Zones group of the Setting Up Physics
ribbon tab.

Setting Up Physics → Zones → Boundaries → All

This opens the Boundary Conditions task page.

a. In the Boundary Conditions task page, in the Zone list, select velocity_inlet _fresh _air and click
Edit....

i. In the Velocity Inlet dialog box, in the Momentum tab, enter 0.8 for Velocity Magnitude.

ii. Enter 5 for Turbulent Viscosity Ratio.

iii. In the Thermal tab, enter 293.15 for Temperature (k).

iv. In the Species tab, enter 0.23 for o2 in the Specie Mass Fractions group.

Note

The species mixture contains 4 components (H2O, O2, CO2 and N2). The most
abundant species (N2) was entered last when the mixture was defined. You do
not need to enter a mass fraction for N2 because it will automatically account
for the remaining fraction not used by the first three (in this case, 0.77).

v. Close the Velocity Inlet dialog box.

b. Double-click pressure_outlet_all_air in the list of Zone in the Boundary Conditions task page and
set the boundary conditions in the Pressure Outlet dialog box, using the values in the following
table:

Component Value
Gauge Pressure 0 pascal
Turbulence Specification Method Intensity and Viscosity Ratio
Backflow Turbulent Intensity 5%
Backflow Turbulent Viscosity Ratio 5

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
10 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

Component Value
Temperature (in the Thermal tab) 293.15[K]
Species Mass Fraction of O2 (in the Species tab) 0.23

Note

As long as there is only flow out of the domain here, these values for turbulence,
temperature, and species will not be needed. However, during the solution process
there may be some inflow though this boundary, and therefore Fluent needs to
know what values to apply.

c. Double-click mass_flow_inlet_car_fire_source in the list of Zone in the Boundary Conditions task


page and set the boundary conditions in the Mass-Flow Inlet dialog box, using the values in the
following table:

Component Value
Mass Flow Rate 0.1 [kg/s]
Direction Specification Method Normal to Boundary
Turbulent Intensity 10%
Turbulent Viscosity Ratio 100
Temperature (in the Thermal tab) 1200[K]

Note

Higher values of turbulence are prescribed to represent the fire.

i. In the Species tab of Mass-Flow Inlet dialog box, enable Specify Species in Mole Fractions.

ii. Enter 0.65 and 0.35 for h2o and co2 respectively.

iii. Click OK to close the Mass-Flow Inlet dialog box.

d. Double-click walls_outer in the list of Zone in the Boundary Conditions task page.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 11
Mutli-Species Flow and Postprocessing

i. In the Thermal tab of Wall dialog box, select Temperature from the Thermal Conditions group.

ii. Retain 300 for Temperature.

iii. Enable Shell Conduction and click Edit... next to it.

Note

The Shell Conduction option enables thin walls to solve for heat transfer in
both the normal and planar directions without the need to volume mesh them.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
12 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

A. In the Shell Conduction Layers dialog box that opens, enter 0.15 for Thickness (m).

B. From the Material drop-down list, select concrete.

C. Click OK to apply the changes and close the Shell Conduction Layers dialog box.

Note

After Shell Conduction is selected, certain fields in the Wall dialog box
are grayed out and their entries are superseded by the entries in the Shell
Conduction Layers dialog box.

iv. Close the Wall dialog box.

e. Click Copy... in the Boundary Conditions task page, to copy the wall boundary conditions.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 13
Mutli-Species Flow and Postprocessing

i. In the Copy Conditions dialog box that opens, select wall_outer from the list of From
Boundary Zone.

ii. Select wall_ceiling and wall_floor from the To Boundary Zones list.

iii. Click Copy.

Note

Click OK when asked to confirm.

iv. Close the Copy Conditions dialog box.

Note

This will copy all boundary settings from the boundary zone walls_outer to both
wall_ceiling and wall_floor.

7. Set the operating conditions.

Setting Up Physics → Solver → Operating Conditions...

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
14 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

a. In the Operating Conditions dialog box, enable Gravity.

b. Enter -9.81 for Z (m/s2) under Gravitational Acceleration.

c. Enable Specified Operating Density.

d. Enter 1.1989 for Operating Density (kg/m3).

e. Click OK to close the Operating Conditions dialog box.

Note

• ANSYS Fluent avoids the problem of round-off error by subtracting the operating pressure
(generally a large pressure roughly equal to the average absolute pressure in the flow) from
the absolute pressure, and using the result (termed the gauge pressure). The absolute
pressure is simply the sum of the operating pressure and the gauge pressure.

• Operating temperature is only used when using the Boussinesq density model, so it has no
meaning in this case.

• Operating density is also a value for avoiding round-off errors. For simulations where pressure
boundary conditions are present, it is important to set the value correctly. Otherwise, the
pressure at the boundary will be incorrect and may lead to unphysical flow conditions. Here,
you have to set it to the density for the conditions at the pressure inlet - a gas at 293.15 K
with 23% O2 and 77% N2. You can initialize your flow field with these conditions to get the
value for the operating density from the post-processor (e. g. Reports -> Volume Integral).
For details, refer to the chapter on Natural Convection and Buoyancy-Driven Flows in the
Fluent Users Guide.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 15
Mutli-Species Flow and Postprocessing

4.4. Solving
1. Set up solution methods.

Solving → Solution → Methods...

a. In the Solution Methods task page, select Coupled from the Scheme drop-down list.

b. Select Body Force Weighted from the Pressure drop-down list.

Note

The Body Force Weighted scheme is recommended for problems involving large
body forces.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
16 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

2. Set the solution controls.

Solving → Controls → Controls...

a. In the Solution Controls task page, enter 50 for Flow Courant Number .

b. In the Under-Relaxation Factors group, enter 0.5 for Turbulent Kinetic Energy and Turbulent
Dissipation Rate.

c. Enter 0.7 for Turbulent Viscosity.

Note

Lower Under-Relaxation Factors will reduce the solution change between iterations,
leading to more stable convergence (though requiring more iterations to reach conver-
gence).

3. Set up residual monitors so that convergence can be monitored.

Solving → Reports → Residuals...

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 17
Mutli-Species Flow and Postprocessing

a. In the Residual Monitors dialog box, ensure that Plot is enabled in the Options group.

b. Select none from the Convergence Criteria drop-down list.

Note

By default ANSYS Fluent will plot residuals to the window and print to the console.
The default setting for the convergence criterion is absolute, which means that
the solver will continue until all residuals fall below the absolute criteria values
specified in the Equations group box. Switching the Convergence Criterion to
none will cause the solver to continue until a maximum number of iterations is
reached.

c. Click OK to close the Residual Monitors dialog box.

4. Create a surface report definition for mass flow rate.

Solving → Reports → Definitions → New → Surface Report → Mass Flow Rate...

Note

It is important to ensure that solution variables have converged to sensible stable values.
Creating Surface Report Definitions enables solution values of interest to be monitored
on specific surfaces within the domain.

a. In the Surface Report Definition dialog box, enter mass-flow for the Name.

b. Under the Create group, enable Report File and Report Plot.

c. Select interior_jet_intake from the list of Surfaces.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
18 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

d. Click OK to save and close the Surface Report Definition dialog box.

5. Similarly, create an integral surface report definition for surface heat flux.

Solving → Reports → Definitions → New → Surface Report → Integral...

a. In the Surface Report Definition dialog box, enter int-heat-flux for the Name.

b. Under the Create group, enable Report File and Report Plot.

c. Select Wall Fluxes... and Total Surface Heat Flux from the Field Variable drop-down lists.

d. Select wall_ceiling from the list of Surfaces.

e. Click OK to save and close the Surface Report Definition dialog box.

Note

• Buoyancy driven flows often show transient behavior. As a result, the residuals will often
oscillate. For this reason, convergence should always be judged by solution variable monitors
and flux reports. The residuals will, however, give an indication of overall convergence be-
havior and stability.

• In cases of an oscillating steady state solution, a common approach is to continue the simu-
lation in transient mode. In many cases, the oscillations will reduce significantly after a few
time steps.

• The use of surface/volume monitors combined with residuals will provide the best overall
judge of solution convergence.

6. Initialize the solution.

Solution → Solution Initialization

a. In the Solution Initialization task page, retain the selection of Hybrid Initialization from Initializ-
ation Methods.

Note

Hybrid initialization performs a basic flow simulation (Laplace equation) to set up


the initial flow field. Simplified momentum and pressure equations are solved, and
so the general flow field can be quickly determined (unlike standard initialization
which puts a constant value in each grid cell). By having a more realistic starting
point the solver will not need to do as much work to converge the model.

b. Click More Settings... in the Solution Initialization task page.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 19
Mutli-Species Flow and Postprocessing

i. In the Hybrid Initialization dialog box, click the Species Settings tab and enable Specify
Species Parameters.

ii. Enter 0.23 for o2 under Species Fraction.

iii. Click OK to close the Hybrid Initialization dialog box.

Note

Only flow and pressure equations are being solved with the Hybrid Initialization
method, so you need to set a realistic although constant value for species.

c. Click Initialize.

Note

You can check the console for progress.

7. Save the project.

File → Save Project

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
20 of ANSYS, Inc. and its subsidiaries and affiliates.
Setup and Solution

8. Run the simulation for 1000 iterations.

Note

This simulation will take a long time to compute a converged solution – this is not un-
usual for such ventilation / natural convection cases. There are natural unsteady features
in the flow and the equation set is somewhat ‘stiff’ to converge.

Figure 1: Residuals for the Solution

Figure 2: Mass Flow Rate Monitor Plot

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 21
Mutli-Species Flow and Postprocessing

Figure 3: Integral Heat Flux Monitor Plot

Note

You can load the data file provided if you do not want to wait till the run finishes.

File → Import → Data...

After loading the data file, click Plot in the Residual Monitors dialog box to display the
residuals.

9. Check convergence by computing the net mass flow rate.

Postprocessing → Reports → Fluxes...

a. In the Flux Reports dialog box, retain the selection of Mass Flow Rate in the Options group.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
22 of ANSYS, Inc. and its subsidiaries and affiliates.
Displaying Results in CFD-Post

b. In the Boundaries list, select mass_flow_inlet_car_fire_source, pressure_outlet_all_air, and ve-


locity_inlet_fresh_air.

c. Click Compute.

Note

The Net Results indicate a good mass balance, but the monitors show that the
solution is not completely converged. It is likely that there are some unsteady effects
present that may necessitate going to a transient (time dependent) simulation. The
energy balance can be checked in a similar way by selecting Total Heat Transfer
Rate.

d. Close the Flux Reports dialog box.

10. Save the project.

File → Save Project

11. Exit Fluent.

File → Close Fluent

5. Displaying Results in CFD-Post

Note

If you are doing the shorter version of the tutorial:

1. Start CFD-Post from the Start menu.

Start → ANSYS → Fluid Dynamics → CFD-Post

2. In CFD-Post, load the given data file car_and_garage-r17-1-01000.dat.gz.

File → Load Results...

Click OK in the window that appears.

Alternatively:

1. Start Workbench.

2. From Components Systems, drag Results to the Project Schematic.

3. Double-click Results, cell 2.

4. In CFD-Post load, the given data file car_and_garage-r17-1-01000.dat.gz.

File → Load Results...

Click OK in the window that appears.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 23
Mutli-Species Flow and Postprocessing

Now proceed to Step 3 (p. 24).

1. From Components Systems, drag Results and drop on Solution, cell 3 ,of the Fluent system.

2. Double-click Results, cell 2 to launch CFD-Post.

Note

The results are loaded. CFD-Post initially displays the outline (wireframe) of the model.

3. Check the temperature on the walls.

a. Add a location representing a group of surfaces.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
24 of ANSYS, Inc. and its subsidiaries and affiliates.
Displaying Results in CFD-Post

Location → Surface Group

Note

This lets you group a selection of entities (in this case walls) and apply the
same post-processing treatment to all items in the group.

i. In the Insert Surface Group dialog box, enter Walls for Name and click OK.

ii. In the Details of Walls, click the Location editor button next to Locations.

A. In the Location Selector dialog box, select wall_ceiling, wall_floor, wall_jet_housing,


and walls_outer from the list.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 25
Mutli-Species Flow and Postprocessing

(Hold down the Ctrl key and click to select multiple locations.)

B. Click OK.

iii. Click the Color tab in Details of Walls.

A. Select Variable from the Mode drop-down list.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
26 of ANSYS, Inc. and its subsidiaries and affiliates.
Displaying Results in CFD-Post

B. From the Variable drop-down list, select Temperature.

C. Select Local from the Range drop-down list.

Note

This option has allowed you to produce a temperature contour plot of


identical color range on a group of surfaces.

iv. Click Apply in the Details of Walls.

v. In the tree, right-click on Default Legend View under User Locations and Plots and click Edit
from the context menu.

A. In Details of Default Legend View, click on the Appearance tab.

B. In the Text Parameters group, enter 1 for Precision.

C. Select Fixed from the drop-down menu next to it.

D. Click Apply in Details of Default Legend View.

b. Generate a figure for use later in a report.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 27
Mutli-Species Flow and Postprocessing

• In the toolbar click on Figure .

Note

You can also click Insert → Figure from the menu.

A. In the Insert Figure dialog box that opens, enter Figure 1 Wall Temperature for
Name.

B. Click OK.

4. Create a Location representing a section plane.

Location → Isosurface

a. In the Insert Isosurface group box, enter xyzplane for Name and click OK.

b. In the Details of xyzplane, select Y from the Variable drop-down list.

c. Enter 9 [m] for Value.

d. Click Apply.

e. Deselect Walls from the tree.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
28 of ANSYS, Inc. and its subsidiaries and affiliates.
Displaying Results in CFD-Post

5. Display temperature contours on the slice plane.

a. In the Details of xyzplane, click the Color tab.

i. Select Variable from the Mode drop-down list.

ii. From the Variable drop-down list, select Temperature.

b. In the Render tab, disable Lighting and click Apply.

Note

The slice through the model gives you a useful indication of what is happening in
the middle of the domain.

c. Generate a new figure for the temperature contours on the section plane and name it Figure 2
Temperature Slice.

In the toolbar, click on Figure .

i. In the Insert Figure dialog box that opens, enter Figure 2 Temperature Slice for Name.

ii. Click OK.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 29
Mutli-Species Flow and Postprocessing

6. Create an animation to traverse the slice through the model so that you can see what is happening
throughout.

• Click the Animation button in the toolbar.

i. In the Animation dialog box, retain the selection of Quick Animation.

ii. Select xyzplane from the list under Select one or more objects to animate:

iii. Click the Play the animation button .

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
30 of ANSYS, Inc. and its subsidiaries and affiliates.
Displaying Results in CFD-Post

iv. After watching the animation, click the Stop the animation button and close the Animation
dialog box.

Note

If required, this animation could be saved to disk in MPEG / AVI formats. The alternative
to Quick Animation is Keyframe Animation. To use this, you set a series of key anim-
ation frames. Together they can display different objects, show different points in a
transient simulation, rotate the model rotated at different viewing angles. The animation
will progress smoothly between the various states you set in the key animation frames.

7. Change the look of the display.

a. Deselect xyzplane from the tree.

b. In the tree, expand fluid_main_garage.

c. Double-click wall_car.

d. In Details of wall_car, select Constant from the Mode drop-down list.

e. Select the color yellow by clicking on the Color selector button next to Color.

f. Click Apply.

8. Add a 3D Isosurface representing gases.

Location → Isosurface

a. In the Insert Isosurface group box, retain the default Name and click OK.

b. In Details of Isosurface, select Co2.Mass Fraction from the Variable drop-down list.

c. Enter 0.001 for Value.

d. In the Color tab, select Constant from the Mode drop-down list.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 31
Mutli-Species Flow and Postprocessing

e. Select the color gray by clicking on the Color selector button next to Color.

f. Click Apply.

g. Generate a new figure and name it Figure 3 CO2 Isosurface.

In the toolbar, click on Figure .

i. In the Insert Figure dialog box that opens, enter Figure 3 CO2 Isosurface for Name.

ii. Click OK.

9. Plot streamlines.

a. Hide the isosurface plot by clearing the Isosurface 1 check box in the tree.

b. Click the streamline button in the toolbar.

c. Retain the default name of Streamline 1 in the Insert Streamline dialog box and click OK.

d. In Details of Streamline, select velocity_inlet_fresh_air from the Start From drop-down list.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
32 of ANSYS, Inc. and its subsidiaries and affiliates.
Displaying Results in CFD-Post

e. Enter 100 for # of Points.

f. In the Color tab, select Local for Range.

g. Click Apply.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 33
Mutli-Species Flow and Postprocessing

h. Generate a figure and name it Figure 4 Streamlines.

In the toolbar, click on Figure .

i. In the Insert Figure dialog box that opens, enter Figure 4 Streamlines for Name.

ii. Click OK.

10. Generate portable CVF files.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
34 of ANSYS, Inc. and its subsidiaries and affiliates.
Displaying Results in CFD-Post

a. Click the Save Picture button in the toolbar.

b. In the Save Picture dialog box, select CFD_Viewer State (3D) from the Format drop-down list.

c. Click the Browse button next to file and browse to the location where you want to save the file.

d. Rename the file as car-streamlines.cvf.

e. Click Save.

Note

CFD-Post exports regular image formats (jpg /png), and in addition 3D images can be
saved. These images have the file extension .cvf.

They can be viewed using a free CFD viewer that can be downloaded from the ANSYS
website. (Go to www.ansys.com, and search for ‘CFD Post Viewer’). No license is required
to use the viewer, so you can install this on any computer (for example, laptop used for
presentations, or ask your client/customer to also download and install a copy). If you
have ANSYS version16.0 or higher installed on your machine, your computer will already
have the viewer, and will recognize this file extension. You only need to do a separate
installation of CFD Viewer (from the ANSYS website) on machines that do not have
Workbench installed.

The 3D image can be viewed using rotate / pan / zoom functionality just as in CFD-
Post,and can also be embedded in MS-Powerpoint. However, you cannot modify the
image, or add/remove objects from the image, or alter color ranges.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 35
Mutli-Species Flow and Postprocessing

The viewer is a powerful tool for presenting your project work. In many cases a 2D jpeg
image cannot explain 3D flow features. However rotating the model ‘live’ in front of
your audience will help convey your findings.

11. In CFD-Post, save the project.

File → Save Project

12. Minimize CFD-Post.

13. Using Windows Explorer, browse to the folder where you saved car-streamlines.cvf.

Note

You can see that the file size is very small, less than 250 KB, making it easy to send by
email.

a. Double click car-streamlines.cvf to open this file.

Note

It will take a few moments to launch the viewer application.

The image displayed is just like the one displayed in the graphical window of CFD-Post.

b. Use the left mouse button to rotate, middle/wheel to zoom, and right to translate.

c. Press ? on your keyboard to open a list of hotkeys.

d. Close the Viewer and the ANSYS CFD Viewer window.

14. In CFD-Post, click Volume Rendering in the toolbar .

a. In the Insert Volume Rendering dialog box, enter Gas Cloud for Name and click OK.

b. Disable Streamline 1 from the tree.

c. In Details of Gas Cloud, select Co2.Mass Fraction from the Variable drop-down list.

d. Retain the selection of Global from the Range drop-down list and click Apply.

e. To make it easier to see the image, change the screen background color to white.

i. In the menu bar, click Edit → Options

ii. In the Options dialog box that opens, click Viewer in the tree under CFD-Post.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
36 of ANSYS, Inc. and its subsidiaries and affiliates.
Displaying Results in CFD-Post

iii. Select Solid from the Color Type drop-down list.

iv. Select the white color from the Color drop-down list.

Note

This option applies a variable color and transparency to each grid cell depend-
ing on the plot variable. For applications like this involving smoke movement,
it makes it easy for the eye to assess where the cloud is concentrated.

v. Click OK to apply the settings and close the Options dialog box.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 37
Mutli-Species Flow and Postprocessing

6. Quantitative Postprocessing in CFD-Post


Until now, you have used CFD-Post to create color images to help interpret the CFD results. Next, you
will look at some quantitative techniques for extracting numerical data (volume integrals) and producing
line graphs. It is also possible to write your own arithmetic expressions for custom post-processing.

1. Create a line through the model.

Location → Line

a. Retain the default name in the Insert Line dialog box and click OK.

b. Disable Gas Cloud from the tree.

c. In Details of Line, retain the selection of Two Points from the Method drop-down list.

d. Enter 18, 3, and 2 for Point 1.

e. Enter 18, 18, and 2 for Point 2.

f. Enter 40 for Samples.

g. Click Apply.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
38 of ANSYS, Inc. and its subsidiaries and affiliates.
Quantitative Postprocessing in CFD-Post

This creates a horizontal line through the model, passing above the front of the car. You can
change the color of the line in the Color tab

2. Create a chart of temperature profile.

a. Click the Chart button in toolbar.

b. Retain the default name in the Insert Chart dialog box and click OK.

c. Under Details of Chart, in the General tab enter Temperature Profile for Title.

d. Retain the selection of XY from Type.

e. In the Data Series tab, select Line 1 from Location drop-down list.

f. In the X Axis tab, select Y from the Variable drop-down list.

g. In the Y Axis tab, select Temperature from the Variable drop-down list.

h. Retain the default settings for the rest and click Apply.

Note

• The computation domain exists from 3m < y < 18m

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 39
Mutli-Species Flow and Postprocessing

• The car (and fire source) is located at: 8m < y < 10m

• The jet fan is located at: 13m < y < 15m

The peak temperature is located not above the middle of the car (y=9m), but some
distance to the left (circa y= 6.5 - 7.5m). This is a direct effect of the air movement from
the jet fan.

3. Perform a volume integral to find out how much CO2 is present in the model.

Note

The only source of carbon dioxide (CO2) in the model is from the car fire source (the
inlet just comprises oxygen and nitrogen).

a. Click the Calculators tab at the top of the tree.

b. In the list, double-click Function Calculator.

c. Select volumeInt (Volume Integral) from the Function drop-down list.

d. Select fluid_main_garage from the Location drop-down list.

e. Select Co2.Mass Fraction from the Variable drop-down list.

f. Click Calculate.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
40 of ANSYS, Inc. and its subsidiaries and affiliates.
Quantitative Postprocessing in CFD-Post

4. Write an arithmetic function for postprocessing.

Note

It is possible to write your own arithmetic functions for post-processing, making use of
the data exported by the solver. The resulting expression may either return a single
value, or produce a quantity that varies spatially for use in a contour plot / line graph.

a. Click the Expressions tab at the top of the tree.

b. Right-click in the window and select New from the context menu.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 41
Mutli-Species Flow and Postprocessing

c. Enter PressureDrop for Name in the New Expression dialog box and click OK.

d. Enter the following command in the Definition tab of Details of PressureDrop:

ave(Pressure)@velocity_inlet_fresh_air

e. Click Apply.

Note

The Value displayed is approximately 35 [Pa].

Note

In the above expression:

ave
This term returns the average at the location specified by @.

For a list of functions available, right-click in the window and select Functions
→ CFD-Post

(Pressure)
Note how Pressure turns to italics as soon as you type it. It is important that the first
letter is in upper case.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
42 of ANSYS, Inc. and its subsidiaries and affiliates.
Quantitative Postprocessing in CFD-Post

For a full list of available variables, right-click in the window and select Variables.

velocity_inlet_fresh_air
This is the name of the boundary on which you are performing the average function.

For a full list of available variables right-click in the window and select Locations.

To compute the pressure drop, you did not need to add the outlet boundary:
ave(Pressure)@pressure_outlet_all_air

The outlet boundary was set to be a pressure outlet in Fluent with a pressure
of 0 Pa. This term would return a zero value.

Instead of typing out the expression, you can alternatively define it by making appropriate
selections from the menus that you can access with right-click.

5. Create an expression to convert temperature units and plot it.

a. Right-click in the Expression window and select New from the context menu.

b. Enter TemperatureConversion for Name and click OK.

c. In the Definition tab, enter Temperature/1[K]-273.15 and click Apply.

Note

• The initial letter of Temperature is upper case. It will turn to italics if correct.

• Expressions must balance dimensionally.

– You cannot enter only Temperature-273.15 since temperature has a unit [K].

– By dividing by 1 [K], the temperature unit is removed.

– You can also write Temperature-273.15[K] instead. This expression is valid,


but would return a value with units [K], which would be misleading.

d. Assign the expression to a variable.

Note

Expressions cannot be plotted directly. They need to be assigned to a variable.

i. Click on the Variables tab.

ii. Right-click in the Variables window and select New.

iii. Enter TemperatureC for the Name in the New Variable window and click OK.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 43
Mutli-Species Flow and Postprocessing

iv. In Details of TemperatureC (scalar), for Expression, select TemperatureConversion from the
drop-down list.

v. Click Apply.

e. Use this new temperature on the chart created earlier.

i. Click on the Outline tab.

ii. In the tree, double-click on Chart 1.

iii. In Details of Chart 1, click the Y Axis tab.

iv. Select TemperatureC from the Variable drop-down list and click Apply.

v. In the graphics window, click on the Chart Viewer tab at the bottom.

The chart now shows the result of the expression.

6. Check the report.

a. At the bottom of the graphics window, click on the Report tab.

b. Click Refresh at the top of the window.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
44 of ANSYS, Inc. and its subsidiaries and affiliates.
Quantitative Postprocessing in CFD-Post

c. Check the report.

You can see:

• Name and location of the result file.

• The mesh summary.

• List of boundary conditions.

• All the figures and charts produced during this workshop.

d. Click Publish to write the report in HTML format.

Note

In the tree, check Report. You can see the options enabled under Report. You can
enable/disable each depending on what you would like to be included in the report.
Double-click each option to check the details. You can add your own image or lines
of text explaining the content of the report.

e. Save the project.

File → Save Project

Note

If you are running the shorter version of this workshop and have used CFD-Post in
standalone mode, use:

File → Save State As...

And save to your working directory. The state file stores all the post-processing
settings you have created. If CFD-Post is used from Workbench, this is done auto-
matically when closing CFD-Post.

If you have done the longer version of this workshop, you will recall that you ran
for a fixed number of iterations, and wanted to examine the results to determine
if the model had converged or not. (The residuals were ‘stuck’ and further iterations
would not lower the residuals). It might be necessary to revisit the model setup,
by moving to a transient scheme, or modifying the modeling settings. A useful as-
sessment of convergence is to see if the results of interest remain unchanged as
the solver settings are enhanced.

The advantage of having the state file is that if you choose to modify the solver
settings and re-run the model, you can quickly reproduce the equivalent post-pro-
cessing images. Simply load the new results file, then load the state file. Likewise,
it is common in project work to have run a series of models to test different oper-
ating conditions. This technique will let you generate equivalent images so as to
produce a good comparison in your presentation / report.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 45
Mutli-Species Flow and Postprocessing

7. Summary
CFD-Post is a very powerful post-processing tool capable of producing high quality images quickly and
easily. In this workshop you have learned how to:

• Produce contour plots, streamlines, and isosurfaces.

• Perform volume integrals, create line graphs, and create your own arithmetic expressions for post-processing.

• Save 3D images to the disk and view them in a viewer.

• Generate a report.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
46 of ANSYS, Inc. and its subsidiaries and affiliates.

You might also like