The COMSOL File Formats > Binary Data Files and Text Data Files > File Structure

File Structure
The COMSOL Multiphysics file format has a global version number, so that it is possible to revise the whole structure. The first entry in each file is the file format, indicated by two integers. The first integer is the major file version and the second is referred to as the minor file version. For the current version, the first two entries in a file is 0 1.
The following sections describe the file structure of the supported version.
File Version 0.1
After the file version, the file contains three groups of data:
A number of tags stored as strings, which gives an identification for each record stored in the file.
A number of types, which are strings that can be used in serializing the object. The tag should be used as an indication of the contents of the file, but can also be an empty string.
The records containing the serialized data in the file.
Example
When using model.mesh(<tag>).export(<filename>) or Mesh>Export to File to save a COMSOL mesh, the tag equals the variable name (m1), the type is set to obj (but this is not used), and the record contains the serialization of the mesh object, including point coordinates and element data of the mesh. See Examples of the Serialization Format for more examples of COMSOL Multiphysics text files.
# Created by COMSOL Multiphysics Fri Aug 26 14:19:54 2005
 
# Major & minor version
0 1
######### Tags
1 # number of tags
2 m1
 
######## Types
1 # number of types
3 obj
 
######## Records
 
# A planar face object
 
0 0 1
4 Mesh # class
...