Home › Forum › SOFA › Using SOFA › [SOLVED] creating_"skin"_of_mebrane_traingles
Tagged: 32_bits, Linux_ubuntu, SOFA_1608
- This topic has 4 replies, 2 voices, and was last updated 7 years, 8 months ago by ewpostek.
-
AuthorPosts
-
21 February 2017 at 07:15 #8647ewpostekBlocked
Hello,
I would like to cover a tetrahedral mesh with a “skin” made of triangular elements (membrane elements). The “skin” should match the nodes on the surface of the tetrahedrals, and it should have the thickness – th. The suitable mesh is done with gms. The *.msh file contains the triangles and the tetrahedrals.Would you be so kind to give a hint “how to” ?
Is it possible to make with one loading ?<MeshGmshLoader name=”meshLoader” filename=”mesh/x.msh” scale=”1″ createSubelements=”true” />
Some doubts: for example, in the
<triangularfemforcefield name=”FEM” youngModulus=”60″ poissonRatio=”0.3″ method=”large”></triangularfemforcefield>
I do not see a place for the thickness
best regards,
Elek21 February 2017 at 17:08 #8652HugoKeymasterHi Elek,
Through the mapping mechanism, you can recover the surface of your tetrahedral mesh using a Tetra2TriangleTopologicalMapping (see example in examples/Components/topology/Tetra2TriangleTopologicalMapping.scn). Then you can have a surface representation of your object with mechanical properties on it.
Here is the scene file you need for an example with a columetric and surface representation of the liver, both with mechanical properties:
<?xml version="1.0" ?> <Node name="lroot" gravity="0 -9.81 0" dt="0.02"> <VisualStyle displayFlags="hideVisualModels showBehaviorModels hideCollisionModels hideBoundingCollisionModels hideMappings hideMechanicalMappings showForceFields hideInteractionForceFields"/> <DefaultPipeline name="CollisionPipeline" verbose="0" /> <BruteForceDetection name="N2" /> <DefaultContactManager name="collision response" response="default" /> <DiscreteIntersection/> <Node name="Liver_Volume" gravity="0 -9.81 0"> <EulerImplicitSolver name="cg_odesolver" /> <CGLinearSolver name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" /> <MeshGmshLoader name="meshLoader" filename="mesh/liver.msh" /> <TetrahedronSetTopologyContainer name="topo" src="@meshLoader" /> <MechanicalObject name="dofs" src="@meshLoader" /> <TetrahedronSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <DiagonalMass name="computed using mass density" massDensity="1" /> <TetrahedralCorotationalFEMForceField template="Vec3d" name="FEM" method="large" poissonRatio="0.3" youngModulus="3000" computeGlobalMatrix="0" /> <FixedConstraint name="FixedConstraint" indices="3 39 64" /> <Node name="iver_Surface"> <include href="Objects/TriangleSetTopology.xml" src="@" tags=" " /> <Tetra2TriangleTopologicalMapping input="@../topo" output="@Container" /> <TriangularFEMForceField name="FEM" youngModulus="60" poissonRatio="0.3" method="large" /> <TriangularBendingSprings name="FEM-Bend" stiffness="300" damping="1.0" /> <TrianglePressureForceField normal="0 0 1" dmin="0.9" dmax="1.1" pressure="0.4 0 0" /> <TriangleSet /> </Node> <Node name="Visu" tags="Visual" gravity="0 -9.81 0"> <OglModel name="VisualModel" fileMesh="mesh/liver-smooth.obj" /> <BarycentricMapping name="visual mapping" input="@../dofs" output="@VisualModel" /> </Node> </Node> <ClipPlane name="Clip" normal="1 0 0" position="-2 0 0"/> </Node>
And here is the result, you can see FEM triangles on the surface and tetra in the volume:
Hope this helps.
Cheers,Hugo
23 February 2017 at 11:38 #8685ewpostekBlockedHi Hugo,
yes, it has helped, the triangles cover
the surface.
Just one concern.
Is it possible to identify the triangles on the surface
in the resulting *.vtu file (vtkExporter) ?
The total number of cells is
<Piece NumberOfPoints=”3009″ NumberOfCells=”65516″>
the tetrahedrals only – 15033;cheers,
Elek24 February 2017 at 10:46 #8698HugoKeymasterHi Elek,
In the scene I wrote above, you can find the triangles covering the surface in the component TriangleSetTopologyContainer (loaded by the Objects/TriangleSetTopology.xml). If you use your VTKExporter in this node, you should be able to export triangles on the surface only.
Does this answer your question?
Hugo
24 February 2017 at 16:17 #8704ewpostekBlockedhi Hugo,
Thank you, I think we can close
the topic,
best, Elek -
AuthorPosts
- You must be logged in to reply to this topic.