STL file to volume mesh

321 views
Skip to first unread message

zbysze...@gmail.com

unread,
Aug 24, 2017, 7:14:26 AM8/24/17
to vmtk-users
Hello, I would like to ask if there is a possibility of creating the volumetric mesh (made of tetrahedrons) compatible with OpenFOAM software when importing the STL (surface of the model) file into the VMTK. Here is the list of what I have already performed:

1. Imported STL file,
2. Clipped inlet and outlets,
3. Assigned IDs to newly created open boundaries,
4. Added circular protrusions on inlets and outlets,
5. Tried to generate tetrahedral mesh and program said it succeeded, however, when I inspected the whole part in the render window, inside of the 'surface' was empty.

I would appreciate any help concerning creating volumetric mesh from the STL file.

Yours faithfully,
Zbigniew Tyfa

Rick Izzo

unread,
Aug 24, 2017, 7:19:18 AM8/24/17
to vmtk-...@googlegroups.com
Hi zbigniew,

Can you provide the code you used to create and view the volume mesh?

-Rick Izzo

--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+unsubscribe@googlegroups.com.
To post to this group, send email to vmtk-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

zbysze...@gmail.com

unread,
Aug 24, 2017, 7:56:07 AM8/24/17
to vmtk-users
Here is the code you asked for (I was doing everything step by step):

vmtksurfacesmoothing -ifile /home/zbigniew/Pulpit/artery_fragment.stl -passband 0.1 -iterations 30 -ofile /home/zbigniew/Pulpit/artery_smoothed.vtp

vmtksurfacereader -ifile /home/zbigniew/Pulpit/artery_smoothed.vtp --pipe vmtkrenderer --pipe vmtksurfaceviewer -display 0 --pipe vmtksurfaceviewer -i @vmtksurfacereader.o -color 1 0 0 -display 1 

vmtksurfaceclipper -ifile /home/zbigniew/Pulpit/artery_smoothed.vtp -ofile /home/zbigniew/Pulpit/artery_clipped.vtp

vmtksurfacereader -ifile /home/zbigniew/Pulpit/artery_clipped.vtp --pipe vmtkcenterlines -seedselector openprofiles --pipe vmtkflowextensions -adaptivelength 1 -extensionratio 2 -normalestimationratio 1 -interactive 0 --pipe vmtksurfacewriter -ofile /home/zbigniew/Pulpit/artery_final.vtp

vmtkmeshgenerator -ifile /home/zbigniew/Pulpit/artery_final.vtp -ofile /home/zbigniew/Pulpit/artery_mesh.vtu -edgelength 0.5

vmtkmeshtetrahedralize -ifile /home/zbigniew/Pulpit/artery_mesh.vtu -ofile /home/zbigniew/Pulpit/artery_mesh_tetra.vtu

vmtkmeshboundaryinspector -ifile /home/zbigniew/Pulpit/artery_mesh_tetra.vtu -entityidsarray CellEntityIds 

zbysze...@gmail.com

unread,
Sep 4, 2017, 7:10:08 AM9/4/17
to vmtk-users
Hello,

Can anybody help me in that issue? I am struggling to make it work (converting STL file to volume mesh, tetrahedral one), however, each attempt is ended with a failure. Any advice is warmly welcomed.

Yours faithfully,
Zbigniew Tyfa

Simone Manini

unread,
Sep 18, 2017, 2:32:51 AM9/18/17
to vmtk-users
Dear Zbigniew,
if you inspect the mesh just after vmtkmeshgenerator is still "empty"? If yes, what's the error output of the vmtkmeshgenerator script?
Simone

--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.

To post to this group, send email to vmtk-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Simone Manini, Eng
Engineer, OROBIX Srl
via Camozzi 144, 24121 Bergamo, Italy

orobix:  www.orobix.com
web:     daron1337.github.io
phone:  +39 035 0273786
             +39 035 0170561

"This message originates from Orobix Srl and its contents and attachments are privileged and confidential and are intended only for the individual(s) or entity(ies) named above. This message should not be forwarded, distributed or disclosed. Any unauthorized use, dissemination and duplication is strictly prohibited and may be unlawful. All personal messages express views solely of the sender, which are not to be attributed to Orobix Srl, and may not be copied or distributed without this disclaimer. If you are not the intended recipient or received this message in error, please delete this message and notify the sender by reply e-mail. Opinions, conclusions and other information in this message that do not relate to the official business of Orobix Srl shall be understood as neither given nor endorsed by it."

zbysze...@gmail.com

unread,
Sep 19, 2017, 5:45:36 PM9/19/17
to vmtk-users
Dear Simone,

After few more attempts I managed to display a volumetric tetrahedral mesh with the function vmtkmeshviewer2, so the mesh was successfully generated. I tetrahedralized it since I wanted to use it in OpenFOAM software, but a problem arised at this stage - when I converted fluent mesh into OpenFOAM structure (checked 2 out of 2 viable options for a conversion), my resultant mesh had many holes in it (which were not present in the initial mesh of vmtk) - see attached files please.

Nevertheless, I managed to create a tetrahedral mesh from STL file. Now it is high time to make it work with OpenFOAM software. Do you have any idea why the current mesh is so poorly recognized by OpenFOAM software, even if it was saved as a fluent file?

Additionally, I have a problem when running the VMTK on Windows (I have specified the correct environment variables, so it is not this issue). When I run the icon from the Desktop (VMTK-1.3), PypePad opens and I can write commands there - everything works perfectly. However, when I try to do the same, but with the Python script, I get the following error: 'No module named vtkCommonCorePython'. What could be a cause of this? Program works when launched via shortcut on Desktop, but does not work when used via Python scripts.

Yours faithfully,
Zbigniew Tyfa


VMTK_mesh.PNG
VMTK_mesh_after_loading_to_openfoam.PNG

Simone Manini

unread,
Sep 25, 2017, 3:16:27 AM9/25/17
to vmtk-users
Dear Zbigniew,
thank you for your feedback.
I don't have any experience with OpenFOAM... I cannot help you.
Regarding your issue with VMTK on Windows, I think the problem is related to the python environment. 
We'll release vmtk 1.4 soon, with python anaconda that it will resolve those vtkCommonCorePython import issues.
Best regards,
Simone

--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To post to this group, send email to vmtk-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages