13.04.2014 Views

Politechnika Poznańska Zastosowanie algorytmów genetycznych do ...

Politechnika Poznańska Zastosowanie algorytmów genetycznych do ...

Politechnika Poznańska Zastosowanie algorytmów genetycznych do ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

for ii=1:nbs<br />

for jj=1:4<br />

wb=dd(ii,jj);<br />

if(~(wb==0))<br />

tc(jj)=ii;<br />

end<br />

end<br />

end<br />

clear s<br />

s.objs={g10};<br />

s.name={'CO1'};<br />

s.tags={'g10'};<br />

fem.draw=struct('s',s);<br />

fem.geom=geomcsg(fem);<br />

% Initialize mesh<br />

fem.mesh=meshinit(fem);<br />

% (Default values are not included)<br />

% Application mode 1<br />

clear appl<br />

appl.mode.class = 'HeatTransfer';<br />

appl.assignsuffix = '_ht';<br />

clear prop<br />

prop.analysis='static';<br />

appl.prop = prop;<br />

clear bnd<br />

bnd.type = 'T';<br />

bnd.T0 = {343,303};<br />

bnd.ind = [1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1];<br />

for jj=1:4<br />

bnd.ind(tc(jj))=2;<br />

end<br />

appl.bnd = bnd;<br />

clear equ<br />

equ.init = 303;<br />

equ.ind = [1];<br />

appl.equ = equ;<br />

fem.appl{1} = appl;<br />

fem.border = 1;<br />

fem.outform = 'general';<br />

fem.units = 'SI';<br />

% Multiphysics<br />

fem=multiphysics(fem);<br />

% Extend mesh<br />

fem.xmesh=meshextend(fem);<br />

% Solve problem<br />

fem.sol=femnlin(fem, ...<br />

'solcomp',{'T'}, ...<br />

'outcomp',{'T'});<br />

% Save current fem structure for restart purposes<br />

fem0=fem;<br />

if(plt)<br />

% Plot solution<br />

postplot(fem, ...<br />

'tridata',{'T','cont','internal'}, ...<br />

'trimap','jet(1024)', ...<br />

'title','Surface: Temperature [K]', ...<br />

'refine',3, ...<br />

'axis',[-1.42910915934755,1.42910915934755,-1,1,-1,1]);<br />

end<br />

% Integrate<br />

I1=postint(fem,'T', ...<br />

'dl',[1]);<br />

% Integrate<br />

I2=postint(fem,'1', ...<br />

'dl',[1]);<br />

display(hN);<br />

if(plt)<br />

display(hN_tmp);<br />

111

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!