<div dir="ltr"><div dir="ltr"><div>Hello Gaetano, <br></div><div><br></div><div>Here is a short program to plot 3x3 tensor data using the C++ gmsh API (it shouldn't be too hard to port to Python or Julia if you're more comfortable there). It only plots data for one element, but can be extended for your case. <br></div><div> <br></div><div>The "addModelData" call is expecting a vector of vectors with 9 entries each for this case. <br></div><div>
<div>I think the vector ordering corresponding to the matrix is like this: <br></div><div>[elt11, elt12, elt13, elt21, elt22, ...] <br></div><div><br></div><div>I assume the stress matrix is symmetric and so only has 6 unique entries.</div>

</div><div>Therefore your vector entries will look like [x xy xz xy y yz xz yz z]<br></div><div>
The tricky part will be importing the data in a sensible way.  <br></div><div><br></div><div>Perhaps you could parse a CSV using python and add entries to the data vector in a loop?</div><div>Please find attached the program as well as example input mesh and output mesh files. <br></div><div><br></div><div><br></div><div><br></div><div><div><img src="cid:ii_jri2kxly0" alt="image.png" width="474" height="241"></div><div><br></div><div>Sincerely,</div><div>Max<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 29, 2019 at 11:24 AM Gaetano Camarda <<a href="mailto:gaetano_18@live.it">gaetano_18@live.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="IT">
<div class="gmail-m_4957269514431204830WordSection1">
<p class="MsoNormal">Hello everyone,</p>
<p class="MsoNormal">I’m having some difficult on post processing a mesh I created.</p>
<p class="MsoNormal">I create a mesh on Gmsh all Hexa (so a brick with 8 nodes), i use this mesh and import it on Matlab,</p>
<p class="MsoNormal">there i run some analisys and find the stress matrix:</p>
<p class="MsoNormal">[sigx sigy sigz sigxy sigyz sigxz]</p>
<p class="MsoNormal">…..    …..    …..   …..    …..    …..</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Now I would like to visualize the stress field on Gmsh, but I do not find any way to do so, I can export the matrix,</p>
<p class="MsoNormal">I tried to generete a *.pos file, but I didn’t find a solution.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Inviato da <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">
Posta</a> per Windows 10</p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

_______________________________________________<br>
gmsh mailing list<br>
<a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
<a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Max Orok</div><div>Contractor<br></div></div><div dir="ltr"><a href="http://www.mevex.com" target="_blank">www.mevex.com</a><br><br><img src="https://docs.google.com/uc?export=download&id=1fHTIiW4OMUjQr1iOkspQ7wiEsxunoOs0&revid=0B6x5w-5zVaEjSkpwbm5oY29jbG1XMzJoYldXTmJpNGFtb3dVPQ" width="164" height="42"><br></div></div></div></div></div></div>