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.
how to know which ind corresponds to the one I want
Posted 2010年11月30日 GMT-5 19:05 Version 3.5a 0 Replies
Please login with a confirmed email address before reporting spam
I am using comsol with the AC/DC module. I created the m file and my question is this.
Lets says i have 6 blocks like this
g1=block3('10','10','10','base','corner','pos',{'0','0','0'},'axis',{'0','0','1'},'rot','0');
g2=block3('10','10','10','base','corner','pos',{'10','0','0'},'axis',{'0','0','1'},'rot','0');
g3=block3('10','10','10','base','corner','pos',{'20','0','0'},'axis',{'0','0','1'},'rot','0');
g4=block3('10','10','10','base','corner','pos',{'0','10','0'},'axis',{'0','0','1'},'rot','0');
g5=block3('10','10','10','base','corner','pos',{'10','10','0'},'axis',{'0','0','1'},'rot','0');
g6=block3('10','10','10','base','corner','pos',{'20','10','0'},'axis',{'0','0','1'},'rot','0');
and 2 points
parr={point3(5,10,10)};
g7=geomcoerce('point',parr);
parr={point3(15,10,10)};
g8=geomcoerce('point',parr);
%-----------------------------------Some automatic stuff bellow----------------------------------------------------
% Analyzed geometry
clear p s
p.objs={g7,g8};
p.name={'PT1','PT2'};
p.tags={'g7','g8'};
s.objs={g1,g2,g3,g4,g5,g6};
s.name={'BLK1','BLK2','BLK3','BLK4','BLK5','BLK6'};
s.tags={'g1','g2','g3','g4','g5','g6'};
fem.draw=struct('p',p,'s',s);
fem.geom=geomcsg(fem);
% Initialize mesh
fem.mesh=meshinit(fem, ...
'hauto',5);
% (Default values are not included)
% Application mode 1
clear appl
appl.mode.class = 'EmConductiveMediaDC';
appl.module = 'ACDC';
appl.sshape = 2;
appl.assignsuffix = '_emdc';
%--------------------------------------------------END of automatic stuff------------------------------------
Now I want to add to point (g7) as a source with Q0=+1 and point g8 as Q0=-1
clear pnt
pnt.Qj0 = {0,1,-1};
pnt.ind = [1,1,1,1,1,1,2,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1];
appl.pnt = pnt;
I have seen from comsol, that g7 is the 7th point, and g8 is the 14th point. But I saw that when I created the m file. If I start from the m file, how can I know in the pnt.ind where is g7 and g8?
%----------------------------------------------------------------------------------------------------------
Similar question can applied to the boundaries
clear bnd
bnd.type = {'V0','cont','nJ0'};
bnd.ind = [1,1,1,3,1,2,1,3,1,2,1,1,3,2,2,1,3,1,2,1,1,3,2,2,1,3,1,1,1];
appl.bnd = bnd;
%----------------------------------------------------------------------------------------------------------
But most important, is the sigma, where I assign in each of these 6 blocks a sigma value
clear equ
equ.sigma = {10,5,20,30};
equ.ind = [1,2,3,2,4,2];
appl.equ = equ;
How can I know that eg equ.ind(1) corresponds to g1 etc....
Thanks in advance.
Hello Marios Karaoulis
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.