karthikmn commited on
Commit
064c922
·
verified ·
1 Parent(s): cab6415

Create ansys_simulation.py

Browse files
Files changed (1) hide show
  1. simulators/ansys_simulation.py +9 -0
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