<div dir="ltr">This may be easier to do in the Python Calculator, which is more efficient anyway. For accessing a specific component of a vector you can do something like "Normals[:,0]". For a 2nd order tensor you'd do something like "StrainRate[:,0,1]".<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 2:51 PM,  <span dir="ltr"><<a href="mailto:Marschmann@stud.uni-heidelberg.de" target="_blank">Marschmann@stud.uni-heidelberg.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Utkarsh,<br>
<br>
I changed the Result Array names to sigmaXX etc but still get the same error message.<br>
I think the problem is with the product between the two unit vectors.<br>
Simply calculating for example " iHat*iHat " yields the same error message.<br>
<br>
Would you know in general how to form a tensor field in paraview from its components?<br>
<br>
Thanks,<br>
Gianna<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Quoting Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Gianna,<br>
<br>
For Calculator filter,  names with "_X", "_Y" have special meaning.<br>
Try change Calulators 1-9 to use Result Array names as "sigmaXX",<br>
"sigmaYY", etc.<br>
Does that work?<br>
<br>
Utkarsh<br>
<br>
On Mon, Oct 6, 2014 at 6:31 PM,  <<a href="mailto:Marschmann@stud.uni-heidelberg.de" target="_blank">Marschmann@stud.uni-<u></u>heidelberg.de</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Utkarsh,<br>
thanks for looking at it.<br>
Attached is the state file:<br>
- Calculators 1-6 calculate the 6 independent components of the symmetric<br>
stress tensor sigma_ij<br>
<br>
- Calculators 7-9 calculate the traction vectors s_i from the stress<br>
components (s_i = sigma_ij e_j , summation over j implied, e_j basis<br>
vectors)<br>
<br>
Now in another calculator I'd like to compute the stress tensor field,<br>
either directly from the stress components sigma_ij or from the traction<br>
vectors. Both approaches fail with the error message.<br>
The stress tensor is given by<br>
sigma =<br>
sigma_xx(e_x*e_x)+sigma_yy(e_<u></u>y*e_y)+sigma_zz(e_z*_ez)+<u></u>sigma_xy)(e_xe_y+e_ye_x)+<u></u>sigma_xz(e_xe_z+e_ze_x)+sigma_<u></u>yz(e_ye_z+e_ze_y)<br>
equivalent to<br>
sigma = s_x*e_x + s_y*e_y +s_z*e_z<br>
<br>
Thanks,<br>
Gianna<br>
<br>
<br>
<br>
Quoting Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you attach a sample data file/state file? That'll make it easier<br>
to identify the problem and suggest a solution.<br>
<br>
Thanks<br>
Utkarsh<br>
<br>
On Sat, Oct 4, 2014 at 4:14 AM,  <<a href="mailto:Marschmann@stud.uni-heidelberg.de" target="_blank">Marschmann@stud.uni-<u></u>heidelberg.de</a>><br>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hello everyone,<br>
<br>
I have three displacement field vector components u, v, w in my .vtk file<br>
and wish to display the associated stress tensor.<br>
I made the following steps:<br>
<br>
- Apply the filter Gradient Of Unstructued DataSet<br>
-> Now have 9 scalars Gradient_0, ... , Gradient 8<br>
<br>
- compute components of stress tensor via sigma_ij = div(Gradient) +<br>
u_i,j<br>
-> Now have additional 9 scalars sigma_ij<br>
<br>
- from this form traction vectors:<br>
T_i = sigma_ij e_j   ,where e_j are the unit vectors iHat<br>
<br>
-> Now have three traction vectors from which the tensor field<br>
computation<br>
doesnt work:<br>
<br>
- I do Result = T_1*iHat + T_2*jHat + T_3*kHat for the tensor calculation<br>
and get the following error message:<br>
<br>
ERROR: In<br>
<br>
/home/abuild/rpmbuild/BUILD/<u></u>ParaView-v4.0.1-source/VTK/<u></u>Common/Misc/vtkFunctionParser.<u></u>cxx,<br>
line 201<br>
vtkFunctionParser (0x205ddac0): Parse: Error deciding between ambiguous<br>
operators<br>
<br>
<br>
ERROR: In<br>
<br>
/home/abuild/rpmbuild/BUILD/<u></u>ParaView-v4.0.1-source/VTK/<u></u>Common/Misc/vtkFunctionParser.<u></u>cxx,<br>
line 300<br>
vtkFunctionParser (0x205ddac0): expecting either 2 scalars or a scalar<br>
and a<br>
vector<br>
<br>
<br>
ERROR: In<br>
<br>
/home/abuild/rpmbuild/BUILD/<u></u>ParaView-v4.0.1-source/VTK/<u></u>Common/Misc/vtkFunctionParser.<u></u>cxx,<br>
line 201<br>
vtkFunctionParser (0x205ddac0): Parse: Error deciding between ambiguous<br>
operators<br>
<br>
<br>
- Can you help me or tell me gow to visualize the stress tensor from the<br>
displacement field?<br>
- Alternatively you it would also be good to know how to multiply the<br>
result<br>
of  filter Gradient of Unstructured DataSet by a scalar value.<br>
<br>
<br>
Many thanks for helping!<br>
Gianna<br>
<br>
______________________________<u></u>_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at:<br>
<a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/<u></u>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/<u></u>mailman/listinfo/paraview</a><br>
</blockquote>
<br>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/<u></u>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/<u></u>mailman/listinfo/paraview</a><br>
</blockquote></div><br></div>