Plotting Cross-Sectional Averaged Values: Part 2 – EnSight
As mentioned in Part 1 of this blog, you reduce complex 3D flows down to cross-sectional averaged values for plotting against the distance along the flow path in either of Ansys’s dedicated post-processing tools: CFD-Post and EnSight. Part 2 of this blog will focus on the method available in EnSight.
Method 3: Query
Application: Ansys EnSight
Pro: Utilizes EnSight, which can be used for much larger models than is practical with CFD-Post
Con: Defining cross-section location can be very difficult for complex geometry
EnSight’s Query tool has a built-in feature for cycling a location over a range of values, performing a calculation as it progresses, and making a plot of that data.
The first step to use this feature is to create a location that defines the cross-section of your flow path. For simple geometry this will just be a Clip along a particular direction, but for more complicated flow paths this could involve defining a spline path for a clip to follow.
Next, you will need to create a Variable that calculates the cross-sectional average of the quantity of interest on the clip. For transported quantities, this should be a mass-flow-weighted average. Unfortunately, EnSight does not have a direction-independent mass-flow-weighted average function, but one can be built in a few steps. First, a new variable for mass flux needs to be created.
Then, the weighted average can be calculated on the clip using the SpaMeanWeighted predefined function and the MassFlux variable that was created in the previous step.
To create the plot of the averaged value as the clip progresses along the flow path, create a new Query using Query > Over time/distance, set the Sample to By constant on part sweep, select the variable that was just created, Start, set the range and number of samples, and then Create query.
Note that the plot data can be exported to a file by right-clicking on the query and choosing Data > Save CSV file.