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


EX_CONVDIFF4 1D Burgers equation (convection and diffusion) example.

[ FEA, OUT ] = EX_CONVDIFF4( VARARGIN ) 1D Burgers equation with steady solution, u_t + (b*u-c)*u_x - nu*u_xx = 0 with exact solution c/b*(1-tanh(c/(2*nu)*(x-x0))). Tests both time dependent and steady solvers. Accepts the following property/value pairs.

Input       Value/{Default}        Description
b           scalar {1.0}           Strength of nonlinearity
c           scalar {0.13}          Convection velocity
nu          scalar {0.01}          Diffusion coefficient
x0          scalar {0.5}           Posision of smooth shock
hmax        scalar {1/25}          Max grid cell size
ischeme     scalar {-1}            Solver scheme (<0 = stationary)
nsolve      scalar {2}             Nonlinear solver (when ischeme<0)
dt          scalar {0.1}           Time step size
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: