Post-processing of CFD Results (- Last updated on 03-Mar-2024 -)
Post-processing activity includes generation of detailed report with the help of quantitative data, qualitative data, contour plots, vector plots, streamlines, area-average values, mass-average values, pressure coefficient, lift coefficient, centre of pressure.
One of the commonly used term in post-processing and visualization technique is 'rendering'. This refers to the process of converting underlying mathematical representation of solid geometry into visual forms.
The screen is represented by a 2D array of locations called pixels. One of 2N intensities or colors are associated with each pixel, where N is the number of bits per pixel. Greyscale typically has one byte per pixel, for 28 = 256 intensities. Color often requires 1 byte per channel, with 3 color channels per pixel: red, green, and blue. An "image map" or 'bitmap' or "frame buffer" is a array or variable to store color data. Z-buffer is the element of the computer hardware/software that is expected to manage the depth of the image (in the z-direction - into the plane of the screen).The important of visual data is summarized in image below. Look at the comparative statistics of information retained by people: 80% in case of visual information, 20% of reading and just 10% of information reaching through ears.
Excerpts from ParaView tutorial manual: "the process of visualization is taking raw data and converting it to a form that is viewable and understandable to humans. This allows us to get a better cognitive understanding of our data. Scientific visualization is specifically concerned with the type of data that has a well defined representation in 2D or 3D space. Data that comes from simulation meshes and scanner data is well suited for this type of analysis. There are 3 basic steps to visualizing your data: reading, filtering and rendering. First, your data must be read into ParaView. Next, you may apply any number of filters that process the data to generate, extract or derive features from the data. Finally, a viewable image is rendered from the data."
Check mass balance as sum of mass flow rates at inlet(s) and outlet(s), energy balance at all walls (excluding inlets and outlets), reverse flow at outlets, Y+ at all walls (minimum, maxium and area-averaged), minimum and maximum values of velocity, pressure and temperature in the domain... One may try to develop a script or journal to make these checks and report a summary.
The maximum value of a domain (eg: maxVal(Temperature)@wallX) gives a cell-centred value (Fluent is coded with this method). The maximum value from a (probe) point corresponds to the temperature value of the nearest node (CFX and CFD-Post operate on this principle). The cell centred value must be used to obtain a more accurate maximum or minimum value as this bases the value on the centroid of the cell.
STAR: The output shows maximum temperature limited to 5000 in 3468 no. of cells... These messages very often indicate a problem with mesh or unreasonably high heat flux. Check the quality of it before running: Right click on your Region -> Remove Invalid Cells -> Preview -> The boxes should indicate 0 problem cells found for a good mesh. Additionally, visualize where this (unrealistic) minimum or maximum temperature is taking place by making a threshold: Representations -> Expand Volume Mesh -> Right click on Cell Sets -> Threshold). Create a lower threshold for unreasonable low temperature and higher threshold for unreasonably high temperatures. Note that temperature thresholds are ALWAYS in Kelvin no matter how solution units are set. In FLUENT one can try turning secondary gradient OFF.
Checklist for Simulation Result
No. | Checkpoint | Record |
01 | Has the overall mass imbalance of ≤ 0.01% achieved? | |
02 | Have the velocity and pressure profiles at inlets and outlets been checked for uniformity? | |
03 | Has the pressure drop reported for porous domains been checked with expected value as per P-Q curve? | |
04 | Has the contour plot been set as banded instead of continuously coloured? | |
05 | Has the precision of labels (number of decimal places) set as per the range of data on legend? | |
06 | Has the format of number labels on legend set as per magnitude of values: float, decimal or exponential? | |
07 | Has the material properties at inlets and outlets checked to be closed to expected and/or specified values? |
These are some basic sanity checks which one should make before starting to prepare detailed report. One should always think how easy the plots are to read, interpret and draw conclusions.
Streamlines are very good representation of velocity field, at least to beginners in CFD. It is closely related to velocity vector and any inconsistency may arise only because of post-processing interpolation on coarse mesh. As theoretically explained, tangent to streamlines gives direction of velocity field at that point.
Contour plots are "coloured-band" plots of any variable where range of value is represented by a single colour band. This is good presentation of information in both the qualitative and quantitative format.
Iso-surfaces are surface or planes with constant value of a particular variable. CFX-post has feature to create interactively, same feature is available in FLUENT through Iso-surface option. Hence, to create a plane parallel to X-Y plane, Z value will remain constant. Iso-surfaces are also useful to visualize the effect of one variable on any other variable over the entire domain.
As on version 2021R1, there is no iso-volume function in Fluent pre-post. Adaption registers can be used to generate the data equivalent to isovolume operation and then exported into other formats. Cell Registers -> Field Variable and then change the Type to Cells in Range. Some post-processors (such as CFD Post) has capability to generate the volume of domain based on range of specified variables such as temperature or pressure.
An Iso Clip takes a copy of any existing location (plane, boundary...) and then clips (trims) it using one or more criteria. E.g. a outlet boundary plot which is then clipped by Velocity ≥ 1 [m/s] and Velocity ≤ 2 [m/s]. Clip operation can be performed using any variable, including geometric variables and user created variables.
in CFD-Post, predefined options to create Cylinder, Cone, Disc, Sphere and "From Line" are available. The last one is a more general way to use any line (existing Line, Polyline, Streamline, Particle Track) and rotate about an axis.
Other features are: Point Cloud - To Create multiple points which is usually used as seeds to streamlines and vectors, Instance Transform - Usually used to re-create full plots from symmetric/periodic solution data, Clip Plane - Define a plane which when active all viewer objects in front / behind this plane are hidden
Hybrid vs Conservative Value in CFX
For visualization purposes, ANSYS CFD-Post uses hybrid values by default, because non-zero wall velocities may look incorrect for otherwise stationary walls with no-slip boundary condition. For calculation purposes conservative values are used by default This is physically correct. For example mass flow is calculated correctly — a velocity of zero would produce zero mass flow through the wall adjacent control volume which is clearly wrong.
In the pipe flow example above, for calculation of temperature at the planes shown by dashed lines, area-weighted option may not give the correct result as it is a function of mesh size near wall. In the example below, area-weighted average velocity at inlet and the two outlets will not be in the ratio of flow areas even though flow is assumed incompressible. This is because of the error in integration or summation due to sharp gradient of velocity in the boundary layer and mesh may not be fine enough to capture it. Also note that the narrower sections have 4 boundary layers as compared to 2 boundary laters in inlet section.
Area-weighted average pressure in a fully-developed turbulent flow exit:Mass-weighted average pressure in a fully-developed turbulent flow exit: Example calculations: let's assume a 5x5 grid with total area of 70 [cm2]. The assumed distribution of velocity, temperature and density for each cell is also described.
For this sample grid, the average velocity is 1.550 [m/s], the area-weighted average velocity = 2.171 [m/s], mass-weighted average velocity = 3.251 [m/s], average temperature = 37.7 [°C], area-averaged temperature = 32.9 [°c] and mass-weighted average temperature = 27.8 [°C]
There are few post-processing operations which require not only a good insight into the flow physics but experience as well. For example, the estimation of separation length (the reattachment point) needs careful evaluation. There are many methods, one recommended method can be generation of y+ plot. By virtue of re-attachment, the velocity necessarily has to go close to zero and hence y+ or shear stress will follow the same variation. The following image represents y+ plot for flow over back-facing step.
Special variables such as Line Integral Convolution Visualization (reference ANSA Training and Brochure Documents):
Postprocessing Simulation Results on Irregular Surfaces: Import surfaces as STL geometry and then imprint them in existing volume mesh within FLUENT Pre-Post. This feature is available in almost all modern post-processors including CFD-Post and ParaView.
Note that an STL file is a surface file and cannot represent a volumetric region even if the surface is a closed one. This means that if you cut through it say to generate Iso Clip, you shall get the appearance of edges rather than a solid object. Steps to generate STL surfaces are: Slice or create post-processing surfaces using edges/boundaries of original geometry in SpaceClaim -> Save as .STL using Options and switch STL output to ASCII format -> Import the surface in FLUENT Pre-Post as explained earlier.
Surface Groups and Clipped Surfaces
Some programs (e.g. CFD-Post) have option to combine boundary surfaces to a named surface group for ease of post-processing. In FLUENT Pre-Post you cannot create a surface group but you can create a single surface for all the walls defining a fluid or solid zone. Then after you can clip the newly created surface based on X-, Y- or Z-coordinates to use say a symmetrical half of the domain.
In ANSYS FLUENT pre-post (V19 or earlier), walls and section planes are diplayed along with partition boundaries. To remove the partition boundaries - try (cxg-stitch-shells). This SCHEME command needs to be used after every new plot operation. Alternatiely, you can try TUI: "define beta yes" followed by "display set duplicate yes".
Flux values are important to check the conservation of mass, momentum and energy. Note that in case there are reverse flows at the outlet, the area-weighted average values of temperature and pressure may signficantly deviate from expected value. In other words, the gain in internal energy of fluid as calculated from [mass flow rate] x [specific heat capacity] x [TEX - TIN] may not be equal to the heat gained by the air through the walls and the heat soures. However, this is more of a data interpolation error on finite cells at the outlet and has less implication on the global energy balance. In case of flows with heat transfer, it is important to set the temperature of fluid entering into the computational domain at the outlets (the reverse flows) close to the expected values to reduce the deviation with respect to thermodynamics energy balance described above.
The discrepancies increases with reduction in mass flow rates such as buoyancy-driven flows. Hence, it is important to move the outlet plane to a location where such reverse flows are not expected.
Probe Function: Some programs such as ANSYS FLUENT use mouse button click to probe values at an arbitrary point. STAR-CCM+ has a probe function separately defined. In ANSYS FLUENT, when you probe (typically right mouse button) in a contour plot, the output printed in console is the band of the contour plot where the probed location falls. It does not print the coordinates of the location and estimated value at the probe position. In order to print the location and value at the probe position, plot the contour along with the mesh (you can use Scene to combine a mesh and contour plot).
Plot HTC (Heat Transfer Coefficient) in ANSYS FLUENT
Custom Volume: sometimes it is needed to create a custom volume such as cylindrical or conical section and generate volume average for the nodes falling inside or outside it. The equation X2 + Y2 = R2 defines an infinite cylinder along Z-axis. How does one define a finite cylinder between points [0, 0, Z1] and [0, 0, Z2]?
The picture above describes 3 methods to create volume in CFD-Post. The inside() function returns 1 when inside the specified location and 0 when outside - this is useful to limit the scope of a function to a subdomain or boundary. The step() function return 1 when the argument is positive and 0 when the argument is negative. This is useful as an on-off switch and alternatively if() function can also be used as a switch. sqrt(X^2 + Z^2) defines distance from the Y-axis and sqrt(X^2 + Y^2 + Z^2) defines a sphere. sqrt(X^2 + Y^2 + (Z - 0.5[m])^2) moves the sphere by a distance of 0.5 [m] in the positive Z direction. Nested conditional statement can be used to create more 3D shapes: if (0.005[m] <= x && x <= 0.025[m], 2.50, 7.50)
Booleans in CEL: Let's write an expression as dx = (x ≥ 0.05 [m] && x ≤ 0.25 [m]). The value of dx for 3 different values of x are as follows:
Note that this expression can be used to define a finite cylinder of radius 0.1 [m] on x-axis between x = 0.05 [m] and x = 0.25 [m]. fincyl = (y*y + z*z ≤ 0.1*0.1 && x ≥ 0.05 [m] && x ≤ 0.25 [m]). CFD-Post offers 4 modes to define clip range: At Value, Below Value, Above Value and Between Values.
In STAR, stepFun = ($$Centroid[2] <= 50) ? 0 : 1 - this creates a step function at the global z-coordinate of centroids of cell ≤ 50. Multiple if conditions - Split a region (Split Regions by Function dialog) into 3 parts: ($$)Position[1] <= 2.5) ? 1 : (($$Position[1] >= 0.5) ? 2 : 0). In this case, after the split: The cells where 0.5 < y < 2.5 belong to Region 1, as the field function does not affect them. The cells where y ≤ 0.5 belong to Region 1 2, as it is the created region with the least cells. The cells where y ≥ 2.5 belong to Region 1 3, as it is the created region with the most cells.
There is no direct option in any of the commercial software to read results from other commercial software in their native formats. However, most of the software provide options to export data into some common post-processor such as FieldView or Tecplot. The option to export and import data from CGNS format also exist.
Centre of pressure - CofP (which depends on the location of each cell and pressure force acting on it) is not same as coefficient of pressure - Cp (which depends on the total pressure force and a arbitrarily chosen reference area). The center of pressure is the point on a body where the total sum of a pressure field acts, causing a force and no moment about that point.
CofP = ∫(x * P.dA)/∫(P.dA) or discretely as ∑(xi * π *Ai)/∑(π * Ai), Cp = ∫(P dA) / AREF
Force-Momentum equation about origin:One of the expectations from a simulation engineer is to provide design recommendations that may help those who are not familiar with fluid mechanics and heat transfer or those who may not be able to interprete the contour plots. For example, if pressure drop criteria is not reached, one recommendation would be to increase the width of the flow channels. But this is only an opinion and cannot be classified as design recommendations. "Increase the diameter by 20% and increase the ratio of bend radii to tube diameter to value ≥ 2.0" is a design recommendation easier to follow and implement. In order to arrive at these numbers, one has to be familiar with the empirical correlations and thumb-rules. For example, the dependence of pressure drop on diameter of circular channels and gap of narrow channels are described below.
For circular, squre or nearly circular channels
For rectangular channels
Post-processing for DPM
When tracking particles in parallel, the DPM model cannot be used with any of the multiphase flow models (VOF, mixture, or Eulerian) if the Shared Memory option is enabled.
ANSYS FLUENT reports the magnitudes of the interphase exchange of momentum, heat, and mass in each control volume as well as the total concentration of the discrete phase. These variables can be displayed graphically, by drawing contours or profiles and are available under the Discrete Phase Model... category of the variable selection drop-down list in postprocessing dialog boxes.
Particle states (position, velocity, diameter, temperature, and mass flow rate) can be written to files at various boundaries and planes (lines in 2D) using the Sample Trajectories Dialog Box accessed by Reports -> Sample -> Set Up... Histograms can be plotted from sample files created in previous step by Reports -> Histogram -> Set Up...
Trajectory Fates: Shed trajectories are newly generated particles during the breakup of a larger droplet and appear only if a breakup model is enabled. Coalesced trajectories are removed particles which have coalesced after particle-particle collisions and appear only if the coalescence model is enabled. Splashed trajectories are particles which are newly generated when a particle touches a wall-film. Those trajectories appear only if the wall-film model is enabled.
No. | Checkpoint | Record [Y/N] |
01 | Have the fluid and solid zones named as per material type say by adding air, ss, al, pl, cr (ceramics)... as suffix? | |
02 | Have appropriate prefixes been added to the boundary names as per boundary type: e.g. mf for mass-flow, vi for velocity inlets, po for pressure outlets... | |
03 | Has the mesh quality been checked for skewness and aspect ratios (for boundary layers and for freestream elements)? | |
04 | Have sliver elements been collapsed? With minimum size ~ 0.05 [mm], elements having area < 0.002 [mm2] or volume 0.0001 [mm3] are unreasonable. | |
05 | Have the areas of the boundaries been checked and matched with the values used to estimate boundary condition parameters? | |
06 | Have the walls been grouped into logical surface-groups easy to maintain during solution and post-processing? | |
07 | Have the inlet and outlet planes of a porous domain been assigned to separate internal patches? | |
08 | Has the basic checks been made: scale of mesh, quality, default interfaces settings (CFX may create unwanted interfaces)? | |
09 | Has the density, viscosity and thermal conductivity of fluid been correctly assigned as per operating temperature and pressure? | |
10 | Has the auto-save frequency and file name correctly defined? For runs on clusters, specify only file name without full path. | |
11 | For transient simulations, have the specific heat capacity and density of solids been correctly assigned? | |
12 | Has the relaxation factors for k, ε and turbulent viscosity been reduced to value lower than 1.0 say 0.25 or 0.50? | |
13 | Has the convergence criteria been set to low value such as 1e-05 or lesser? Run may stop early if set to higher number such as 1e-3. | |
14 | Has the discretization schemes set to first order for initial 500~1000 iterations? Gradually move to second order. | |
15 | Has the monitor points been created for global mass imbalance? | |
16 | In FLUENT, have contour plots been created? This helps avoid repeating the process on repeated set-up of different cases. | |
17 | Has a monitor for heat transfer through all walls been created? Do not include inlets and outlets. | |
18 | Have the interfaces of porous and fluid domains changed to type 'internal'? |
The following table summarizes all the steps which one needs to follow to make CFD simulations. They have already been described in detail on various pages of this website. Yet, the following table shall act as a ready-reckoner for the information to look for.
Step | Description of the Step | Activities Performed | Tool Name |
01 | Prepare the geometry | Rename the parts as per identifier such as applicable boundary condition, material or interface type | ANSYS SpaceClaim, HyperMesh, ANSA |
02 | Inspect geometry | Check for interferences, gaps, proximities and leakages to ensure volumes do not mix and merge | SpaceClaim, HyperMesh, ANSA |
03 | Create named selection or names zones / patches | To apply required mesh setting and boundary conditions - easy to filter and select in subsequent operations | SpaceClaim, HyperMesh, ANSA |
04 | Prepare geometry for pre-processor | Merge volumes, imprint surfaces, share topology (merge overlapping surfaces) | SpaceClaim, ANSA, Hypermesh |
05 | Import the CAD geometry in pre-processor (meshing) | Get boundary mesh and required refinement at curvatures | FLUENT Mesher, ANSA, Hypermesh |
06 | Correct surface mesh for topological and quality issues | Intersections, proximities, leakages, skewed cells, high aspect ratio (sliver elements) | FLUENT Mesher, ANSA, Hypermesh |
07 | Define meshing parameters | Global mesh controls, local mesh controls, boundary layer controls | FLUENT Mesher, ANSA, Hypermesh |
08 | Compute volume | Regenerate volumes for fluid and solid zones, ensure each volume is correctly identified | FLUENT Mesher, ANSA, Hypermesh |
09 | Generate volume mesh | Check quality of volume mesh: skewness (≤ 0.90), orthogonality (≥ 0.10) and aspect ratio (≤ 50) | FLUENT Mesher |
10 | Improve mesh quality | Use mesh improvement tools (move and merge nodes, refine mesh) to meet required target | FLUENT Mesher |
11 | Export mesh into solver format and read into pre-processor | Check the mesh, scale into metric units | FLUENT Pre-Post |
12 | Apply solver settings | Define materials, boundary conditions, turbulence models, relaxation factors | FLUENT Pre-Post |
13 | Identify run-time variables | Define monitor points and planes, section planes for contours, result back-up frequency | FLUENT Pre-Post |
14 | Make runs | Monitor convergence residuals | FLUENT Solver and Cluster |
15 | Post-process result | Create contour plots, vector plots, streamlines, animations | FLUENT Pre-Post, CFD-Post, ParaView |
16 | Create special plots | Overlap of contour and vectors, Iso-volumes, Import special planes for post-processing, uniformly spaced vectors | FLUENT Pre-Post, CFD-Post, ParaView |
The content on CFDyna.com is being constantly refined and improvised with on-the-job experience, testing, and training. Examples might be simplified to improve insight into the physics and basic understanding. Linked pages, articles, references, and examples are constantly reviewed to reduce errors, but we cannot warrant full correctness of all the contents.
Template by OS Templates