Sunteți pe pagina 1din 66

2014 ANSYS, Inc. February 28, 2014 1 Release 15.

0
15.0 Release
Introduction to ANSYS
Fluent
Workshop 03
Multi-Species Flow and Post-
Processing

2014 ANSYS, Inc. February 28, 2014 2 Release 15.0
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 N
2
, O
2
, CO
2
and H
2
0
6 m/s exhaust, 0.1 kg/s combustion gases (H
2
O and CO
2
) at 1200 K
80 N/m
3
momentum source in jets

Introduction
Fresh Air Inlet
velocity_inlet_fresh_air
Jet Fan
fluid_jet_fan
Heat and gas release from fire
mass_flow_inlet_car_fire_source
Air Outlet
pressure_outlet_all_air
Symmetry Plane
symmetry
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 3 Release 15.0
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 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
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 4 Release 15.0


If doing the short version (post-processing only)
please jump to page 35 now
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 5 Release 15.0
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 8 (Tank Flush).
I Objectives (Flow Simulation Part)
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 6 Release 15.0
Starting Workbench
Open Workbench
Start > Programs > ANSYS 15.0 > Workbench 15.0
Drag a Fluent Component System into the project schematic
Rename the system to Garage (RMB on cell A1 to rename the system)

Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 7 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 8 Release 15.0
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/s
2
Import Mesh and General Setup
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 9 Release 15.0
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 Near-
Wall Treatment
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. The
documentation provides further guidance on
which models to use for specific applications.
Click OK
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 10 Release 15.0
Setting Physics (Species / Mixture)
Specify species model
Double click Species in the model
selection pane to open the Species Model
panel
In this workshop the products of combustion
(heat & gases) will be modeled rather than the
reaction itself. You can see in the panel that if
it was desired to model fire by including the
reactions, there are several combustion models
available.
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 non-
reacting chemical species
The species model requires the
definition of a mixture representing
the chemical species of interest. The
default mixture contains nitrogen,
oxygen and water vapour.
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 11 Release 15.0
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

Defining Materials (1)
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 12 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 13 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 14 Release 15.0
Defining Materials (4)
Specify mixture
Modify the existing settings for Thermal Conductivity and Viscosity to be mass-
weighted-mixing-law
Click Change/Create to apply the changes
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 15 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 16 Release 15.0
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/m
3
)
Click OK in both panels
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
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.
2014 ANSYS, Inc. February 28, 2014 17 Release 15.0
Set Boundary Conditions
Select Boundary Conditions from the Navigation Pane
Open velocity_inlet_fresh_air from the Zone list
Apply Momentum and Thermal settings as shown
Continued on next slide.....
Boundary Conditions (air inlet)
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 18 Release 15.0
Boundary Conditions (air inlet)
Set Boundary Conditions.... cont
Apply Species settings as shown
Click OK
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
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).
2014 ANSYS, Inc. February 28, 2014 19 Release 15.0
Boundary Conditions (air outlet)
Set Boundary Conditions
Open 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
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
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.
2014 ANSYS, Inc. February 28, 2014 20 Release 15.0
Set Boundary Conditions
Open 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
Boundary Conditions (fire source)
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 21 Release 15.0
Boundary Conditions (walls 1)
Set Boundary Conditions
Open walls_outer from the Zone list
Set the temperature to 300 K and click Shell Conduction
Enter the Shell Conduction Model Settings as shown
Click OK in both panels

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.
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
After Shell Conduction is selected, certain fields in the Wall
panel are greyed out and their entries are superseded by the
entries in the Shell Conduction Model Settings Panel.
2014 ANSYS, Inc. February 28, 2014 22 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 23 Release 15.0
Operating Conditions
Set operating conditions
Select Operating Conditions
Apply Specified Operating Density settings as shown
Click OK


Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 24 Release 15.0
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% O
2
and 77% N
2
. 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). See the Users Guide Natural Convection
and Buoyancy-Driven Flows for more details.

Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 25 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 26 Release 15.0
Solution Controls
Set solution controls
Select Solution Controls from the Navigation Pane
Set the values shown below
Flow Courant Number = 50
Explicit Relaxation Factors 0.5 (Momentum & Pressure)
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 27 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 28 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 29 Release 15.0
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_ceiling plotting to window 3 and printing to the console, as shown below
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 30 Release 15.0
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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 31 Release 15.0
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

Solution Initialization
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 32 Release 15.0
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 (but not the surface monitors) shown below
by Monitors > Residuals > Select Residuals then Edit, then press the Plot button






Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 33 Release 15.0
Check Convergence
Select Reports from the Navigation Pane and select Fluxes under Reports
Click Set Up
In the Flux Reports panel select Mass Flow Rate and select the inlet/outlet boundaries
(shown below) then click compute

Note that the Net Results indicate a good mass balance, but the monitors show 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. 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 Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 34 Release 15.0
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
The remainder of this workshop will introduce some features of CFD-Post, which is a
powerful, separate post-processing application containing many more advanced
features than Fluent
Introduction Part 1: Long Version Setup Solving Proceed to Part 2.
2014 ANSYS, Inc. February 28, 2014 35 Release 15.0


Post-Processing in CFD-Post
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 36 Release 15.0
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.
I Objectives (Post-Processing)
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 37 Release 15.0
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
Left click in the Solution cell (A3) and without releasing the mouse button, drag the
pointer on to the Solution Cell of the Results system (B2) (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 15.0 > Fluid Dynamics > CFD-Post 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 38 Release 15.0
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 post-
processing treatment to all items in the group
Select Location > Surface Group, and enter the name Walls
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 39 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 40 Release 15.0
Apply contour plot to Location
Select the Color tab, click on Mode and select:
Variable: Temperature
Range: Local
Apply

Modify the Legend
Select Default Legend
Right click, Edit
Under Appearance:
Precision 1
Change Scientific
to Fixed
Apply


Post-Processing Wall Temperature (3)
This option has allowed us to
produce a temperature contour
plot of identical colour range on
a group of surfaces.
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 41 Release 15.0
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
Post-Processing Generating a Figure
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 42 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 43 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 44 Release 15.0
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 xzplane object.
Press the Play button , and watch the display
When finished, use the stop button 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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 45 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 46 Release 15.0
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 (in the Color tab) (keep default grey colour), then Apply
Generate a new Figure: Figure 3 CO2 Isosurface
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 47 Release 15.0
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 the Color tab set
Mode: Use Plot Variable
Range: Local
Apply

Generate a new Figure of this image
Figure 4 Streamlines

Post-Processing Streamlines
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 48 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 49 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 50 Release 15.0
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 R15.0 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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 51 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 52 Release 15.0
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 Global, 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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 53 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 54 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 55 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 56 Release 15.0
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.57m
3
of CO
2
.
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 57 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 58 Release 15.0
Post-Processing Expressions [1b]
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
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!
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
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 59 Release 15.0
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 > (Right click) 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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 60 Release 15.0
Post-Processing Expressions [2b]
Expressions cannot be plotted directly, they need to
be assigned to a Variable

Variables Tab > (Right click) New Enter name
TemperatureC

From the pull down list, select the expression
TemperatureConversion created on the last slide

Select Apply
Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 61 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 62 Release 15.0
Post-Processing Expressions [2d]
The graph now shows the result of our expression:

Part 2: Post-Processing Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 63 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 64 Release 15.0
State Files and Optional Extra Work
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 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 modeling 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 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-processing
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
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 65 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary
2014 ANSYS, Inc. February 28, 2014 66 Release 15.0
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 Colour Images Line Graphs Expressions and Integrals Reports Summary

S-ar putea să vă placă și