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

224         Process Modelling and Simulation with Finite Element Methods

          %  Save current fem structure for restart purposes
          f emO=f em;
          %  WZ: Now we compute our boundary integrals (11) exit x-velocity
                            ...
          Il=postint(fem,'u',
                  'cont',  'internal', ...
                  'contorder',2, ...
                       ,
                  'edim'   1,. . .
                             .
                  'solnum' , I, . .
                  'phase',  0, ...
                              .
                               .
                  lgeomnum',l,.
                  'dl',    8, ...
                  'intorder',4, ...
                  'context','local');
          %  WZ: Boundary integral (12) viscous stress on  notch
          I2=postint (fem,  'Kx-ns', . . .
                  'cont',  'internal', ...
                  'contorder',2, ...
                  'edim',  1,. .
                              .
                  'solnum' , 1, . . .
                  'phase', 0,. .
                              .
                  I  geomnum' ,1, . .
                             .
                  'dl',    4:6,. . .
                  'intorder',4, ...
                  'context','local');
          %  WZ: Boundary integral (13) pressure at inlet
          13=postint (fern, 'p'  , . . .
                  'cont',  'internal', ...
                  'contorder',2, ...
                              .
                  'edim',  1,. .
                  'solnurn' 1, . . .
                         ,
                  'phase', 0,. .
                              .
                  'geomnum',l, ...
                  'dl',    1, ...
                  'intorder',4, ...
                  'context','local');
          %  WZ: write out output to the array output
          output  (j, 1) =slot (j) ;
          output (j, 2) =I1;
          output  (j ,3) =I2;
          output  (j ,4) =I3;
          output  (j, 5) =length(fern.mesh.p) ;
          %  WZ: end our ]-loop
          end
          %  WZ: record results to file
          dlmwrite('tubeori.dat',output,',');
          quit
          There is no difficulty executing this programme on the UNIX command line.  It
          is also computationally "light"  enough that you might want to run it in the GUI.
          You  can do this by launching the m-file script (test.m in this case) from Open
          option on the File menu and selection Model m-file.  FEMLAB has its own built-
          in MATLAB workspace, separate from that in the MATLAB command window
          that launched FEMLAB.  So any m-file script that can run under MATLAB can
          run  in  FEMLAB  as  well.  You  get  the  added  feature  of  watching  the  GUI
          execute your commands on the domain.  You get the computational overhead of
          the  GUI as well,  which may not  be  a problem if  your platform has  sufficient
   232   233   234   235   236   237   238   239   240   241   242