[vtkusers] Computing eigenvalues for asymmetric matrices &detecting complex conjugate

Adriano Gagliardi agagliardi at ara.co.uk
Thu Apr 7 04:46:38 EDT 2011


Alexis,
 
I couldn't find such functionality in VTK. However, you can get the roots
for your 3x3 matrix directly. Theory here (although you may know this
already):
http://en.wikipedia.org/wiki/Eigenvalue_algorithm#Eigenvalues_of_3.C3.973_ma
trices. It is what I used in the end for l2.
 
Regards,
 
Adriano
 
===================================

Adriano Gagliardi MEng PhD
Business Sector Leader
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford

Tel: 01234 32 4644
E-mail: agagliardi at ara.co.uk
Url: www.ara.co.uk 
 

  _____  

From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of Alexis Chan
Sent: 06 April 2011 20:32
To: vtkusers at vtk.org; vis-contest-2011 at freelists.org
Subject: [vtkusers] Computing eigenvalues for asymmetric matrices &detecting
complex conjugate


Hi
I am trying to compute the eigenvalue of S^2 + Omega^2 where S: strain-rate
tensor and Omega:spin tensor [1]

Question 1:

Since vtkMath::Jacobi computes the eigenvalues for a symmetric matrix, does
that mean that I have compute the eigenvalues for S separately from the
eigenvalues of Omega?

Is there a way to compute eigenvalues of asymmetric matrices in VTK ?
Should I run the Matlab eig function using vtkMatlabEngineInterface instead?

Here's how I compute S^2+Omega^2 in my modification of vtkCellDerivatives:

else if(this->TensorMode == VTK_TENSOR_MODE_COMPUTE_LAMBDA2)// This is not
actually Lambda2, but the tensor used for calculating lambda2
          {
          tens->SetComponent(0,0, derivs[0]*derivs[0] +
0.25*derivs[1]*derivs[1] + 0.25*derivs[3]*derivs[3] +
0.25*derivs[2]*derivs[2] + 0.25*derivs[6]*derivs[6]);
tens->SetComponent(0,1, 0.5*derivs[0]*derivs[1] + 0.5*derivs[4]*derivs[1] +
0.25*derivs[2]*derivs[5] + 0.25*derivs[6]*derivs[7]);
          tens->SetComponent(0,2, 0.5*derivs[0]*derivs[2] +
0.25*derivs[1]*derivs[5] + 0.25*derivs[3]*derivs[7] +
0.5*derivs[8]*derivs[1]);
          tens->SetComponent(1,0, 0.5*derivs[0]*derivs[1] +
0.5*derivs[4]*derivs[1] + 0.25*derivs[5]*derivs[2] +
0.25*derivs[7]*derivs[6]);
          tens->SetComponent(1,1, 0.25*derivs[1]*derivs[1] +
0.25*derivs[3]*derivs[3] + 1*derivs[4]*derivs[4] + 0.25*derivs[5]*derivs[5]
+ 0.25*derivs[7]*derivs[7]);
          tens->SetComponent(1,2, 0.25*derivs[1]*derivs[2] +
0.25*derivs[3]*derivs[6] + 0.5*derivs[4]*derivs[5] +
0.5*derivs[8]*derivs[5]);
          tens->SetComponent(2,0, 0.5*derivs[1]*derivs[2] +
0.25*derivs[5]*derivs[1] + 0.25*derivs[7]*derivs[5] +
0.5*derivs[8]*derivs[2]);
          tens->SetComponent(2,1, 0.25*derivs[2]*derivs[1] +
0.25*derivs[6]*derivs[5] + 0.5*derivs[4]*derivs[5] +
0.5*derivs[8]*derivs[5]);
          tens->SetComponent(2,2, 0.25*derivs[2]*derivs[2] +
0.25*derivs[6]*derivs[6] + 0.25*derivs[5]*derivs[5] +
0.25*derivs[7]*derivs[7] + 1*derivs[8]*derivs[8]);
          
          outTensors->InsertTuple(cellId, tens->T);
          }


full file here:
https://github.com/alexisylchan/VTK/blob/master/Graphics/myVTKCellDerivative
s.cxx

Question2:

How do I determine if the eigenvalue returned by vtkMath::Jacobi is a real
or complex-conjugate value?

I would appreciate any help! Thanks.

[1] Jinhee Jeong and Fazle Hussain. On the Identification of a Vortex.
<http://journals.cambridge.org/download.php?file=%2FFLM%2FFLM285%2FS00221120
95000462a.pdf&code=b89c005d1fed041d4786ecfec8f757c2> Journal of Fluid
Mechanics, pages 69-94, 285 1995 
[2]  <http://citeseer.ist.psu.edu/viewdoc/summary?cid=543964> Sujudi,D., and
Haines,R., "Identification of Swirling Flow in 3-D Vector Fields", Proc.
AIAA (Am. Inst. of Aeronautics and Astronautics) Computational Fluid
Dynamics Conf., American Institute of Aeronautics and Astronautics, (Reston,
Va., June 1995, pp. 151-158. 
-- 
Regards,
Alexis



**********************************************************************
This email contains information that is private and confidential and is intended only for the addressee.
If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other than the recipient, for
system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No 503668 Registered Office:
Manton Lane, Bedford MK41 7PF England VAT No GB 196351245

**********************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110407/5a047271/attachment.htm>


More information about the vtkusers mailing list