Page 355 - Process Modelling and Simulation With Finite Element Methods
P. 355

342        Process Modelling and Simulation with Finite Element Methods

          However, the coding warrants a look for a crafty way of  patching  together  the
          array of solution vectors (fem.so1.u) and the array of solution times (fem.sol.tlist)
          so that the FEMLAB GUI can be used to animate the movie.  Using the manual
          technique in the FEMLAB GUI described above, the user would only have the
          most recent half-period  available for animation. The m-file script outline below
          should  be run  in MATLAB, and  thereafter  the fem.so1 structure imported  into
          the FEMLAB GUI from the "Insert from Workspace"  option on the file menu,
          specifying  "Compatible  solution"  as  fem.so1.  Then  the  animation  proceeds
          smoothly.  Curiously,  loading  the  m-file  script  from the  FEMLAB  GUI as a
         model m-file  still only leaves the last half-period  available for post-processing.
         No  doubt  this  is  due to  our  imperfect  understanding  of  FEMLAB's  variable
          assignments.
          %  FEMLAB Model M-file (Ysta9ed.m)
          %  Generated 05-Jun-2003 21:11:46 by FEMLAB 2.3.0.148.
          flclear fern
          %  FEMLAB Version
          clear vrsn;
         vrsn.name='FEMLAB 2.3';
         vrsn  . maj or=O ;
         vrsn.build=148;
          fem.version=vrsn;


          %%%%%%%%%%%%%%%%%%%%%%%WBJZ contants %%%%%%%%%%%%%%%%%
          tau=3 ;
         cycles=4;
         phia=24;
         phib=l2;
          %  Recorded command sequence  (set up  first half  cycle before the
         loop)
          ...
         %  Define constants
          fem.const={  ...
                 'Pec',    35.399999999999999,  ...
                 'Re',     0.035400000000000001,.
                 'zel',    1, ...
                 'betael'  1.1200000000000001, ...
                 'zeta1  ' ,  1, ...
                 'zetar'  1, ...
                        ,
                 'sigr',  1, ...
                 If',      1, ...
                 ' PHIA' ,   phia, . . .
                 'PHIB',  phib, . . .
                 'PHIC'  ,   0, ...
                 'PA',     0, ...
                 'PB'  ,   0, ...
                     ,
                 'PC'      0, ...
                      ,
                 'dsa'     10,. . .
                 'dsb',    10,. . .
                 'dsc',    6) ;
   350   351   352   353   354   355   356   357   358   359   360