How to Reduce the Size of Your Model File
There are several things you can do to reduce the size of your COMSOL Multiphysics® model file. Here, we outline a few of the different ways, including the steps that you can employ to do this.
Update Your Preferences
COMSOL Multiphysics® saves files in either a compressed or uncompressed state. You can switch between these two options by updating your preference settings by going to: File Menu > Preferences.
Accessing the preferences through the File menu.
Under Preferences > Files and in the section of settings titled Saving COMSOL application files, change the Optimize for drop-down menu selection to File size. All subsequent save operations will compress the file. This is not the default setting in the preferences because compressing will make save operations take a little more time.
The Preferences window, wherein the selections have been updated to the recommended settings to reduce the model file size upon saving.
Clear the Mesh and Solution
If you do not need to keep the results in your model, but only want to save the unsolved model, you can use the Clear Built Mesh button in the Mesh ribbon tab or right-click on the Mesh node within the Model Builder window and select Clear Built Mesh. This removes the mesh data and keeps the information about how the mesh was created.
The Clear Built Mesh button available in the Mesh ribbon tab.
The Clear Built Mesh function accessed through right-clicking the Mesh node.
Similarly, you can use the Clear Solutions button in the Study ribbon tab or right-click on the Study node and select 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 same mesh and solution data.
The Clear Solutions button available in the Study ribbon tab.
The Clear function accessed through right-clicking the Study node.
Reduce the Amount of Solution Data
File sizes can become significant when a lot of solution data is generated. Thus, you may want to reduce the amount of solution data contained in your model. If you want to keep some, but not all, of the solution data in your model, see our Learning Center article on reducing the amount of data stored in a model. You can follow the steps in the link provided, which will also help reduce the size of your COMSOL Multiphysics® model file.