How and When to Open Recovery Files in COMSOL Multiphysics®

February 7, 2017

The Open Recovery File feature is a somewhat unknown feature in the COMSOL Multiphysics® software, but it’s useful for anyone running simulations that give multiple solutions. If, for any reason, the software shuts down before the simulation finishes, you can open a recovery file so that you don’t lose your work. Here, we highlight a tutorial video on how to open these files to recover “lost” work as well as go over the strengths and limitations of this feature.

Tutorial Video: How to Open Recovery Files

When to Open Recovery Files in COMSOL Multiphysics®

The Open Recovery Files feature is useful for anyone running simulations with multiple parameters, namely:

  • Time-dependent studies
  • Frequency domain studies
  • Auxiliary sweeps
  • Parametric sweeps

While these simulations are running, a recovery file is created after the first solution is found and is then updated after each solved iteration. The recovery file is also updated following any of these three events:

  1. After solving for a specified output time in a time-dependent simulation
  2. After each parametric value in a parametric simulation
  3. After each iteration of a nonlinear stationary simulation

If, at any point in your simulation, COMSOL Multiphysics closes unexpectedly, you can open the recovery file with the saved solutions. You can then continue running the simulation from where it left off.

Screenshot of the Open Recovery File window in COMSOL Multiphysics.
The Open Recovery File window. You can view additional details by clicking on the Show/Hide Details button.

Note: As of version 5.3a of the COMSOL Multiphysics® software, the button to open recovery files is located on the Home > Windows button on the Model Builder ribbon.

To learn more about the ins and outs of this feature, watch the video at the top of this post, where we discuss everything you need to know about opening recovery files. First, we open a model and run a simulation. After waiting until the simulation is nearly done, we force quit the software so that we may reopen it and finish the simulation.

Additional Resources

Categories


Comments (4)

Leave a Comment
Log In | Registration
Loading...
James D Freels
James D Freels
February 10, 2017

Thank you Andrew for posting this blog article. The recovery feature is perhaps one of the most valuable features of COMSOL if you depend on network stability and you tend to run very long running jobs (in my case the nonlinear, stationary type that you mentioned). This problem has been improved in recent versions of COMSOL for users of the floating network license since the license manager now allows COMSOL to keep running and/or get reconnected following a loss of the license manager connection over the network.

Another, perhaps unsupported, feature of COMSOL that I have exploited with our floating network license and additional available seats of our licenses is to monitor the results of the long-running jobs on another machine. By copying the recovery directory needed. and modifying the comsol.recoveries file, the user can then open the model and current results on another computer. Then the user can examine the results with the GUI of the current status of the running job. This helps to make sure you want to keep the job running, and perhaps help to determine how much longer the job may run, or if it is good enough already. You can get more information than is available from the running job graphical results, or batch job. Perhaps this is something that you can also do with the COMSOL Server License and an App?

Another important thing to remember about recovery files is to clear them out occasionally if you keep them activated for your simulations. Over time, the recovery files can take up a lot of disk space that you can easily clear out to free up disk space on your machines.

I feel like that COMSOL has not taken full advantage of the recovery feature. For example, a “viewer” feature that did not take up a license that uses these recover files might be a great thing to have. Another might be to optionally save the nonlinear iteration steps of the stationary solver and have a recovery feature that might allow the user to pick a previous iteration to restart his stationary simulation with modified settings.

Recovery is another great feature of COMSOL, and adds to the many reasons I use COMSOL.

Amit Kunte
Amit Kunte
May 18, 2024

Hi James,
I am also using the FNL to run remote jobs, but have no way to monitor the results while the job is running, as there is no simple way to save intermediate solution in a long running time dependent solution.
As per your post, the recovery files can be used to monitor the progress after copying them in local machine. To save the files at regular intervals during a run, I modified the ‘recovery saving’ and ‘Force save of recovery file’ settings in the ‘advanced’ section of the time dependent solver to saving ratio of ‘0.1’ and ‘save every’ to 300s.
But the file is not getting updated in the recoveries folder as per the timestamp.

Andrew Griesmer
Andrew Griesmer
February 16, 2017 COMSOL Employee

Hi James, thanks for the comment, it’s great to hear that people are taking advantage of this functionality, and we always appreciate the feedback.

With the release of COMSOL Multiphysics 5.3a, the Recovery Files window opens when the software is launched, if there are any recovery files. The files are listed with date, time, a reference to the name of the original MPH file, as well as the size of the recovery file. This makes it easier to manage the recoveries folder, if you want to, for example, clear files from the recovery folder.

Charles Rambo
Charles Rambo
January 19, 2022

I have multiple recovery files, but nothing shows up when I follow this Home>Windows>Recovery files path as given above. Logically I would have to give a path to those files, but this does not appear to be available anywhere. It’s been 5 years perhaps an update is in order?

EXPLORE COMSOL BLOG