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

Description

EX_DIFFUSION1 2D Diffusion equation example on a unit square.

[ FEA, OUT ] = EX_DIFFUSION1( VARARGIN ) Diffusion equation on a unit square with exact solutions. Accepts the following property/value pairs.

Input       Value/{Default}        Description
-----------------------------------------------------------------------------------
isol        scalar {1}             Exact solution
                    1                x*y
                    2                x^2-y^2
                    3                2*y/((1+x)^2+y^2)
                    4                2*y/((1+x)^2+y^2)
                    5                (sinh(pi*x)*sin(pi*y)+sinh(pi*y)*
                                     sin(pi*x))/sinh(pi)
cd          scalar {0.1}           Diffusion coefficient
igrid       scalar 1/{0}           Cell type (0=quadrilaterals, 1=triangles)
hmax        scalar {1/40}          Max grid cell size
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: