Skip to main content Skip to navigation

Flow Visualisation

Flow Visualisation

Functions exist that when plotted show clearly vorticity in the flow. In order to use these functions, the eigenvalues of velocity matrices taken directly from the CFD code are required. The median eigenvalue must be found for each grid point in the flow (over 1 million), so efficient code to do this is needed.

 sample vortex graph

An example of such a visualisation- K. L. Ma, H. Akiba and H. Yu, University of California - Davis and E. Hawkes, Sandia National Laboratories. http://www.scidacreview.org/0602/html/combustion.html


Solving the eigenvector equation for a general 3x3 matrix provides the cubic equation for eigenvalues.

λ3 + aλ2 + bλ + c=0,

where a= -(x11 + x22 + x33),

b= (x11x22+x11x33-x12x21-x13x31+x22x33-x23x32),

c= (-x11x22x33+x11x23x32+x12x21x33-x12x23x31-x13x21x32+x13x22x31)

 


By using Lagrange Resolvents a solution to these equations can be found:

λ1=(-a+z11/3+z21/3)/3

where,

z1=(9ab-2a3-27c+((9ab-2a3-27c)2+4(3b-a2)3)1/2)/2,
z2=(9ab-2a3-27c-((9ab-2a3-27c)2+4(3b-a2)3)1/2)/2


This solution can be factorised out of the cubic to give

(λ-λ1)[λ2+(a+λ1)λ+(b+aλ112)]

The quadratic factor provides two further roots given by

(-(a+λ1)±[(a+λ1)2-4(b+aλ112)]1/2)/2


Thus with all three eigenvalues calculated, the median eigenvalue can be selected and used in the functions for flow visualisation.

Finished code for Fortran 90- Click here 24/10/07