from ansys.mapdl.core import launch_mapdl def run_simulation(script_path): try: mapdl = launch_mapdl() mapdl.input(script_path) return "Simulation completed. Results are available in the ANSYS output directory." except Exception as e: return f"Error during simulation: {str(e)}"