How to add force component values in the form of expressions using python code?

Nithin Nallani
Nithin Nallani Altair Community Member
edited July 2023 in Community Q&A

Hi, I am trying to add forces at multiple points. Its tedious to add them manually. So I started defining markers at those points, by writing my script in python window. I referred to "Motionview Python Reference Guide". All my required markers were created using the script. Now I am trying to add forces at those same points. But I am unable to find the syntax to add expressions for force components. I already referred to Force documentation in "Motionview Python Reference Guide". I can't find syntax to add force component expressions. Altair team should have mentioned it clearly in the documentation.

Can anyone please help me with this issue? 

Thanks in advance.

 

Answers

  • Jongsung
    Jongsung
    Altair Employee
    edited July 2023

    Hi Nithin,

    Could you try this example? 

    force1.fy.expr= '`sin(2*pi*time)`'

    Regards,

    Jongsung