% FEMLAB Model M-file
% Generated 16-Jul-2003 15:52:41 by FEMLAB 2.3.0.145.

flclear fem
% FEMLAB Version
clear vrsn;
vrsn.name='FEMLAB 2.3';
vrsn.major=0;
vrsn.build=145;
fem.version=vrsn;

% Recorded command sequence

% New geometry 1
fem.sdim={'x','y'};

% Geometry
clear s c p
p=[-3 -3 -0.25 -0.25 -0.25 0 0 0.25 0.25 0.25 6 6;0 1 0.25 0.5 0.75 0.25  ...
0.75 0.25 0.5 0.75 0 1];
rb={[1 2 4 6 7 9 11 12],[1 1 2 11;2 11 12 12],[4 4 6 7;3 5 8 10;6 7 9 9], ...
zeros(4,0)};
wt={zeros(1,0),ones(2,4),[1 1 1 1;0.70710678118654746 0.70710678118654746  ...
0.70710678118654746 0.70710678118654746;1 1 1 1],zeros(4,0)};
lr={[NaN NaN NaN NaN NaN NaN NaN NaN],[0 1 0 1;1 0 1 0],[0 1 0 1;1 0 1 0], ...
zeros(2,0)};
CO1=solid2(p,rb,wt,lr);
objs={CO1};
names={'CO1'};
s.objs=objs;
s.name=names;

objs={};
names={};
c.objs=objs;
c.name=names;

objs={};
names={};
p.objs=objs;
p.name=names;

drawstruct=struct('s',s,'c',c,'p',p);
fem.draw=drawstruct;
fem.geom=geomcsg(fem);

clear appl

% Application mode 1
appl{1}.mode=flpdens2d('dim',{'u','v','p'},'sdim',{'x','y'},'submode','std', ...
'tdiff','on');
appl{1}.dim={'u','v','p'};
appl{1}.form='general';
appl{1}.border='off';
appl{1}.name='ns';
appl{1}.var={};
appl{1}.assign={'Fx';'Fx';'Fy';'Fy';'Kx';'Kx';'Ky';'Ky';'U';'U';'V';'V'; ...
'beta_x_uv';'beta_x_uv';'beta_y_uv';'beta_y_uv';'cBeta_uv';'cBeta_uv';'eta'; ...
'eta';'rho';'rho';'wequ_u';'wequ_u';'wequ_v';'wequ_v'};
appl{1}.elemdefault='Lagp2p1';
appl{1}.shape={'shlag(2,''u'')','shlag(2,''v'')','shlag(1,''p'')'};
appl{1}.sshape=2;
appl{1}.equ.rho={'Re'};
appl{1}.equ.eta={'1'};
appl{1}.equ.Fx={'0'};
appl{1}.equ.Fy={'0'};
appl{1}.equ.sdon={0};
appl{1}.equ.sdtype={'sdlowre'};
appl{1}.equ.delta={'0.25'};
appl{1}.equ.gporder={{4;4;2}};
appl{1}.equ.cporder={{2;2;1}};
appl{1}.equ.shape={1:3};
appl{1}.equ.init={{{'4*y*(1-y)'};{'0'};{'0'}}};
appl{1}.equ.usage={1};
appl{1}.equ.ind=1;
appl{1}.bnd.u={'Umax*4*s*(1-s)','0','0'};
appl{1}.bnd.v={'0','0','0'};
appl{1}.bnd.p={'0','0','0'};
appl{1}.bnd.type={'uv','noslip','out'};
appl{1}.bnd.gporder={{0;0;0},{0;0;0},{0;0;0}};
appl{1}.bnd.cporder={{0;0;0},{0;0;0},{0;0;0}};
appl{1}.bnd.shape={0,0,0};
appl{1}.bnd.ind=[1 2 2 3 2 2 2 2];

fem.appl=appl;

% Initialize mesh
fem.mesh=meshinit(fem,...
	'Out',    {'mesh'},...
	'jiggle', 'mean',...
	'Hcurve', 0.29999999999999999,...
	'Hgrad',  1.3,...
	'Hpnt',   {10,[]});

% Differentiation rules
fem.rules={};

% Problem form
fem.outform='general';

% Differentiation
fem.diff={'ga','g','f','r','expr'};

% Differentiation simplification
fem.simplify='on';

% PDE coefficients
clear equ
equ.rho={'Re'};
equ.eta={'1'};
equ.Fx={'0'};
equ.Fy={'0'};
equ.sdon={0};
equ.sdtype={'sdlowre'};
equ.delta={'0.25'};
equ.gporder={{4;4;2}};
equ.cporder={{2;2;1}};
equ.shape={1:3};
equ.init={{{'0'};{'0'};{'0'}}};
equ.usage={1};
equ.ind=1;
fem.appl{1}.equ=equ;

% Internal borders
fem.appl{1}.border='off';

% Shape functions
fem.appl{1}.shape={'shlag(2,''u'')','shlag(2,''v'')','shlag(1,''p'')'};

% Geometry element order
fem.appl{1}.sshape=2;

% Define constants
fem.const={...
	'Re',     10,...
	'D',      1,...
	'd',      0.5,...
	'B',      0.5,...
	'Umax',   1.0909090909090911};

% Multiphysics
fem=multiphysics(fem);

% Extend the mesh
fem.xmesh=meshextend(fem,'context','local','cplbndeq','on','cplbndsh','on');

