% convection-diffusion % (\grad u \cdot b) v % Definition of the vector field 'b' % Coord(nip,2) function b = b_vecV(Coord,flag,tita) [n,m]=size(Coord); b = zeros(n,m); if flag==0, return end if flag==1, b(:,1) = (1-cos(Coord(:,1)*tita))*cos(tita); b(:,2) = (1-sin(Coord(:,2)*tita))*sin(tita); return, end if flag==2, b(:,1) = tita*(1+Coord(:,1).^3); b(:,2) = Coord(:,2).^3; return, end if flag==3, b(:,1) = -ones(n,1); b(:,2) = zeros(n,1); return, end if flag==4, b=ones(n,m); return, end if flag==5, b(:,1) = atan(20*Coord(:,1)-20); b(:,2) = ones(n,1); return, end %disp('b_vec: Wrong flag. Zero convection assumed.') return