FEINS
(Finite Element Incompressible Navier-Stokes solver)
Author:
Rene Schneider
Intro -
Key features -
License -
Documentation -
Download -
Examples.
As the name suggests, this software originated as a solver for
fluid flow problems, to test methods developed in the authors
PhD Thesis.
Over time though it evolved, and the same low level routines were
reused to build solvers for other problems as well.
All linear equation systems are solved by modern preconditioned
iterative methods, based on multi-level/multi-grid ideas.
Although the code is written entirely in C, it uses ideas from
object oriented programming to a certain degree, to combine
advantages of both worlds.
The code currently implements unstructured meshes of triangular
elements (P
1 and P
2) in two dimensions, with
adaptive refinement or uniform h-refinement. The data structures
and code layout are
intended to allow easy extension other types of elements
(e.g. quadrangles), and three dimensions (but
we haven't found time to implement these yet).
[Update:]
Extension to 3D is under way as a student project.
From the beginning, the code was meant to support shape
optimisation. For this purpose it allows boundary sections defined
by Bezier-splines, and is able to compute the derivatives of
functionals that depend on the solution of a PDE with respect to
those spline parameters. This is done efficiently by means of the
discrete adjoint method (see the authors PhD thesis), with a cost
roughly equivalent to one additional solve of the primal
problem. This derivative is in some sense a shape-gradient of the
functional, which can be used for optimisation.
Problem specific features:
- Poisson Equation
-
- mainly meant for testing various components for other
problems
- BPX-preconditioner and V-cycle-multigrid as preconditioners for CG
- no shape gradient yet
- P1 and P2 elements
- no adaptivity yet
- stationary case only
- Lame-Equation of linear elasticity
-
- BPX-preconditioner and V-cycle-multigrid as preconditioners for CG
solving 35,419,650 DOFs for P2 elements to 1e-6 in 733 seconds on a single core of a Intel Xeon 5160 @ 3.0 GHz
- shape gradient available
- P1 and P2 elements
- adaptivity, using Bänsch green refinement and a
residual error estimator
- stationary case only
- Incompressible Navier-Stokes
-
- Newton- or Picard-linearisation
- Fp-preconditioner for GMRES ([Kay, Loghin,
Wathen, 2002] and [Elman, Loghin, Wathen, 2003]) with
multigrid preconditioned GMRES for solving the subproblems
within the preconditioner.
solving 37,769,219 DOFs to 1e-9 in 8.6 hours on a single core of a Intel Xeon 5160 @ 3.0 GHz
- shape gradient available
- Taylor-Hood elements (P2 for velocities and
P1 for pressure)
- no adaptivity yet
- stationary case only
This finite element solver is released as free software under
GNU GPL Version 3.
However, if this to restrictive for your purposes, please contact the
author
rene.schneider@..., and a less restrictive license may be agreed.
The code itself is documented fairly well, but a central guide is
only available in form of the README.TXT. The README provides
support up to the point that you can build the code and run an
example that comes along with it. It should be fairly easy to
start from there. If you have questions, please contact me:
rene.schneider@....
- The current development version of the code is always
available via SVN. To get access to the SVN, please contact me: rene.schneider@....
- feins___rev2579_2011-04-29__13_59_22.tgz, SVN snapshot revision 2579, last change 29 April 2011.
Main changes since last release:
- two new examples for optimisation with linear elasticity equation: pedal crank and support with hole
- generic ZZ error estimate and generalised marking: gen_error_est_zz_tx gen_error_est_marker
- improved the solver_settings section of mesh files (.f1m), now allowing various stopping criteria for the mesh refinement among other options
- backward Euler and ROS3P Rosenbrock ODE solver for time dependent convection diffusion
- loads of changes to make feins compile and run in Windows environment. See README.txt for instructions on building under Windows
- implemented usage of OpenMP parallelisation: for now only matrix vector products and assembly of Navier-Stokes matrices, reasonable speedup, looks promising
downloads: 113
- feins___rev1824_2010-05-21__13_00_13.tgz, SVN snapshot revision 1824, last change 21 May 2010.
Main changes since last release:
- Adjoint and shape gradient for Lamé equation (linear elasticity, thanks Andreas Günnel).
- Adaptivity for Lamé equation (Bänsch green refinement,
thanks Andreas Günnel, see his Diplom thesis).
- Redesign of directory layout, see also README.TXT.
- Dropped $ARCHI variable approach and old makefiles, we
now use cmake for automatic configuration, see also README.TXT.
- Added UMFPACK as sparse direct solver, with automatic
detection of availability.
- New visualisation solution: paraview. We can now write
.vtk files for use with paraview.
downloads: 150
- feins_080703.tgz, released 3 July 2008.
- feins_AD_elem_release_100607.tgz, released 7 June 2010, benchmark for AD community, see also "README_AD.txt". The slides of the presentation leading to this benchmark are here.
- Navier-Stokes: shape optimisation of a obstacle in a
channel
Initial shape at Re=10
Optimised shape for Re=10
- Navier-Stokes: flow over bump (from README.TXT)
bump.f1m at Re=1; 297,795 DOFs, solution takes 150s, adjoint
gradient 110s
- Navier-Stokes: cavity (with curved bottom)
lid driven cavity at Re=100; 148,739 DOFs, solution takes
230s, adjoint gradient 190s
- Linear elasticity (Lamé): optimisation of a pedal crank
Initial shape
Optimised shape
- Linear elasticity (Lamé): triangular support with a hole
adaptive solver; 17,980 DOFs, takes 2.2s including shape
gradient (adjoint)
- Poisson equation: square domain
| Nodes | PCG iterations | time (s) |
| 9 | 1 | 4.9e-05 |
| 25 | 9 | 6.9e-05 |
| 81 | 10 | 2.2e-04 |
| 289 | 10 | 8.2e-04 |
| 1,089 | 10 | 3.0e-03 |
| 4,225 | 10 | 1.2e-02 |
| 16,641 | 10 | 6.1e-02 |
| 66,049 | 10 | 4.0e-01 |
| 263,169 | 10 | 2.0e+00 |
| 1,050,625 | 10 | 8.8e+00 |
| 4,198,401 | 10 | 3.7e+01 |
| 16,785,409 | 10 | 1.5e+02 |
| 67,125,249 | 10 | 6.0e+02 |
- first steps in 3D: Poisson equation on 3D geometry (in development)
30,715 DOFs
visits to this site: 10366
Details.