FEATool  v1.7
Finite Element Analysis Toolbox
 All Files Functions Pages
ex_convdiff1.m File Reference

Description

EX_CONVDIFF1 2D Convection and diffusion equation example on a rectangle.

[ FEA, OUT ] = EX_CONVDIFF1( VARARGIN ) Convection and diffusion equation on a rectangle with exact solution u_0+c1*eta+c2*(2*cd*xi+eta^2). Accepts the following property/value pairs.

Input       Value/{Default}        Description
-----------------------------------------------------------------------------------
igrid       scalar 1/{0}           Cell type (0=quadrilaterals, 1=triangles)
hmax        scalar {1/40}          Max grid cell size
a           scalar {1}             Convection velocity in x-direction
b           scalar {2}             Convection velocity in y-direction
c1          scalar {1}             Solution constant
c2          scalar {0.8}           Solution constant
cd          scalar {0.5}           Diffusion coefficient
sfun        string {sflag1}        Shape function
iphys       scalar 0/{1}           Use physics mode to define problem    (=1)
                                   or directly define fea.eqn/bdr fields (=0)
iplot       scalar 0/{1}           Plot solution (=1)
                                                                                  .
Output      Value/(Size)           Description
-----------------------------------------------------------------------------------
fea         struct                 Problem definition struct
out         struct                 Output stuct
Generated fields of fea:
Generated fields of out: