action functions
|
Please note that the library has not been "officially" released. While we continue to work on the documentation, these web pages are likely to contain broken links and documents in draft form. Please send an email to if you wish to be informed of the library's "official" release. |
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..oomph-lib's self-test routines (activated by typing make check in the top-level directory). |
Overview:
Example codes for specific problem/equations
| Example code | oomph-lib features/conventions illustrated by the example code | Completeness of the documentation |
| The 1D Poisson equation We (re-)solve the problem considered in the Quick Guide, this time using existing oomph-lib objects: The OneDMesh and finite elements from the QPoisson family. |
| |
| The 2D Poisson equation. 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. |
| |
| 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 oomph-lib's fully-automatic mesh adaptation routines. |
| |
| 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 oomph-lib's automatic mesh adaptation routines. |
| |
| Poisson's equation in a fish-shaped domain revisited -- mesh adaptation in deformable domains with curvilinear and/or moving boundaries. 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 oomph-lib's octree-based 3D mesh adaptation routines. |
| |
| 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 2D unsteady heat equation We solve the 2D unsteady heat equation and demonstrate oomph-lib's time-stepping procedures for parabolic problems. |
| |
| The 2D unsteady heat equation with restarts We demonstrate oomph-lib's dump/restart capabilities which allow time-dependent simulations to be restarted. |
| |
| The 2D unsteady heat equation with adaptive timestepping We demonstrate oomph-lib's adaptive timestepping capabilities. |
| |
| Spatially adaptive solution of the 2D unsteady heat equation with Neumann (flux) boundary conditions. We solve a 2D unsteady heat equation in a non-trivial domain with flux boundary conditions and compare the computated results against the exact solution. |
| |
| Spatially adaptive solution of the 2D unsteady heat equation in a moving domain with Neumann (flux) boundary conditions. We demonstrate the spatially adaptive solution of a 2D unsteady heat equation in a nontrivial moving domain. |
| |
| Spatially and temporally adaptive solution of the 2D unsteady heat equation in a moving domain with flux boundary conditions. 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 2D linear wave equation. We solve a 2D wave equation and demonstrate oomph-lib's time-stepping procedures for hyperbolic problems. |
| |
| The spatially-adaptive solution of the 2D linear wave equation We demonstrate that the spatially-adaptive solution of the 2D wave equation is difficult (in fact, not very sensible) because any spurious waves that are generated during mesh adaptation are never damped out. Refineable linear wave elements should therefore only be used to "manually" refine meshes before the start of the simulation. |
| |
| 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 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 oomph-lib's mesh adaptation routines to refine the mesh in the neighbourhood of the pressure singularities. |
| |
| 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. |
| |
| A variant of Rayleigh's oscillating plate problem: The unsteady 2D Navier-Stokes equations with periodic boundary conditions 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. |
| |
| Another variant of Rayleigh's oscillating plate problem: The unsteady 2D Navier-Stokes equations with periodic boundary conditions, driven by an applied traction. 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 oomph-lib's AlgebraicNode, AlgebraicElement and AlgebraicMesh classes. Algebraic node updates will turn out to be essential for the efficient implementation of fluid-structure interaction problems. |
| |
| 2D finite-Reynolds-number-flow in a 2D channel that is partially obstructed by an oscillating leaflet 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. |
| |
| 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. |
|
|
| Spin-up of a viscous fluid -- the spatially adaptive solution of the unsteady 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 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. |
| |
| Free-surface relaxation oscillations of a viscous fluid layer. We study the oscillations of perturbed fluid layer. |
| |
| Relaxation oscillations of an interface between two viscous fluids. We study the oscillations of two-layer fluid system. |
| |
| 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! |
| |
| A steadily-rotating cylinder below a free surface in a finite box. Compute the free surface position and fluid velocity and pressure fields about a fixed, steadily-rotating cylinder immersed in a viscous fluid in a finite box. Uses a pseudo-elastic remesh strategy and spatial adaptivity in a non-trivial free surface problem. |
|
|
| Solid mechanics: Theory and implementation In this document we discuss the theoretical background and the practical implementation of oomph-lib's solid mechanics capabilities. |
| |
| Bending of a cantilever beam 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 canvilever 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. |
| |
| Inflation of a blood vessel 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. |
| |
| Large shearing deformations of a hyper-elastic, incompressible block of material We solve a classical problem in large-displacement elasticity and comprare against Green and Zerna's exact solution. |
| |
| 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 oomph-lib's geometrically non-linear Kirchhoff-Love-type HermiteBeamElement and compare the results against an (approximate) analytical solution. |
| |
| 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. |
| |
| 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. |
| |
| Warm-up problem for free-boundary problems: How to parametrise unknown boundaries. We demonstrate how to "upgrade" a GeomObject to a GeneralisedElement so that it can be used to parameterise an unknown domain boundary. |
| |
| A toy interaction problem: The solution of a 2D Poisson equation coupled to the deformation of the domain boundary We show how to use MacroElementNodeUpdateElements and MacroElementNodeUpdateMeshes to implement sparse node update operations in free-boundary problems. We demonstrate their use in a simple free-boundary problem: The solution of Poisson's equation, coupled to an equation that determines the position of the domain boundary. |
| |
| A classical fluid-structure interaction problem: Finite Reynolds number flow in a 2D channel with an elastic wall. 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. |
| |
| Finite Reynolds number flow in a 2D channel with an elastic wall revisited: Sparse algebraic node updates 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. |
| |
| Finite Reynolds number flow in a 2D channel with an elastic wall revisited again: Spatial adaptivity in fluid-structure interaction problems. We revisit the problem of flow in a collapsible channel yet again to demonstrate the use of spatial adaptivity in fluid-structure interaction problems. |
| |
| Segregated solvers for fluid-structure-interaction problems: Revisiting the flow in a 2D collapsible channel We revisit the problem of flow in a collapsible channel once more to demonstrate the use of segregated solvers in fluid-structure interaction problems. |
| |
| Preconditioning monolithic solvers for fluid-structure-interaction problems: Revisiting the flow in a 2D collapsible channel yet again We revisit the problem of flow in a collapsible channel yet again to demonstrate the use of oomph-lib's FSI preconditioner for the monolithic solution of fluid-structure interaction problems. |
| |
| Flow past a flexible leaflet 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 oomph-lib. |
| |
| Using unstructured meshes for FSI problems. We demonstrate how to use xfig/triangle-generated unstructured meshes for 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. |
| |
| 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). |
| |
| A simple fluid-structure interaction problem: Finite Reynolds number flow, driven by an oscillating ring. 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 MacroElements. [This is a warm-up problem for the full fluid structure interaction problem discussed in the next example]. We compare the predictions for the flow field against asymptotic results. |
| |
| A simple fluid-structure interaction problem re-visited: Finite Reynolds number flow, driven by an oscillating ring -- this time with algebraic updates for the nodal positions. 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 AlgebraicElements. |
| |
| A real fluid-structure interaction problem: Finite Reynolds number flow in an oscillating elastic ring. 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. |
| |
| Simple multi-physics problem: How to combine exisiting single-physics elements into new multi-physics elements. We demonstrate how to "combine" a CrouzeixRaviartElements and QAdvectionDiffusionElements into a single BuoyantCrouzeixRaviartElement that solves the Navier--Stokes equations under the Boussinesq approximation coupled to an energy equation. |
| |
| Refineable multi-physics problem: How to combine exisiting refineable single-physics elements into new refineable multi-physics elements. We demonstrate how to "combine" a RefineableCrouzeixRaviartElements and RefineableQAdvectionDiffusionElements into a single RefineableBuoyantCrouzeixRaviartElement that solves the Navier--Stokes equations under the Boussinesq approximation coupled to an energy equation. |
| |
| 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 QUnsteadyHeatElement and QPVDElement into a single QThermalPVDElement that solves the equations governing elastic deformations coupled to uniform thermal expansion. The geometric coupling back to the heat equation is completely hidden. |
| |
| Mesh type | oomph-lib features/conventions discussed | Completeness of the documentation |
We list oomph-lib's existing structured meshes and provide a quick overview of their common features. |
| |
We describe oomph-lib's wrappers to third-party (unstructured) mesh generators. |
| |
xfig oomph-lib's one-and-only GUI: Generating unstructured triangular meshes using xfig and Triangle |
Linear solvers and preconditioners
| Example code | oomph-lib features/conventions illustrated by the example code | Completeness of the documentation |
| Overview We provide an overview of oomph-lib's direct and iterative linear solvers and preconditioners. |
| |
oomph-lib's Least-Squares-Commutator (LSC) Navier-Stokes precondtitioner We discuss oomph-lib's implementation of Elman, Silvester & Wathen's Least-Squares-Commutator (LSC) Navier-Stokes precondtitioner. |
| |
oomph-lib's fluid-structure interaction preconditioner We discuss oomph-lib's preconditioner for the solution of monolithically-discretised fluid-structure interaction problems. |
| |
| Example code | oomph-lib features/conventions illustrated by the example code | Completeness of the documentation |
| Displaying results with paraview We demonstrate how to use Angelo Simone's conversion scripts that allow the oomph-lib results to be displayed by paraview. |
| |
Please consult the general tutorial on oomph-lib's parallel processing capabilities.
| Example code | oomph-lib features/conventions illustrated by the example code | Completeness of the documentation |
| Parallel solution of the adaptive driven cavity problem We demonstrate how to distribute a straightforward single-physics problem. |
| |
| Parallel solution of the 2D Poisson problem with flux boundary conditions We demonstrate the modifications required to distribute a problem involving FaceElements. |
| |
| 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. |
| |
1.4.7