% COMSOL Multiphysics Model M-file % Generated by COMSOL 3.5 (COMSOL 3.5.0.494, $Date: 2008/09/19 16:09:48 $) flclear fem % COMSOL version clear vrsn vrsn.name = 'COMSOL 3.5'; vrsn.ext = ''; vrsn.major = 0; vrsn.build = 494; vrsn.rcs = '$Name: $'; vrsn.date = '$Date: 2008/09/19 16:09:48 $'; fem.version = vrsn; % Geometry g1=cylinder3('0.006','0.002','pos',{'0','0','-0.0025'},'axis',{'0','0','1'},'rot','0'); g2=cylinder3('0.006','0.002','pos',{'0','0','0.0025'},'axis',{'0','0','1'},'rot','0'); g3=block3('24','24','24','base','center','pos',{'0','0','0'},'axis',{'0','0','1'},'rot','0'); g4=block3('0.024','0.024','0.024','base','center','pos',{'0','0','0'},'axis',{'0','0','1'},'rot','0'); % Analyzed geometry clear s s.objs={g1,g2,g4}; s.name={'CYL1','CYL2','BLK1'}; s.tags={'g1','g2','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); % COMSOL Multiphysics Model M-file % Generated by COMSOL 3.5 (COMSOL 3.5.0.494, $Date: 2008/09/19 16:09:48 $) % Geometry g2=rotate(g2,0.04363323129985824,[1,0,1],[0,0,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=rotate(g2,-0.04363323129985824,[1,0,1],[0,0,0]); g2=move(g2,[1,0,0]); g2=move(g2,[-1,0,0]); g2=move(g2,[0.001,0,0]); g2=move(g2,[-0.001,0,0]); g2=move(g2,[0,0.001,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=move(g2,[0,-0.001,0]); g2=move(g2,[0,0.0025,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=move(g2,[0,-0.0025,0]); g2=move(g2,[0,0.005,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=move(g2,[0,-0.005,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=move(g2,[0,0.001,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=move(g2,[0,-0.001,0]); g2=move(g2,[0,0.0025,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=move(g2,[0,-0.0025,0]); g2=move(g2,[0,0.005,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=move(g2,[0,-0.005,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=rotate(g2,0.04363323129985824,[1,0,1],[0,0,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=rotate(g2,0.04363323129985824,[1,0,1],[0,0,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=rotate(g2,-0.04363323129985824,[1,0,1],[0,0,0]); g2=rotate(g2,-0.04363323129985824,[1,0,1],[0,0,0]); g2=rotate(g2,0.1308996938995747,[1,0,1],[0,0,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); g2=rotate(g2,-0.1308996938995747,[1,0,1],[0,0,0]); % Geometry objects clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); % COMSOL Multiphysics Model M-file % Generated by COMSOL 3.5 (COMSOL 3.5.0.494, $Date: 2008/09/19 16:09:48 $) % Geometry % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); % COMSOL Multiphysics Model M-file % Generated by COMSOL 3.5 (COMSOL 3.5.0.494, $Date: 2008/09/19 16:09:48 $) % (Default values are not included) % Application mode 1 clear appl appl.mode.class = 'MagnetostaticsNoCurrents'; appl.module = 'ACDC'; appl.assignsuffix = '_emnc'; clear bnd bnd.type = {'Vm0','cont'}; bnd.ind = [1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1]; appl.bnd = bnd; clear equ equ.magconstrel = {'mur','M','M'}; equ.M = {{0;0;0},{0;0;931056},{0;0;931056}}; equ.maxwell = {{},'Mag2','Mag1'}; equ.ind = [1,2,3]; appl.equ = equ; fem.appl{1} = appl; fem.frame = {'ref'}; fem.border = 1; clear units; units.basesystem = 'SI'; fem.units = units; % ODE Settings clear ode clear units; units.basesystem = 'SI'; ode.units = units; fem.ode=ode; % Multiphysics fem=multiphysics(fem); % COMSOL Multiphysics Model M-file % Generated by COMSOL 3.5 (COMSOL 3.5.0.494, $Date: 2008/09/19 16:09:48 $) % Initialize mesh fem.mesh=meshinit(fem, ... 'hauto',5); % (Default values are not included) % Application mode 1 clear appl appl.mode.class = 'MagnetostaticsNoCurrents'; appl.module = 'ACDC'; appl.assignsuffix = '_emnc'; clear bnd bnd.type = {'Vm0','cont'}; bnd.ind = [1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1]; appl.bnd = bnd; clear equ equ.magconstrel = {'mur','M','M'}; equ.M = {{0;0;0},{0;0;931056},{0;0;931056}}; equ.maxwell = {{},'Mag2','Mag1'}; equ.ind = [1,2,3]; appl.equ = equ; fem.appl{1} = appl; fem.frame = {'ref'}; fem.border = 1; clear units; units.basesystem = 'SI'; fem.units = units; % ODE Settings clear ode clear units; units.basesystem = 'SI'; ode.units = units; fem.ode=ode; % Multiphysics fem=multiphysics(fem); % Extend mesh fem.xmesh=meshextend(fem); % Solve problem fem.sol=femstatic(fem, ... 'solcomp',{'Vm'}, ... 'outcomp',{'Vm'}, ... 'blocksize','auto'); % Save current fem structure for restart purposes fem0=fem; % Plot solution postplot(fem, ... 'slicedata',{'Vm','cont','internal','unit','A'}, ... 'slicexspacing',5, ... 'sliceyspacing',0, ... 'slicezspacing',0, ... 'slicemap','jet(1024)', ... 'title','Slice: Magnetic potential [A]', ... 'grid','on', ... 'campos',[-0.10957705817405121,-0.14280360249372037,0.1039230493574675], ... 'camtarget',[0,0,0], ... 'camup',[0,0,1], ... 'camva',11.623672480256646); % Plot solution postplot(fem, ... 'arrowdata',{'Hx_emnc','Hy_emnc','Hz_emnc'}, ... 'arrowxspacing',[0 0], ... 'arrowyspacing',7, ... 'arrowzspacing',7, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic field', ... 'geom','off', ... 'grid','on', ... 'campos',[-0.10957705817405121,-0.14280360249372037,0.1039230493574675], ... 'camtarget',[0,0,0], ... 'camup',[0,0,1], ... 'camva',11.623672480256664); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0 0], ... 'arrowyspacing',7, ... 'arrowzspacing',7, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[-0.10957705817405121,-0.14280360249372037,0.1039230493574675], ... 'camtarget',[0,0,0], ... 'camup',[0,0,1], ... 'camva',11.623672480256579); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0 0], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[-0.10957705817405121,-0.14280360249372037,0.1039230493574675], ... 'camtarget',[0,0,0], ... 'camup',[0,0,1], ... 'camva',11.623672480256579); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0 0], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[-0.10957705817405121,-0.14280360249372037,0.1039230493574675], ... 'camtarget',[0,0,0], ... 'camup',[0,0,1], ... 'camva',11.623672480256579); % Geometry g2=rotate(g2,0.17453292519943295,[1,0,1],[0,0,0]); % Analyzed geometry clear s s.objs={g2,g1,g4}; s.name={'CYL2','CYL1','BLK1'}; s.tags={'g2','g1','g4'}; fem.draw=struct('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 = 'MagnetostaticsNoCurrents'; appl.module = 'ACDC'; appl.assignsuffix = '_emnc'; clear bnd bnd.type = {'Vm0','cont'}; bnd.ind = [1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1]; appl.bnd = bnd; clear equ equ.magconstrel = {'mur','M','M'}; equ.M = {{0;0;0},{0;0;931056},{0;0;931056}}; equ.maxwell = {{},'Mag2','Mag1'}; equ.ind = [1,2,3]; appl.equ = equ; fem.appl{1} = appl; fem.frame = {'ref'}; fem.border = 1; clear units; units.basesystem = 'SI'; fem.units = units; % ODE Settings clear ode clear units; units.basesystem = 'SI'; ode.units = units; fem.ode=ode; % Multiphysics fem=multiphysics(fem); % Extend mesh fem.xmesh=meshextend(fem); % Solve problem fem.sol=femstatic(fem, ... 'solcomp',{'Vm'}, ... 'outcomp',{'Vm'}, ... 'blocksize','auto'); % Save current fem structure for restart purposes fem0=fem; % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0 0], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[0.16507507513359165,1.695007085800171E-7,8.80565494298935E-5], ... 'camtarget',[-2.619170118123293E-6,1.695007085800171E-7,8.80565494298935E-5], ... 'camup',[0,0,1], ... 'camva',9.109271987473086); % (Default values are not included) % Application mode 1 clear appl appl.mode.class = 'MagnetostaticsNoCurrents'; appl.module = 'ACDC'; appl.assignsuffix = '_emnc'; clear bnd bnd.type = {'Vm0','cont'}; bnd.ind = [1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1]; appl.bnd = bnd; clear equ equ.magconstrel = {'mur','M','M'}; equ.M = {{0;0;0},{0;0;931056},{0;0;931056}}; equ.maxwell = {{},'Mag2','Mag1'}; equ.ind = [1,2,3]; appl.equ = equ; fem.appl{1} = appl; fem.frame = {'ref'}; fem.border = 1; clear units; units.basesystem = 'SI'; fem.units = units; % ODE Settings clear ode clear units; units.basesystem = 'SI'; ode.units = units; fem.ode=ode; % Multiphysics fem=multiphysics(fem); % Extend mesh fem.xmesh=meshextend(fem); % Solve problem fem.sol=femstatic(fem, ... 'solcomp',{'Vm'}, ... 'outcomp',{'Vm'}, ... 'blocksize','auto'); % Save current fem structure for restart purposes fem0=fem; % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0 0], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[-0.20784609871493506,0,0], ... 'camtarget',[0,0,0], ... 'camup',[0,0,1], ... 'camva',7.432499880060367); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0.001 0.001], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[0.1650987015846871,-7.678288966417313E-6,9.007984772324562E-5], ... 'camtarget',[-1.4586839824914932E-7,-7.678288966417313E-6,9.007984772324562E-5], ... 'camup',[0,0,1], ... 'camva',4.56204070856228); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0.001 0.001], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[0.1650987015846871,-7.678288966417313E-6,9.007984772324562E-5], ... 'camtarget',[-1.4586839824914932E-7,-7.678288966417313E-6,9.007984772324562E-5], ... 'camup',[0,0,1], ... 'camva',4.56204070856228); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0.001 0.001], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','arrow', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[0.1650987015846871,-7.678288966417313E-6,9.007984772324562E-5], ... 'camtarget',[-1.4586839824914932E-7,-7.678288966417313E-6,9.007984772324562E-5], ... 'camup',[0,0,1], ... 'camva',4.56204070856228); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0.001 0.001], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[0.1650987015846871,-7.678288966417313E-6,9.007984772324562E-5], ... 'camtarget',[-1.4586839824914932E-7,-7.678288966417313E-6,9.007984772324562E-5], ... 'camup',[0,0,1], ... 'camva',4.56204070856228); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0.001 0.001], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[0.1650987015846871,-7.678288966417313E-6,9.007984772324562E-5], ... 'camtarget',[-1.4586839824914932E-7,-7.678288966417313E-6,9.007984772324562E-5], ... 'camup',[0,0,1], ... 'camva',4.56204070856228); % Plot solution postplot(fem, ... 'arrowdata',{'Bx_emnc','By_emnc','Bz_emnc'}, ... 'arrowxspacing',[0.001 0.001], ... 'arrowyspacing',30, ... 'arrowzspacing',30, ... 'arrowtype','cone', ... 'arrowstyle','proportional', ... 'arrowcolor',[1.0,0.0,0.0], ... 'title','Arrow: Magnetic flux density', ... 'geom','off', ... 'grid','on', ... 'campos',[0.1650987015846871,-7.678288966417313E-6,9.007984772324562E-5], ... 'camtarget',[-1.4586839824914932E-7,-7.678288966417313E-6,9.007984772324562E-5], ... 'camup',[0,0,1], ... 'camva',4.56204070856228);