Getting Started
redbKIT is a MATLAB library for finite element simulation and reduced-order modeling of PDEs.
redbKIT
consists of three main packages: RB_library
, FEM_library
and Problems
, which are briefly described below.
RB_library
The RB_library
includes straightforward implementations of many of the algorithms presented in Chapters 3, 6, 7 and 10 of the book
Notable examples are the following:
- proper orthogonal decomposition
- greedy algorithm
- radial basis function interpolation of stability factors
- Galerkin and least-squares reduced basis methods
- the empirical interpolation method and its discrete variant
The implementation is almost independent of the underlying high-fidelity approximation, provided that the high-fidelity model is described in a specified format. Here, we rely on the finite element method as high-fidelity approximation. See below.
As of Release 2.0, an implementation of the Matrix Discrete Empirical Interpolation Method (see [NMA15]) as well as an example of its application to the Helmholtz equation are provided.
FEM_library
Provides a flexible implementation for the following families of problems:
-
2D/3D steady and unsteady diffusion-transport-reaction equations, with P1/P2 finite elements and SUPG stabilized P1 finite elements.
- 2D/3D steady and unsteady Navier-Stokes equations approximated by
- P2-P1 or P1Bubble-P1 finite elements for velocity and pressure spaces, respectively;
- P1-P1 finite elements stabilized with the SUPG stabilization (implemented as in the framework of the Variational MultiScale Method).
For the steady case, Newton iterations are provided. For the unsteady case, time advancing is performed via BDF integrator, while the convection term can be treated either implicitly (with Newton subiterations) or with a semi-implicit scheme with extrapolation of the convective term.
-
2D/3D steady and unsteady structural problem. Both linear elasticity and nonlinear hyperelastic St. Venant Kirchhoff, nearly incompressible Neo-Hookean and Raghavan-Vorp material models are implemented. For the steady case, a basic Newton algorithm with backtracking is provided. In the unsteady case, time advancing is performed via the generalized-$\alpha$ scheme suitably combined with Newton subiterations in the nonlinear case.
- 2D/3D Fluid-Structure Interaction (FSI) problems. The solver implements the following numerical approximations of the FSI problem:
- (a) monolithic geometric convective explicit with semi-implicit fluid and linear/nonlinear structure
- (b) monolithic fully-implicit
In both cases:
- a condensed formulation is employed, i.e. only internal and interface fluid velocity, fluid pressure, and internal solid displacement are considered as degrees of freedom. In case (a), internal fluid displacement DoFs are automatically uncoupled from the Fluid-Solid problem. In case (b), since shape derivatives in the Jacobian matrix are not taken into account, the mesh motion problem is only one-way coupled with the Fluid-Solid problem.
- the fluid equations are approximated in time by means of a BDF scheme. Space discretization for the velocity can be either P2, P2Bubble or P1 with SUPG stabilization.
- the structure can be either linear or nonlinear; time discretization is performed via the Newmark scheme.
- for the mesh motion problem, we use the Solid Extension Mesh Motion technique with Jacobian-based stiffening.
The package can load linear triangular and tetrahedral meshes either in the .msh format or in the MATLAB Partial Differential Equation Toolbox(R) format. Results can be either visualized in MATLAB or exported in the (binary) VTK format for post-processing with Paraview.
The assembly routines for the FE vectors and matrices are written in C code using suitable mex interfaces. For this reason, before using the library you first need to compile the FE assemblers, as explained in the INSTALL file. Loops over the elements are parallelized via OpenMP, while the global assembly of sparse matrices from local contributes can be speeded-up by installing the FAST package.
The default linear solver is Matlab backslash (sparse direct solver). If available, also MUMPS can be used in a straightforward fashion. For moderately large size problems, a One-Level (geometric) Additive Schwarz preconditioner can be employed in combination with a suitable iterative solver (usually gmres). In this case, mesh partitioning is done through the Meshpart toolbox and Metis library.
Problems
The Problems
contains a gallery of tests, examples and applications which are described in the Problems Gallery.
Usage
Start MATLAB(R) and navigate to the redbKIT
folder. Then, type in the MATLAB prompt
>> setPath
to add the FEM_library/
and RB_library/
folders to the current path.
A welcome message should appear: you can now start using redbKIT!
A gallery of applications is provided in the folder Problems/
.
To check that the code is correctly working, please type in the MATLAB prompt
>> cd Problems
>> test_all
The test_all.m
functions launches a series of tests and generates a log file test_log.txt
. If all the tests are marked as passed, you can start enjoying redbKIT
. Otherwise, do not hesitate to contact us by email at redbkit@gmail.com.