![]() |
valib
Vortex Analysis LIBrary
|
User-level VALIB functions. More...
Functions | |
| VA_DEVICE_FUN void | valib_compactness (VA_REAL *A, VA_REAL *compactness) |
| Compactness criterion. | |
| VA_DEVICE_FUN void | valib_contrarotation (VA_DEVICE_ADDR VA_REAL *A, VA_DEVICE_ADDR VA_REAL *S_RAVG) |
| Average contrarotation (a.k.a. \( S_{RAVG} \)) [20]. | |
| VA_DEVICE_FUN void | valib_delta (VA_REAL *A, VA_REAL *delta) |
| \( \Delta \)-criterion [3] [4] [18] | |
| VA_DEVICE_FUN void | valib_lambda2 (VA_REAL *A, VA_REAL *lambda_2) |
| \( \lambda _2 \)-criterion [9] | |
| VA_DEVICE_FUN void | valib_qcriterion (VA_REAL *A, VA_REAL *qcriterion) |
| \(Q\)-criterion [8] | |
| VA_DEVICE_FUN void | valib_qwcriterion (VA_REAL *A, VA_REAL *qw_criterion) |
| \(Q_W\)-criterion [12] | |
| VA_DEVICE_FUN void | valib_rortex (VA_REAL *A, VA_REAL *rortex) |
| The Rortex vector \( \boldsymbol R \) (a.k.a. the Vortex vector or the Liutex vector) [6] [16]. | |
| VA_DEVICE_FUN void | valib_swirling_strength (VA_REAL *A, VA_REAL *lambda_ci, VA_REAL *lambda_cr) |
| Swirling strength criterion (a.k.a. \(\lambda_{ci}\)-criterion) [19] [2]. | |
| VA_DEVICE_FUN void | valib_triple_decomposition (VA_DEVICE_ADDR VA_REAL *A, int *num_intervals, VA_DEVICE_ADDR VA_REAL *residual_vorticity, VA_DEVICE_ADDR VA_REAL *residual_strain, VA_DEVICE_ADDR VA_REAL *shear) |
| Triple Decomposition Method (TDM, a.k.a. residual vorticity and residual strain rate) [14], [10]. | |
| VA_DEVICE_FUN void | valib_residual_vorticity (VA_DEVICE_ADDR VA_REAL *A, int *num_intervals, VA_DEVICE_ADDR VA_REAL *residual_vorticity, VA_DEVICE_ADDR VA_REAL *residual_strain, VA_DEVICE_ADDR VA_REAL *shear) |
| Triple Decomposition Method (TDM, a.k.a. residual vorticity and residual strain rate) [14], [10]. | |
| VA_DEVICE_FUN void | valib_triple_decomposition_4norms (VA_DEVICE_ADDR VA_REAL *A, int *num_intervals, VA_DEVICE_ADDR VA_REAL *residual_vorticity, VA_DEVICE_ADDR VA_REAL *residual_strain, VA_DEVICE_ADDR VA_REAL *shear_vorticity, VA_DEVICE_ADDR VA_REAL *shear_strain) |
| Triple Decomposition Method (TDM, a.k.a. residual vorticity and residual strain rate) [14], [10]. | |
| VA_DEVICE_FUN void | valib_triple_decomposition_with_angles (VA_DEVICE_ADDR VA_REAL *A, int *num_intervals, VA_DEVICE_ADDR VA_REAL *residual_vorticity, VA_DEVICE_ADDR VA_REAL *residual_strain, VA_DEVICE_ADDR VA_REAL *shear, VA_DEVICE_ADDR VA_REAL *alpha, VA_DEVICE_ADDR VA_REAL *beta, VA_DEVICE_ADDR VA_REAL *gamma) |
| Triple Decomposition Method (TDM, a.k.a. residual vorticity and residual strain rate) [14], [10]. | |
User-level VALIB functions.
| VA_DEVICE_FUN void valib_compactness | ( | VA_REAL * | A, |
| VA_REAL * | compactness ) |
#include "compactness.h"
Compactness criterion.
Vortex is defined as compact if in a region for which \( \nabla u \) has a pair of complex (conjugate) eigenvalues,
\[ \lambda_{cr} \pm \lambda_{ci} i, \]
where \( \lambda_{cr} \) and \( \lambda_{ci} \) are the real and the imaginary parts of the complex eigenvalue of \( \nabla u \), respectively.
The result is
\[ 1 - \left[ \left( \lambda_{cr}/\lambda_{ci} - \lambda_{r}/\lambda_{ci} \right)^2 \right] / 3 - \mbox{sgn}{\left(2\lambda_{cr}+\lambda_{r}\right)}\ \left(2\lambda_{cr}/\lambda_{ci}+\lambda_{r}/\lambda_{ci}\right)^2 /6. \]
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [out] | compactness | value of the criterion |
Definition at line 38 of file compactness.h.
| VA_DEVICE_FUN void valib_contrarotation | ( | VA_DEVICE_ADDR VA_REAL * | A, |
| VA_DEVICE_ADDR VA_REAL * | S_RAVG ) |
#include "contrarotation.h"
Average contrarotation (a.k.a. \( S_{RAVG} \)) [20].
The symmetric tensor of average contrarotation at a point \(x_0\) is defined as a spherical average over a unit sphere \(\sigma(0,1)\) as
\[ S_{RAVG}(x_0) = \beta\ \frac{\iint\limits_{\sigma(0,1)} S_{3,RES}(x_0, n)\ d\sigma} {\iint\limits_{\sigma(0,1)}\ d\sigma} = \frac{\beta}{4\pi}\iint\limits_{\sigma(0,1)} S_{3,RES}(x_0, n)\ d\sigma, \]
where \(\beta\) is a scaling factor. The natural choice \(\beta=5/2\) is derived in [20], and this value is used also here. The tensor \( S_{3,RES}(x_0, n) \) is obtained by 2-D analysis of the residual strain rate in a cutting plane given by a normal \(n\), and it corresponds to the contrarotation of line segments near a point. Details can be found in [20] . It should not be confused with the \( S_{RES} \) tensor of the 3-D residual strain rate from the Triple Decomposition Method [14].
The average-contrarotation tensor can be seen as the strain-rate tensor corrected by the effect of shear. As shown in [20], the norm of the tensor \(\| S_{RAVG} \|_F\) can be effectively used for vizualising high strain-rate zones.
Average contrarotation is determined from deviatoric quantities, thus it can be applied to compressible flows for which
\[ \mbox{trace}(\nabla u) \neq 0. \]
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [out] | S_RAVG | 3x3 matrix with the tensor of averaged contrarotation, stored column-wise |
Definition at line 55 of file contrarotation.h.
| VA_DEVICE_FUN void valib_delta | ( | VA_REAL * | A, |
| VA_REAL * | delta ) |
#include "delta.h"
\( \Delta \)-criterion [3] [4] [18]
Vortices are defined as the regions in which the velocity gradient \( \nabla u \) has a conjugate pair of complex eigenvalues. This corresponds to
\[ \Delta = \left(\frac{Q}{3} \right)^3 + \left(\frac{R}{2}\right)^2 > 0, \]
where \( Q \) is the second invariant of \( \nabla u \), and \( R \) is the third invariant (the determinant) of \( \nabla u \). Incompressibility is assumed in the derivation of this criterion, i.e.
\[ \mbox{trace}(\nabla u) = 0. \]
The criterion is derived from the discriminant of the characteristic polynomial
\[ \lambda ^3 + Q\lambda - R = 0, \]
with \( \Delta = 0 \) corresponding to the transition from three real eigenvalues to the case of one real eigenvalue and a conjugate pair of complex eigenvalues.
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [out] | delta | value of \( \Delta \) |
| VA_DEVICE_FUN void valib_lambda2 | ( | VA_REAL * | A, |
| VA_REAL * | lambda_2 ) |
#include "lambda2.h"
\( \lambda _2 \)-criterion [9]
Vortex is defined as a connected fluid region with two negative eigenvalues of the symmetric tensor
\[ S^2 + \Omega^2, \]
where \( \Omega = \frac{1}{2} ( \nabla u - ( \nabla u )^T ) \) is the antisymmetric part and \( S = \frac{1}{2} ( \nabla u + (\nabla u )^T )\) is the symmetric part of the velocity gradient \( \nabla u \).
In the underlying search for a local pressure minimum across a vortex, the quantity \(S^2 + \Omega^2\) is employed as an approximation of the pressure Hessian after removing the unsteady irrotational straining and viscous effects from the strain-rate transport equation for incompressible fluids. The eigenvalues of \(S^2 + \Omega^2\) are real and if they are ordered,
\[ \lambda_1 \geq \lambda_2 \geq \lambda_3, \]
the condition on two negative eigenvalues is equivalent to
\[ \lambda_2 < 0, \]
hence the name of the criterion.
Incompressibility is assumed in the derivation of this criterion, i.e.
\[ \mbox{trace}(\nabla u) = 0, \]
and the criterion should not be applied to flows with significant effects of compressibility.
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [out] | lambda_2 | the second eigenvalue of \(S^2 + \Omega^2\) |
| VA_DEVICE_FUN void valib_qcriterion | ( | VA_REAL * | A, |
| VA_REAL * | qcriterion ) |
#include "qcriterion.h"
\(Q\)-criterion [8]
Vortices are identified as connected fluid regions with a positive second invariant of the velocity-gradient tensor \( \nabla u \), which for an incompressible flow simplifies to
\[ Q = \frac{1}{2} \left( \| \Omega \|_F^2 - \| S \|_F^2 \right) > 0, \]
where \( \Omega = \frac{1}{2} ( \nabla u - ( \nabla u )^T ) \) is the antisymmetric part and \( S = \frac{1}{2} ( \nabla u + ( \nabla u )^T ) \) is the symmetric part of the velocity gradient \( \nabla u \). The criterion is fulfilled in the regions where the vorticity magnitude prevails over the strain-rate magnitude.
Incompressibility is assumed in the derivation of this criterion, i.e.
\[ \mbox{trace}(\nabla u) = 0. \]
For compressible flows, variants taking compressibility into account, i.e. \(Q_D\), \(Q_M\), or \(Q_W\), should be used.
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [out] | qcriterion | value of \( Q \) |
Definition at line 46 of file qcriterion.h.
| VA_DEVICE_FUN void valib_qwcriterion | ( | VA_REAL * | A, |
| VA_REAL * | qw_criterion ) |
#include "qwcriterion.h"
\(Q_W\)-criterion [12]
Vortices are identified as connected fluid regions with a positive quantity
\[ Q_W = \frac{1}{2} \left( \| \Omega \|_F^2 - \frac{6}{5} \| S_D \|_F^2 \right) > 0, \]
where \( \Omega = \frac{1}{2} ( \nabla u - ( \nabla u )^T ) \), and \( S_D = \frac{1}{2} ( (\nabla u)_D + (\nabla u )_D^T )\) is the symmetric part of the deviatoric part of the velocity gradient \( \nabla u \),
\[ (\nabla u)_D = \nabla u - \frac{1}{3} \mbox{trace}(\nabla u)\ I. \]
The criterion is a modification of the \(Q\)-criterion, and it is based on spherical averaging of the (planar) Okubo-Weiss criterion. \(Q_W\) corrects the effect of compressibility and eliminates the effect of shear. Since it is derived from the deviatoric part of the velocity gradient \(\nabla u\), it is applicable also to compressible flows where
\[ \mbox{trace}(\nabla u) \neq 0. \]
An alternative might be using the \(Q_M\) criterion, which is stricter than \(Q_W\).
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [out] | qw_criterion | value of \( Q_W \) |
Definition at line 48 of file qwcriterion.h.
| VA_DEVICE_FUN void valib_residual_vorticity | ( | VA_DEVICE_ADDR VA_REAL * | A, |
| int * | num_intervals, | ||
| VA_DEVICE_ADDR VA_REAL * | residual_vorticity, | ||
| VA_DEVICE_ADDR VA_REAL * | residual_strain, | ||
| VA_DEVICE_ADDR VA_REAL * | shear ) |
#include "triple_decomposition.h"
Triple Decomposition Method (TDM, a.k.a. residual vorticity and residual strain rate) [14], [10].
Evaluates the triple decomposition of the velocity gradient following [14],
\[ \nabla u = S_{RES} + \Omega_{RES} + (\nabla u)_{SH} \]
where the symmetric tensor \( S_{RES} \) corresponds to the irrotational straining motion (residual strain rate), \( \Omega_{RES} \) is the antisymmetric tensor of rigid-body rotation (residual vorticity), and \( (\nabla u)_{SH} \) contains the effective pure shearing motion. In the Basic Reference Frame (BRF), the last tensor has a strictly asymmetric form, i.e.
\[ u_{i,j} = 0\ \mbox{or}\ u_{j,i} = 0\ \mbox{for all}\ i,j. \]
The function returns the vector of residual vorticity and the Frobenius norms of the residual strain and shear tensors. The connection to the tensor of residual vorticity is as follows: \( \omega_{RES} = (\omega _x, \omega _y, \omega _z) \), where
\[ \Omega_{RES} = \frac{1}{2}\left( \begin{array}[c]{ccc} 0 & -\omega_z & \omega_y \\ \omega_z & 0 & -\omega_x \\ -\omega_y & \omega_x & 0 \end{array} \right) \]
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [in] | num_intervals | number of steps, i.e. division of the interval \( [0,\pi] \) |
| [out] | residual_vorticity | vector of the residual vorticity, \( \omega_{RES} \) |
| [out] | residual_strain | Frobenius norm of the tensor of irrotational straining \( \|S_{RES}\|_F \) |
| [out] | shear | Frobenius norm of the tensor related to the shear contribution \( \|(\nabla u)_{SH}\|_F \) |
Definition at line 435 of file triple_decomposition.h.
| VA_DEVICE_FUN void valib_rortex | ( | VA_REAL * | A, |
| VA_REAL * | rortex ) |
#include "rortex.h"
The Rortex vector \( \boldsymbol R \) (a.k.a. the Vortex vector or the Liutex vector) [6] [16].
Vortex is defined as a region for which \( \nabla u \) has a pair of complex (conjugate) eigenvalues,
\[ \lambda_{cr} \pm \lambda_{ci} i, \]
where \( \lambda_{cr} \) and \( \lambda_{ci} \) are the real and the imaginary parts of the complex eigenvalue of \( \nabla u \), respectively.
The result is a vector with the direction of \( \boldsymbol r \), which is the eigenvector corresponding to the real eigenvalue \( \lambda_{r} \).
The orientation of the eigenvector is selected so that
\[ \boldsymbol \omega \cdot \boldsymbol r > 0, \]
where \( \boldsymbol \omega \) is the vorticity vector.
Then the Rortex vector is defined in [6], equation (13), as
\[ \boldsymbol R = R \boldsymbol r = \left\{ \boldsymbol \omega \cdot \boldsymbol r - \sqrt{(\boldsymbol \omega \cdot \boldsymbol r)^2 - 4\lambda_{ci}^2} \right\} \boldsymbol r. \]
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [out] | rortex | Rortex vector of length 3 |
| VA_DEVICE_FUN void valib_swirling_strength | ( | VA_REAL * | A, |
| VA_REAL * | lambda_ci, | ||
| VA_REAL * | lambda_cr ) |
#include "swirling_strength.h"
Swirling strength criterion (a.k.a. \(\lambda_{ci}\)-criterion) [19] [2].
Vortex is defined as a region for which \( \nabla u \) has a pair of complex (conjugate) eigenvalues,
\[ \lambda_{cr} \pm \lambda_{ci} i, \]
where \( \lambda_{cr} \) and \( \lambda_{ci} \) are the real and the imaginary parts of the complex eigenvalue of \( \nabla u \), respectively.
Absolute value of the imaginary part of these eigenvalues is used to determine a vortex region in [19], i.e.
\[ \lambda_{ci} \ge \varepsilon. \]
In addition, according to [2], a vortex region needs to satisfy
\[ -\kappa \le \lambda_{cr}/\lambda_{ci} \le \delta, \]
It can be seen as a generalization of the \(\Delta\)-criterion, and these two criteria are equivalent for zero thresholds, i.e.
\[ \Delta = 0 \Leftrightarrow \lambda_{ci} = 0. \]
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [out] | lambda_ci | absolute value of the imaginary part of the complex eigenvalue of \( \nabla u \), \( \lambda_{ci} \) |
| [out] | lambda_cr | the real part of the complex eigenvalue of \( \nabla u \), \( \lambda_{cr} \) |
Definition at line 56 of file swirling_strength.h.
| VA_DEVICE_FUN void valib_triple_decomposition | ( | VA_DEVICE_ADDR VA_REAL * | A, |
| int * | num_intervals, | ||
| VA_DEVICE_ADDR VA_REAL * | residual_vorticity, | ||
| VA_DEVICE_ADDR VA_REAL * | residual_strain, | ||
| VA_DEVICE_ADDR VA_REAL * | shear ) |
#include "triple_decomposition.h"
Triple Decomposition Method (TDM, a.k.a. residual vorticity and residual strain rate) [14], [10].
Evaluates the norms of the quantities appearing in the triple decomposition of the velocity gradient following [14],
\[ \nabla u = S_{RES} + \Omega_{RES} + (\nabla u)_{SH} \]
where the symmetric tensor \( S_{RES} \) corresponds to the irrotational straining motion (residual strain rate), \( \Omega_{RES} \) is the antisymmetric tensor of rigid-body rotation (residual vorticity), and \( (\nabla u)_{SH} \) contains the effective pure shearing motion. In the Basic Reference Frame (BRF), the last tensor has a strictly asymmetric form, i.e.
\[ u_{i,j} = 0\ \mbox{or}\ u_{j,i} = 0\ \mbox{for all}\ i,j. \]
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [in] | num_intervals | number of steps, i.e. division of the interval \( [0,\pi] \) |
| [out] | residual_vorticity | Frobenius norm of the tensor of rigid rotation \( \|\Omega_{RES}\|_F \) |
| [out] | residual_strain | Frobenius norm of the tensor of irrotational straining \( \|S_{RES}\|_F \) |
| [out] | shear | Frobenius norm of the tensor related to the shear contribution \( \|(\nabla u)_{SH}\|_F \) |
Definition at line 325 of file triple_decomposition.h.
| VA_DEVICE_FUN void valib_triple_decomposition_4norms | ( | VA_DEVICE_ADDR VA_REAL * | A, |
| int * | num_intervals, | ||
| VA_DEVICE_ADDR VA_REAL * | residual_vorticity, | ||
| VA_DEVICE_ADDR VA_REAL * | residual_strain, | ||
| VA_DEVICE_ADDR VA_REAL * | shear_vorticity, | ||
| VA_DEVICE_ADDR VA_REAL * | shear_strain ) |
#include "triple_decomposition.h"
Triple Decomposition Method (TDM, a.k.a. residual vorticity and residual strain rate) [14], [10].
Evaluates the norms of the quantities appearing in the triple decomposition of the velocity gradient following [14],
\[ \nabla u = S_{RES} + \Omega_{RES} + (\nabla u)_{SH} \]
where the symmetric tensor \( S_{RES} \) corresponds to an irrotational straining motion (residual strain rate), \( \Omega_{RES} \) is an antisymmetric tensor of rigid-body rotation (residual vorticity), and \( (\nabla u)_{SH} \) contains the effective pure shearing motion. In the Basic Reference Frame (BRF), the last tensor has a strictly asymmetric form, i.e.
\[ u_{i,j} = 0\ \mbox{or}\ u_{j,i} = 0\ \mbox{for all}\ i,j. \]
The difference from the valib_triple_decomposition function is that the tensor of shear is transformed from BRF to the original coordinate system and there further decomposed into the symmetric and antisymmetric parts,
\[ (\nabla u)_{SH} = S_{SH} + \Omega_{SH}. \]
Norms of these parts are returned by this function individually.
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [in] | num_intervals | number of steps, i.e. division of the interval \( [0,\pi] \) |
| [out] | residual_vorticity | Frobenius norm of the tensor of rigid rotation \( \|\Omega_{RES}\|_F \) |
| [out] | residual_strain | Frobenius norm of the tensor of irrotational straining \( \|S_{RES}\|_F \) |
| [out] | shear_vorticity | Frobenius norm of the tensor related to the shear contribution to vorticity \( \|\Omega_{SH}\|_F \) |
| [out] | shear_strain | Frobenius norm of the tensor related to the shear contribution to strain-rate \( \|S_{SH}\|_F \) |
Definition at line 545 of file triple_decomposition.h.
| VA_DEVICE_FUN void valib_triple_decomposition_with_angles | ( | VA_DEVICE_ADDR VA_REAL * | A, |
| int * | num_intervals, | ||
| VA_DEVICE_ADDR VA_REAL * | residual_vorticity, | ||
| VA_DEVICE_ADDR VA_REAL * | residual_strain, | ||
| VA_DEVICE_ADDR VA_REAL * | shear, | ||
| VA_DEVICE_ADDR VA_REAL * | alpha, | ||
| VA_DEVICE_ADDR VA_REAL * | beta, | ||
| VA_DEVICE_ADDR VA_REAL * | gamma ) |
#include "triple_decomposition.h"
Triple Decomposition Method (TDM, a.k.a. residual vorticity and residual strain rate) [14], [10].
Evaluates the norms of the quantities appearing in the triple decomposition of the velocity gradient following [14],
\[ \nabla u = S_{RES} + \Omega_{RES} + (\nabla u)_{SH} \]
where the symmetric tensor \( S_{RES} \) corresponds to an irrotational straining motion (residual strain rate), \( \Omega_{RES} \) is an antisymmetric tensor of rigid-body rotation (residual vorticity), and \( (\nabla u)_{SH} \) contains the effective pure shearing motion. In the Basic Reference Frame (BRF), the last tensor has a strictly asymmetric form, i.e.
\[ u_{i,j} = 0\ \mbox{or}\ u_{j,i} = 0\ \mbox{for all}\ i,j. \]
The difference from the valib_triple_decomposition function is that this function also returns optimal angles of the BRF.
| [in] | A | 3x3 matrix of velocity gradient stored column-wise |
| [in] | num_intervals | number of steps, i.e. division of the interval \( [0,\pi] \) |
| [out] | residual_vorticity | Frobenius norm of the tensor of rigid rotation \( \|\Omega_{RES}\|_F \) |
| [out] | residual_strain | Frobenius norm of the tensor of irrotational straining \( \|S_{RES}\|_F \) |
| [out] | shear | Frobenius norm of the tensor related to the shear contribution \( \|(\nabla u)_{SH}\|_F \) |
| [out] | alpha | rotation angle \( \alpha \) of the basic reference frame (BRF) in radians |
| [out] | beta | rotation angle \( \beta \) of the basic reference frame (BRF) in radians |
| [out] | gamma | rotation angle \( \gamma \) of the basic reference frame (BRF) in radians |
Definition at line 656 of file triple_decomposition.h.