[Paraview] help - producing 'different strain values' from the 'ComputeDerivatives' VectorGradient arrays
Tim Bhatnagar
tim.bhatnagar at gmail.com
Thu Mar 27 16:47:58 EDT 2014
To anyone that has some experience with custom/programmable filters,
I have a set of 9 arrays from my 'ComputeDerivatives' Filter, and I would
like to perform simple math operations on these arrays, to create another
set of 9 arrays. I have to do this with 30 sets of data, so a 'brute force'
approach would be very timely
In theory, instead of using the in-program Strain selection from
'ComputeDerivatives' (which provides the elements of the infinitesimal
strain tensor), I need to formulate my own 'Strain' data (*finite* strain
tensor elements), which will have EXACTLY the same format as the in-program
Strain data, just each element is calculate slightly differently.. I can
show the difference below:
Current, infinitesimal strain element calculation, where 'tens' is a 3x3
matrix:
tens->SetComponent(0,0, derivs[0]);
tens->SetComponent(0,1, 0.5*(derivs[1]+derivs[3]));
tens->SetComponent(0,2, 0.5*(derivs[2]+derivs[6]));
tens->SetComponent(1,0, 0.5*(derivs[1]+derivs[3]));
tens->SetComponent(1,1, derivs[4]);
tens->SetComponent(1,2, 0.5*(derivs[5]+derivs[7]));
tens->SetComponent(2,0, 0.5*(derivs[2]+derivs[6]));
tens->SetComponent(2,1, 0.5*(derivs[5]+derivs[7]));
tens->SetComponent(2,2, derivs[8]);
and I would need to substitute the math for the finite strain elements:
tens->SetComponent(0,0, ( derivs[0] + 0.5*( derivs[0]^2 + derivs[3]^2
+ derivs[6]^2)) );
tens->SetComponent(0,1, ( 0.5*(derivs[1]+derivs[3]) +
0.5*(derivs[1]*derivs[2] + derivs[4]*derivs[5] + derivs[7]*derivs[8]))
);
tens->SetComponent(0,2, ( 0.5*(derivs[2]+derivs[6]) +
0.5*(derivs[0]*derivs[2] + derivs[3]*derivs[5] + derivs[6]*derivs[8]))
);
tens->SetComponent(1,0, ( 0.5*(derivs[1]+derivs[3]) +
0.5*(derivs[1]*derivs[2] + derivs[4]*derivs[5] + derivs[7]*derivs[8]))
);
tens->SetComponent(1,1, ( derivs[4] + 0.5*( derivs[1]^2 + derivs[4]^2
+ derivs[7]^2)) );
tens->SetComponent(1,2, ( 0.5*(derivs[5]+derivs[7]) +
0.5*(derivs[1]*derivs[2] + derivs[4]*derivs[5] + derivs[7]*derivs[8]))
);
tens->SetComponent(2,0, ( 0.5*(derivs[2]+derivs[6]) +
0.5*(derivs[0]*derivs[2] + derivs[3]*derivs[5] + derivs[6]*derivs[8]))
);
tens->SetComponent(2,1, ( 0.5*(derivs[5]+derivs[7]) +
0.5*(derivs[1]*derivs[2] + derivs[4]*derivs[5] + derivs[7]*derivs[8]))
);
tens->SetComponent(2,2, ( derivs[8] + 0.5*( derivs[2]^2 + derivs[5]^2
+ derivs[8]^2)) );
I am NOT a very competent programmer, and was hoping there'd be some way to
implement this in the Paraview GUI (perhaps using a programmable python
filter?), without having to modify/create code.
Can anyone lend a hand to helping me find a simple way to implement this? I
would like to stay in paraview, because I am creating figures using
Paraview for other aspects of my research.
Alternatively, if someone knows a way to import a csv into Paraview, and
have it behave exactly like data produced from 'ComputeDerivatives' - in
that I wish to use 'Resample with Dataset', then that would be another way
to go.
Thanks,
--
Tim Bhatnagar
PhD Candidate
Orthopaedic Injury Biomechanics Group
Department of Mechanical Engineering
University of British Columbia
Rm 5000 - 818 West 10th Ave.
Vancouver, BC
Canada
V5Z 1M9
Ph: (604) 675-8845
Fax: (604) 675-8820
Web: oibg.mech.ubc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140327/b4f8d1eb/attachment.html>
More information about the ParaView
mailing list