This document provides a complete list of the example codes that are distributed with the oomph-lib
library. For each code we give a brief description of the problem solved and provide a link to the detailed documentation. The codes are listed in order of increasing complexity. The bullet-point list in the right column lists the new oomph-lib
features that are introduced in the example. You may either work through the examples one-by-one, treating the example codes and their documentation as chapters in a self-study course, or use the list of topics in the right column as a quick reference to example codes that provide an introduction to a specific feature.
You may also wish to consult the following documents:
oomph-lib
.oomph-lib's
data structure.oomph-lib's
fundamental objects: Problems
, Meshes
, and Elements
.oomph-lib
's parallel processing capabilities.. We're still working on the detailed documentation for many of the demo problems listed below. The fully-documented demo problems are accessible via the links. If you are particularly interested in a specific problem for which the detailed documentation is incomplete, let us know – we might be able to give it a slightly higher priority. We are happy to let you have driver codes before the documentation is complete. Such codes usually need a bit of tidying to make them acceptable for "general release", but they are fully functional. In fact, they are run on a regular basis as part of oomph-lib's self-test routines (activated by typing make check in the top-level directory). |
Problem solved by example code Short description of problem. |
|
Poisson problems | |
We (re-)solve the problem considered in the Quick Guide, this time using existing |
|
We solve a 2D Poisson problem with Dirichlet boundary conditions and compare the results against an exact solution. |
|
The 2D Poisson equation with flux boundary conditions (I) Another 2D Poisson problem – this time with Dirichlet and Neumann boundary conditions. |
|
The 2D Poisson equation with flux boundary conditions (II) An alternative solution for the previous problem, using multiple meshes. |
|
Poisson problems with adaptivity | |
Adaptive solution of Poisson's equation in a fish-shaped domain We solve a 2D Poisson equation in a nontrivial, fish-shaped domain and demonstrate |
|
The 2D Poisson equation revisited – how to create a refineable mesh We revisit an earlier example and demonstrate how easy it is to "upgrade" an existing mesh to a mesh that can be used with |
|
We revisit an earlier example and demonstrate how to create refineable meshes for problems with curvilinear and/or moving domain boundaries. |
|
Adaptive solution of Poisson's equation with flux boundary conditions. We revisit an earlier example and demonstrate how to apply flux boundary conditions in problems with spatial adaptivity. |
|
Adaptive solution of a 3D Poisson equations in a spherical domain We demonstrate |
|
The advection-diffusion equation | |
The 2D advection diffusion equation with spatial adaptivity We solve a 2D advection-diffusion equation and illustrate the characteristic features of solutions at large Peclet number. |
|
2D advection diffusion equation with Neumann (flux) boundary conditions. We solve a 2D advection-diffusion equation with flux boundary conditions. |
|
The 2D advection diffusion equation revisited: Petrov-Galerkin methods and SUPG stabilisation. We demonstrate how to implement a stabilised Petrov-Galerkin discretisation of the advection diffusion equation. |
|
The unsteady heat equation and an introduction to time-stepping | |
We solve the 2D unsteady heat equation and demonstrate |
|
The 2D unsteady heat equation with restarts We demonstrate |
|
The 2D unsteady heat equation with adaptive timestepping We demonstrate |
|
We solve a 2D unsteady heat equation in a non-trivial domain with flux boundary conditions and compare the computed results against the exact solution. |
|
We demonstrate the spatially adaptive solution of a 2D unsteady heat equation in a nontrivial moving domain. |
|
We demonstrate the use of combined spatial and temporal adaptivity for the solution of a 2D unsteady heat equation in a nontrivial moving domain. |
|
The linear wave equation | |
We solve a 2D wave equation and demonstrate |
|
The Helmholtz equation | |
We solve a 2D Helmholtz problem, simulating scattering of a planar wave from a circular cylinder. |
|
Solving the Helmholtz equation on an unstructured mesh. We solve a 2D Helmholtz problem, simulating scattering of a planar wave from a circular cylinder – this time using an unstructured mesh. |
|
The azimuthally Fourier-decomposed 3D Helmholtz equation | |
The azimuthally Fourier-decomposed 3D Helmholtz equation. We solve the 3D Helmholtz equation in cylindrical polar coordinates, using a Fourier-decomposition in the azimuthal direction. |
|
We re-visit the 3D Helmholtz equation in cylindrical polar coordinates, using a Fourier-decomposition in the azimuthal direction – this time using spatial adaptivity and an unstructured mesh |
|
The Helmholtz equation and perfectly matched layers | |
The Helmholtz equation and perfectly matched layers (PMLs). We demonstrate the imposition of the Sommerfeld radiation condition by perfectly matched layers (PMLs) using the example of a radiating cylinder. |
|
The azimuthally Fourier-decomposed 3D Helmholtz equation and perfectly matched layers (PMLs) | |
The azimuthally Fourier-decomposed 3D Helmholtz equation and perfectly matched layers (PMLs). We consider the azimuthally Fourier-decomposed 3D Helmholtz equation and demonstrate the imposition of the Sommerfeld radiation condition by perfectly matched layers (PMLs). |
|
The Young Laplace equation | |
The solution of the Young-Laplace equation. We solve the Young Laplace equation that governs the shape of static air-liquid interfaces. |
|
Contact-angle boundary conditions for the Young-Laplace equation We demonstrate how to apply contact angle-boundary conditions for the Young-Laplace equation. |
|
The Navier-Stokes equations | |
The 2D Navier-Stokes equations: Driven cavity flow Probably the most-solved problem in computational fluid dynamics: Steady driven cavity flow. We illustrate the problem's discretisation with Taylor-Hood and Crouzeix-Raviart elements. |
|
The 2D Navier-Stokes equations: Adaptive solution of the 2D driven cavity problem We employ |
|
The 2D Navier-Stokes equations: Driven cavity flow in a quarter-circle domain with mesh adaptation We re-solve the driven-cavity problem in a different domain, demonstrate how to apply body forces and show how to switch between the stress-divergence and simplified forms of the Navier-Stokes equations. |
|
Adaptive simulation of 3D finite Reynolds number entry flow into a circular pipe We solve the classical problem of entry flow into a 3D tube. |
|
We solve a variant of the classical Rayleigh plate problem to demonstrate the use of periodic boundary conditions and time-stepping for the Navier-Stokes equations. |
|
We demonstrate how to apply traction boundary conditions for the Navier-Stokes equations. |
|
2D finite-Reynolds-number-flow driven by an oscillating ellipse We study the 2D finite-Reynolds number flow contained inside an oscillating elliptical ring and compare the computed results against an exact solution (an unsteady stagnation point flow). |
|
2D finite-Reynolds-number-flow in a 2D channel with a moving wall This is a "warm-up" problem for the classical fluid-structure interaction problem of flow in a 2D collapsible channel. Here we compute the flow through a 2D channel in which part of one wall is replaced by a moving "membrane" whose motion is prescribed. |
|
2D finite-Reynolds-number-flow in a 2D channel with a moving wall revisited: Algebraic Node updates. We re-visit the problem studied in the previous example and demonstrate an alternative node-update procedure, based on |
|
We consider a variation of the problem studied in the previous example and demonstrate an alternative node-update procedure, based on |
|
This is a "warm-up" problem for the corresponding fluid-structure interaction problem where the leaflet deforms in response to the fluid traction. Here we consider the case where the motion of the leaflet is prescribed. |
|
Flow past a cylinder with a waving flag This is a "warm-up" problem for Turek & Hron's FSI benchmark problem where the flag deforms in response to the fluid traction. Here we consider the case where the motion of the flag is prescribed. |
|
Unstructured meshes for fluids problems This is a "warm-up" problem for another tutorial in which we demonstrate the use of unstructured meshes for FSI problems. |
|
Unstructured meshes for 3D fluids problems This is a "warm-up" problem for another tutorial in which we demonstrate the use of unstructured 3D meshes for FSI problems. |
|
Steady finite-Reynolds-number flow through an iliac bifurcation We show how to simulate physiological flow problems, using the Vascular Modeling Toolkit (VMTK). This is a "warm-up" problem for another tutorial in which we consider the corresponding FSI problems in which the vessel wall is elastic. |
|
Motion of elliptical particles in shear flow: unstructured adaptivity We solve the classical problem of shear flow past a immersed ellipse |
|
Adaptive simulation of flow at finite Reynolds number in a curved circular pipe We solve the classical problem of flow into a 3D curved tube. |
|
The axisymmetric Navier-Stokes equations | |
A classical fluid mechanics problem: Spin-up of a viscous fluid. A key feature of the flow is the development of thin Ekman (boundary) layers during the early stages of the spin-up. We demonstrate how the use of spatial adaptivity helps to resolve these layers. At large times, the flow field approaches a rigid-body rotation – this poses a subtle problem for the spatial adaptivity as its default behaviour would cause strong spatially uniform refinement. |
|
The free-surface Navier-Stokes equations | |
Interfaces, Free Surfaces and Surface Transport: Theory and Implementation. In this document, we introduce the basic theory of moving surfaces, surface calculus and surface transport equations. In addition, we describe how oomph-lib's free-surface and surface-transport capabilities are implemented. |
|
Free-surface relaxation oscillations of a viscous fluid layer. We study the oscillations of a perturbed fluid layer and compare the results to the analytic dispersion relation based on linearised disturbances. |
|
Relaxation oscillations of an interface between two viscous fluids. We study the oscillations of a two-layer fluid system and compare the results to the analytic dispersion relation based on linearised disturbances. |
|
A static free surface bounding a layer of viscous fluid. A hydrostatics problem: Compute the static free surface that bounds a layer of viscous fluid – harder than you might think! |
|
A static interface between two viscous fluids. A hydrostatics problem: Compute the static interface between two viscous fluids – harder than you might think! |
|
Flow of a fluid film down an inclined plane A classical fluid mechanics problem: We study the flow of a film of fluid down an inclined plane and compare the results to the exact solution of Nusselt. The stability is assessed by simulating the time-evolution of a perturbation to the free surface. |
|
The Bretherton problem: An air finger propagates into a 2D fluid-filled channel. A classical fluid mechanics problem: We study the propagation of an inviscid (air) finger into a 2D fluid-filled channel and compare our results against those from Bretherton's theoretical analysis. |
|
A finite bubble propagates in a 2D fluid-filled channel. Uses a pseudo-elastic remesh strategy and unstructured spatial adaptivity in a non-trivial free surface problem. |
|
A finite droplet propagates in a 2D fluid-filled channel. Uses a pseudo-elastic remesh strategy and unstructured spatial adaptivity in a non-trivial interfacial (two-fluid) problem. |
|
The axisymmetric free-surface Navier-Stokes equations | |
Relaxation oscillations of an interface between two viscous fluids in an axisymmetric domain. We study the oscillations of a two-layer fluid system in an axisymmetric domain and compare the results to the analytic dispersion relation based on linearised disturbances. |
|
An axisymmetric static free surface bounding a layer of viscous fluid. A hydrostatics problem: Compute the static free surface that bounds a layer of viscous fluid in an axisymmetric geometry. |
|
Nonlinear solid mechanics problems | |
Nonlinear solid mechanics: Theory and implementation In this document we discuss the theoretical background and the practical implementation of |
|
We study a classical solid mechanics problem: the bending of a cantilever beam subject to a uniform pressure loading on its upper face and/or gravity. We compare the results for zero-gravity against the (approximate) analytical St. Venant solution for the stress field. |
|
Axisymmetric compression of a circular disk We study the axisymmetric compression of a circular, elastic disk, loaded by an external traction. The results are compared against the predictions from small-displacement elasticity. |
|
Compressible and incompressible behaviour We discuss various issues related to (in)compressible material behaviour and illustrate various solution techniques in a simple test-problem: The compression of a square block of (compressible or incompressible) material by a gravitational body force. The results are compared against the predictions from small-displacement elasticity. |
|
Axisymmetric oscillations of a circular disk We study the free axisymmetric oscillations of a circular, elastic disk and compare the eigenfrequencies and modes against the predictions from small-displacement elasticity. |
|
Deformation of a solid by a prescribed boundary motion We study the large deformations of a 2D elastic domain, driven by the prescribed deformation of its boundary. The boundary motion is imposed by Lagrange multipliers. This technique is important for the solution of fluid-structure interaction problems in which the deformation of the fluid mesh is controlled by (pseudo-)elasticity. |
|
Large-amplitude bending of an asymmetric 3D cantilever beam made of incompressible material. We study the deformation of an asymmetric 3D cantilever beam made of incompressible material. |
|
Unstructured meshes for 2D and 3D solid mechanics problems. We demonstrate how to use unstructured meshes to solve 2D and 3D solid mechanics problems. This tutorial acts as a "warm-up" problem for the solution of unstructured FSI problems. |
|
Unstructured meshes for 3D solid mechanics problems. We demonstrate how to use unstructured meshes to solve 3D solid mechanics problems. This is a "warm-up" problem for another tutorial in which we demonstrate the use of unstructured 3D meshes for FSI problems. |
|
We show how to simulate physiological solid mechanics problems, using the Vascular Modeling Toolkit (VMTK). This is a "warm-up" problem for another tutorial in which we consider the corresponding FSI problems in which the vessel conveys (and is loaded by) a viscous fluid. |
|
Large-amplitude shock waves in a circular disk We study the propagation of shock waves in an elastic 2D circular disk. |
|
Solid Mechanics using unstructured meshes with adaptivity We study the deflection of a 2D rectangular solid under a lateral pressure load. |
|
Large shearing deformations of a hyper-elastic, incompressible block of material We solve a classical problem in large-displacement elasticity and compare against Green and Zerna's exact solution. |
|
Linear elasticity | |
Linear Elasticity: Theory and implementation In this document we discuss the theoretical background and the practical implementation of |
|
We demonstrate how to compute the deformation of a linearly elastic strip, loaded by a spatially periodic surface traction, using spatial adaptivity. |
|
Axisymmetric linear elasticity | |
Axisymmetric linear elasticity: Theory, implementation and a time-dependent demo problem. In this document we discuss the theoretical background and the practical implementation of |
|
Time-harmonic linear elasticity | |
The equations of time-harmonic linear elasticity: Theory and implementation In this document we discuss the theoretical background and the practical implementation of equations describing forced, time-harmonic oscillations of elastic bodies. |
|
Solving the equations of time-harmonic linear elasticity on unstructured meshes We re-visit the solution of the equations of time-harmonic linear elasticity – this time using an unstructured mesh. |
|
Generalised time-harmonic linear elasticity and perfectly matched layers (PMLs) | |
The generalised equations of time-harmonic linear elasticity and perfectly matched layers (PMLs). In this document we discuss a generalisation of the equations of time-harmonic linear elasticity that allows the implementation of far field boundary condition by perfectly matched layers |
|
Azimuthally Fourier-decomposed 3D time-harmonic linear elasticity | |
In this document we discuss the theoretical background and the practical implementation of equations describing forced, time-harmonic, non-axisymmetric oscillations of axisymmetric elastic bodies. |
|
We simulate the forced, time-harmonic oscillations of a hollow cylinder loaded by a spatially-constant pressure load on its inner surface. |
|
Beam structures | |
The deformation of a pre-stressed elastic beam, loaded by a pressure load We study the lateral deformation of a pre-stressed elastic beam, using |
|
Large-displacement post-buckling of a pressure-loaded, thin-walled elastic ring We compute the post-buckling deformation of a thin-walled elastic ring, subjected to a pressure load and compare the results against results from the literature. |
|
Large-amplitude oscillations of a thin-walled elastic ring. We compute the free, large-amplitude oscillations of a thin-walled elastic ring and demonstrate that Newmark's method is energy conserving. |
|
Small-amplitude oscillations of a thin-walled elastic ring. We compute the free, small-amplitude oscillations of a thin-walled elastic ring, demonstrate that Newmark's method is energy conserving, and compare the oscillation frequencies and mode shapes against analytical predictions. |
|
Shell structures | |
Large-displacement post-buckling of a clamped, circular cylindrical shell. We simulate the post-buckling deformation of a pressure-loaded, clamped, thin-walled elastic shell. |
|
Large-displacement fluid-structure interaction problems | |
Warm-up problem for free-boundary problems: How to parametrise unknown boundaries. We demonstrate how to "upgrade" a |
|
We show how to use |
|
We demonstrate the solution of this classical fluid-structure interaction problem and demonstrate how easy it is to combine the two single-physics problems (the deformation of an elastic beam under pressure loading and the flow in a 2D channel with a moving wall) to a fully-coupled fluid-structure interaction problem. |
|
We revisit the problem of flow in a collapsible channel to demonstrate that the sparse algebraic node update procedures first discussed in an earlier non-FSI example lead to a much more efficient code. |
|
We revisit the problem of flow in a collapsible channel yet again to demonstrate the use of spatial adaptivity in fluid-structure interaction problems. |
|
We revisit the problem of flow in a collapsible channel once more to demonstrate the use of segregated solvers in fluid-structure interaction problems. |
|
We revisit the problem of flow in a collapsible channel yet again to demonstrate the use of |
|
We study the flow in a 2D channel that is partially obstructed by an elastic leaflet. |
|
Turek & Hron's FSI benchmark: Flow past an elastic flag attached to a cylinder We demonstrate how to discretise and solve this benchmark problem with |
|
Using unstructured meshes for FSI problems. We demonstrate how to use xfig/triangle-generated unstructured meshes (together with a pseudo-solid node update strategy for the fluid mesh) in fluid-structure interaction problems. |
|
Using unstructured meshes for 3D FSI problems. We demonstrate how to use tetgen-generated unstructured meshes for 3D fluid-structure interaction problems. |
|
2D FSI on unstructured meshes with adaptivity We demonstrate how to use spatial adaptivity on unstructured meshes for 2D fluid-structure interaction problems. |
|
Finite-Reynolds-number flow through an elastic iliac bifurcation We show how to simulate physiological fluid-structure interaction problems, using the Vascular Modeling Toolkit (VMTK). |
|
We discuss |
|
This is a very simple fluid-structure interaction problem: We study the finite-Reynolds number internal flow generated by an oscillating ring. The wall motion only has a single degree of freedom: The ring's average radius, which needs to be adjusted to conserve mass. The nodal positions in the fluid domain is updated by |
|
We re-visit the simple fluid-structure interaction problem considered in the earlier example.This time we perform the update of the nodal positions with |
|
Our first "real" fluid-structure interaction problem: We study the finite-Reynolds number internal flow generated by the motion of an oscillating elastic ring and compare the results against asymptotic predictions. |
|
Acoustic fluid-structure interaction problems | |
We provide an overview of |
|
A brief extension of the previous tutorial illustrating how to solve the problem with unstructured meshes. |
|
Azimuthally Fourier-decomposed 3D acoustic fluid-structure interaction problems | |
We provide an overview of |
|
A brief extension of the previous tutorial illustrating how to solve the problem on adaptive, unstructured meshes. |
|
Multi-physics problems | |
Simple multi-physics problem: How to combine existing single-physics elements into new multi-physics elements. We demonstrate how to "combine" a |
|
We demonstrate how to "combine" a |
|
Solving multi-field problems with multi-domain discretisations. We demonstrate an alternative approach to the solution of multi-field problems, in which the governing PDEs are discretised in separate meshes and interact via "external elements". |
|
Thermoelasticity: How to combine single-physics elements with solid mechanics elements. We demonstrate how to "combine" a |
|
Surfactant Transport: How to add surface transport equations to free surface elements. We demonstrate how to add general surface transport equations to the |
|
Eigenproblems | |
How to formulate and solve an eigenproblem. We demonstrate how to write |
|
How to formulate and solve an eigenproblem involving complex eigenvalues. We demonstrate how to write |
|
Structured meshes | |
We list |
|
Unstructured meshes using input from third-party mesh generators | |
Unstructured meshes generated via input from third-party mesh generators We describe |
|
Inline unstructured mesh generation We describe how to generate unstructured 2D meshes from within an |
|
Inline unstructured mesh generation including internal boundaries We describe how to generate unstructured 2D meshes that contain internal boundaries, delineating different regions of space, from within an |
|
|
Direct and iterative linear solvers and general-purpose preconditioners | |
We provide an overview of |
|
(Distributed) linear algebra and oomph-lib's block preconditioning framework | |
(Distributed) Linear Algebra Infrastructure We provide an overview of oomph-lib's (distributed) linear algebra infrastructure. |
|
(Distributed) Block preconditioners We provide an overview of oomph-lib's (distributed) block preconditioning framework and demonstrate how to write a new block preconditioner. |
|
(Distributed) General-purpose block preconditioners We provide an overview of oomph-lib's (distributed) general purpose block preconditioners |
|
Problem-specific preconditioners | |
We discuss |
|
We discuss |
|
We discuss |
|
We discuss |
|
Paraview | |
Displaying results with paraview We demonstrate how to use Angelo Simone's conversion scripts that allow the |
|
Please consult the general tutorial on oomph-lib
's parallel processing capabilities.
Distributed problems | |
Example code |
|
Parallel solution of the adaptive driven cavity problem We demonstrate how to distribute a straightforward single-physics problem. |
|
Parallel solution of the adaptive driven cavity problem with load balancing We demonstrate the modifications required to perform a load balancing step within the distributed adaptive driven cavity problem |
|
Parallel solution of the 2D Poisson problem with flux boundary conditions We demonstrate the modifications required to distribute a problem involving |
|
Parallel solution of the Boussinesq convection problem We demonstrate how to distribute a straightforward multi-physics problem where two domains interact. |
|
Parallel solution of an FSI problem: Channel with an elastic leaflet We demonstrate how to distribute FSI problems that use algebraic update methods. |
|
Parallel solution of Turek and Hron's FSI benchmark problem We demonstrate how to distribute a problem involving refineable 2D solid and fluid meshes that interact along interface boundaries. |
|