Home › Forum › SOFA › Using SOFA › [SOLVED] composite_objects
Tagged: 32_bits, Linux_ubuntu, SOFA_1608
- This topic has 10 replies, 2 voices, and was last updated 7 years, 9 months ago by Hugo.
-
AuthorPosts
-
14 February 2017 at 15:59 #8575ewpostekBlocked
Dear Colleagues,
I would like to build a composite object.
This is just a cell with nucleus.
Therefore, I build two meshes (gmsh) with cytoplasm and with the nucleus (different mat. properties). They have common nodes on their interface.Could you give advise to build it ?
best regards,
ElekThis is just to load cytoplasm (outer mesh).
I intend enrich it with nucleus, but I stopped with assignment of the mat. properties.<Node name=”cell1.msh” 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_n/mesh_ctp_a.msh” /> <TetrahedronSetTopologyContainer name=”topo” src=”@meshLoader” /> <MechanicalObject name=”dofs” src=”@meshLoader” /> <TetrahedronSetGeometryAlgorithms template=”Vec3d” name=”GeomAlgo” /> <DiagonalMass name=”computed using mass density” massDensity=”1000″ /> <TetrahedralCorotationalFEMForceField template=”Vec3d” name=”FEM” method=”large” poissonRatio=”0.3″ youngModulus=”100″ computeGlobalMatrix=”0″ /> </Node>
14 February 2017 at 17:36 #8580HugoKeymasterHi Elek,
Would you not rather use one single mesh with heterogeneous material properties?
This would be more coherent and easy to simulate.About the xml file you wrote: be careful with the quote you use. Only the regular one (“) are recognized. Another user recently got an issue due to this.
Hope this helps.
Hugo
15 February 2017 at 00:15 #8585ewpostekBlockedHi Hugo,
Yes, it would be much better, definitely.
I simply do not see the coincidence
between ‘rphys’ variable and the
definition of the for example
<TetrahedralCorotationalFEMForceField template=”Vec3d” name=”FEM” method=”large” poissonRatio=”0.3″ youngModulus=”100″ computeGlobalMatrix=”0″ /><TetrahedralCorotationalFEMForceField template=”Vec3d” name=”FEM” method=”large” poissonRatio=”0.3″ youngModulus=”500″ computeGlobalMatrix=”0″ />
since I should set it twice for two different physical models. This is the second tet.
rphys = 1
2 4 1 1 4 654 1708 1974 2101and this is the 15032th tet with rphys = 2
15032 4 2 2 4 1319 1390 1320 3008Because both kind of elements should be
in the same Mechanical Object.best, Elek
Thank you for the hint on the (“)
17 February 2017 at 15:07 #8610ewpostekBlockedHi,
Sorry, may be it is redundant.
Would you mind to give a hint
how to build a composite object based
on one single mesh (gmsh 1.0 format) ?
(different kind of materials)kindest regards, Elek
17 February 2017 at 15:50 #8611HugoKeymasterDear Elek,
What you need is to define the elasticity of each of the tetrahedra (if you use a tetrahedral mesh). This can be done by using the data youngModulus of the TetrahedronFEMForceField. The data youngModulus is a vector of real (E). The size of this vector is the number of tets.
So, what you can do is:
- load you Gmsh mesh file
- load the elasticity vector, that you can save in a .obj file as:
v E1 v E2 v E3
- and give the elasticity vector to your TetrahedronFEMForceField
In a scene, it would look like:
<?xml version="1.0" ?> <Node name="root" > ... <MeshGmshLoader name="GmshLoader" filename="path_to/your_mesh.msh" createSubelements="true" /> <MeshObjLoader name="elasticityVectorFile" filename="path_to/elasticity_vector.obj" /> ... <TetrahedronFEMForceField youngModulus="@elasticityVectorFile.position" /> </Node>
To see the heterogeneous elasticity, you can even use the option drawHeterogeneousTetra=”1″ in your TetrahedronFEMForceField
Let us know if it works.
CheersHugo
17 February 2017 at 17:19 #8613ewpostekBlockedThank you, I will do the test on comparison
of the stiffnesses (hetero and homogenous structure).So far, I have checked the reading of the file
and the applicability of the drawHeterogeneousTetra=”1″ to
the TetrahedronFEMForceField
and TetrahedralCorotationalFEMForceFieldBoth commands read the file *pos. However, the
TetrahedralCorotationalFEMForceField gives the warning:
Unused Attribute: “drawHeterogeneousTetra” with value: “1”.Could you tell me if the vector *pos should work with
other parameters as well? Namely, Poisson’s ratio,
and for the nonlinear materials parameters like for example neohokean.
This is because I intend to have nonlinear viscous-elastic
finite strains materials in the bodies.Cheers, Elek
17 February 2017 at 17:58 #8614HugoKeymasterHi Elek,
So, you succeeded in having heterogeneous Young’s modulus E, right ?
Other parameters are unfortunately homogeneous for the whole object.
Moreover, non-linear constitutive laws in SOFA exist but are in private repositories for now. Hopefully, it will soon be released open-source.Best regards,
Hugo
17 February 2017 at 22:45 #8615ewpostekBlockedHi Hugo,
Yes, I did. There still is quite much work
to build the framework of the system before
adding nonlinearities.
Best regards, Elek.18 February 2017 at 12:18 #8617HugoKeymasterSo Elek,
It means your post about getting heterogeneous elasticity is solved, right?
Cheers,Hugo
18 February 2017 at 23:03 #8619ewpostekBlockedYes, it is,
cheers, Elek19 February 2017 at 21:11 #8624HugoKeymasterNice to hear, I close it.
Best,Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.