21.01.2015 Views

COMSOL Multiphysics™

COMSOL Multiphysics™

COMSOL Multiphysics™

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Overview<br />

A <strong>COMSOL</strong> Multiphysics file is used to store <strong>COMSOL</strong> Multiphysics data. The<br />

format is suitable for exchange of mesh or CAD data between <strong>COMSOL</strong> Multiphysics<br />

and other software systems. It is possible to save a <strong>COMSOL</strong> Multiphysics file in a text<br />

file format, using the extension .mphtxt, or a binary file format, using the extension<br />

.mphbin. The file formats contain the same data in the same order.<br />

File Structure<br />

The <strong>COMSOL</strong> Multiphysics file format has a global version number, so that it is<br />

possible to revise the whole structure. The first entry in each file is the file format,<br />

indicated by two integers. The first integer is the major file version and the second is<br />

referred to as the minor file version. For the current version, the first two entries in a<br />

file is 0 1.<br />

The following sections describe the file structure of the supported version.<br />

FILE VERSION 0.1<br />

After the file version, the file contains three groups of data:<br />

• A number of tags stored as strings, which gives an identification for each record<br />

stored in the file.<br />

• A number of types, which are strings that can be used in serializing the object. The<br />

tag should be used as an indication of the contents of the file, but can also be an<br />

empty string.<br />

• The records containing the serialized data in the file.<br />

Example When using flsave from <strong>COMSOL</strong> Script to save a <strong>COMSOL</strong><br />

Multiphysics mesh, the tag equals the variable name (m1) in <strong>COMSOL</strong> script, the type<br />

is set to obj (but this is not used), and the record contains the serialization of the mesh<br />

object, including point coordinates and element data of the mesh. See “Examples” on<br />

page 461 for more examples of <strong>COMSOL</strong> Multiphysics text files.<br />

# Created by <strong>COMSOL</strong> Multiphysics Fri Aug 26 14:19:54 2005<br />

# Major & minor version<br />

0 1<br />

######### Tags<br />

1 # number of tags<br />

426 | CHAPTER 3: THE <strong>COMSOL</strong> MULTIPHYSICS FILES

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!