Recommendations to Avoid ANSYS Mechanical Database Corruption

It’s late. The report for the project that you have spent over 140 hours on in the past two weeks is due in the morning. It is crunch time. Your computer resources are maxed out while you are running a final test scenario, post-processing another Workbench Mechanical module, and grabbing screenshots while you finish up your report formatting. Then, the unutterable occurs, ok, well maybe isn’t utter-able since I’m writing it, but, in short, your run is complete, you hit save, your computer locks up, you have to force quit, but you are sure that your save was successful. And it was…mostly.

Upon re-opening your project you find that all but one of your Mechanical databases are healthy and happy. But that one, the one that you needed a final image from, is corrupted. You know this because of the error messages that pop up with the slew of text that might look something like this:

image

Your frustration is building. You have already used results from that Mechanical model and reflected it in your report, so you do not want to lose it. I feel your pain.

Since this error message pin-points the SYS.mechdb file as the problem, it is unlikely that you can recover it. I know, not what you wanted to hear. But there is a chance that the database is not corrupt. To verify that, follow the steps Ted Harris outlined in a post he made earlier this year here.

If your Mechanical model is, indeed, corrupt and you were not able to recover it from steps outlined by Ted, make note of the following list of guidelines to help avoid database corruption in the future. I received this list of recommendations from ANSYS Inc. after one of our customers experienced a similar scenario as described above.

  1. Open your project from a Local mounted disk drive
  2. Do not work off of a network drive. It is OK to save to it after you are done
  3. Do not work off of a portable USB flash drive. It is OK to save to it after you are done
  4. Software backup programs can often lock a file and prevent WB from writing to the file
  5. Virus scan programs can also lock the file, and prevent WB from writing to the file
  6. Virus scan program can sometimes find a false positive in the file, and “disinfect” it, causing corruption
  7. Determine if the problem is related to the particular computer. ANSYS has seen bad memory or failing disk drives cause problems with saving files
  8. Use Windows Update regularly
  9. Update graphics drivers as needed

Bullet points 4, 5, and 6 are items that can possibly cause corruption while running, so be aware of the times they are generally run. In addition, ANSYS has recommended that disabling the Pre-Load of the Mechanical (and Meshing) editors can reduce the risk of database corruption. Here are the steps to do that:

  1. Reboot the computer (or Close/kill all AnsysFWW.exe and AnsysWBU.exe processes)
  2. Start a new instance of Workbench to change the settings:
    Tools > Options > Mechanical > Pre-Load the Mechanical Editor (disable)
    Tools > Options > Meshing > Pre-Load the Meshing Editor
    (disable)
  3. Exit Workbench
  4. Start a new instance of Workbench and work normally

As a disclaimer, even if you follow the above guidelines, there is still the chance of losing data. To avoid losing all of your data, follow the motto: save early, save often, and with backups! You can create backups by archiving your project as you make progress so that there is always a version to fall back on. Or, if you have the disk space to handle it, you can simply “Save As.” We hope following these recommendations will save you from headache down the road.

Corrupt ANSYS Mechanical Database? You Might Be Able to Recover

Most of the time ANSYS Mechanical does a great job of keeping track of all our input and output files needed for a particular simulation. Every once in a while though, a glitch can happen which could lead to a corrupt database that gives you errors, say, if you try to reopen the ANSYS Mechanical editor. If you suspect that somehow your project database for a Mechanical model (or any other model that uses the same interface as ANSYS Mechanical) has been corrupted, you just might be able to recover it using these steps:

1. Copy any .mechdb files from the project directory to a different location. Rename them to a .mechdat extension. These will be named SYS.mechdb, SYS-1.mechdb, etc. The easiest way to find these files is to click on View > Files from the Workbench window, then scroll through the list until you find the .mechdb file or files. Then right click on each one and select “Open Containing Folder.” This will open Windows Explorer in the directory in which the file resides. You can then copy the files to a new location and rename them to .mechdat extensions.

image

image

2. Copy any .agdb (DesignModeler) files or other geometry files from the project directory to a different location. These will be named SYS.agdb , SYS-1.agdb, etc. (for DesignModeler) and can be found using View > Files as I described above. No need to rename these.

image

3. Start a new Workbench session.

4. Click File > Import. Set the type of file to import to “Importable Mechanical File”. Browse to the two .mechdat files created in step 1 (by renaming the copied .mechdb files) and import each.

image

5. If needed for geometry files, in the resulting Project Schematic in the Workbench window, right click on the first block’s geometry cell and select Replace Geometry > Browse. Browse to the copied SYS.agdb file or other geometry file from step 2. Repeat any additional analysis block in similar fashion.

image

6. Then save the project with a new name and directory. 

This should allow you to recreate a Workbench project that allows you to continue working. We hope this suggestion is helpful if the need ever arises to use it.

image

(Artwork by Eric… Ted does much nicer smiley faces)