Hello Daniel Zhang
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
21 nov 2011, 17:35 GMT-5
From the manual:
Separate File for Geometry Objects in Model M-Files
Sometimes the geometry objects in the draw section of a Model M-file, which defines fem.draw, are not generated from commands but saved in a separate file. This happens in the following cases:
• When you have opened a Model M-file and afterward used Reset Model in the File menu.
• When you have imported the geometry or the FEM structure from MATLAB.
The reason is that, in those cases, the information on how to generate the geometry from commands is lost.
When you save a Model M-file—such as under the name mymodel.m—COMSOL Multiphysics also saves a file mymodel.mphm with the geometry objects. In mymodel.m the variable flbinaryfile specifies the geometry file:
flbinaryfile = 'mymodel.mphm';
The geometry objects are defined by statements such as
g1 = flbinary('g1','draw',flbinaryfile);
The function flbinary loads the object, which is identified by the tags g1 and draw, from mymodel.mphm.
From the manual:
Separate File for Geometry Objects in Model M-Files
Sometimes the geometry objects in the draw section of a Model M-file, which defines fem.draw, are not generated from commands but saved in a separate file. This happens in the following cases:
• When you have opened a Model M-file and afterward used Reset Model in the File menu.
• When you have imported the geometry or the FEM structure from MATLAB.
The reason is that, in those cases, the information on how to generate the geometry from commands is lost.
When you save a Model M-file—such as under the name mymodel.m—COMSOL Multiphysics also saves a file mymodel.mphm with the geometry objects. In mymodel.m the variable flbinaryfile specifies the geometry file:
flbinaryfile = 'mymodel.mphm';
The geometry objects are defined by statements such as
g1 = flbinary('g1','draw',flbinaryfile);
The function flbinary loads the object, which is identified by the tags g1 and draw, from mymodel.mphm.