Home › Forum › SOFA › Using SOFA › Extract stiffness matrix
Tagged: 64_bits, Linux_ubuntu, SOFA_1509, Stiffness, tetrahedra
- This topic has 1 reply, 2 voices, and was last updated 7 years, 10 months ago by Hugo.
-
AuthorPosts
-
9 January 2017 at 18:07 #8293Sophie gBlocked
Hi,
I would want to calculate the stiffness matrix of an elastic force of a tetrahedral mesh. It would not really be for a mechanical aspect but for ‘reducing the dimension’ of my mesh (by taking the first N eigenvectors of the matrix). I though about using the TetrahedronFEMForceField, but how do I extract the matrix without modifying the code (maybe from the function computeStiffnessMatrix)? What is the best way?
Thank you!This is the idea of the scene so far :
<Node name="root" dt="0.002" showBoundingTree="0" gravity="0 0 0"> <Object type="LightManager" shadows="0" ambient="1 1 1 1"/> <Node name="MecaNode" gravity="0 0 0"> <!--Load the MESH --> <MeshVTKLoader name="meshLoader" filename="mesh.vtk" scale3d="0.001 0.001 0.001" tags="meca"/> <TetrahedronSetTopologyContainer name="Container" src="@meshLoader" tags="meca"/> <MechanicalObject template="Vec3d" name="mecaObj" src="@meshLoader" tags="meca"/> <TetrahedronSetTopoloygModifier template="Vec3d" name="Modifier" tags="meca"/> <TetrahedronSetTopologyAlgorithms template="Vec3d" name="TopoAlgo" tags="meca"/> <TetrahedronSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" tags="meca"/> <TriangleModel name="collisionmodel"/> <VariationalSymplecticSolver name="default0" tags="meca" rayleighStiffness="0" rayleighMass="0" newtonError="0.001" verbose="0" file="energy.txt"/> <!--<VariationnalSolver name="default0" tags="meca" rayleighStiffness="0.5" rayleighMass="0.5" verbose="0"/> --> <CGLinearSolver iterations="3000" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" /> <MeshMatrixMass name="mass" lumping="1" printMass="0" massDensity="1" /> <TetrahedronFEMForceField name="FEM" youngModulus="100000" poissonRatio="0.4" computeGlobalMatrix="true" method="small" /> </Node> <!-- meca --> </Node> <!-- root -->
9 January 2017 at 18:19 #8294HugoKeymasterHi Sophie !
At my best knowledge the component TetrahedronFEMForceField does not allow for K export. Using linear elasticity, you can extract the K matrix from the addDForce function (since you are using an iterative scheme).
Just for your information, we are currently working on developing cleaner, simpler and validated linear elasticity component. This export feature could indeed be included.
Best,
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.