Professional Documents
Culture Documents
Workshop 03
Multi–Species Flow and Postprocessing
Dimitrios Sofialidis
Technical Manager, SimTec Ltd.
Mechanical Engineer, PhD
PRACE Autumn School 2013 - Industry Oriented HPC Simulations, September 21-27,
University of Ljubljana, Faculty of Mechanical Engineering, Ljubljana, Slovenia
Introduction to ANSYS
Fluent
© 2012 ANSYS, Inc. September 19, 2013 2 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.
Air Outlet
Heat and gas release from fire "pressure_outlet_all_air".
"mass_flow_inlet_car_fire_source".
Jet Fan
"fluid_jet_fan".
Symmetry Plane
Fresh Air Inlet "symmetry".
"velocity_inlet_fresh_air"
.
• 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 CFD–
Post. Pre–prepared results files are supplied, so please jump straight to page 35 for
post–processing.
• [Long Option] Follow all the instructions, which will demonstrate how to set up a multi–
species 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.
– 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 roundoff 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.
The use of surface/volume monitors combined with residuals will provide the best
overall judge of solution convergence.
• Alternatively, just import 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.
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".
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.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 36 Release 14.5
I Objectives (Post Processing)
Learning Aims:
This workshop is designed to teach a range of skills in postprocessing 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 37 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).
If you are doing the short (postprocessing 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.cas.gz".
• Press "OK" to the pop–up window.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 38 Release 14.5
Post Processing – Wall Temperature [1]
• Add a "Location" representing a group of surfaces.
This lets you group a selection of entitles (in this case walls) and apply the same post–
processing treatment to all items in the group.
Select "Locations>Surface Group", and enter the name "Walls".
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 39 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 40 Release 14.5
Postprocessing – Wall Temperature [3]
Apply contour plot to Location. This option has allowed us to
Click the contour icon. produce a temperature contour
plot of identical colour range on
Select the "Color" tab, click on "Mode" and select:
a group of surfaces.
"Variable": "Temperature".
"Range": "Local".
"Apply".
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 41 Release 14.5
Postprocessing – 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.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 42 Release 14.5
Postprocessing – Section Plane [1]
• Add a Location representing a section plane.
Select "Locations>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".
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 43 Release 14.5
Postprocessing – 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 44 Release 14.5
Postprocessing – 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 object "xzplane“.
Press the Play button , and watch the display.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 45 Release 14.5
Postprocessing – 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 46 Release 14.5
Postprocessing – 3D Isosurface [2]
Add a 3D Isosurface representing gases.
Select "Locations>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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 47 Release 14.5
Postprocessing – 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_inlet_fresh_air".
"# Points": "100".
Under "Color" set:
"Mode": "Use Plot Variable".
"Range": "Local".
"Apply".
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 48 Release 14.5
Postprocessing – 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 49 Release 14.5
Postprocessing – Portable CVF Files [2]
• In CFD–Post, click the "camera" icon:
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 50 Release 14.5
Postprocessing – 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 recognize 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 51 Release 14.5
Postprocessing – 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 52 Release 14.5
Postprocessing – 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 53 Release 14.5
Postprocessing – 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.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 54 Release 14.5
Postprocessing – 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 55 Release 14.5
Postprocessing – Line Graph [2]
The resulting graph looks like this:
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 56 Release 14.5
Postprocessing – 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.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 57 Release 14.5
Postprocessing – 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).
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 58 Release 14.5
Postprocessing – 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". • 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 how "Pressure" turns to
• Note that to compute the pressure drop,
italics as soon as you type it.
we did not need to subtract the outlet
• It is important to make the
boundary pressure:
first letter a capital "P".
"ave(Pressure)@pressure_outlet_all_air".
• For a full list of available
The outlet boundary was set to be a pressure
variables, right click in this
outlet in Fluent with a pressure of 0 Pa. This
window and select Variables.
term would return a zero value – try it if you
like!
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 59 Release 14.5
Postprocessing – 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.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 60 Release 14.5
Postprocessing – Expressions [2b]
Expressions cannot be plotted directly, they need
to be assigned to a Variable.
• Select "Apply".
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 61 Release 14.5
Postprocessing – Expressions [2c]
Use this new temperature on the
Chart created earlier.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 62 Release 14.5
Postprocessing – Expressions [2d]
The graph now shows the result of our expression:
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 63 Release 14.5
Postprocessing – Reports
• In the options below the graphic
window, select "Report Viewer".
• Select "Refresh".
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 64 Release 14.5
State Files and Optional Extra Work [1]
• Use "File>Save state as..." and save to your working directory.
This state file stores all the post–processing settings you have created.
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 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 the 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 65 Release 14.5
State Files and Optional Extra Work [2]
• 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: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 66 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).
• Postprocessing is best learnt by practice. If you have time now, try exploring the other
buttons in the interface.
Part 2: Postprocessing Colour Images Line Graphs Expressions and Integrals Reports Summary
© 2012 ANSYS, Inc. September 19, 2013 67 Release 14.5