FEATool  v1.6
Finite Element Analysis Toolbox
 All Files Functions Pages
ex_convdiff2.m File Reference


EX_CONVDIFF2 1D Time dependent convection and diffusion equation example.

[ FEA, OUT ] = EX_CONVDIFF2( VARARGIN ) 1D time dependent convection and diffusion equation on a line with exact solution exp(-k^2*nu*t)*sin(k*(x-a*t)) and periodic boundary conditions. Accepts the following property/value pairs.

Input       Value/{Default}        Description
k           scalar {2*pi}          Simulation parameter
a           scalar {1}             Convection velocity
nu          scalar {0.1}           Diffusion coefficient
hmax        scalar {1/25}          Max grid cell size
dt          scalar {0.01}          Time step size
ischeme     scalar {2}             Time stepping scheme
sfun        string {sflag1}        Shape function
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: