FEATool Multiphysics  v1.16.5
Finite Element Analysis Toolbox
ex_navierstokes1b.m File Reference

Description

EX_NAVIERSTOKES1B 2D Channel flow CFD benchmark.

[ DATA, FEA ] = EX_NAVIERSTOKES1B 2D Channel flow CFD benchmark

CFD benchmarking script comparing the OpenFOAM and SU2 CFD solvers to the fully coupled and monolithic FEniCS and FEATool Multiphysics solvers, for stationary laminar Poiseuille flow in a rectangular channel. The inflow profile is constant and the outflow should assume a parabolic profile u(y) = U_max*4/h^2*y*(h-y).

See also
ex_navierstokes1, run_featool_benchmarks

Code listing

% Define available solvers.
 solvers  = { 'FEATool', 'FEniCS', 'OpenFOAM', 'SU2' };
 FEATOOL  = 1;
 FENICS   = 2;
 OPENFOAM = 3;
 SU2      = 4;

% Define available grid cases.
 grids    = { 'Quad', 'Tri', 'TriU' };
 QUAD     = 1;
 TRI      = 2;   % Structured triangles.
 TRIU     = 3;   % Unstructured triangles.

% Define available FEM shape/basis functions.
 D0       = 'sf_disc0';
 D1       = 'sf_disc1';
 P1       = 'sf_simp_P1';
 P2       = 'sf_simp_P2';
 Q1       = 'sf_quad_Q1';
 Q2       = 'sf_quad_Q2';

% Set up benchmark test cases.
 NLEV  = 1:5;   % Select grid levels.
 cases = { FEATOOL,   TRI,   {P1,P1},  NLEV;
           FEATOOL,   TRI,   {P2,P1},  NLEV(1:end-1);
           FEATOOL,   QUAD,  {Q1,Q1},  NLEV;
           FEATOOL,   QUAD,  {Q2,D1},  NLEV(1:end-1);
           FENICS,    TRI,   {P1,P1},  NLEV;
           FENICS,    TRI,   {P2,P1},  NLEV(1:end-1);
           OPENFOAM,  TRI,   {D0,D0},  NLEV;
           OPENFOAM,  QUAD,  {D0,D0},  NLEV;
           SU2,       TRI,   {P1,P1},  NLEV;
           SU2,       QUAD,  {Q1,Q1},  NLEV };


 opt.basename = mfilename();
 opt.solvers  = solvers;
 opt.grids    = grids;
 opt.cases    = cases;
 opt.fcn_fea  = @l_setup_fea_struct;
 opt.fcn_err  = @l_compute_error;

 [ data, fea ] = run_featool_benchmarks( opt );


%