Using Paraview to visualise vortex by lambda2, vortexity and Qcriterion
By Qingfeng Xia,
2015-12-31
1. Install Paraview
http://www.paraview.org/download/
install the 64bit V5.0, 64bit is indispensable for large dataset processing
2. export data from CFD software
From CFX, export result as CGNS file (single zone or multiple zone should be fine), and load
into paraview
Create a new spreadsheet view, to lookup velocity vector variable name.
CFD result could be exported as pointData(result value at the grid point) or cellData(value at
cell centre), In the following tutorial, “Attribute Mode”“point Data” is used, but “cellData” is
applicable. Paraview has a “CellDataToPointData” filter, which could be used to convert
cellData into PointData for further visualisation.
first of all, you need "velocity" vector, which is not present in your data file.
Creating vectors from 3 scalars
Filters → Common → Calculator
Build the vector equation using the iHat, jHat and kHat buttons on the
calculator.
Result Array Name → “Velocity”
Expression: VelocityX*iHat+VelocityY*jHat+VelocityZ*kHat
The “gradient” filter, the result variable is “Gradients” by default, it is a tensor 3X3
3. Calculate lambda2
After load the data file cgns, create a “Python Calculator” from “Filters->Alphabetical” menu
Paste” eigenvalue(strain(Velocity)**2 + (Gradients - strain(Velocity)**)2)” Into Expression
text box:
Result name could be any text, here “Lambda” is used,
Check “Spreadsheet view” for velocity vector variable name, it is assumed it is “Velocity”
strain(Velocity) is S tensor,
calc the Gradient of velocity, it is D tensor,
"strain(Velocity)**2" will do "element-wise square" : S_square_ij = S_ij*S_ij
vorticity(Velocity) is NOT the omega tensor, but a vector! instead
omega = Gradients - S
Lambda_X >Lambda_Y>Lambda_Z is clearly shown in spread sheet, as
Create a “Calculator” filter to extract the 2nd scaler of lambda vector, it is just another name
for Lambda_Y,
Switch to 3D view to plot lambda2, using contour filter (default to the mean of lambda2 ),
the contour surface could be colored by any scaler, like T, pressure, etc.
4. Calculate Vorticity or Q-criterion to compare with lambda2
You must click the gear icon button to activate advanced options.
Tick the checkbox, “vorticity” and “Qcriterion”, after click “apply”, “vorticity” and
“Qcriterion” appear in spreadsheet view.