[Paraview] Calculation of eigenvalues of velocity tensors
Janusz Michalik
janusz.michalik at epfl.ch
Mon Aug 6 10:27:41 EDT 2012
Hi Hal. I'm trying to use this filter that you attached but I get errors. This is what I'm doing and I'm not sure what is wrong:
1) Take the GradientOfUnstructuredData in the Paraview filters which gives me the velocity tensor with components numbered from 0 to 8.
2) I modified your tensor components matrix to have
tensor_components = [
'G_0', 'G_1', 'G_2',
'G_3', 'G_4', 'G_5',
'G_6', 'G_7', 'G_8']
where G is the result array name obtained from the Gradient Filter.
3) I run the your eig filter but I get errors:
Traceback (most recent call last):
File "<string>", line 26, in <module>
File "<string>", line 12, in RequestData
IndexError: 0-d arrays can only use a single () or a list of newaxes (and a single ...) as an index
And then I've tried any combination of with or without quotes in the tensor components or renaming my variables using the calculator.
So I'm pretty much have trouble in the area of loading the data from the Paraview variables to the numpy array.
-Janusz
________________________________________
From: paraview-bounces at paraview.org [paraview-bounces at paraview.org] on behalf of Hal Canary [hal at cs.unc.edu]
Sent: May 4, 2012 14:39
To: paraview at paraview.org
Subject: Re: [Paraview] Calculation of eigenvalues of velocity tensors
On 05/03/2012 03:47 AM, Janusz Michalik wrote:
> Has anyone tried to compute the eigenvalues of tensors?
>
> In particular, I am interested in plotting the isosurface of the second
> eigenvalue of S^2+Omega^2 where S and Omega are the symmetric and
> antisymetric parts of the velocity gradient tensor \nabla U.
I needed to get eigenvalues and eigenvectors from a tensor recently and
wrote a macro to do it. I'll attach it.
--
Hal Canary
http://cs.unc.edu/~hal/
More information about the ParaView
mailing list