I would like to calculate the vectors of the principal stresses in each node of the mesh after an FEM analysis with Matlab (with the Partial Differential Equation Toolbox) of an imported 3D component (.stl) and plot them in my component. This also works very well, just takes a relatively long time because I do this via a loop (surely it can be done better). I calculate the vectors from the double lists of the different stress components generated during the FEM analysis.
Now, at each node (xyz coordinates) in the component, the direction of the stress is available in the form of a vector (u, v, w) - plotted with quiver3.
for i = 1 : 500
S = [qx(i) txy(i) txz(i); txy(i) qy(i) tyz(i); txz(i) tyz(i) qz(i)];
E = eye(3);
V, D, W] = eig(S);
HS = [D(3, 3) ; D(2, 2); D(1, 1)];
V1 = [W(1, 3); W(2, 3); W(3, 3)];
q = quiver3(msh.Nodes(1,i), msh.Nodes(2,i), msh.Nodes(3,i), W(1,1), W(2,1), W(3,1));
set(q,'AutoScale','on', 'AutoScaleFactor', 5,);
Now to my question: I would like to display these vectors as a kind of streamlines. Lines that follow the approximate directions of the vectors. Preferably in variable quantity.
First I tried this with the streamline command, but it doesn't work because I don't have a real vector field, but only plot single vectors at certain xyz coordinates.
I am very grateful for any help.