General COMSOL tips

In the following some interesting questions and answers from COMSOL forum are collected here for a quick review.


Is there a way to check a model before running the analysis?
It seems that it is quite easy to forget something basic like specifying a material property. The analysis will still process but then generate an error.


Running COMSOL scripts in the background using MATLAB interface

comsol server </dev/null > /dev/null &
matlab -nodesktop -nosplash -r myfile

instead of simply “comsol server &” then the server process is not stopped and you can run matlab, connect to comsol server, and run your .m script, without any user-intervention nor need for X support. Also, the comsol server exits when running ModelUtil.disconnect in Matlab, so I don’t leave any process on the compute node.

Tip: Batch calculations with Matlab + Comsol 4.0a


How to recover your work from an interrupted simulation

This knowledgebase describes how to benefit from the recovery feature in COMSOL 4.1 and later. This is particularly useful if you have a long computation that for some reason was interrupted at some point, maybe due to system instability, or a network problem or power outage.

You can retrieve data that might have been saved by the automatic recovery feature.

  1. Select File->Open Recovery File and open the file with correct date.
  2. Save the file as a new file.
  3. In the new file, you should be able to right-click Study and select Continue instead of Compute in
    order to continue the solution process.

You can turn off the recovery feature in Options->Preferences->Save. Clear the Save recovery file checkbox. It is checked by default.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s