[Paraview] Assemble Variables into Tensor

Nicholas Richmond nicholas.richmond at maine.edu
Wed Nov 29 17:01:20 EST 2017


Greetings,

I have a vtk Polygonal Mesh with six separate arrays (sigma_xx, sigma_yy,
sigma_zz, sigma_xy, sigma_yz, sigma_xz). I'd like to assemble these into a
tensor so that I may apply the Tensor Glyph filter.

After reading that the paraview.simple.TensorGlyph
<https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.simple.TensorGlyph.html>
expects
a symmetric tensor with the order XX, YY, ZZ, XY, YZ, XZ, I tried to
assemble the six separate arrays into a single array with the Python
Calculator, but have been unsuccessful.

I've tried a variety of approaches, including:

*Expression:* np.array([sigma_xx, sigma_yy, sigma_zz, sigma_xy, sigma_yz,
sigma_xz])
*Array Association:* Point Data

I can make a vector of the normal stresses using the "make_vector" function
from paraview.vtk.numpy_interface.algorithms, but there is no "make_tensor"
function to assemble both normal and shear stresses into a single symmetric
tensor.

Any guidance would be most appreciated.
Many thanks,
Nick Richmond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20171129/dd3eb314/attachment.html>


More information about the ParaView mailing list