17 April 2017 at 13 h 53 min #8923
I generated FEM mesh using iso2mesh(a volumetric mesh generation tool from segmented map), and I can export the mesh data in off file. But i didn’t find the way to save the file in .obj format. Now I can load the off file which saves the node and triangle in the surface using thle MeshOffLoader. It looks like a liver that i want.
The problem is that I want to deform the liver. I studied the scene file of liver.scn and TutorialForceFieldLiverFEM.scn and TetrahedralCorotationalFEMForceField.scn and so on. But I still didnt get the key point of creating such a scene to achieve my simulation. Can anybody give me some advice?
Thanks in advance.17 April 2017 at 21 h 40 min #8926
If I understand well your process, you are generating a surface mesh from segment ted data. It means your mesh only includes points, edges et and triangles (surface). Right ?
To achieve a simulation like liver.scn or TutorialForceFieldLiverFEM.scn, you need a volumetric mesh, i.e. mesh made up of volumetric elements like tetra or hexahedra. The question coming nest is : how to generate one volumetric mesh from a surface mesh ?
This has already been discussed here : https://www.sofa-framework.org/community/forum/topic/obj-files-msh-files/
Hugo18 April 2017 at 3 h 52 min #8928
Thanks for ur reply!
The mesh that i got also contains nodes inside. I think it is already volumetric mesh now. The off file that i loaded in meshoffloader contains nodes both in surface and inside and also triangles(surface). The strange thing is if i only saved nodes in surface, it looks disorder in meshoffloader.
Now I dont know how to use or deal with these data in SOFA just using the volumtric elements that i have get, without using other components to generate again.
I am also confused with the convert between the format of these files, i.e.,.off,.obj,.msh,.stl,…
By the way, CGALPlugin cant be loaded in my work and i didn’t solve this problem, so i didnt use this plugin.
Lujain18 April 2017 at 12 h 34 min #8930
Could you share with us a preview of your volumetric mesh ? a clipping would help to see in the volume of your object.
Hugo20 April 2017 at 4 h 03 min #8966
Sorry for late reply.
I have sent my data file to your emali(I am sorry for that I dont know how to put it in the forum).
Thanks again!20 April 2017 at 9 h 13 min #896720 April 2017 at 9 h 27 min #8968
Your mesh is indeed a volumetric mesh.
Loading your *.mesh file with the MeshGmshLoader should work and then use the same structure as in the scene examples/Demos/liver.scn
This should definitely work.
Here are two pictures of your tetrahedral mesh:
Hope this helps,
Hugo20 April 2017 at 9 h 40 min #8969
I forgot to mention :
In the liver.scn scene you will find :
<EulerImplicitSolver name="cg_odesolver" /> <CGLinearSolver name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" />
This means that the simulation is based on a Euler implicit integration scheme. This scheme builds a linear system Ax=b solved iteratively by a conjugate gradient.
You will also find:
<DiagonalMass name="computed using mass density" massDensity="1" /> <TetrahedralCorotationalFEMForceField template="Vec3d" name="FEM" method="large" poissonRatio="0.3" youngModulus="3000" computeGlobalMatrix="0" />
This means that the liver has an homogeneous mass (with massDensity set to 1), integrated within the elements and lumped onto the vertices of the mesh. Finally, the mechanical constitutive law is a co-rotational FEM implementation of the linear elasticity, i.e. linear elastic model allowing for large displacement. The youngModulus is the elasticity parameter. For more, please refer to:
- a systematic approach to the element-independent corotational dynamics
- Efficient, physically plausible finite elements
Hugo21 April 2017 at 2 h 42 min #8970
Thanks very much. You helped me a lot and I can load my *.mesh file in SOFA now.
Then I will follow your advice to do next work.By the way, I also used CGALplugin to generate mesh using MeshGenerationFromImage.scn. But when I test the scene itself.It can generate mesh but can’t create vtu file. Ok,I will pull another topic.
Thanks again for your help.
You must be logged in to reply to this topic.