Reducing the size of your COMSOL Multiphysics file

Solution Number: 1238
Title: Reducing the size of your COMSOL Multiphysics file
Platform:
Versions: All versions
Categories: General
Keywords:

Problem Description

I would like to reduce the size of my COMSOL Multiphysics model file.

Solution

There are several things that you can do to reduce the file size:

First, COMSOL saves files in either a compressed or uncompressed state. You can switch between these two by going to: File Menu > Preferences > Files, and in the section titled Saving COMSOL application files change to Optimize for: Size. All subsequent save operations will compress the file as well.

Second, go to File Menu > Compact History. COMSOL keeps a log of all changes made to a model file. This log can be viewed if you save the model as a Model File for Java, MATLAB or VBA (the *.java, *.m or *.vba file extensions.) If you have been working with the same file for a very long time, this log may get quite large. By compacting the history you keep only the information needed for creating the current state of the model.

Third, if you do not need to keep the results in your model, but only want to save the un-solved model, you can right-click on the Mesh node within the Model Builder and select Clear Mesh. This removes the mesh data, but keeps the information about how the mesh was created. Similarly, right-click on the Study branch and Clear Solutions. This removes the solution data, but keeps the solver information about how the solution was computed. Re-solving the model will recreate the mesh and solution data.

Fourth, if you want to keep some, but not all, of the solution data in your model, see: Knowledge Base 1255: Reducing the amount of data stored in a model


Disclaimer

COMSOL makes every reasonable effort to verify the information you view on this page. Resources and documents are provided for your information only, and COMSOL makes no explicit or implied claims to their validity. COMSOL does not assume any legal liability for the accuracy of the data disclosed. Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark details.