Accessing contact model parameters in Matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Kevin Hao
Posts: 4
Joined: Sat Dec 16, 2017 9:55 am

Accessing contact model parameters in Matlab

Post by Kevin Hao » Sat Mar 23, 2019 9:51 pm

Hi all! I am trying to access parameters (stiffness, friction, etc) from model files in Matlab, but I am having a hard time figuring out what functions I have available to use to access these parameters. Here are a few things I have tried:

Code: Select all

>> Model1.getForceSet().get(25)

ans =

index_plane

Code: Select all

>> Model1.getForceSet().get(25).getPropertyByIndex(1)

ans =

ElasticFoundationForce::ContactParametersSet

Section of code I am trying to access:
code.PNG
code.PNG (89.28 KiB) Viewed 207 times
Any help with how to access these parameters would be greatly appreciated!

Tags:

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

Re: Accessing contact model parameters in Matlab

Post by Dimitar Stanev » Thu Mar 28, 2019 2:18 am

You can get the force object and access its parameters through the get/set functions:

Code: Select all

force = ElasticFoundationForce.safeDownCast(Model1.getForceSet().get(25))

Code: Select all

    double getStiffness() 
    void setStiffness(double stiffness) 
    double getDissipation() 
    void setDissipation(double dissipation)
    double getStaticFriction() 
    void setStaticFriction(double friction)
    double getDynamicFriction() 
    void setDynamicFriction(double friction)
    double getViscousFriction() 
    void setViscousFriction(double friction)

POST REPLY