9 October 2019 at 16 h 33 min #14364
- INRIA, Rennes
I am trying to build a scene (with the SOFA Python plugin) where a particular vertex of a tetrahedral mesh is subjected to a sequence of translation, given by this:
node.createObject('LinearMovementConstraint',name='moveConst',template='Vec3d',relativeMovements='true',movements='4 0 0 0 4 0 0 0 4',showMovement='true', keyTimes='1 1.5 2 2.5', indices = str(self.node))
self.nodeis the vertex ID.
Given this sequence of motion, I would like to know the external, unbalanced force acting on the object to cause this deformation, i.e., the amount of force I need to apply using a
LinearForceFieldtype of object to cause the same amount of deformation in the mechanical mesh. I would like to record these forces when a steady-state has been reached and the vertex has reached the desired position.
I tried to do this using two methods:
node.createObject("Monitor" , name="myMonitor", indices=str(self.node), ExportForces='true', showForces='false',fileName='/path/to/log/file.txt')
Both these methods produce similar outputs, but they do not seem to be reasonable.
For example, at the
keyTimes, it shows the force to be zero for most of the simulation, and then suddenly jumps to a meaningful value after a few sequence of translation has already been executed.
Could you please let me know the proper way to get this done (or point me to a proper documentation for doing this). Thanks in advance.11 October 2019 at 19 h 40 min #14395
- SOFA Consortium
The first concern that I have is that you are mixing two notions of “nodes”.
I would rather name the indices that you want to pass to your constraint:
nodeis also the graph node..
The idea of looking into the force vector was good, I don’t know exactly what makes the values to suddenly jump..
Internal forces resulting from imposed displacement are computed by the mechanical constitutive law. Depending on the FEM mechanical model you are using, you could export in the C++ code the vector resulting from the
Hugo11 October 2019 at 23 h 42 min #14397
- INRIA, Rennes
So, can I assume that the VecDeriv object ‘f’ in the
addForce()method of FastTetrahedralCorotationalForceField would provide the force on each indices?
So the inverse of the resultant of all the forces is the external force needed to cause the same displacement?
If that is correct, it will neatly solve my problem. I will try this out soon.
Thanks a lot.
You must be logged in to reply to this topic.