Calculations in SmoothSphereHalfSpaceForce

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Dhruv Gupta
Posts: 30
Joined: Sat Aug 29, 2015 11:23 am

Calculations in SmoothSphereHalfSpaceForce

Post by Dhruv Gupta » Sat Dec 05, 2020 11:52 am

Hello,

Thank you for OpenSim Moco. It is a great platform for faster simulations.

I am using the Hunt Crossley Force using the SmoothSphereHalfSpaceForce in Moco. On Github, I was trying to find the code where all the calculations in this code, but I could not find them. For example, the code https://github.com/opensim-org/opensim- ... eForce.cpp does not include the calculation like the code for Hunt Crossley Force in the Simbody directory (https://github.com/simbody/simbody/blob ... yForce.cpp). It seems to use the getForce or calcForceContribution methods, but those seem like methods of the parent/friend classes.

I am not an expert in C++, can you please direct me to where the actual the Hunt Crossley Force calculations (including friction) of SmoothSpaceHalfSpaceForce used in Moco are coded?

I greatly appreciate your time and effort.

Thank You
Dhruv

User avatar
Nicos Haralabidis
Posts: 190
Joined: Tue Aug 16, 2016 1:46 am

Re: Calculations in SmoothSphereHalfSpaceForce

Post by Nicos Haralabidis » Mon Dec 07, 2020 1:15 am

Hello Dhruv,

You can find the source code for the SmoothSphereHalfSpaceForce here: https://github.com/simbody/simbody/blob ... eForce.cpp

The equations for the model (normal and friction forces) can be found here:
https://simbody.github.io/3.7.0/classSi ... Force.html

Hope that helps.

Nicos

User avatar
Dhruv Gupta
Posts: 30
Joined: Sat Aug 29, 2015 11:23 am

Re: Calculations in SmoothSphereHalfSpaceForce

Post by Dhruv Gupta » Mon Jan 25, 2021 1:01 pm

Thanks Nicos, that helped!

POST REPLY