Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Bug in flsave command? The "bnd" information is not loaded.

Please login with a confirmed email address before reporting spam

Hi,

I use Comsol 3.5a and want to save a fem structure (that I created with MATLAB) as *.mph file.
(Other people should be able to open it from the COMSOL Interface.)

The command "flsave" should be able to save a fem structure als *.mph file,
but it seems that some data get lost.

If I run Comsol from within MATLAB with the "comsol" Command and import
the fem strukture, everything works fine: I can see my Weak terms in the
Boundary Settings Menü (Strg+F7).

If I save the fem structure with "flsave" and open it in the COMSOL Interface,
the Boundary Weak term information is missing (see attached *.mph file).

Please check the attached example file "test.mat". It can be opened in MATLAB
and contains all informaiton. How can I save the structure "fem" of this file as "*.mph"
file withoud loosing data?

Sunny regards,

Stefan





2 Replies Last Post Sep 7, 2011, 1:22 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 27, 2010, 6:22 a.m. EDT
I got following information from COMSOL support:

--------------------------------------------------------------
The reason why the boundary equation system are reset when you open a MPH
file saved from the command line is because the MULTIPHYSICS command is
called during the import.
If you want to keep the modification in the equation system you need to
set a lock field in the fem.bnd field, such as :

fem.bnd.lock=[0,1,1,1,1,0];

The command above indicate that boundaries 2 to 5 are locked while
boundaries 1 and 6 are not locked.

If you want to lock the subdomain equation you can use the field :

fem.equ.lock = ...

Then you can use the FLSAVE command and the modification of the equation
will remain when you load the FEM structure.
---------------------------------------------------------------

This solution worked for me. If you have a "multiphysics" command in your
script file, it is importand that the "fem.bnd.lock = ..."
command comes after the multiphysics command because the "multiphysics"
command would delete the lock information.




I got following information from COMSOL support: -------------------------------------------------------------- The reason why the boundary equation system are reset when you open a MPH file saved from the command line is because the MULTIPHYSICS command is called during the import. If you want to keep the modification in the equation system you need to set a lock field in the fem.bnd field, such as : fem.bnd.lock=[0,1,1,1,1,0]; The command above indicate that boundaries 2 to 5 are locked while boundaries 1 and 6 are not locked. If you want to lock the subdomain equation you can use the field : fem.equ.lock = ... Then you can use the FLSAVE command and the modification of the equation will remain when you load the FEM structure. --------------------------------------------------------------- This solution worked for me. If you have a "multiphysics" command in your script file, it is importand that the "fem.bnd.lock = ..." command comes after the multiphysics command because the "multiphysics" command would delete the lock information.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 7, 2011, 1:22 a.m. EDT
Hi, I also have some problems with the flsave command.. When I make changes in Matlab in material propeties, and even after "locking" fem.equ fields there is no change in these properties... What to do?

I wrote about this in: www.comsol.com/community/forums/general/thread/22231/
Regards,
Rafał Piotuch
Hi, I also have some problems with the flsave command.. When I make changes in Matlab in material propeties, and even after "locking" fem.equ fields there is no change in these properties... What to do? I wrote about this in: http://www.comsol.com/community/forums/general/thread/22231/ Regards, Rafał Piotuch

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.