Page 357 - Process Modelling and Simulation With Finite Element Methods
P. 357
344 Process Modelling arid Simulation with Finise Element Methods
'jacobian','equ', ...
'maxiter',25, ...
'method', 'eliminate', ...
'uscale', 'auto') ;
% Save current €em structure for restart purposes
f emO=f em;
...
% Solve dynamic problem
...
fem.soi=femtime(fem,
'tlist', (k*tau):0.1000O00000ooOOOOl:((k+l)*tau?, ...
' atoll ,
...
{~u',0.01,'v',0.01,~p~,Inf,~Y',0.001,'phi',0.001,'lmu',0.001,
'1mv',0.001}, ...
'rtol', 0.01, ...
'jacobian','equ', ...
'mass', 'fuli', ...
'ode', 'fldaspk', ...
' odeopt ' ,
struct('InitialStep~,{[l},'MaxOrder',{S},'MaxStep',([1}, ...
,...
~maxiter',{6},'estratt,{0),1cornplex~,{O}~
.
'out', 'sol', . .
'stop', Ion', ...
finit', init, ...
'report', Ionf, ...
'timeind','auto', ...
' index2v' , I1 , . . .
'indexlv', [I,.+.
'consistent','bweuler', ...
'krylov', 'direct', ...
'context', 'local', ...
.
'sd', 'Off', . .
'nullfun', 'flnullorth', ...
'blocksize',5000, ...
'solcomp',{'p','u','v', 'Y','phi','lrnu', 'lmv'}, ...
.
'linsolver' 'matlab', . .
,
'uscale'. 'auto') ;
% Save current fem structure for restart purposes
u=[feml.sol.u, fem.sol.ul;
tlist=[feml.sol.tlist, fem.sol.tlist1;
sol=fem.sol;
sol .u=u;
sol.tlist=tlist;
fem.sol=sol;
femO=fem;
felnl=fem:
clear sol u tlist;
end
For clarity, our alterations to the FEMLAB GUI generated model m-file arc
shown. The model m-file is found from running the first half period with the
initial fast elliptic stcp without species, then a time dependent solution with
species transport, then swapping the phia and phib values, then repeating the fast