FEATool Multiphysics
v1.17.0
Finite Element Analysis Toolbox
|
EX_NAVIERSTOKES8B Axisymmtric laminar pipe flow benchmark.
[ DATA, FEA ] = EX_NAVIERSTOKES8B Axisymmtric laminar pipe flow benchmark
Sets up and solves stationary axisymmetric laminar Poiseuille flow in a circular pipe. The inflow profile is constant and the outflow should assume a parabolic profile. Compares the FEATool, FEniCS, and OpenFOAM solvers.
% 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 }; 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 ); %