Clarification on Lambda2 function object
Functionality to add/problem to solve
The description of the Lambda2 function object states:
The Lambda2 function object computes the second largest eigenvalue of the sum of the square of the symmetrical and anti-symmetrical parts of the velocity gradient tensor.
But it seems the function actually computes the opposite value: -Lambda2
return store ( resultName_, -eigenValues(SSplusWW)().component(vector::Y) );
This is a bit confusing, since negative Lambda2 values are supposed to indicate vortex cores while in OpenFOAM you need to look for positive values to get vortex cores.
Target audience
Anyone using Lambda2 to visualize vortex structures
Proposal
Two possible solutions:
- writing the actual Lambda2 rather than -Lambda2
- updating the function description to clearly mention the opposite value of Lambda2 is written
I don't really have a preference between these solutions, as long as the description matches the code to avoid misleading users.
Links / references
This old thread put me on track: https://www.cfd-online.com/Forums/openfoam-post-processing/117005-lambda2-openfoam-utilities.html