karthikmn commited on
Commit
6d6d281
·
verified ·
1 Parent(s): bf5e54d

Create simulation.py

Browse files
Files changed (1) hide show
  1. modules/simulation.py +9 -0
modules/simulation.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from ansys.mapdl.core import launch_mapdl
2
+
3
+ def run_simulation(script_path):
4
+ try:
5
+ mapdl = launch_mapdl()
6
+ mapdl.input(script_path)
7
+ return "Simulation completed successfully. Results are stored in ANSYS output directory."
8
+ except Exception as e:
9
+ return f"Error during simulation: {str(e)}"