-
-
January 9, 2022 at 3:16 pm
Baloch
SubscriberDear 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.
January 10, 2022 at 7:49 amErik Kostson
Ansys EmployeeHi
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
January 12, 2022 at 1:51 pmBaloch
SubscriberDear
If possible can you share a snap of the apdl script you used?
January 12, 2022 at 2:57 pmErik Kostson
Ansys EmployeeHi
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.
Ansys Innovation SpaceTrending discussionsTop Contributors-
3437
-
1057
-
1051
-
902
-
896
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-

Ansys Assistant

Welcome to Ansys Assistant!
An AI-based virtual assistant for active Ansys Academic Customers. Please login using your university issued email address.

Hey there, you are quite inquisitive! You have hit your hourly question limit. Please retry after '10' minutes. For questions, please reach out to ansyslearn@ansys.com.
RETRY