You are on page 1of 66

Workshop 03

Multi-Species Flow and PostProcessing


14.5 Release

Introduction to ANSYS
Fluent
2012 ANSYS, Inc.

November 13, 2012

Release 14.5

Introduction
In this workshop you will analyze the release of heat and combustion gases from a single
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.
Simulation Physics & Boundary Conditions
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
Air Outlet
pressure_outlet_all_air

Heat and gas release from fire


mass_flow_inlet_car_fire_source
Jet Fan
fluid_jet_fan

Symmetry Plane
symmetry

Fresh Air Inlet


velocity_inlet_fresh_air

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
2

Solving

Proceed to Part 2.
Release 14.5

Important Note
NOTE:

This workshop has been designed to be completed in one of two ways. Please check with
your trainer on whether you are to take the short or long option.

[Short Option] This workshop can be used just to demonstrate post-processing in CFDPost. Pre-prepared results files are supplied, so please jump straight to page 35 for postprocessing.

[Long Option] Follow all the instructions, which will demonstrate how to set up a multispecies simulation of a car fire. Once the model is set up, you can choose to wait for it
to converge, or then replace your results with the supplied pre-prepared set.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
3

Solving

Proceed to Part 2.
Release 14.5

If doing the short version (post-processing only)


please jump to page 35 now.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
4

Solving

Proceed to Part 2.
Release 14.5

Objectives (Flow Simulation Part)


Learning Aims:
The first part of 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, water vapor).
Other topics that will be introduced are:

Including gravitational (buoyancy) effects

Setting a momentum source term to account for a jet fan

Learning Objectives:
To understand how Fluent can be used to simulate mixtures of fluids, and
account for buoyancy effects. Note that a multi-species problem like this
assumes that the components are mixed at a molecular level (as normally
happens with gases). The alternative is a multi-phase problem where there is an
identifiable boundary between the components (either droplets / particles /
bubbles, or a free-surface). Multi-phase workshops include Workshop 2 (DPM)
and Workshop 7 (Tank Flush).
Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
5

Solving

Proceed to Part 2.
Release 14.5

Starting Workbench
Open Workbench
Start > Programs > ANSYS 14.5 > Workbench 14.5
Drag a Fluent Component System into the project schematic
Rename the system to Garage (RMB on cell A1 to rename the system)

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
6

Solving

Proceed to Part 2.
Release 14.5

Starting Fluent in Workbench


Start Fluent
Double click on the Setup cell to open Fluent
Choose 3D and Double Precision under Options and retain the other default
settings (if your computer has 2 or more nodes and parallel licenses are
available, you also could start Fluent parallel)

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
7

Solving

Proceed to Part 2.
Release 14.5

Import Mesh and General Setup


Import the existing mesh file
Under the Fluent File menu select Import >
Mesh.
Select the file car_and_garage.msh and click OK
to import the mesh.
To check for any problems in the mesh click
Check. There should be no problems reported in
the TUI window.
Reorder the mesh using Mesh > Reorder >
Domain (from the menu).
Reordering the domain can improve the computational
performance of the solver by rearranging the nodes,
faces and cells in memory.

Retain defaults for the solver.


Enable gravity and set z = -9.81 m/s2.
Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
8

Solving

Proceed to Part 2.
Release 14.5

Setting Physics (Turbulence)


Specify turbulence model
Select Models in the navigation pane.
Double click Viscous in the model
selection pane. The Viscous Model panel
will open.
Select k-epsilon (2 eqn) under Model,
Realizable under k-epsilon Model and
Enhanced Wall Treatment under NearWall Treatment.
Turbulence modelling, as with all physics
modelling, is a complex area. There are many
application specific options. The k-epsilon
model is a simple but robust model. The
documentation provides further guidance on
which models to use for specific applications.

Click OK.
Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
9

Solving

Proceed to Part 2.
Release 14.5

Setting Physics (Species / Mixture)


Specify species model
Double click Species in the model
selection pane. The Species Model panel
will open.
In this workshop the products of combustion
(heat & gases) will be modelled rather than the
reaction itself.

Select Species Transport and click OK.


Switching on the species model will introduce
new material properties.
An information box will appear. Click OK to
accept this.
This setup will enable the tracking of nonreacting chemical species.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
10

The species model requires the


definition of a mixture representing
the chemical species of interest. The
default mixture contains nitrogen,
oxygen and water vapour.
Solving

Proceed to Part 2.
Release 14.5

Defining Materials (1)


Specify mixture
Select Materials in the navigation pane.
Note that under Mixture in the Materials pane the
default mixture is listed as containing nitrogen,
oxygen and water-vapor.

Double click mixture-template, this will open the


Create/Edit Materials panel with the mixture
preselected.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
11

Solving

Proceed to Part 2.
Release 14.5

Defining Materials (2)


Add a mixture species
In the Create/Edit Materials panel click on
Fluent Database.
The Fluent Database Materials panel will
appear.
Select fluid as Material Type.
All predefined fluids materials will be
listed under Fluent Fluid Materials.
Select carbon-dioxide (co2).
Click Copy.
Close the Fluent Database Materials panel.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
12

Solving

Proceed to Part 2.
Release 14.5

Defining Materials (3)


Copying carbon-dioxide(co2) from the fluid database has made the species available to
the simulation, now add it to the mixture.
In the Materials panel ensure Material Type is set to Mixture.
Alongside Mixture Species, click Edit.
In the Species panel select co2 from the Available Materials list and select Add.
The Selected Species defines the component species of the mixture.
The order of the species listed under Selected Species is important. The most
abundant species should be listed last.
Use the Remove button to Remove n2, followed by the Add button to replace n2 as
the last species. Click OK (but dont close the mixture panel yet).

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
13

Solving

Proceed to Part 2.
Release 14.5

Defining Materials (4)


Specify mixture
Modify the existing settings for Thermal Conductivity and viscosity to be massweighted-mixing-law.
Click Change/Create to apply the changes.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
14

Solving

Proceed to Part 2.
Release 14.5

Defining Materials (5)


Specify solid material
Select Solid under Material Type. The default solid material is aluminum (al).
Modify aluminum (Name, Chemical Formula & Properties) as shown below.
Click Change/Create and choose No for overwriting.
Selecting No preserves the original material (aluminum) and adds the new material.

Close the Create/Edit Materials panel.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
15

Solving

Proceed to Part 2.
Release 14.5

Cell Zone Conditions


Set Cell Zone Conditions
Select Cell Zone Conditions from the
Navigation Pane.
Select fluid_jet_fan, then edit.
Activate Source Terms.
Select the Source Terms tab and click on
Edit for Y Momentum.
Add 1 source, select Constant and enter a
value of -80 (N/m3).
Click OK in both panels.
We need to account for the air movement produced by the ceiling
jet fan. Here we 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 we preserve the
species (smoke) concentration through the fan. If we had used
velocity boundary conditions, we would have needed a UDF to find
the concentration at the intake to the jet fan and apply that to the
jet fan discharge.
Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
16

Solving

Proceed to Part 2.
Release 14.5

Boundary Conditions (air inlet)


Set Boundary Conditions

Select Boundary Conditions from the Navigation Pane.


Double-click velocity_inlet_fresh_air from the Zone list.
Apply Momentum and Thermal settings as shown.
Continued on next slide.....

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
17

Solving

Proceed to Part 2.
Release 14.5

Boundary Conditions (air inlet)


Set Boundary Conditions.... cont
Apply Species settings as shown.
Click OK.
The mixture species 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. It will automatically account for the
remaining fraction not used by the first
three (in this case 0.77).

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
18

Solving

Proceed to Part 2.
Release 14.5

Boundary Conditions (air outlet)


Set Boundary Conditions

Double click pressure_outlet_all_air from the Zone list.


For Momentum, in Turbulence set intensity to 5% and viscosity ratio to 5.
For Thermal, set the temperature to 293.15 K (as for previous BC).
For Species, set the o2 concentration to 0.23.
Click OK.

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

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
19

Solving

Proceed to Part 2.
Release 14.5

Boundary Conditions (fire source)


Set Boundary Conditions

Double click mass_flow_inlet_car_fire_source from the Zone list.


Momentum: Mass Flow Rate to 0.1 kg/s, Normal to Boundary
Turbulence: 5% Turbulent Intensity, Turbulent Viscosity Ratio = 5
Thermal:
1200K
Species:
set specify in mole fractions
with 0.65 h2o and 0.35 co2
- OK

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
20

Solving

Proceed to Part 2.
Release 14.5

Boundary Conditions (walls 1)


Set Boundary Conditions
Double click walls_outer from the Zone list.
Apply Thermal settings as shown.
Click OK.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
21

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.

Solving

Proceed to Part 2.
Release 14.5

Boundary Conditions (walls 2)


Set Boundary Conditions
Select Copy from the Boundary Conditions Pane.
Select walls_outer in the From Boundary Zone list and wall_ceiling and wall_floor
in the To Boundary Zones list.
Click Copy, click OK in the question dialog box then Close.
This will copy all boundary settings from the boundary zone walls_outer to both
wall_ceiling and wall_floor.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
22

Solving

Proceed to Part 2.
Release 14.5

Operating Conditions
Set operating conditions
Select Operating Conditions.
Apply Specified Operating Density settings as shown.
Click OK.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
23

Solving

Proceed to Part 2.
Release 14.5

Operating Conditions
Notes
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 in
this case, it has no meaning.

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 postprocessor (e. g. Reports -> Volume Integral). See the Users Guide Natural Convection
and Buoyancy-Driven Flows for more details.
Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
24

Solving

Proceed to Part 2.
Release 14.5

Solution Methods
Set solution methods
Select Solution Methods from the Navigation Pane.
For Pressure-Velocity Scheme, set to Coupled.
Under Spatial Discretization set Pressure to Body Force Weighted.
The Body Force Weighted scheme is recommended for problems involving large
body forces.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
25

Solving

Proceed to Part 2.
Release 14.5

Solution Controls
Set solution controls
Select Solution Controls from the Navigation Pane.
Set the values shown below.

Flow Courant Number = 50


Density = 1
Body Forces = 1
Turbulent Kinetic Energy = 0.5
Turbulent Dissipation Rate = 0.5
Turbulent Viscosity = 0.7
h2o = 1
o2 = 1
co2 = 1
Energy = 1

Lower Under-Relaxation Factors will reduce the solution


change between iterations, leading to more stable
convergence though requiring more iterations to reach
convergence.
Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
26

Solving

Proceed to Part 2.
Release 14.5

Monitors (1)
Set solution monitors
Select Monitors from the Navigation Pane.
Click Edit and set the Residual Monitors as shown below.
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
box. Switching the Convergence Criterion to none will cause the solver to continue until a
maximum number of iterations is reached.

Click OK.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
27

Solving

Proceed to Part 2.
Release 14.5

Monitors (2)
Set surface monitors
Under Surface Monitors, click Create.
It is important to ensure that solution variables have converged to sensible stable values.
Creating Surface Monitors enables solution values of interest to be monitored on specific
surfaces within the domain.

Set the Surface Monitor as shown below and click OK.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
28

Solving

Proceed to Part 2.
Release 14.5

Monitors (3)
Set surface monitors
There are many different types of calculations that can be performed over surfaces listed
under Report Type.
Create a second monitor for the integral of the Total Surface Heat Flux on the surface
wall_floor plotting to window 3 and printing to the console, as shown below.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
29

Solving

Proceed to Part 2.
Release 14.5

Monitors (3)
Notes on monitors
Buoyancy driven flows often show transient behavior. For this reason, the residuals
will often oscillate. Because of this, convergence should always be judged by solution
variable monitors and flux reports. The residuals will however give an indication of
overall convergence behavior and stability.
In cases of an oscillating steady state solution, a common approach is to continue
the simulation 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.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
30

Solving

Proceed to Part 2.
Release 14.5

Solution Initialization
Set initialization values
Select Solution Initialization and Hybrid Initialization
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, less work will be
needed by the solver to converge the model.

Select More Settings, and for species settings, define the initial o2
concentration to be 0.23, then OK
Only flow and pressure equations are being solved with the Hybrid method, so we need to
set a realistic, although constant, value for species.

Select Initialize, and watch the TUI window for progress

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
31

Solving

Proceed to Part 2.
Release 14.5

Running the simulation


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

If you want to run the simulation yourself, set the case to run for 1000 iterations in Run
Calculation, and keep an eye on the solution progress.
Alternatively, just load the results (data) file supplied with this workshop
File > Import > Data > car_and_garage_1000its.dat.gz
You can reproduce the residual graph shown below by
Monitors > Residuals > Select Residuals then Edit. Press the Plot button.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
32

Solving

Proceed to Part 2.
Release 14.5

Check convergence

Select Reports from the Navigation Pane and select Fluxes under Reports.
Click Setup.
In the Flux Reports panel select the Mass balance and select the inlet/outlet boundaries
(shown below) then click compute.

Note that the Net Results indicate the results are mostly, but not completely converged. It is likely that
there are some unsteady effects present that may necessitate going to a transient (time dependent)
simulation. This will be discussed in a later lecture.
Note that the energy balance can be checked in a similar way by selecting Total Heat Transfer Rate

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
33

Solving

Proceed to Part 2.
Release 14.5

Exit
Close Fluent

Close ANSYS Fluent by selecting File>Close Fluent

ANSYS Fluent contains basic built in post-processing capabilities which can be used to
quickly assess results graphically and numerically during and after the solution.

CFD-Post is a powerful separate post-processing application containing many more


advanced features. The remainder of this workshop will introduce some features of
CFD-Post.

Introduction
2012 ANSYS, Inc.

Part 1: Long Version


November 13, 2012

Setup
34

Solving

Proceed to Part 2.
Release 14.5

Post-Processing in CFD-Post

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
35

Expressions and Integrals

Reports

Summary
Release 14.5

Objectives (Post-Processing)
Learning Aims:
This workshop is designed to teach a range of skills in post-processing Fluent
results files using CFD-Post. Topics to be covered include:
Creating surface groups
- Creating line graphs
Creating isosurfaces
- Creating expressions (CEL)
Creating portable (.cvf) images
- Performing integrals
Creating automatic reports
- Volume rendering

Learning Objectives:
To understand the ways in which CFD-Post can be used both for high quality
images, as well as producing quantitative data from volume/surface integrals,
and writing custom functions.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
36

Expressions and Integrals

Reports

Summary
Release 14.5

Starting CFD-Post
If you are doing the long version of this workshop:

Go to the ANSYS Workbench project page.

Under Component Systems, pick Results and drag onto the desktop.

Draw a line from the Solution Cell of the Fluent system to the Results Cell (see image)

Start CFD-Post by clicking on the Results cell

If you are doing the short (post-processing only) version of this workshop:

Start CFD-Post from the Start menu:

Start Menu > ANSYS 14.5 > Fluid Dynamics > CFD-Post 14.5

Within CFD-Post, select File > Load Results and pick the supplied file:
car_and_garage_1000its.dat.gz

OK to the pop-up window.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
37

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Wall Temperature (1)


Add a Location representing a group of surfaces
This lets you group a selection of entities (in this case walls) and apply the same postprocessing treatment to all items in the group

Select Location > Surface Group, and enter the name Walls

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
38

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Wall Temperature (2)


Define Location details

The details of the new location will


be displayed in the bottom left pane.

Select Locations, click on and


select all walls EXCEPT wall_car
(CTRL click to multiple select).

Click OK in the Location Selector.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
39

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Wall Temperature (3)


Apply contour plot to Location

Select the Color tab, click on Mode and select:

Variable: Temperature

Range: Local

Apply

This option has allowed us to


produce a temperature contour
plot of identical colour range on
a group of surfaces.

Modify the Legend

Select Default Legend

Right click, Edit

Under Appearance:

Precision 1

Change Scientific
to Fixed

Apply

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
40

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Generating a Figure


Generate a figure for use later in a report.
- Click the Figure icon
- Enter name Figure 1 Wall Temperature
- OK to the Insert Figure panel.

Remember where this option is


(you will be asked to use it
several times on subsequent
slides).
We will be creating several
figures as we progress through
this workshop.
Later on we will demonstrate
how to use these figures to
automate report-writing.
Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
41

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Section Plane (1)


Add a Location representing a section plane

Select Location > Isosurface

In the pop-up window Enter name xzplane and click OK.

Under Geometry tab set Definition Variable to Y

Value to 9 [m]

Click Apply

In the model outline tree,

de-select the Walls option


so only the new slice plane
is visible

Continued on next slide..

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
42

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Section Plane (2)

Under Color set the Variable to Temperature

Under Render disable Lighting, then Apply to display

Generate a new Figure, and name it Figure 2 Temperature Slice

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
43

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Quick Animation


The slice through the model gives us a useful indication of what is happening in the
middle of the domain. A quick animation will transverse this slice through the model
so we can see what is happening elsewhere.

Click the Animation button in the top toolbar

Select Quick Animation

Highlight the xyplane object.

Press the Play button

When finished, use the stop button

, and watch the display.


then Close.

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 animation frames. These might have
different objects visible, different points in a transient simulation, or
might have the model rotated at a different viewing angle. The
animation will progress smoothly between these states.
Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
44

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing 3d Isosurface [1]


First, change the look of the display:

Hide the plane xzplane previously created by un-ticking in the model tree

Expand the top of the model tree, expanding fluid_main_garage

Double-click on wall_car

Make sure the details box shows (wall_car), if not you will be modifying the wrong object!

For Color select constant, and pick yellow

Apply

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
45

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing 3d Isosurface [2]


Add a 3D Isosurface representing gases

Select Location > Isosurfaces

Keep the default name Isosurface 1

Set the Variable to Co2.Mass Fraction and the value to 0.001

Set Color to be constant (keep default grey colour), then Apply

Generate a new Figure: Figure 3 CO2 Isosurface

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
46

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Streamlines
Add 3D streamlines to visualize flow

Hide the isosurface created in the previous step (un-tick in model tree)

Click the Streamline button

and keep default name (Streamline 1)

Start From: velocity_inlect_fresh_air

# Points: 100

Under Color set

Mode: User Plot Variable

Range: Local

Apply

Generate a new Figure of this image


Figure 4 Streamlines

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
47

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Portable CVF Files [1]


Not only can CFD-Post export regular image formats (jpg /png), but 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 (e.g. laptop
used for presentations, or ask your client/customer to also download and install a copy).
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 the user cannot modify the image, they
cannot add/remove objects from the image, or alter color ranges.
This is a really powerful tool for when you come to present 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.
Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
48

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Portable CVF Files [2]


In CFD-Post, click the camera icon:
For Format, select CFD-Viewer State(3D)
Click the folder icon to the right of the filename.
Pick the directory you are working in (remember this!)
Save as filename car-streamlines.cvf
Click Save in both windows.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
49

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Portable CVF Files [3]


Minimise CFD-Post, and use Windows Explorer to browse to the folder used on the last
slide.
Note how this file (car-streamlines.cvf) is quite small (in this case about 170kB, and
therefore easy to email to your client or manager).

Double-click to open this file (it will take a few moments to launch the viewer application)
If you have ANSYS R14.5 installed on your machine, your computer will already have the
viewer, and will recognise this file extension. You only need to do a separate installation of
CFD-Post Viewer (from the ANSYS website) on machines that do not have Workbench
installed.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
50

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Portable CVF Files [4]


CFD-Post Viewer will look just like the graphical window of CFD-Post
Use left mouse button to rotate
Middle mouse button (or wheel) to zoom
Right mouse button to translate
Type question mark ? for a list of hotkeys

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
51

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Volume Rendering


Close the standalone viewer and return to CFD-Post
Hide the streamlines plot by un-ticking in model view
Select Volume Rendering,
and use name Gas Cloud

Under Geometry, set Co2.Mass Fraction

Keep range as Default, then Apply

To make it easier to see the image, change the screen background colour to white:

Edit > Options > CFD-Post > Viewer

Set Color Type to Solid

Pick White from the color options

OK

This option applies a variable colour and


transparency to each grid cell depending 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.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
52

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Quantitative
Until now we have used CFD-Post to create colour images to help interpret the CFD results
Next we 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.

Create a line through the model:


Hide the Gas Cloud volume rendering.
Location > Line and keep default name Line 1.
Set Method Two Points
From X=18 Y=3 Z=2
To
X=18 Y=18 Z=2
Set 40 samples along this line
Apply
This has created a horizontal line through the model,
passing above the front of the car

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
53

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Line Graph [1]


Select the Chart Icon
from the top Toolbar
Keep the Default name Chart 1 then OK
Under General, set the Title to Temperature Profile
Under Data Series Set location to Line 1
Under X Axis, set variable to Y
Under Y Axis set variable to Temperature
Apply

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
54

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Line Graph [2]


The resulting graph looks like this:
The computation domain exists from
3m < y < 18m
The car (and fire source) is located at
8m < y < 10m
The jet fan is located at
13m < y < 15m
Notice that the peak temperature is
located not above the middle of the car
(y=9m) but moved some distance to the
left (circa y= 6.5 - 8m). This is a direct
effect of the air movement from the jet
fan.
Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
55

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Volume Integrals


The only source of carbon dioxide (co2) in the model is from
the car fire source (the inlet just comprises oxygen and
nitrogen). We will perform a volume integral to find out how
much co2 is present in the model.
Select Calculators tab
Select Function Calculator and double click
Function: volumeInt (for Volume Integral)
Location: fluid_main_garage
Variable: Co2.Mass.Fraction
Press Calculate

The result is about 0.93m3 of CO2.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
56

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Expressions [1a]


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 (first example, below), or produce a quantity that varies spatially for use in a
contour plot / line graph (second example, to follow).
Select Expressions tab
Right click in the window and select New
Enter name PressureDrop then OK
Enter the expression exactly as shown below, then Apply
The answer is approximately 35Pa.
If you get any errors look at the next slide now, which
will help you understand why

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
57

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Expressions [1b]


ave returns the average at
the location specified by
the @
For a list of functions
available, right-click in the
window and select
Functions > CFD-Post

Note how Pressure turns to


italics as soon as you type it
It is important to make the
first letter a capital P
For a full list of available
variables, right click in this
window and select Variables

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

This is the name of the boundary that you


are performing the average function on
For a full list of locations, right-click and
select Locations
Note that to compute the pressure drop,
we 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 try it if you
like!

Line Graphs
58

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Expressions [2a]


The procedure to create an expression that can be plotted spatially is very similar,
there is just one additional step to assign it to a variable
As a simple example, lets convert temperature from K to C and plot this on the graph
Expressions > New > name TemperatureConversion
Enter the expression Temperature/1[K] 273.15 then Apply

Note:
Initial capitals for Temperature. It will turn to italics if correct.
Expressions must balance dimensionally.
We cannot just enter Temperature 273.15 since Temperature has a unit [K]
By dividing by 1 [K] we remove the temperature unit.
We could instead enter Temperature 273.15[K] This expression is valid, but
would return a value with units [K] which would be misleading.
Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
59

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Expressions [2b]


Expressions cannot be plotted directly, they need to
be assigned to a Variable
Variables > New Enter name TemperatureC
From the pull down list, select the expression
TemperatureConversion created on the last slide
Select Apply

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
60

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Expressions [2c]


Use this new temperature on the
Chart created earlier
(Top-Left) select Outline then
double-click on Chart 1

Under Y Axis change the variable


by clicking on the ... icon
Select this expression
TemperatureC
OK then Apply
At the bottom of the screen change
from 3D Viewer to Chart Viewer

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
61

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Expressions [2d]


The graph now shows the result of our expression:

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
62

Expressions and Integrals

Reports

Summary
Release 14.5

Post-Processing Reports
In the options below the graphic
window, select Report Viewer
Select Refresh
Review what is shown in the report
window. You can see:
Names of the results file
Mesh summary
List of Boundary conditions
All the Figures and Charts produced
during this workshop
If you select Publish this will be written
out in html format, along with copies of all
the results images.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
63

Expressions and Integrals

Reports

Summary
Release 14.5

State files and optional extra work


Use File > Save state as...
and save to your working directory.
This state file stores all the post-processing settings you have created. If CFD-Post is used
from WB, this is done automatically when closing CFD-Post.
If you have done the long version of this workshop, you will recall that we ran for a fixed
number of iterations, and wanted to examine the results to help us determine if the model
had converged or not. (The residuals were stuck and further iterations would not lower
the residuals). It might be be necessary to revisit the model setup, by moving to a
transient scheme, or modifying the modelling settings. A useful assessment of
convergence is to see if the results of interest remain unchanged as the solver settings are
enhanced.
The big advantage of having this state file is that if you choose to modify the solver
settings and re-run this model, you can quickly reproduce the equivalent post-processing
images. Simply load the new results file, then load this state file.
Likewise, it is common in project work to have run a series of models to test different
operating conditions. This technique will let you generate equivalent images so as to
produce a good like-for-like comparison in your presentation / report.
Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
64

Expressions and Integrals

Reports

Summary
Release 14.5

State files and optional extra work


The Reports feature just demonstrated will let you customise the format of your
report.
If you have finished this exercise ahead of the rest of the class, try experimenting with
the Report options in the left-hand toolbar.

You can choose which objects are visible, add your own company logo, or add lines of
text to explain the content of the report.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
65

Expressions and Integrals

Reports

Summary
Release 14.5

Wrap Up
CFD-Post is a very powerful post-processing tool, and capable of producing high quality
images quickly and easily.
In this workshop we have shown how to produce contour plots, streamlines, and
isosurfaces (as seen in some other workshops for this course).

In addition you have used CFD-Post to perform volume integrals, create line graphs, and
to create your own arithmetic expressions for post-processing.
3D images can be saved to disk, and viewed in a freeware viewer. This adds much
impact to presentations, and can be run on any computer (no license needed).
CFD-Post can also automate the report generation process.
Post-processing is best learned by practice. If you have time now, try exploring the
other buttons in the interface.

Part 2: Post-Processing
2012 ANSYS, Inc.

Colour Images

November 13, 2012

Line Graphs
66

Expressions and Integrals

Reports

Summary
Release 14.5

You might also like