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


EX_NATURAL_CONVECTION 2D Example for natural convection of air in a square cavity.

[ FEA, OUT ] = EX_NATURAL_CONVECTION( VARARGIN ) Sets up and solves a natural convection benchmark problem. Reference solutions are for example reported in G. Davis "Natural convection of air in a square cavity a bench mark numerical solution", IJNMF vol. 3, 249-254 (1983).

Accepts the following property/value pairs.

Input       Value/{Default}        Description
Ra          scalar {1e3}           Rayleigh number
Pr          scalar {0.71}          Prandtl number
l           scalar {1}             Side length of cavity
igrid       scalar 0/{1}           Cell type (0=quadrilaterals, 1=triangles)
hmax        scalar {0.05}          Max grid cell size
sf_u        string {sflag2}        Shape function for velocity
sf_p        string {sflag1}        Shape function for pressure
sf_T        string {sflag2}        Shape function for temperature
iphys       scalar 0/{1}           Use physics mode to define problem (=1)
iplot       scalar 0/{1}           Plot solution and error (=1)
Output      Value/(Size)           Description
fea         struct                 Problem definition struct
out         struct                 Output struct
Generated fields of fea:
Generated fields of out: