Spaces:
Build error
Build error
Create ansys_simulation.py
Browse files
simulators/ansys_simulation.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from ansys.mapdl.core import launch_mapdl
|
| 2 |
+
|
| 3 |
+
def run_ansys_simulation(apdl_file):
|
| 4 |
+
mapdl = launch_mapdl()
|
| 5 |
+
mapdl.input(apdl_file)
|
| 6 |
+
max_stress = mapdl.get_value("NODE", 0, "S", "EQV")
|
| 7 |
+
deformation = mapdl.get_value("NODE", 0, "U", "SUM")
|
| 8 |
+
mapdl.exit()
|
| 9 |
+
return max_stress, deformation
|