Reducing the size of your COMSOL Multiphysics file

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

Problem Description

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


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. This will slow down the saving, and re-opening, of the file.

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.

If you are working with a new model file, and have not yet generated any results, you can reduce the amount of data which will be stored during the solution. Use the Store Selections capability to save results on only a subset of your model, as described here: Minimize Your Model File Size with Storing Solution Techniques Use the Probes functionality to save only a selections of scalar outputs from your model, as described here: Probing Your Simulation Results


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.