-
-
June 14, 2023 at 7:48 am
emmanuel.lecomte
SubscriberHello,
In an old 2018 post, we were explained how to calculate a signed Von Mises stress using this formula in a user defined result:
seqv*(sx+sy+sz+1e-6)/abs(sx+sy+sz+1e-6)
What could be the python script to put in ANSYS 2023 R1 ?
Thanks,
E.L.
-
June 14, 2023 at 8:19 am
Erik Kostson
Ansys EmployeeHi
Can you explain more what you want to do – what is the python script for signed VM, is very generic.
The above post is about user defined reusult using that expresssion which is defined by the user manually. So do you want to automate this, say by having a mechanical script that generates this user defined result ? Then the command to do this is:
ExtAPI.DataModel.Project.Model.Analyses[0].Solution.AddUserDefinedResult()
Or perhaps the question is not the above then explain much more.
All the best
Erik
-
June 14, 2023 at 11:48 am
emmanuel.lecomte
SubscriberHi,
To be more clear, I want to write a python script which calculated the signed Von Mises stress.
My simulation have 3 times steps. For each time step, I want to collect :
- the Von Mises stress,
- the SX, SY and SZ stresses,
then I want to calculate the signed Von Mises according to the formula presented in my first post.
I just want to write a python script which will give same result than user defined result.
(it will be used after in a more complex python script).
Thanks.
-
June 14, 2023 at 11:56 am
Erik Kostson
Ansys EmployeeHi
See this post on how to extract stresses and uses them as needed.
/forum/forums/topic/getting-stress-values-by-act-scripting/Also look on the the python result object (same post above)
All the best
Erik
-
June 15, 2023 at 2:14 pm
emmanuel.lecomte
SubscriberHi,
It's interesting, I'm on the right way but not yet arrived.
Now I can collect the SX, SY, SZ and Von Mises stresses, script the first part of my equation, but I dont' know how to script the "abs(sx+sy+sz+1e-6)".
Any idea ?
Thanks
E.L.
-
- The topic ‘Python script for signed Von Mises Stress’ is closed to new replies.
-
3402
-
1052
-
1051
-
896
-
872
© 2025 Copyright ANSYS, Inc. All rights reserved.