TutorialTopologyVolumeMesh
From SOFAWiki
Tutorial : Volume Mesh Topology
- Previous Tutorial: TutorialTopologySurfaceMesh
- Next Tutorial: TutorialSurfaceToLinearTopologicalMapping
Contents |
Example Scene Using different volume meshes (static, dynamic and regular)
This example is distributed inexamples/Tutorials/Basic/TutorialTopologyVolumeDifferentMesh.scnwithin SofaSVN and SOFA distributions starting from 1.0 beta 4.
Graph
XML Description
<?xml version="1.0" ?> <!-- See https://wiki.sofa-framework.org/wiki/TutorialTopologyVolumeMesh --> <Node name="root" gravity="0 -9.86 0" dt="0.05" showBehaviorModels="1" showCollisionModels="0" showMappings="0" showForceFields="0"> <!-- Basic Components to perform the collision detection --> <DefaultPipeline name="DefaultCollisionPipeline" verbose="0"/> <BruteForceDetection name="Detection"/> <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5"/> <DefaultContactManager name="Response"/> <DefaultCollisionGroupManager name="Group"/> <Node name="Cylinder Static Mesh"> <MechanicalObject name="DOFs" template="Vec3d" translation="0 0 0" rotation="0 90 0" scale="10"/> <FixedConstraint name="FixedConstraint" template="Vec3d" indices="0"/> <UniformMass name="Mass" template="Vec3d" totalmass="50"/> <EulerImplicitSolver name="cg_odesolver" printLog="0"/> <CGLinearSolver name="linear solver" template="GraphScattered" iterations="25" tolerance="1e-09" threshold="1e-09"/> <MeshTopology name="Static Mesh" fileTopology="/home/epernod/projects/sofa-dev/trunk/Sofa/share/mesh/cylinder.msh" /> <MeshSpringForceField name="FEM-Bend" template="Vec3d"/> <TetrahedronFEMForceField name="FEM" template="Vec3d" method="polar" poissonRatio="0.3" youngModulus="1116" assembling="0"/> <TetrahedronModel name="Models"/> <OglModel name="Visual" template="ExtVec3f" color="red"/> <IdentityMapping name="Mapping" template="Mapping<Vec3d,ExtVec3f>" object1=".." object2="Visual"/> </Node> <Node name="Cylinder Regular Mesh"> <MechanicalObject name="DOFs" template="Vec3d" translation="0 0 -10" rotation="0 0 -90"/> <FixedConstraint name="FixedConstraint" template="Vec3d" indices="54 44 45 55" drawSize="0"/> <UniformMass name="Mass" template="Vec3d" totalmass="500"/> <EulerImplicitSolver name="cg_odesolver" printLog="0"/> <CGLinearSolver name="linear solver" template="GraphScattered" iterations="25" tolerance="1e-09" threshold="1e-09"/> <CylinderGridTopology name="Regular Mesh" n="10 10 10" axis="0 1 0" radius="2" length="10"/> <MeshSpringForceField name="FEM-Bend" template="Vec3d"/> <TetrahedronFEMForceField name="FEM" template="Vec3d" method="polar" poissonRatio="0.3" youngModulus="1116" assembling="0"/> <OglModel name="Visual" template="ExtVec3f" color="blue"/> <IdentityMapping name="Mapping" template="Mapping<Vec3d,ExtVec3f>" object1=".." object2="Visual"/> </Node> <Node name="Cylinder Dynamic Mesh"> <MechanicalObject name="DOFs" template="Vec3d" translation="0 0 10" rotation="0 90 0" scale="10"/> <FixedConstraint name="FixedConstraint" template="Vec3d" indices="0"/> <UniformMass name="Mass" template="Vec3d" totalmass="50"/> <EulerImplicitSolver name="cg_odesolver" printLog="0"/> <CGLinearSolver name="linear solver" template="GraphScattered" iterations="25" tolerance="1e-09" threshold="1e-09"/> <TetrahedronSetTopologyContainer name="Topology Container" fileTopology="/home/epernod/projects/sofa-dev/trunk/Sofa/share/mesh/cylinder.msh" drawTetras="0"/> <TetrahedronSetTopologyModifier name="Topology Modifier"/> <TetrahedronSetTopologyAlgorithms name="Topology Algorithms" template="Vec3d"/> <TetrahedronSetGeometryAlgorithms name="Geometry Algorithms" template="Vec3d"/> <MeshSpringForceField name="FEM-Bend" template="Vec3d"/> <TetrahedronFEMForceField name="FEM" template="Vec3d" method="polar" poissonRatio="0.3" youngModulus="1116" assembling="0"/> <TetrahedronModel name="Models"/> <OglModel name="Visual" template="ExtVec3f" color="green"/> <IdentityMapping name="Mapping" template="Mapping<Vec3d,ExtVec3f>" object1=".." object2="Visual"/> </Node> </Node>
Example Scene of different dynamic volume meshes types (tetrahedra and hexahedra)
Graph
XML Description
</source>
