TAGGED: #mechanical-#workbench, mechanical, python-apdl
-
-
October 23, 2024 at 11:25 am
camilla.gironi4
SubscriberHello everyone,
i'm working on a Static Structural simulation. I have a named selection scoped with some elements of the mesh. I would like to export a .txt file containing the element ID of these elements and their corresponding elastic modulus. Any suggestion? I tried with some scripts but nothing working at the moment.
Moreover, a doubt that I have is, if I create a second simulation consecutive to this one, with the same model, is it possible to read the previously saved .txt file and assign the specific elastic modulus indicated in that file to the elements included in the named selection?
Thank you!
-
October 23, 2024 at 12:54 pm
Erik Kostson
Ansys EmployeeÂ
Â
Â
Â
Â
Â
Â
Hi
Assuming it is Workbench mech. you are using.
One way of doing this (get Young’s mod. for mesh/elements) using ACT mechanical scripting is shown here:
https://discuss.ansys.com/discussion/4481/how-to-get-youngs-modulus-for-each-element-in-the-mesh
Â
If in APDL then looping over elements and using as below can do the same:
enow = elnext(enow)
*GET,mpid,ELEM,enow,ATTR,MAT ! get MP MAT number of el.
*GET, mpex(ii, 1), EX, mpid ! Store it in arrayÂ
For the second part, that would need APDL.
All the best
Erik
Â
Â
Â
Â
Â
Â
Â
-
- You must be logged in to reply to this topic.
-
2577
-
933
-
797
-
599
-
591
© 2025 Copyright ANSYS, Inc. All rights reserved.