- This topic has 0 replies, 1 voice, and was last updated 6 years, 2 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › Estimating external force on a vertex
I am trying to build a scene (with 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))
where self.node is 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 LinearForceField type 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.getChild('myRootNode').getObject('myMech').findData('force').value[self.node]
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.
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.
