Elastic Foundation Force properties

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Mary K
Posts: 37
Joined: Mon Feb 24, 2014 9:15 am

Elastic Foundation Force properties

Post by Mary K » Sun Oct 09, 2016 1:03 pm

Hello there,
I have added contact meshes to my lower limb .osim model. And now I want to add contact forces on them. (On femur and meniscii).
I figured out that Elastic Foundation Force is what OpenSim provides for this situation.

But how can I define the properties (stiffness, dissipation, static friction, dynamic friction, viscous friction) that this force needs?
I've searched in bibliography and couldn't find something helpful. Should I calculate them somehow? If yes what's the best procedure?

Thanks for your time,
Maria K.

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Elastic Foundation Force properties

Post by Dimitar Stanev » Mon Oct 10, 2016 11:27 pm

Hi Maria,

This may help:

Code: Select all

void KneeAdjustment::add_contact_geometry()
{
	ContactMesh* femur_r = new ContactMesh(
		"data/geometry/femur.obj", Vec3(0), Vec3(0), 
		m_model->updBodySet().get("femur_r"), "contact_femur_r");
	m_model->addContactGeometry(femur_r);

	ContactMesh* tibia_r = new ContactMesh(
		"data/geometry/tibia.obj", Vec3(0), Vec3(0), 
		m_model->updBodySet().get("tibia_r"), "contact_tibia_r");
	m_model->addContactGeometry(tibia_r);

	m_model->buildSystem();


	double stiffness       = 1.E6;
    double dissipation     = 1.0; 
    double staticFriction  = 0.8;
    double dynamicFriction = 0.4;
    double viscousFriction = 0.4;
 
	OpenSim::ElasticFoundationForce::ContactParameters right_knee_param;
    right_knee_param.addGeometry("contact_femur_r");
    right_knee_param.addGeometry("contact_tibia_r");
	right_knee_param.setStiffness(stiffness);
	right_knee_param.setDissipation(dissipation);
	right_knee_param.setStaticFriction(staticFriction);
	right_knee_param.setDynamicFriction(dynamicFriction);
	right_knee_param.setViscousFriction(viscousFriction);

	right_knee_param.print("data/out/param.xml");

	OpenSim::ElasticFoundationForce* right_knee_force = new OpenSim::ElasticFoundationForce();
	right_knee_force->setName("right_knee_contact");
	right_knee_force->addContactParameters(&right_knee_param);
    right_knee_force->setTransitionVelocity(0.2);
    
	right_knee_force->print("data/out/contact.xml");

    m_model->addForce(right_knee_force);
    
   /* OpenSim::HuntCrossleyForce* right_knee_contact = new OpenSim::HuntCrossleyForce(right_knee_param);
    right_knee_contact->setName("right_knee_contact");
    right_knee_contact->setTransitionVelocity(0.2);
    
    m_model->addForce(right_knee_contact);*/

	/*ContactMesh* femur_l = new ContactMesh(
		"C:/OpenSim 3.2/Geometry/l_femur.vtp", Vec3(0), Vec3(0), 
		m_model->updBodySet().get("femur_l"), "contact_femur_l");
	femur_l->setDisplayPreference(4);
	m_model->addContactGeometry(femur_l);

	ContactMesh* tibia_l = new ContactMesh(
		"C:/OpenSim 3.2/Geometry/l_tibia.vtp", Vec3(0), Vec3(0), 
		m_model->updBodySet().get("tibia_l"), "contact_tibia_l");
	tibia_l->setDisplayPreference(4);
	m_model->addContactGeometry(tibia_l);*/
}

User avatar
Mary K
Posts: 37
Joined: Mon Feb 24, 2014 9:15 am

Re: Elastic Foundation Force properties

Post by Mary K » Tue Oct 11, 2016 8:01 am

Hi Dimitar,
thanks for your reply, it was helpful.
But I did not formulate my question properly. My question is, how to validate Elastic Foundation Force property values.
Because in bibliography I can find only some of the properties or I find approximate values. Is something you validate with simulations and plots? If yes, could I have some example?

P.S. Maybe I could use the properties of your example for Femur, but still I cannot find for Meniscii dissipation and friction coefficients.

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Elastic Foundation Force properties

Post by Dimitar Stanev » Wed Oct 12, 2016 12:16 am

I think you can relate the contact parameters to measurable properties of the matter.

https://github.com/simbody/simbody/blob ... yContact.h

Best

POST REPLY