-
-
May 15, 2023 at 9:49 am
josemishael
SubscriberHi,
I have a workbench project which is executed from a Jupyter notebook. The input parameters for the workbench file is written by the notebook and call to the workbench project is made using the python function subprocess.run(). The entire process is placed in a 'for' loop. The simulation was running without any issues until one of the FE simulations ran out of memory and I had to force stop it. I restarted the simulation from avoiding the particular input which created memory shortage. Now the simulation is not entering the solving phase (At least this is what I understood from looking at the time frame) and exiting before producing the output. I am using ANSYS 2022 R2 Academic version. Things I did to rectify the problem:
- Opened Workbench and removed the "file locked" condition.
- Try to run the workbench project from windows command prompt with the input file (created by Jupyter notebook) - Successful simulation
- Reduced the number of cores from 10 to 8 to see the influence of memory. I have maximum 64GB availabile for the simulation - No change if I run from Jupyter notebook. But successful from windows command prompt.
- Changed solver from distributed to iterative - No change with Jupyter notebook
- Checked ANSYS license manager - It is running without any problem. No logs of license lose during simulation.
I am using Python 3.8.8 to run my Jupyter notebook. The python function from my Jupyter code is
def simulation():# Location of file containg ANSYS workbench executablecmd = ".../Framework/bin/Win64/RunWB2.exe"# Location of file containg ANSYS workbench journalinput_file = ".../Plate.wbjn"start = time.time()# Run the simulation in batch modesubprocess.run([cmd,'-B','-R',input_file], shell=True)end = time.time()print(end-start)I was successfully completed approximately 1500 simulations with my code. The problem started as soon as I force stopped my simulation and restarted. My understanding is that python is failing to open MAPDL solver.Can you shed some light on potential solutions for the problem? -
May 18, 2023 at 6:06 pm
mjmiddle
Ansys EmployeeAnsys doesn’t support Jupyter Notebook, and I’m not sure what it is. It looks like a web based operating system emulator.
On Windows I would suggest resetting the Ansys cache back to default. This would mean deleting or renaming %APPDATA%\Ansys\v222 while workbench is closed. The next time you launch it will recreate the cache with all defaults. I don’t know where this would be located through Jupyter Notebook, but %APPDATA% locates the user login directory in Windows:
C:\Users\{login}\AppData\Roaming
You can also delete the file.lock in the workbench project’s solution directory for the system being solved, if you think the APDL solver is not launching due to the previous crash. This really shouldn’t exist in the workbench solution directory. It would be in a temporary solution directory, such as _ProjectScratch in a parallel location with the workbench project. But even this folder has subdirectories created new for each solution so a file.lock would not limit the APDL solver from running.
I assume your Plate.wbjn loads or creates a workbench project and does the update command to start the solution?
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Solver Pivot Warning in Beam Element Model
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- User manual
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- whether have the difference between using contact and target bodies
- material damping and modal analysis
- Colors and Mesh Display
-
5162
-
3251
-
2443
-
1308
-
956
© 2023 Copyright ANSYS, Inc. All rights reserved.