karthikmn commited on
Commit
ff26c0e
·
verified ·
1 Parent(s): f898211

Delete simulators/ansys_simulation.py

Browse files
Files changed (1) hide show
  1. simulators/ansys_simulation.py +0 -24
simulators/ansys_simulation.py DELETED
@@ -1,24 +0,0 @@
1
- from ansys.mapdl.core import launch_mapdl
2
-
3
- def run_ansys_simulation(apdl_file):
4
- """
5
- Run ANSYS simulation using a dynamically generated APDL script.
6
-
7
- Parameters:
8
- apdl_file (str): Path to the APDL script file.
9
-
10
- Returns:
11
- max_stress (float): Maximum stress from the simulation.
12
- deformation (float): Total deformation from the simulation.
13
- """
14
- mapdl = launch_mapdl()
15
-
16
- # Load and execute the APDL script
17
- mapdl.input(apdl_file)
18
-
19
- # Extract results
20
- max_stress = mapdl.get_value("NODE", 0, "S", "EQV") # Max equivalent stress
21
- deformation = mapdl.get_value("NODE", 0, "U", "SUM") # Total deformation
22
-
23
- mapdl.exit() # Close the session
24
- return max_stress, deformation