When analyzing complex 3D flow, it’s often helpful to visualize data using simple 1D plots. One of the most commonly requested plots is to be able to show how the flow is changing on average as you progress from inlet to outlet. While there is a native feature in Ansys Fluent to calculate circumferential averages on boundaries and plot them with respect to the axial direction (for reference, the TUI command /plot circum-avg-axial), for volumetric data this process needs to be done in one of the dedicated post-processing tools: CFD-Post or EnSight. This blog will show various methods to create cross-sectional average plots within each tool as well as discuss some of the pros and cons of each method.
Part 1 focuses on the two methods available in CFD-Post.
Method 1: Turbo Mode
Application: Ansys CFD-Post
Pro: Easiest method to enable and customize
Con: Limited to axially-aligned geometry
CFD-Post has a suite of turbomachinery focused post-processing tools called Turbo Mode. However, it is not limited to just turbomachinery models. To utilize Turbo Mode, you simply have to identify a hub, shroud, inlet, and outlet. If those items exist as part of your geometry, you can just specify them directly, but if not you can identify them using a series of Lines. For example, you can create a hub line along the axis of your model, a shroud line around the outer diameter, and then inlet and outlet lines to connect the two.
Note that for the purposes of calculating average data the lines do not have to follow the exact contour of the geometry.
Once this is done, within Turbo Mode you can identify the global rotation axis (the axis perpendicular to your cross-section), specify the Lines that were just created, and Initialize. This will create a 2D grid defining the revolved region for the calculations.
Now that the region has been identified, you can use the Inlet to Outlet chart to plot area-weight or mass-flow-weighted values versus progress from inlet to outlet.
Method 2: Scripting a Session File
Application: Ansys CFD-Post
Pro: Direct control over process, allowing for complex flow paths
Con: Requires knowledge of CFX Command Language and Perl
The most direct way of getting cross-sectional averaged values along a flow path is to create a location that defines the cross-section, calculate the averaged value at that location, and then script the progression of the location from inlet to outlet. In CFD-Post, this scripting is done using Sessions.
First, a location needs to be created: typically a simple plane, but if the flow path is complex then a bounded plane defined by point and normal.
Then, an Expression needs to be created that calculates the appropriate type of average on the plane, such as area-weighted or mass-flow-weighted.
To start the scripting process, you will need the code to modify the plane location. This can be generated by starting a new Session, starting Recording, editing the plane location, and then stopping the Recording. This creates a CSE file in your working directory.
The CSE file can then be modified with Perl commands to loop over the flow path from inlet to outlet and save the calculated Expression value to a file. Once that is done, the modified Session file can then be played back in CFD-Post to perform the calculations.
An example of this script can be obtained by e-mailing email@example.com