• CFD, Fluid Flow, FEA, Heat/Mass Transfer

Post-processing of CFD Results (- Last updated on 03-Mar-2024 -)

Extracting Engineering Information from CFD Results

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.

Table of Contents: Checklist for Simulation Result | Paragraph, Units, Fonts in a Report | Estimate Flux Values | Post-processing for DPM | Data Exchange between Solvers | Centre of Pressure | Make Recommendations | Radiation View Factors | Display Annotations in Graphics Window | Post-processing for Turbo-machines | Post-Processing in CFD-Post

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.

Impact of Visuals

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


Before you proceed to generate a report

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.


Common Issues in Post-Processing

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.CheckpointRecord
01Has the overall mass imbalance of ≤ 0.01% achieved?
02Have 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?
05Has 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.


Vector Plot

A vector plot is qualitative representation of spatial magnitude. The only limitation is that it can be drawn plane or a 3D twisted surface. For any vector or contour plot, one of the important consideration is to selection the number of colour bands (also called the legend).
  • This should be small enough to have a distinct interval and high enough to keep it legible and easy to read and distinguish.
  • A value between 8 and 16 normally is a good choice.
  • Note the example below has 20 bands (with 21 values) and how cluttered it looks. There are 2 colours very close in intensity and cannot be easily distinguished looking at the plots.

Vector Plot

Streamlines

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.

Streamline Plot

Contour Plot

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.

Contour Plot

Iso-surfaces

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.


Access residual values for each cell of the flow domain: Use TUI command /solve/set/expert and set "Save cell residuals for post-processing? [no]" to yes. Then run the simulation for 1 iteration so that the specific data fields are created after which the residuals of all solved equations can be accessed and postprocessed within FLUENT Post. They can also be used for convergence monitors. To store the residuals in the data file, adjust the data file quantities (File > Data File Quantities) and the select variables under "Additional Quantities". Residual histories for each variable are automatically saved in the data file, regardless of whether they are being monitored.

Excerpt from user manual: "If you are having solution convergence difficulties, it is often useful to plot the residual value fields (e.g., using contour plots) to determine where the high residual values are located. When you use one of the density-based solver, the residual values for all solution variables are available in the Residuals... category in the postprocessing dialog boxes. (If you read case and data files into ANSYS FLUENT, you will need to perform at least one iteration before the residual values are available for postprocessing.) For the pressure-based solver, however, only the mass imbalance in each cell is available by default. Note that residual values are not available for the radiative transport equations solved by the discrete ordinates radiation model. "

Iso-Volume

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.

Iso-Clips

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.

Surface of Revolution

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

CFX Hybrid-Conservative

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.

Display the velocity near a wall

Fluent can display the velocity contour on the wall, with node values disabled which shows the values of the cell centroids adjacent to the wall. In CFD-Post and EnSight, a user-defined surface can be created using “offset from surface” option, with surface-normal as the direction. Specify a samll value of normal offset distance based on how close you want to be near the walls, and the velocity will be interpolated to that surface.

Display additional information in ANSYS Fluent graphics windows using titles or annotations: In order to create hard copies, it is sometimes usefule or even necessary to show flow time or some explanation text that is fixed to a certain position. In recent versions such as ANSYS FLUENT V2022, the title bar is hidden by default. The GUI method is to use the toggle button in the icon toolbars that are connected with the Fluent viewport. Corresponding text command is /display/set/windows/text/visible? yes. The setting is not saved together with the case file. To modify the shown information and/or add different text, use TUI: /display/set/windows/text application? yes and /display/set/titles left-top "text string". To toggle the date shown, use the text command /display/set/windows/text/date? no. The location of date and application text is fixed and cannot be change either though GUI or using TUI. To move this information at a different location in the titles, disable them and use text commands to add fixed text at desired locations. To display flow time in the TUI, type (rpgetvar ‘flow-time) /display/set/titles left-bottom (rpgetvar 'flow-time)

Add Annotations: using TUI or GUI, adding annotation requires a mouse click at desired location. Note that window 1 is the default window that is used to display the residual plot. To use a contour plot window, (cx-use-window-id 2) if residual plot is active. To add annotation: (cx-annotate '() '(0.50 2.50 0.00) "v<" "Annotation text") (cx-changed 'scene-list) where "v<" denotes vertically left-aligned. For right-aligned text, use ">v". The Scheme statement (cx-changed 'scene-list) is required since the Annotate panel is populated with the annotations added by Scheme. Thus, full script looks like:

(cx-use-window-id 1)
(cx-annotate '() '(0.50 2.50 0.00) "v<" (format #f "Time: ~5.3fs" (rpgetvar 'flow-time)))
(cx-changed 'scene-list)
The annotation text can be formatted using:
(cxsetvar 'annotate/font/size "25")
(cxsetvar 'annotate/font/wt "Medium")
(cxsetvar 'annotate/font/slant "Regular")
(cxsetvar 'annotate/color "blue")
(cxsetvar 'annotate/font/name "sans serif")
or
(cxsetvar 'annotate/font/size "50")
(cxsetvar 'annotate/font/wt "Bold")
(cxsetvar 'annotate/font/slant "Italic")
(cxsetvar 'annotate/color "foreground")
(cxsetvar 'annotate/font/name "Courier")

Mass-weighted or Area-weighted?

The features explained above are more qualitative in nature and may not be used directly in design calculations which usually require a discrete value. This can be obtained by "area-weighted average" or "mass-weighted average" feature available in the post-processing tools. But, the choice of area-weighting or mass-weighting should be based on the gradients of the chosen field variable. For example, to estimate average temperature at a given section for internal flow, mass-weighted option is the correct method as explained below.

area-weighted averaging recommendation

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 averaging error

Area-weighted average pressure in a fully-developed turbulent flow exit:

area-weighted average dynamic pressure

Mass-weighted average pressure in a fully-developed turbulent flow exit:

mass-weighted average dynamic pressure

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.

mass-Weighted vs. areaWeighted Example

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]


Separation and Re-attachment

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.

Re-attachment point

Special variables such as Line Integral Convolution Visualization (reference ANSA Training and Brochure Documents):

Line Integral Convolution

General Recommendations for Report Preparation

  • One picture or sketch (preferably an isometric or sectional view) representing the extent, origin and axes of computation domain, boundaries and moving walls (if any).
  • Sectional view of mesh in area of interest highlighting the boundary layer, growth and orthogonality.
  • Mesh quality matrix, worst values of mesh Equi-angle skewness and aspect ratios.
  • The description of material properties and its thermodynamic behaviour.
  • Tabulated summary of boundary conditions and turbulence parameters.
  • Tabulated summary of solver setting: discretization scheme, wall function, relaxation factors
  • Contour plots
    1. Limit the number of colour bands to 10
    2. Set the decimal notation to FLOAT, INTEGER or SCIENTIFIC (exponential) based on mangnitude. E.g. for values ≤ 1000, it is better to use decimal notation istead of exponential format
    3. Chose the unit easy to read and interpret: e.g. [K] for temperature is difficult to quicky visualize in mind. For most of us, 37 [°C] which is out body temperature or 25 [°C] which is standard ambient temperature serves as reference
    4. Similarly, a value of 0.075 [m] takes more time to interpret than 75 [mm]. It is quicker to deal with integers than fractions

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.

post-Processing on Imported Surfaces

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. TUI: mesh/surface-mesh/read "postPlane.stl" mm. /surface/imprint-surface post_plane post_plane_imprint fluid_domain.

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.

Cell Set in STAR-CCM+

Cell sets are used to identify collections of cells for visualizing the model, such as during post-processing or mesh checking. A cell set is similar to a derived part though more versatile and can be derived from more than one condition. Cell Sets node is available under Representations > Volume Mesh > Finite Volume Regions node in the simulation tree. A field function is also created for each cell set by default, which appears under the Automation > Field Functions manager node. The field function has the same name as the cell set by default.

Cell Set


Conventions for Paragraph, Fonts and Symbols
  1. Chose font size ≥ 11 px, font-type should be easy to read. Calibri, Arial are few good fonts.
  2. Use line spacing of 1.50 or higher. For bullet points, it can be reduced to 1.25
  3. If paragraphs are not indented, quadruple-space the paragraphs i.e. add extra space before the pargraphs
  4. Keep margin of 20 ~ 25 [mm] on each side
  5. Add page number centred under footer
  6. Maintain uniformity of font sizes such as for Paragraphs, Headers, Captions...
  7. Use unique symbols for variables
  8. Do not use mix of small letters and capital letters for same variables such as u or U, p or P
  9. Use over-dot for mass flow rates such as
  10. List standard (Roman) alphabets and Greek alphabets separately
  11. Arrange the variable names in alphabetical order
  12. Keep separate lists for subscripts and superscripts
  13. Add page number in references, typically any documents (books, journals, theses, research papers...) having number of pages ≥ 5
  14. Do not use superscript of 'o' or '0' as degree symbol. All of the MS-Office programs Excel, Word and PowerPoint provide degree symbol (°).
  15. Do not use underline for words containing g, j, p, q, y
  16. Write all units within square brackets [...]
  17. No space should be left in front of (before) a punctuation mark
  18. It is better to write inline reference with page number (e.g. Sukhatme, 1998, p. 21)
  19. For all title of in-text citations, the first letter of every word except articles (a, an, the), prepositions (such as in, on, under...), and conjunctions (such as and, because, but, however ...) should be capitalized, unless they occur at the beginning of the title or subtitle
  20. In-text citations must provide the name of the author or authors and the year the source was published
  21. The references page should be double-spaced and lists entries in alphabetical order by the author’s last name

Spelling Errors:

  1. Note that there is no space before any of the punctuations such as . (full stop) , (comma) : (colon) ; (semi-colon) closing ' (apostophe) and closing " (double quote)
  2. There are some words which spell check cannot identify as error. There are words generated due to nearby key on the kewords: e.g. [any:nay], [out:our], [neat:near], [near:hear], [below:bellow], [field:filed], [from:form], [for:fro], [its:it's], [though:through], [it is:it it], constrast : contract, varies : varied
  3. Check all the occurrences of 'it' and ensure 'it' and 'is' are used appropriately. Note that its and it's are not same
  4. Do not use &
  5. Full stop is used only at the end of last entry of a bulletted list.

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

  • Use same lower and upper limits of legends for contour as well as vector plots
  • Use decimal notation if variables are > 0.01. Even though scientific notations can be used, it is easier for human mind to read numbers as compared to exponential notations.
  • Use number of significant digits judiciously. For example, for most of the industrial applications, it is not important to specify velocity to the 1/10 of mm/s. The number of significant digit is also dependent on the units chosen. For example, 3 decimal places for [Pa] such as 1045.368 [Pa] is irrelevant where as it is a need if unit chosen is [bar] or [kPa] such as 1.034 [kPa]. Followings are more information about "number of significant figures or digits".

Number Significant Digits

One of the issues observed in contour plots is not making intuitive selection of lower and upper bounds. It is easier to read a numbers which are rounded to a multiple of 5 or 10. Following steps demonstrate how to write a script to convert a number into nearest multile of 0.01 where any number between 8001 to 8099 shall be rounded to 8000.

  • Take the log (base 10) of the number. For 8235, it would result in n1 = 3.916
  • Use the math operator equivalen to FLOOR and find the nearest higher integer: n2 = FLOOR(n1, 1) + 1 = 4
  • Divide the original number with exponent of 10, n3 = 8235/104 = 0.8235
  • Use another FLOOR operation with desired significan, 0.01 in this case. n4 = FLOOR (0.8235, 0.01) = 0.82
  • Multiply the previous number with exponent of 10, n5 = n4 x 10n2 = 8200.
This function can be used in combination with the maximum and minimum value of a variable say velocity magnitude. The maximum and minimum values can be adjusted by 10% (maximum multiplied by 0.9 and minimum multipled by 1.1) and then converted into a range which is easier to read and covers 10% of the colour bands. For CFD-Post, a contour can be updated by changing the required variable only. For example, the maximum and minimum range of a pressure contour can be updated with as short a block of code as described below. The value for 'Max' parameter can be estimated using expression maxPr_z50 = maxValue(Total Pressure in Stn Frame)@Isosurface_z50, followed by call to function removeSignificantDigits(maxPr_z50, 3).
CONTOUR: Contour_Total_Pressure
  Max = 1.5E4
  Min = 0.5E3
  Number of Contour = 11
END

Due to limitations of floor operator in Python, the abovementioned steps need to be tweaked as bit as described below.

import math, sys
def removeSignificantDigits(number, num_sign_digits):
  '''
  number: the value to be converted to nearest order of magnitude
  num_sign_digits: number of significant digits to be removed
  '''
  n1 = math.log10(number)
  n2 = math.floor(n1)
  if (n2 < num_sign_digits):
    print("The specified number of significant digits cannot be removed!")
    sys.exit()
  n3 = math.floor(number / 10**num_sign_digits)
  n4 = n3 * 10**num_sign_digits
  return n4
print(removeSignificantDigits(23456, 3)) # 23000

The mthod for same purpose needs to be revised while using PERL as it does not have a floor and log10 operator. Also, PERL does not required to be specified the input arguments in advance. $_ list needs to be used.

sub removeSignificantDigits {
  $number = $_[0];
  $num_sign_digits = $_[1];
  $n1 = log($number) / log(10.0);
  $n2 = int($n1);
  if ($n2 < $num_sign_digits) {
    die("Input has less number of significant digits than to be removed \n");
  }
  $n3 = int($number / 10**$num_sign_digits);
  $n4 = $n3 * 10**$num_sign_digits;
  return $n4;
}
print removeSignificantDigits(23456, 2), "\n"; # 23000

The code in Java is:

import java.io.*;  
import java.lang.*;
public class removeLeadingDigits {

  public static void main(String[] args) {
   System.out.println(removeSignificantDigits(23456, 3));
  }
  static double removeSignificantDigits(double number, int num_sign_digits) {
    double n1 = Math.log10(number);
    double n2 = Math.floor(n1);
    if (n2 < num_sign_digits) {
      System.out.println("Specified number of significant digits too high!");
      System.exit(1);
    }
    n2 = Math.floor(number / Math.pow(10, num_sign_digits));
    return (n2 * Math.pow(10, num_sign_digits));
  }
}

Recommendations for Rotating Reference frame
  • Clearly specify the rotating and stationary domain, direction of rotation, location of the interfaces.
  • Show the overlapping view of meshes at the interfaces, if not 1:1.
  • Mention the location of the place used to estimate pressure heads developed by the machine. It is further recommended to use 3 or more close locations on the upstream as well as downstream sides to estimate the grand average values of the pressure.
  • The physics governing performance of turbo-machines uses many non-dimensional coefficients. Include the plots of important performance parameters such as pressure coefficients on the blades
  • On all the plots dealing with flow passage and blades, explicitly mention the suction and pressure sides.
Cell by cell data: A histogram can be generated in ANSYS FLUENT to check cell data. For example, CFL number is important in transient simulations. CFL number can be checked by post-processing operations: Results → Plots → Histogram → Set Up... → Select Velocity... under Histogram of → Select Cell Courant Number from the Velocity... category → Set the value for Divisions to desired value say 50, 100 or 200 → Click Plot.

Flux Values

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.

  • The mass flow rate through a boundary is computed by summing the [dot product of the density × the velocity vector] and the area projections over the faces of the zone.
  • The total moment vector about a specified center of action is computed by summing the [cross products of the pressure and viscous force vectors] for each face with the moment vector.
  • Export heat flux data on wall zones (including radiation) to a(including radiation) to a text file: file/export/custom-heat-flux
  • To display the amount of heat removed, outlet temperature, and inlet temperature of the entire heat exchanger during post processing: define/models/heat-exchanger/macro-model/heat-exchanger-report zone_porous_hx. To post-processing each macro result of the heat exchanger: define/models/heat-exchanger/macro-model/heat-exchanger-macro-report zone_porous_hx.

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

Heat Transfer Coefficient 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]?

  • Let A and B are the two ends of the cylinder with coordinates [x1, y1, z1] and [x2, y2, z2] denoted by vectors rA and rB respectively.
  • Unit vector along the axis of cylinder is defined by e = rA - rB
  • Let P be an arbitrary point along the cylindre axis is given by t.A + (1−t).B where t varies between 0 and 1
  • The squared distance between a point on the line with parameter t and a point r0 = (x0, y0, z0) is R2 = [(x1 - x0) + (x2 - x1).t]^2 + [(y1 - y0) + (y2 - y1).t]^2 + [(z1 - z0) + (z2 - z1).t]^2
  • The minimum distance between point r0 and axis of the cylinder is: R^2 = [ (x1 - x0)^2 + (y1 - y0)^2 + (z1 - z0)^2 ] + 2.t. [(x2 - x1)(x1 - x0) + (y2 - y1)(y1 - y0) + (z2 - z1)(z1 - z0)] + t^2. [(x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2]
  • The points falling inside a finite cylindrical volume of radius R and axis points x1 and x2 CANNOT be specified by inequality: cylindrical Volume
  • Above inequality only tells that point may lie within radius of the cylinder and does not check if the point lies between the points x1 and x2 on its axis.
  • Boolean operator can be used to truncate a cylinder. For example, a cylinder with left face at (0, 0, z1) and right face at (0, 0, z2) having radius can be specified as (x^2 + y^2 ≤ r^2 AND (z ≥z1 AND z ≤ z2)

volume CFD-Post

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:

  • x = 0.0, dx = 0
  • x = 0.15, dx = 1
  • x = 0.50, dx = 0

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.

Custom Surface Integrals: As described at forum.ansys.com/forums/topic/surface-integral-of-a-plane: to calculate induced drag D = Σ[(v2 + w2) x area of cell], run the command /solve/set/expert no no yes no which activates the option of "Keep temporary solver memory from being freed". Create the variable for equation drag_i = [(v2 + w2) x area of cell]. To select the cell surface area, "Cell Surface Area" is available under 'Mesh'. To compute drag D, use Results > Reports > Surface Integrals - pick variable drag_i, and select the required surface.


Data Exchange

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.

Export option in FLUENT
The option File > FSI Mapping provides a method to transfer CFD data to FEA for 1-way FSI (Fluid-Structure Interaction) simulations.

FLUENT data export - CSV ASCII Format

Import option in FLUENT

FLUENT data import

FLUENT FSI Data Mapping

FLUENT FSI Volume Data Mapping


Import option in STAR-CCM+
For mapping temperature and pressure data to solvers like NASTRAN and ABAQUS: Export NASTRAN mesh as a *.BDF file or ABAQUS mesh as *.inp file and import it into STAR-CCM+ using "File->Import->Import CAE Model". Then use data mappers (available under Tools) to map the data to the NASTRAN mesh. Then export the data containing mapped nodal temperatures and pressures from STAR-CCM+ back onto the *.BDF format. Import it back into pre-processor say ABAQUS/CAE or Patran.

STAR-CCM+ data import

To export temperature at every node in STAR-CCM+: create a table (Tools->Tables) and export it to CSV which will contain information in X, Y, Z, T format where X, Y, Z are coordinates of the nodes.

Post-Processing in CFD-Post

The variable temperature gradient is not available as standard. A derived variable can be created by selecting gradient operator and temperature as field variable. It will create 3 components named: "Temperature.Gradient X", "Temperature.Gradient Y" and "Temperature.Gradient Z". The names of expressions are sorted alphabetically in order A..Za...z. To export variables in CSV format in ANSYS CFD Post: File - Export - Export... and then under Options tab, set and choose (1) CSV File path and name, (2) Location (i.e. boundary locations) and (3) Variable(s). For vectors, select appropriate option under Formatting tab. Sync cameras: Views move together, Sync objects: Visibility of locations and plots is the same. In CFD-Post, the name of an expression or an object such as plane or contour cannot be changed once it has been created. To rename an existing object, create a duplicate with desired name and delete the original copy.

The CFX State File (*.cst) created for one result file (*.res) cannot be used at it is for another result file with different zone (primitive boundary) names. The CST file contains the case name which needs to be updated. One roundabout option it to rename each case file to a "same unique name" on which *.cst file was created and saved.

CFX-Pre sometimes does not show surface mesh when selected. This seems to be a bug which can be overcome by running following session code.

> setPreferences User Import Executable = , Viewer Background Image File = , \
  Viewer Highlight Type = Wireframe
> update
> setPreferences Render Draw Faces = On
> update
> setPreferences Viewer Highlight Type = Surface Mesh
> update
> setPreferences Render Draw Faces = Off
> update

The polyline created by boundary intersection in CFD-Post sorts the point in ascending order along the axes. Hence, combining multiple polylines into a single polyline file using text editor needs to arrange the points such that they follow the sequence else extra (straight) polylines shall get created between the end point of one polyline and start point of next polyline because the are not same.

In a *.cst file, print all lines starting with string "CONTOUR"

$substr = "CONTOUR";
open(INFILE, "Case_123.cst");
while($line = <INFILE>) {
  $str = $line;
  # Convert the strings into lower case before comparing them
  if (index(lc ($str), lc($substr)) = -1) {
    if (index (1c($str), lc($substr)) == 0) {
      print "$str\n";
    }
  }
}
Solver variables are available for use in any expression: x, y, z: Direction 1, 2, 3 in Reference Coordinate Frame. r: Radial spatial location, r = (x^2+y^2)^0.5. theta: Angle, arctan(y/x). t: Time, u, v, w: Velocity in the x, y, z coordinate direction, p: (absolute) Static Pressure, ke: Turbulent kinetic energy, ed: Turbulent eddy dissipation, T: Temperature, sstrnr: Shear strain rate, density: Density, rNoDim: Non-dimensional radius (rotating frame only), viscosity: Dynamic Viscosity, Cp: Specific Heat Capacity at Constant Pressure, cond: Thermal Conductivity, AV name: Additional Variable name, mf: Mass Fraction

Post-process multiple *.res files either to compare or generate similar plots

cfd-online.com/Forums/cfx/91436-post-process-cfx.html: In CFD-Post, load all the files by checking the option "Keep current cases loaded" in the load results files window. As default option "Open in new view" is checked which creates a view for each case in one window. For each view you will be able to select timesteps, set separate visualisation options and so on. To have all views with the same options there is a button called "Synchronize Visibility" which lets all vectors and contour plots appear in all views simultaniously. "Synchronize camera" enables the same angle of view and z0om factor in all views. Alternatively, load one file and open the "Load results" again, check "Keep current cases loaded" and uncheck "Open in new view" before second file is loaded. Then apply 'translation' on one of the cases to have two results in one view. Steps can be repeated for more files.

Create separate meridional plots of the pressure side and suction side of a blade in CFD-Post: this is an important requirement if the suction and pressure side of blades are not split during pre-processing stage. innovationspace.ansys.com/.../how-to-create-separate-meridional-plots-of-the-pressure-side-and-suction-side-of-a-blade-in-cfd-post: this link provides a detailed explaination and sample CCL script.

How to hide all contours in CFD Post? This requires PERL subroutine getChildren which, as per CFX Reference Guide, returns the children of an object in a comma-separated list. Similar other utility 'getChildrenByCategory': to get a comma-separated list of all surfaces in a state at the top level (that is, not sub-objects of other objects): ! $surfaces = getChildrenByCategory("/", "surface");

! my @contour_list;
# 'split' converts the string into an array of strings
! @contour_list = split(",", getChildren("/", "CONTOUR"));
! foreach $contour (@contour_list) {
   # Sending visibility action from ViewUtilities
   > hide /$contour, view=/VIEW:View 1
! }

Post-processing for Turbo-machines

The post-processing activities of turbomachines require understanding of special terms like Turbo surface, Meridioanl plots, Span Normalized, ACA: Area Circumferential Average, LCA: Line Circumferential Average, Blade Aligned Edge... CFD-Post has Turbo mode with special features not available in outline mode. Promote to General Mode: this method can be used to copy the selected plot object and any required supporting objects (for example, a line locator) to the Outline workspace. This would enable, for example, the selected plot to be included in a report.

The Blade-to-Blade and Meridional objects can be copied into the Outline tree view by right-clicking and selecting Promote to General Mode. "Span Normalized" defines the dimensionless distance (between 0 and 1) from the hub to the shroud. The Blade-to-Blade object is used to view plots on a surface of constant span. The Meridional object is used to view plots on an axial-radial plane. A surface of constant Theta at 0 degrees is created. In turbo line, turbo surface, and related editors, the Blade Aligned coordinate values entered in the input fields (and the related CCL parameters) are normalized to the leading and trailing edge locations of blade with predefined constant references: 0.25 and 0.75 are taken to be the blades leading and trailing edges, respectively. Note that Meridional Surface is a reserved name in CFD-Post.

The main purpose of Turbo mode is to make the ACA (Area Circumferential Average) value of field variables availabe for Outline Mode. Thus, once a contour in Turbo Mode under Plots -> Meridional, is generated say for Pressure, a location named "Meridional Surface" and a variable "Pressure ACA of Meridional Surface" become available in Outline Mode for generation of contour plots. Similarly, a contour plot of "Velocity Meridional" shall make a variable "Velocity Meridional ACA on Meridional Surface" available in Outline Mode. Velocity Meridional itself ia available only when "Calculate Velocity Components" under Turbo mode is executed. This operation creates many other variables such as Velocity Axial, Velocity Blade to Blade, Velocity Circumferential, Velocity Radial, Velocity Spanwise, Velocity Streamwise, and X- Y- Z-Components of "Velocity Meridional" & "Velocity Blade to Blade".

Many a time the background mesh generation of meridional plane fails for one of the domains. One of the options is manual initialization by selecting hub option to "From Line" instead of default value of "From Turbo Regions". Before that a polyline representing hub needs to be created using "Boundary Intersection" method. This is a trial and error approach though and different polylines would need to be tried out. Note that many a time, the domain comprise of 3 sub-domains, stationary one upstream the rotation blade domain and another stationary sub-domain downstream. The defnition of hub and shroud should be connected walls used to define the hub and shroud for rotating domains.

Hub-Shroud-Definition

In the image above, the red lines should be defined as hub to respective zones and dottend lines as shrouds.


Centre of Pressure

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:
  • Let {F} = (Fx, Fy, Fz) and {M} = (Mx, My, Mz)
  • Mx = 0*x + Fz*y - Fy*z
  • My = -Fz*x + 0 *y + Fx*z
  • Mz = Fy*x - Fx*y + 0*z
  • As diagonal of the [F] matrix in {M} = [F] {x} is zero, they are singular (i.e. one or more equations are not independent). inv(F) does not exist and det[F] = 0.
  • Unit vector in force direction {f} = {F}/|F| = (Fx, Fy, Fz)/|F| where |F| = sqrt(Fx*Fx + Fy*Fy + Fz*Fz)
  • Moment parallel to F (pure couple) can be calculated by taking component of {M} along {f}. Thus: {MF} = [{M}.{F}] {f} = (Fx, Fy, Fz) * (Mx*Fx + My*Fy + Mz*Fz) / |F| / |F|
  • We need to find a location about which Mz = 0 then using the equations Mz = Fy*x - Fx*y + 0*z we get 0 = Fx*x - Fy*y. Thus, y = (Fx*x)/Fy
  • Mz = -Fx *y + Fy * x and y = (Fx*x)/Fy. Thus: Mz = -Fx*(Fx*x)/Fy) + Fy*x = (-Fx2/Fy)*x + Fy*x
  • Hence, x = Mz/(-Fx2/Fy + Fy)
  • Note: The equations used to calculate the CofP location cannot be used to calculate the moment at the CofP. The moments in those equations are the moments about the origin.

Rules of Thumb: Interpolation of Results

Pressure Loss Ratios


Design Recommendations

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

Pressure drop in circular channels

For rectangular channels

Pressure drop in 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.

Post-Processing for DPM

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.


Post-processing for Radiation

In STAR-CCM+ one can calculate the radiation view factor for S2S model using solver tree as shown below. The view factor summary can also be printed using option "Display View Factor Summary".

Post-Processing for radiation

If there are 100 element surfaces involved in radiation, the view factor matrix will be 100 x 100. Qij = Radiative heat transfer from surface 'i' to surface 'j' = Aii.Fij.σ.(Ti4 - Tj4). In general, Fij ≠ Fji though Ai.Fij = Aj.Fji. The amount of radiant energy leaving Ai and striking Aj may be written as Aii.Fij.σ.Ti4. The amount of radiant energy leaving Aj and striking Ai equals Ajj.Fji.σ.Tj4.

Overall Checklist

No. CheckpointRecord [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...
03Has 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.
05Have 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?
08Has the basic checks been made: scale of mesh, quality, default interfaces settings (CFX may create unwanted interfaces)?
09Has the density, viscosity and thermal conductivity of fluid been correctly assigned as per operating temperature and pressure?
10Has the auto-save frequency and file name correctly defined? For runs on clusters, specify only file name without full path.
11For transient simulations, have the specific heat capacity and density of solids been correctly assigned?
12Has the relaxation factors for k, ε and turbulent viscosity been reduced to value lower than 1.0 say 0.25 or 0.50?
13Has 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.
14Has the discretization schemes set to first order for initial 500~1000 iterations? Gradually move to second order.
15Has the monitor points been created for global mass imbalance?
16In FLUENT, have contour plots been created? This helps avoid repeating the process on repeated set-up of different cases.
17Has a monitor for heat transfer through all walls been created? Do not include inlets and outlets.
18Have the interfaces of porous and fluid domains changed to type 'internal'?

Overall Steps of Simulations

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.

StepDescription of the Step Activities Performed Tool Name
01Prepare the geometry Rename the parts as per identifier such as applicable boundary condition, material or interface type ANSYS SpaceClaim, HyperMesh, ANSA
02Inspect geometryCheck for interferences, gaps, proximities and leakages to ensure volumes do not mix and mergeSpaceClaim, HyperMesh, ANSA
03Create named selection or names zones / patchesTo apply required mesh setting and boundary conditions - easy to filter and select in subsequent operationsSpaceClaim, HyperMesh, ANSA
04Prepare geometry for pre-processorMerge volumes, imprint surfaces, share topology (merge overlapping surfaces)SpaceClaim, ANSA, Hypermesh
05Import the CAD geometry in pre-processor (meshing)Get boundary mesh and required refinement at curvaturesFLUENT Mesher, ANSA, Hypermesh
06Correct surface mesh for topological and quality issuesIntersections, proximities, leakages, skewed cells, high aspect ratio (sliver elements)FLUENT Mesher, ANSA, Hypermesh
07Define meshing parametersGlobal mesh controls, local mesh controls, boundary layer controls FLUENT Mesher, ANSA, Hypermesh
08Compute volumeRegenerate volumes for fluid and solid zones, ensure each volume is correctly identified FLUENT Mesher, ANSA, Hypermesh
09Generate volume meshCheck quality of volume mesh: skewness (≤ 0.90), orthogonality (≥ 0.10) and aspect ratio (≤ 50)FLUENT Mesher
10Improve mesh qualityUse mesh improvement tools (move and merge nodes, refine mesh) to meet required targetFLUENT Mesher
11Export mesh into solver format and read into pre-processorCheck the mesh, scale into metric unitsFLUENT Pre-Post
12Apply solver settingsDefine materials, boundary conditions, turbulence models, relaxation factors FLUENT Pre-Post
13Identify run-time variablesDefine monitor points and planes, section planes for contours, result back-up frequencyFLUENT Pre-Post
14Make runsMonitor convergence residualsFLUENT Solver and Cluster
15Post-process resultCreate contour plots, vector plots, streamlines, animationsFLUENT Pre-Post, CFD-Post, ParaView
16Create special plotsOverlap of contour and vectors, Iso-volumes, Import special planes for post-processing, uniformly spaced vectorsFLUENT Pre-Post, CFD-Post, ParaView

Radiation View Factor and Other Equations

View Factor Equation

The view factor expression is a 4-dimensional integral due to integrations over the area of the emitting surface '1' and the receiving surface '2' or vice-versa.

View Factor Infinitesimal

View Factor Differential

Numerical integration of view factor equation, adapted from "A modified numerical integration method to calculate the view factor between finite and infinite cylinders in arbitrary array":

View Factor Discretized

Radiation-Parallel-Plates

Radiation-Perp-Plates

Radiation-Coaxial-Discs

Radiation View Factor for Concentric Spheres

Radiating heat transfer rate from inner sphere is given by following equation. Note that the view factor of inner sphere to outer sphere is 1.0 as all radiation leaving inner sphere is trapped by the outer one.

Radiation-Conc-Spheres

The view factors of outer sphere to inner sphere for concentric spheres for different ratio of radii are tabulated below. The view factor of outer sphere with respect to itself can be calculated as [1 - FOUT_IN].
Ratio of Radii0.0500.1000.2000.3000.4000.5000.6000.7000.8000.9000.9500.975
FOUT_IN0.99750.99000.96000.91000.84000.7500 0.64000.51000.36000.19000.09750.0494
Ratio of Radii0.1500.2500.3500.4250.4500.5500.6500.7500.8500.8750.9250.985
FOUT_IN0.97750.93750.87750.81940.79750.6975 0.57750.43750.27750.23440.14440.0298
If convection is applied to the outer and inner spheres, the fourth order polynomial equation is derived below.

conc Sphere Convection radiation

Few very special configurations such as "Ground plane to the outer surface of a cylinder (radius r2, height h) at a distance L above a ground plane (a planar disk of radius r1)" and their few factors are described in "HLS-UG-001: BASELINE RELEASE - "HUMAN LANDING SYSTEM LUNAR THERMAL ANALYSIS GUIDEBOOK" published by NASA. Some other configurations are: Outer surface of a cylinder (radius r1, height h) to the ground plane (a planar disk of radius r2), Outer surface of a sphere located at a distance h above the ground plane to the ground plane (a planar disk of radius r2), Outer surface of a hemisphere (radius r1) to the ground plane (a planar annular disk of radius r2), Outer surface of a “small” sphere (radius r1) to a "much larger" sphere (radius r2) where the centers of the two spheres are separated by a distance h.

Radiation-Conc-Cylinders-Formula

Radiation-Conc-Cylinders

Contact us
Disclaimers and Policies

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.