Importing complete mesh for simulation

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Daniel Emerson
Posts: 12
Joined: Fri Jul 17, 2020 4:33 pm

Importing complete mesh for simulation

Post by Daniel Emerson » Tue Mar 16, 2021 3:26 pm

Hello,

I am trying to import a .stl or .vtk file into SimVascular to run a fluid simulation. When importing, it important the I retain the original geometry because I need to have a one-to-one correspondence between these simulation results and results simulated through other means, on the same mesh.

I will describe my current (unsuccessful) attempt to do this. I create a new project (File > Create SV Project). I then right click on the "Models" button in the Data Manager tab and select "Import Solid Model" (Data Manager > Models > Import Solid Model). I select my .vtk file and select "Open", but then I am greeted with a message that says "No face info found. Would you like to extract faces for the model?"
Screen Shot 2021-03-16 at 6.20.30 PM.png
Screen Shot 2021-03-16 at 6.20.30 PM.png (57.19 KiB) Viewed 340 times
If I select "Yes" I then have to choose the separation angle and press okay. At this point I was hoping to at least see some model, but the model is not visible, and there appears to be no face info when I open the "SV Modeling" tab and select my model from the Data Manager.

I have included a link to a simple pipe model as a .vtk and .stl at the drive link here:https://drive.google.com/drive/folders/ ... sp=sharing

Required info: MacOS 11.2.3, SimVascular 2020.04.06

Thanks,
Dan

User avatar
David Parker
Posts: 1716
Joined: Tue Aug 23, 2005 2:43 pm

Re: Importing complete mesh for simulation

Post by David Parker » Wed Mar 17, 2021 11:45 am

Hi Dan,

I had a look at the STL and VTK files.

The STL file is defining quads and not triangles (standard) so our reading can't read it properly. Export your model using triangles and this should be able to be read correctly.

The .vtk file defines an unstructured mesh of bricks, SV is expecting a polygonal surface.

SV should be displaying a popup with an error message for this but is not. I've opened an Issue for this https://github.com/SimVascular/SimVascular/issues/822.

Cheers,
Dave

User avatar
Daniel Emerson
Posts: 12
Joined: Fri Jul 17, 2020 4:33 pm

Re: Importing complete mesh for simulation

Post by Daniel Emerson » Fri Mar 19, 2021 9:58 am

Thank you Dave! I am able to import my mesh now without issue.

Now,with my .stl imported as the "model", I would then need to generate a volumetric mesh within SimVascular using TetGen under the "SV Meshing" utility.

My issue is that I need to use a specific volumetric mesh for my simulations in SimVascular. Is there a way I can provide SimVascular a volumetric mesh with tetrahedral elements as a .mesh or some other volumetric mesh file format?

Alternatively, if I could export the TetGen volumetric mesh file from SimVascular I could try importing file that into my other CFD simulation software.

Thanks,
Dan

User avatar
David Parker
Posts: 1716
Joined: Tue Aug 23, 2005 2:43 pm

Re: Importing complete mesh for simulation

Post by David Parker » Fri Mar 19, 2021 1:28 pm

Hi Dan,

There is currently no way to import a mesh into SV. You will need to convert a mesh file into a VTK .vtu file that SV can use, need to define GlobalNodeID, ModelRegionID and GlobalElementID VTK Data arrays.

The SV .vtu mesh file is located in the project's Meshes directory. You can convert that into any format using VTK.

Cheers,
Dave

POST REPLY