Page 1 of 1

Elastic Foundation Forces not visible in Force Reporter

Posted: Mon Jun 29, 2015 11:37 am
by newberrr
I am trying to use forward dynamics to find the force generated on the bottom of the foot by the flexor digitorum. I created pairs of plate-like bodies to go under the foot, then used contact mesh and elastic foundation force to attach the bodies to each other and the foot or ground. I have a control file that runs for 10 seconds and activates the flexor digitorum at t=2, but when I run forward dynamics the foot falls before that and the plates go through each other, rather than resisting the motion. I turned off gravity already and can't figure out why it's behaving like this. The plot will allow me to graph any or the muscle forces, but the elastic foundation forces are not available. I have already added mass to the bones to run forward dynamics because the model I'm using started with mass-less bodies. What could be causing these problems?

Re: Elastic Foundation Forces not visible in Force Reporter

Posted: Mon Jun 29, 2015 2:43 pm
by newberrr
Update: I moved the mesh around a bit and got this error
Bad call to Simbody API method ContactGeometry::TriangleMesh::Impl::TriangleMesh::Impl(): Each edge must be shared by exactly two faces. (Required condition 'iter2 != backwardEdges.end()' was not met.)
After that I changed the ground ones to be contact spheres instead of contact meshes. It's back to the same behavior as before.

Re: Elastic Foundation Forces not visible in Force Reporter

Posted: Tue Jun 30, 2015 11:02 am
by newberrr
java.lang.RuntimeException: SimTK Exception thrown at ContactGeometry_TriangleMesh.cpp:472:
Bad call to Simbody API method ContactGeometry::TriangleMesh::Impl::TriangleMesh::Impl(): Each edge must be shared by exactly two faces.
(Required condition 'iter2 != backwardEdges.end()' was not met.)
at org.opensim.modeling.opensimModelJNI.Model_initSystem(Native Method)
at org.opensim.modeling.Model.initSystem(Model.java:179)
at org.opensim.view.pub.OpenSimDB.addModel(OpenSimDB.java:138)
at org.opensim.view.pub.OpenSimDB.addModel(OpenSimDB.java:133)
at org.opensim.view.FileOpenOsimModelAction$1.run(FileOpenOsimModelAction.java:95)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


What does this error mean and how do I fix it?

Re: Elastic Foundation Forces not visible in Force Reporter

Posted: Tue Jun 30, 2015 12:50 pm
by sherm
This likely means there is a hole in the mesh. Elastic Foundation meshes have to be "water tight". Even if you intend only to bump into one side of it, the back side must also be closed off. To test this you should make a very simple closed mesh (maybe mesh a sphere) to make sure that works. Then to use your own mesh you may have to clean it up with some mesh editing software like MeshLab.

Sherm