Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

How to properly trace a python script working in a transient analysis or not?

    • Baloch
      Subscriber

      Dear All,

      I am using a python script to control longitudinal spring in transient analysis. How I can make it sure whether the script is working or not? Because when I run the problem and looking into solver output there is no information in the solver out put about the script.

    • ErKo
      Ansys Employee
      Hi

      I would try to run a simple test case (as shown below), where you use this script, and thus expect a certain behaviour.

      So say the spring changes stiffness halfway through the analysis (say from 1 N/mm to 2 N/mm at time 9.5 sec.) then in the spring probe for the spring which is just attached to a block which is being pulled by a constant displacement (1 mm), we should see the force in the spring doubling from 1 N to 2 N, just as shown below so that is a simple example on how to see that the script (apdl to have time dependent stiffness) works.
      Of course one can create many different type of tests so this is just a simple one for reference, and in order to explain how one can check if a script does what it is supposed to do.

      All the best

      Erik


    • Baloch
      Subscriber
      Dear
      If possible can you share a snap of the apdl script you used?
    • ErKo
      Ansys Employee
      Hi

      See this post where the snippet is shown - the only difference here is tha the *dim array kfreq should be a function of time not frequency,
      so the array is ktime called say and defined as:
      *DIM,ktime,table,5,1,,TIME
      RMODIF,_sid,1,%ktime%

      Of course you need to assign the appropriate values to ktime just as is done in that post for kfreq - of course you need your own time and stiffness values, this is just for reference.
      For more info see the *DIM, and RMODIF commands.

      All the best

      Erik



Viewing 3 reply threads
  • The topic ‘How to properly trace a python script working in a transient analysis or not?’ is closed to new replies.
[bingo_chatbox]