Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
Save comsol file as M.file, but without any parameter of geometry in script
Posted Feb 10, 2012, 4:46 p.m. EST Geometry Version 3.5a 4 Replies
Please login with a confirmed email address before reporting spam
Hi everyone,
I builded my model based on comsol 3.5a version, and then save it as to M.file. But when I save comsol file as to the .m file, the geometry file was produced as flbinary file .mphm (the example I list below). I do not want to get this script (flbilary), since the geometry parameter can not be changed. is there anybody know how to solve this problem?
Thanks.
% The name of this file is given by the variable 'flbinaryfile'.
flclear fem
% COMSOL version
clear vrsn
vrsn.name = 'COMSOL 3.5';
vrsn.ext = 'a';
vrsn.major = 0;
vrsn.build = 603;
vrsn.rcs = '$Name: $';
vrsn.date = '$Date: 2008/12/03 17:02:19 $';
fem.version = vrsn;
flbinaryfile='1.mphm';
% Geometry
clear draw
g247=flbinary('g247','draw',flbinaryfile);
draw.s.objs = {g247};
draw.s.name = {'CO1'};
draw.s.tags = {'g247'};
fem.draw = draw;
fem.geom = geomcsg(fem);
fem.mesh = flbinary('m1','mesh',flbinaryfile);
% (Default values are not included)
I want the form like this so that I can change the geometry parameter.
g1=ellip2(0.2,0.2,'base','center','pos',[0.4,-0.4]);
g2=ellip2(r,r,'base','center','pos',{'0','0'},'rot','0');
garr=geomarrayr(g2,pitch,pitch/sqrt(3),5,8);
[g40,g41,g42,g43,g44,g45,g46,g47,g48,g49,g50,g51,g52,g53,g54,g55,g56,g57,g58,g59,g60,g61,g62,g63,g64,g65,g66,g67,g68,g69,g70,g71,g72,g73,g74,g75,g76,g77,g78,g79]=deal(garr{:});
g80=ellip2(2.0E-4,2.0E-4,'base','center','pos',[-0.0010,6.0E-4]);
g81=ellip2(r,r,'base','center','pos',{pitch/2,pitch/(2*sqrt(3))},'rot','0');
I builded my model based on comsol 3.5a version, and then save it as to M.file. But when I save comsol file as to the .m file, the geometry file was produced as flbinary file .mphm (the example I list below). I do not want to get this script (flbilary), since the geometry parameter can not be changed. is there anybody know how to solve this problem?
Thanks.
% The name of this file is given by the variable 'flbinaryfile'.
flclear fem
% COMSOL version
clear vrsn
vrsn.name = 'COMSOL 3.5';
vrsn.ext = 'a';
vrsn.major = 0;
vrsn.build = 603;
vrsn.rcs = '$Name: $';
vrsn.date = '$Date: 2008/12/03 17:02:19 $';
fem.version = vrsn;
flbinaryfile='1.mphm';
% Geometry
clear draw
g247=flbinary('g247','draw',flbinaryfile);
draw.s.objs = {g247};
draw.s.name = {'CO1'};
draw.s.tags = {'g247'};
fem.draw = draw;
fem.geom = geomcsg(fem);
fem.mesh = flbinary('m1','mesh',flbinaryfile);
% (Default values are not included)
I want the form like this so that I can change the geometry parameter.
g1=ellip2(0.2,0.2,'base','center','pos',[0.4,-0.4]);
g2=ellip2(r,r,'base','center','pos',{'0','0'},'rot','0');
garr=geomarrayr(g2,pitch,pitch/sqrt(3),5,8);
[g40,g41,g42,g43,g44,g45,g46,g47,g48,g49,g50,g51,g52,g53,g54,g55,g56,g57,g58,g59,g60,g61,g62,g63,g64,g65,g66,g67,g68,g69,g70,g71,g72,g73,g74,g75,g76,g77,g78,g79]=deal(garr{:});
g80=ellip2(2.0E-4,2.0E-4,'base','center','pos',[-0.0010,6.0E-4]);
g81=ellip2(r,r,'base','center','pos',{pitch/2,pitch/(2*sqrt(3))},'rot','0');
4 Replies Last Post Apr 9, 2014, 7:13 p.m. EDT