1 October 2019 at 10 h 19 min #14323
I would like to know if/how this can be done with SOFA:
I need to consider a straight beam (e.g. as defined in BeamFEMForceField.scn, or with a loaded input mesh and a HexahedronFEMForceField) whose initial deformation would be fully defined by its vertex positions. I want to simulate the behaviour of the beam once released.
Thanks for your help
Pierre1 October 2019 at 10 h 41 min #14324
If I understood correctly, you are looking for loading a pre-loaded (pre-stressed) object. An you would like to compute the motion back to a rest (stress-free) configuration. Is that correct ?
It is possible to load a deformed geometry. But it is far from being trivial to compute back the rest geometry. This is called inverse mechanical modeling. I know it has been already investigated around SOFA. I will try to gather some info/references.
Hugo1 October 2019 at 10 h 55 min #14325
Thanks for your quick answer.
Yes you understood correctly: this is a pre-loaded beam. In my case the end configuration is actually not stress-free, but this beam will have to find its position into a rigid object (collisions included). But the real rest geometry of the beam is actually known, its is just straight, fully defined by some input obj mesh.
Pierre1 October 2019 at 11 h 01 min #14326
I would therefore go for a simulation in two steps: first compute the deformed geometry from your rest position, second release it with the desired collisions. Would this suit your need? Is there a reason you don’t want to simulate the first step ?
Hugo1 October 2019 at 11 h 12 min #14327
I like this two-step approach. I think it is suitable in my case, I just ignored one could specify a target deformation state defined by vertex-wise positions. Could you please provide a link to an example scn?
Pierre1 October 2019 at 16 h 34 min #14328
I guess the solution is in the use of FixedTranslationConstraint. I will try to follow this way.
Pierre1 October 2019 at 17 h 53 min #14330
I have no experience with FixedTranslationConstraint. I just tried it, it seems a bit complicated to use.
What you want to do in step 1 is actually a registration. You can do it by minimizing energy between the two configurations. This idea is shown in the plugin Registration: applications/plugins/Registration/examples/ICPRegistration_MeshSpring.scn
I would go this way.
Let me know how this works for you.
Hugo2 October 2019 at 10 h 40 min #14339
Thanks, that’s interesting. I think this could work, but unfortunately the QPL license of the plugin may become a problem at some point.
I am surprised there is no simple way to specify a constraint as a series of target positions for a subset of the input vertices. I find no example with FixedTranslationConstraint.
Pierre7 October 2019 at 17 h 55 min #14355
Was the approach described in the scene ICPRegistration_MeshSpring.scn fitting your needs though?
You could also have a look at another example: examples/Components/constraint/AffineMovementConstraint.scn
Hugo9 October 2019 at 16 h 34 min #14365
The deformation is actually such that none of these methods is actually a solution. I need to reconsider the whole problem I guess.
Pierre10 October 2019 at 16 h 03 min #14368
I’ve thought about an alternative process but I cannot find the appropriate method:
I would like to load the deformed beam as a mesh (obj), and define a MeshSpringForceField (or something similar) whose initial parameters represent the pre-stress. I guess this could be fully determined by the contraction/elongation values of each edge, which I know. What do you think ?
Pierre10 October 2019 at 22 h 36 min #14369
If I understand correctly, you want to load the two configuration:
– the rest volumetric mesh
– the deformed surface mesh
and use a MeshSpringForceField to fit both and recover the stressed configuration.
Is this what you target?
Hugo11 October 2019 at 10 h 39 min #14374
not exactly, sorry it was not clear. I am now considering a problem in one step only.
I would like to load the deformed shape only (volumetric mesh), and define a MeshSpringForceField which would be aware of all the rest edge lengths (those of the beam in its – straight – rest position). Initial forces would be derived from these initial displacements.
So I would not have to load this straight beam (whose connectivity is the same) but just its edge lengths.
I hope it is clearer now.
Pierre11 October 2019 at 19 h 42 min #14396
I think what you want to do is to fill the MechanicalObject with the field
positioncontaining the deformed positions and the field
rest_positionwith the undeformed positions. However, the internal forces computation might depend from the code you are using. Which FEM constitutive model are you using?
Hugo12 November 2019 at 13 h 31 min #14584
Thanks, it works. I load a hexahedron gmsh mesh and specify the rest position coordinates in the scn file, then I use either a HexahedronFEMForceField or a TetrahedronFEMForceField.
Unfortunately I cannot figure out how to properly define a collision model for this deformable object. Whatever I tried has caused crashes so far. Is there a good example scene where the collision model is derived/mapped from a parent with hexahedral elements, maybe with some topological mapping in between ?
Pierre27 November 2019 at 16 h 33 min #14635
Sorry for the delay of my reply, we have been busy with the SOFA Week. You can find out more about this annual community event on SofaFramework’s YouTube account.
To assist you in defining a proper collision model, having your complete scene or a simplified version of it would help. There is several examples in SOFA but it depends on the method you want to use:
– for the detection : discrete intersection, distance maps.
– for the resolution : penalty method, or Lagrange multiplier resolution
Documentation is available on this online:
Hugo17 October 2021 at 1 h 41 min #20629HadiParticipant
- King\'s College London
Thanks for the helpful discussion.17 October 2021 at 21 h 47 min #20636
- You must be logged in to reply to this topic.