% FEMLAB Model M-file % Generated by FEMLAB 3.0 (FEMLAB 3.0.0.181, $Date: 2004/01/29 19:04:14 $) flclear fem % Femlab version clear vrsn vrsn.name = 'FEMLAB 3.0'; vrsn.ext = ''; vrsn.major = 0; vrsn.build = 181; vrsn.rcs = '$Name: $'; vrsn.date = '$Date: 2004/01/29 19:04:14 $'; fem.version = vrsn; % Geometry g1=block3('10','10','1','base','corner','pos',{'0','0','0'},'axis',{'0','0','1'},'rot','0'); clear s s.objs={g1}; s.name={'BLK1'}; s.tags={'g1'}; fem.draw=struct('s',s); fem.geom=geomcsg(fem); % Initialize mesh fem.mesh=meshinit(fem); % Application mode 1 clear appl appl.mode.class = 'ConductiveMediaDC'; appl.assignsuffix = '_dc'; clear bnd bnd.V0 = {0,1000,0}; bnd.type = {'V0','V','nJ0'}; bnd.ind = [2,3,3,3,3,1]; appl.bnd = bnd; fem.appl{1} = appl; % Application mode 2 clear appl appl.mode.class = 'HeatTransfer'; appl.border = 'on'; appl.assignsuffix = '_ht'; clear prop prop.weakconstr=struct('value',{'off'},'dim',{{'lm2'}}); appl.prop = prop; clear bnd bnd.T0 = 293; bnd.type = 'T'; bnd.ind = [1,1,1,1,1,1]; appl.bnd = bnd; clear equ equ.init = 293; equ.Q = 'Q_dc'; equ.ind = [1]; appl.equ = equ; fem.appl{2} = appl; fem.outform = 'general'; % Multiphysics fem=multiphysics(fem); % Extend mesh fem.xmesh=meshextend(fem); % Solve problem fem.sol=femlin(fem,'symmetric','on','solcomp',{'T', ... 'V'},'outcomp',{'T','V'}, ... 'nonlin','off','linsolver','cg', ... 'prefun','amg'); % Save current fem structure for restart purposes fem0=fem; % Plot solution postplot(fem,'slicedata','V','slicexspacing',5, ... 'sliceyspacing',0,'slicezspacing',0, ... 'slicemap','jet(1024)','solnum',1, ... 'cont','internal','refine',4, ... 'geom','on'); % Plot solution postplot(fem,'slicedata','T','slicexspacing',5, ... 'sliceyspacing',0,'slicezspacing',0, ... 'slicemap','jet(1024)','solnum',1, ... 'cont','internal','refine',4, ... 'geom','on'); % Initialize mesh fem.mesh=meshinit(fem); % Application mode 1 clear appl appl.mode.class = 'ConductiveMediaDC'; appl.assignsuffix = '_dc'; clear bnd bnd.V0 = {0,1000,0}; bnd.type = {'V0','V','nJ0'}; bnd.ind = [2,3,3,3,3,1]; appl.bnd = bnd; fem.appl{1} = appl; % Application mode 2 clear appl appl.mode.class = 'HeatTransfer'; appl.assignsuffix = '_ht'; clear prop prop.weakconstr=struct('value',{'off'},'dim',{{'lm2'}}); appl.prop = prop; clear bnd bnd.T0 = 293; bnd.type = {'T','q0'}; bnd.ind = [1,1,2,2,1,1]; appl.bnd = bnd; clear equ equ.init = 293; equ.Q = 'Q_dc'; equ.ind = [1]; appl.equ = equ; fem.appl{2} = appl; fem.outform = 'general'; % Multiphysics fem=multiphysics(fem); % Extend mesh fem.xmesh=meshextend(fem); % Evaluate initial value using current solution init = asseminit(fem,'u',fem0.sol,'xmesh',fem0.xmesh); % Solve problem fem.sol=femlin(fem,'init',init,'symmetric','on', ... 'solcomp',{'T','V'},'outcomp', ... {'T','V'},'nonlin','off', ... 'linsolver','cg','prefun','amg'); % Save current fem structure for restart purposes fem0=fem; % Plot solution postplot(fem,'slicedata','T','slicexspacing',5, ... 'sliceyspacing',0,'slicezspacing',0, ... 'slicemap','jet(1024)','solnum',1, ... 'cont','internal','refine',4, ... 'geom','on'); % Initialize mesh fem.mesh=meshinit(fem); % Application mode 1 clear appl appl.mode.class = 'ConductiveMediaDC'; appl.assignsuffix = '_dc'; clear bnd bnd.V0 = {0,1000,0}; bnd.type = {'V0','V','nJ0'}; bnd.ind = [2,3,3,3,3,1]; appl.bnd = bnd; fem.appl{1} = appl; % Application mode 2 clear appl appl.mode.class = 'HeatTransfer'; appl.assignsuffix = '_ht'; clear prop prop.weakconstr=struct('value',{'off'},'dim',{{'lm2'}}); appl.prop = prop; clear bnd bnd.T0 = 293; bnd.type = {'T','q0'}; bnd.ind = [1,1,2,2,1,1]; appl.bnd = bnd; clear equ equ.init = 293; equ.Q = 'Vx^2+Vy^2'; equ.ind = [1]; appl.equ = equ; fem.appl{2} = appl; fem.outform = 'general'; % Multiphysics fem=multiphysics(fem); % Extend mesh fem.xmesh=meshextend(fem); % Evaluate initial value using current solution init = asseminit(fem,'u',fem0.sol,'xmesh',fem0.xmesh); % Solve problem fem.sol=femlin(fem,'init',init,'symmetric','on', ... 'solcomp',{'T','V'},'outcomp', ... {'T','V'},'nonlin','off', ... 'linsolver','cg','prefun','amg'); % Save current fem structure for restart purposes fem0=fem; % Plot solution postplot(fem,'slicedata','T','slicexspacing',5, ... 'sliceyspacing',0,'slicezspacing',0, ... 'slicemap','jet(1024)','solnum',1, ... 'cont','internal','refine',4, ... 'geom','on'); % Initialize mesh fem.mesh=meshinit(fem); % Application mode 1 clear appl appl.mode.class = 'ConductiveMediaDC'; appl.assignsuffix = '_dc'; clear bnd bnd.V0 = {0,1000,0}; bnd.type = {'V0','V','nJ0'}; bnd.ind = [2,3,3,3,3,1]; appl.bnd = bnd; fem.appl{1} = appl; % Application mode 2 clear appl appl.mode.class = 'HeatTransfer'; appl.assignsuffix = '_ht'; clear prop prop.weakconstr=struct('value',{'off'},'dim',{{'lm2'}}); appl.prop = prop; clear bnd bnd.T0 = 293; bnd.type = {'T','q0'}; bnd.ind = [1,1,2,2,1,1]; appl.bnd = bnd; clear equ equ.init = 293; equ.Q = 'Vx^2+Vy^2+Vz^2'; equ.ind = [1]; appl.equ = equ; fem.appl{2} = appl; fem.outform = 'general'; % Multiphysics fem=multiphysics(fem); % Extend mesh fem.xmesh=meshextend(fem); % Evaluate initial value using current solution init = asseminit(fem,'u',fem0.sol,'xmesh',fem0.xmesh); % Solve problem fem.sol=femlin(fem,'init',init,'symmetric','on', ... 'solcomp',{'T','V'},'outcomp', ... {'T','V'},'nonlin','off', ... 'linsolver','cg','prefun','amg'); % Save current fem structure for restart purposes fem0=fem; % Plot solution postplot(fem,'slicedata','T','slicexspacing',5, ... 'sliceyspacing',0,'slicezspacing',0, ... 'slicemap','jet(1024)','solnum',1, ... 'cont','internal','refine',4, ... 'geom','on'); % Plot solution postplot(fem,'slicedata','T','slicexspacing',5, ... 'sliceyspacing',0,'slicezspacing',0, ... 'slicemap','jet(1024)','solnum',1, ... 'cont','internal','refine',4, ... 'geom','on'); % Plot solution postplot(fem,'slicedata','T','slicexspacing',5, ... 'sliceyspacing',0,'slicezspacing',0, ... 'slicemap','jet(1024)','solnum',1, ... 'cont','internal','refine',4, ... 'geom','on'); % Plot solution postplot(fem,'slicedata','T','slicexspacing',5, ... 'sliceyspacing',0,'slicezspacing',0, ... 'slicemap','jet(1024)','solnum',1, ... 'cont','internal','refine',4, ... 'geom','on');