Hi everybody,
I am trying to get my head around how HuntCrossleyForce.cpp calculates 's1' & 's2' as outlined in the appendix of Sherman et al. (2011).
I have included a sphere and a half-space - in the Model file as follows, where I have set a 'stiffness' :
<HuntCrossleyForce name="Foot_Ground_R1">
<!--Material properties.-->
<HuntCrossleyForce::ContactParametersSet name="contact_parameters">
<objects>
<HuntCrossleyForce::ContactParameters>
<!--Names of geometry objects affected by these parameters.-->
<geometry>ground right_1</geometry>
<stiffness>1000000</stiffness>
<dissipation>1.5</dissipation>
<static_friction>0.8</static_friction>
<dynamic_friction>0.8</dynamic_friction>
<viscous_friction>0</viscous_friction>
</HuntCrossleyForce::ContactParameters>
</objects>
<groups />
</HuntCrossleyForce::ContactParametersSet>
<!--Slip velocity (creep) at which peak static friction occurs.-->
<transition_velocity>0.1</transition_velocity>
</HuntCrossleyForce>
In the following line from: https://github.com/mitkof6/simbody/blob ... e.cpp#L115
s1 is calculated by the individual stiffness properties of the sphere and half-space. How are these parameter values calculated when I have only specified the 'overall stiffness'?
Also, I tried to search for the method 'getParameters' and class 'Parameters' used in lines 110 and 111. Please could somebody explain why I am not able to find those in the OpenSim or SimBody doxygen?
Kind regards,
Nicos Haralabidis
HuntCrossleyForce...getParameters(contact.getSurface1());
- Nicos Haralabidis
- Posts: 196
- Joined: Tue Aug 16, 2016 1:46 am
- Michael Sherman
- Posts: 807
- Joined: Fri Apr 01, 2005 6:05 pm
Re: HuntCrossleyForce...getParameters(contact.getSurface1());
Hi, Nicos.
Simbody contains a variety of contact methods. The paper refers to the implementation using a CompliantContactSubsystem, for which the relevant code is here. You can see that it requires two materials, and obtains separate stiffnesses from each material. That does not use the HuntCrossleyForce element you were looking at.
There was an older subsystem, GeneralContactSubsystem, that used that force element and that code is still available in Simbody. It is not clear to me which of those OpenSim is using, but if it takes only a single stiffness it is assuming either that the two materials are identical or that someone has precalculated the composite properties.
If you look at Simbody's ExampleContactPlayground you can see the newer implementation in use, with the old method commented out. The older one takes only a single set of contact parameters.
Your observation makes me think OpenSim is using Simbody's older contact implementation. Possibly an OpenSim developer can say for sure?
Regards,
Sherm
Simbody contains a variety of contact methods. The paper refers to the implementation using a CompliantContactSubsystem, for which the relevant code is here. You can see that it requires two materials, and obtains separate stiffnesses from each material. That does not use the HuntCrossleyForce element you were looking at.
There was an older subsystem, GeneralContactSubsystem, that used that force element and that code is still available in Simbody. It is not clear to me which of those OpenSim is using, but if it takes only a single stiffness it is assuming either that the two materials are identical or that someone has precalculated the composite properties.
If you look at Simbody's ExampleContactPlayground you can see the newer implementation in use, with the old method commented out. The older one takes only a single set of contact parameters.
Your observation makes me think OpenSim is using Simbody's older contact implementation. Possibly an OpenSim developer can say for sure?
Regards,
Sherm
- Nicos Haralabidis
- Posts: 196
- Joined: Tue Aug 16, 2016 1:46 am
Re: HuntCrossleyForce...getParameters(contact.getSurface1());
Hello Sherm,
Thank you for clarifying that the model described in your article is in relation to a CompliantContactSubsystem.
I will try to find the OpenSim HuntCrossley class through the OpenSim GitHub page and report back.
Thank you for your help!
Kind regards,
Nicos Haralabidis
Thank you for clarifying that the model described in your article is in relation to a CompliantContactSubsystem.
I will try to find the OpenSim HuntCrossley class through the OpenSim GitHub page and report back.
Thank you for your help!
Kind regards,
Nicos Haralabidis