ROM Simulation - Project results to 3D mesh issues

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

ROM Simulation - Project results to 3D mesh issues

Post by Charlie Bright » Fri Oct 15, 2021 8:55 am

Hi SV Devs,

I think this question is best aimed at Martin/people involved with the ROM solver.
I've been trying to trick the ROMsolver into projecting the results of a 1D sim onto a MeshSim mesh, which has proved a more little complicated then it sounds. Hopefully this explains my issues well enough.
A link to my project files:
https://drive.google.com/drive/folders/ ... sp=sharing

In the project folder, I have a model of a patient's anatomy made with the Parasolid model type (Aorta_Model_cm) and a corresponding mesh made with MeshSim (Aorta_Mesh_3M).
However, as the ROM simulation's centreline calculation only appears to work with PolyData models, I created a 2nd model by converting the model into the PolyData model type (Aorta_Model_cm_PolyData).

I've been speaking with Dave trying to get the 'Project results to 3D mesh' option from the ROMsimulation tab to project the results of a 1D simulation (that uses the PolyData model) to the MeshSim mesh (created from the Parasolid model).
We've explored a few different options, but the only one that seems to have worked is to use the Python Console built into SV and run the Project_Results.py script found in the OneD_Projection_Tests directory within the project. The script calls the extract_results.run() function and points the volume_mesh_file object to the MeshSim mesh file in an existing 3D simulation also in the project.

This gives me a .vtu file filled with the projected information (thanks again Dave!), however when I try to use this file as the initial conditions for a 3D simulation I get a segmentation fault:
Error from Manchester's HPC -

Code: Select all

/usr/local/bin/svsolver: line 58: 23895 Segmentation fault      $SV_HOME/bin/svsolver $*
Error on local machine -

Code: Select all

/usr/local/sv/svsolver/2021-06-15/svsolver: line 58:  3697 Segmentation fault      (core dumped) $SV_HOME/bin/svsolver $*
This happens regardless of how I set the initial conditions ((a) by specifying the path to the projected-file in the 'Basic parameters' tab, or (b)when I replace'restart.0.1' with the projected-file).

Do you have any suggestions as to what is causing this error?

Best wishes,
Charlie

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

Re: ROM Simulation - Project results to 3D mesh issues

Post by David Parker » Mon Oct 18, 2021 3:07 pm

Hi Charlie,

I had a look at your project. The problem is that almost all of the .vtp files in Simulations/Projection_Validation_IC/mesh-complete/mesh-surfaces are empty. This is causing Create Data Files for Simulation to fail with ERROR: problem finding GlobalNodeIDERROR: command could not be processed. Be sure to check the Details of the popup displayed after completion, errors are not always reported it seems.

Because of this error a new geombc.dat.1 was not being created and this was causing the solver to fail.

Cheers,
Dave
Attachments
Screen Shot 2021-10-18 at 3.01.12 PM.png
Screen Shot 2021-10-18 at 3.01.12 PM.png (72.66 KiB) Viewed 516 times

User avatar
Martin Pfaller
Posts: 59
Joined: Tue Oct 01, 2019 10:23 am

Re: ROM Simulation - Project results to 3D mesh issues

Post by Martin Pfaller » Mon Oct 18, 2021 6:06 pm

Hi Charlie,

I'm super happy that you're using our methods! I also had a look at your project, it seems like the line

read_pressure_velocity_vtu ...

is missing from your .svpre file. I upload a project with initial conditions for reference here:

https://drive.google.com/file/d/1e6_6q7 ... sp=sharing

Maybe you can try manually editing your .svpre file and then run it with svpre?

Let me know if it works!

Martin

User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

Re: ROM Simulation - Project results to 3D mesh issues

Post by Charlie Bright » Wed Oct 20, 2021 5:20 am

Hi Dave & Martin,

Thank you both for getting back so quickly.

To Dave:
I see what you mean about the files being empty.
I opened one of the cap files from the 'mesh-complete/mesh-surfaces/' directory with ParaView and compared it with a cap file from Martin's project linked above. Martin's files contain much more data than mine (see images)!
My surface files do contain 'GlobalNodeID' data though, so I am unsure of what the GlobalNodeIDERROR is referring to.

I also opened the mesh files stored in 'Meshes/' directory and found that neither the .vtu or .vtp files for the MeshSim mesh contained the missing data - so I thought it might be a problem with MeshSim over TetGen.
So I created a mesh for the PolyData model using TetGen, but checking the mesh in ParaView I also found that it was empty. I've updated the files within the project link in my original post to reflect this if you want to check them out. I also have summarised what data is stored in each mesh at the bottom of this post for you to glance at. But in short, I'm not sure why I seem to be missing information - do you have any idea of the cause?

To Martin:
You're right about the missing line in the .svpre file for the IC test simulation.
However, I think that when I pressed "Created Data Files for Simulation" through the GUI, it took the file I pointed to under 'Basic Parameters -> IC File' and used that to create the restart.0.1. Hence that is why it didn't include the line within the .svpre code (the restart.0.1 file is over 1GB so I think that's what happened).

I went back and created the data-files by creating my own .svpre file from your example and calling svPre from the command line. I've uploaded these files to the Google Drive from the original post under the path 'Simulations/Projection_Validation_CommandLine'. Using this method the restart.0.1 file was much smaller (11MB compared to the previous 1GB).

I've been able to call svSolver via the command line after making the solver.inp and rcrt.dat files for the simulation. Right now it looks to be working well, although it is currently only on timestep 13 so I will have to get back to you on if the initial conditions from the projected file actually applied using this method.
Out of curiosity, in the .svpre file within 'Simulations/Projection_Validation_IC' I had the lines:

Code: Select all

 
initial_pressure 0
initial_velocity 0.0001 0.0001 0.0001
Could these have negatively impacted using the initial conditions file?
I removed them for my current tests.

Best wishes,
Charlie
Charlie_Inlet_Face.png
Charlie_Inlet_Face.png (40.78 KiB) Viewed 466 times
Martin_Inlet_Face.png
Martin_Inlet_Face.png (46.83 KiB) Viewed 466 times
Additional information for Dave:
----------------------------------------------
Martin's mesh-complete/mesh-surfaces/Aorta_inlet.vtp
- ActiveCells
- BadTriangle
- BooleanRegion
- FreeEdge
- GlobalBoundaryCells
- GlobalElementID
- ModelFaceID
- Normals
- GlobalBoundaryPoints
- GlobalNodeID
----------------------------------------------
Charlie's mesh-complete/mesh-surfaces/Aorta_inlet.vtp
- GlobalElementID
- GlobalElementID2
- ModelFaceID
- GlobalNodeID
----------------------------------------------
Charlie's Meshes/Aorta_Mesh_3M.vtu (MeshSim):
- GlobalElementID
- ModelRegionID
- GlobalNodeID

Charlie's Meshes/Aorta_Mesh_3M.vtp (MeshSim):
- GlobalElementID
- GlobalElementID2
- ModelFaceID
- GlobalNodeID
----------------------------------------------
Charlie's Meshes/Aorta_Mesh_PolyData.vtu (TetGen):
- GlobalElementID
- ModelRegionID
- GlobalNodeID

Charlie's Meshes/Aorta_Mesh_PolyData.vtp (TetGen):
- GlobalElementID
- ModelFaceID
- GlobalNodeID
----------------------------------------------
Martin's Meshes/0075_1001.vtu (TetGen?):
- ActiveCells
- BadTriangle
- BooleanRegion
- FreeEdge
- GlobalBoundaryCells
- GlobalElementID
- ModelFaceID
- Normals
- GlobalBoundaryPoints
- GlobalNodeID

Martin's Meshes/0075_1001.vtp (TetGen?):
- GlobalElementID
- GlobalNodeID

User avatar
Charlie Bright
Posts: 30
Joined: Mon Jan 27, 2020 3:49 am

Re: ROM Simulation - Project results to 3D mesh issues

Post by Charlie Bright » Fri Oct 22, 2021 10:27 am

Hi both,

Just to update - I tried the suggested method of modifying the .svpre file and calling svPre and it has worked!
I managed to run svSolver on the files without an error and called svPost without issue.

To test that it worked, I ran one simulation with the projected results as the IC file and a second simulation without the IC file for 10 timesteps (short on time today).
By the 10th timestep the IC file method had much higher pressure (see imgs) - so I think it's worked!

Thanks for the suggestions on the previous post. :)
I'll keep playing around with the method and let you know if I run into anymore trouble.

Best wishes,
Charlie
With_IC.png
With_IC.png (289.07 KiB) Viewed 422 times
No_IC.png
No_IC.png (284.99 KiB) Viewed 422 times

POST REPLY