Example codes
and tutorials
The (Not-so) Quick Guide
List of tutorials/demo codes
Single-Physics Problems
Poisson
Adaptivity illustrated for Poisson
Advection-Diffusion
Unsteady heat equation
Linear wave equation
The Young-Laplace equation
Navier-Stokes
Free-surface Navier-Stokes
Axisymmetric Navier-Stokes
Solid mechanics
Beam structures
Shell structures
Multi-physics Problems
Fluid-structure interaction
Boussinesq convection
Steady thermoelasticity
Methods-based example codes and tutorials
Mesh generation
Linear solvers and preconditioners
Visualisation of the results
Parallel processing
How to write a new element
How to write a new refineable element
Default nonlinear solvers -- the sequence of action functions
...
Documentation
FE theory and top-down discussion of the data structure
The (Not-so) Quick Guide
Comprehensive bottom-up discussion of the data structure
List of available structured and unstructured meshes
Linear solvers and preconditioners
Visualisation of the results
Parallel processing
Coding conventions and C++ style
Creating documentation
Optimisation - robustness vs. "raw speed"
Linear vs. nonlinear problems
Storing shape functions
Changing the default "full" integration scheme
Disabling the ALE formulation of unsteady equations
C vs. C++ output
Different sparse assembly techniques and the STL memory pool
Publications
Publications
Talks
Journal publications
Theses
Picture show
Download
Copyright
Download/installation instructions
Download page
FAQ & Contact
FAQ
Change log
Bugs and other known problems
Completeness of the library & our "To-Do List"
Contact the developers
Get involved

 


Beta release!

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

oomph-lib AT maths DOT man DOT ac DOT uk

if you wish to be informed of the library's "official" release.

Example codes and Tutorials

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:

Note:
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).

Overview:

  1. Example codes for specific problem/equations
  2. Mesh generation
  3. Linear solvers and preconditioners
  4. Visualisation
  5. Parallel driver codes



Example codes for specific problem/equations

Example code oomph-lib features/conventions illustrated by the example code Completeness of the documentation
Poisson problems
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.
  • General post-processing routines.

  • General conventions:
    • Use of public typedefs to specify function pointers.
    • Element constructors should not have any arguments.
complete
The 2D Poisson equation.

We solve a 2D Poisson problem with Dirichlet boundary conditions and compare the results against an exact solution.
  • How to apply Dirichlet boundary conditions in complex meshes.
  • How to use the DocInfo object to label output files.
  • How does one change the linear solver in the Newton method?

  • General conventions:
    • oomph-lib mesh objects are templated by the element type. How does one pre-compile mesh objects?
complete

The 2D Poisson equation with flux boundary conditions (I)

Another 2D Poisson problem -- this time with Dirichlet and Neumann boundary conditions.
  • How to apply non-Dirichlet (flux) boundary conditions with FaceElements.

  • General conventions:
    • What are broken virtual functions and why/when/where are they used?
complete
The 2D Poisson equation with flux boundary conditions (II)

An alternative solution for the previous problem, using multiple meshes.
  • How to use multiple meshes.

  • General conventions:
    • In problems with multiple sub-meshes, Nodes retain the boundary numbers of the mesh in which they were created.

  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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 oomph-lib's fully-automatic mesh adaptation routines.
  • How to perform automatic mesh adaptation.
  • oomph-lib's "black-box" adaptive Newton solver.
  • The functions Problem::actions_before_adapt() and Problem::actions_after_adapt().
complete
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.
  • "Upgrading" meshes to make them refineable.
  • General conventions:
    • Hanging nodes -- the functions Node::position(...) and Node::value(...).
complete
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.
  • How to create refineable meshes for problems with curvilinear and/or moving domain boundaries.
  • General conventions:
    • The GeomObject, Domain and MacroElement objects.
    • The Mesh::node_update() function.
    • It is good practice to store boundary coordinates for (Boundary) Nodes that are located on curvilinear domain boundaries.
complete
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.
  • How to apply flux boundary conditions in problems with spatial adaptivity.
  • General conventions:
    • The Mesh::flush_element_and_node_storage() function: "Emptying" a mesh without deleting its constituent nodes and elements (they might be shared with other meshes!).

  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
Adaptive solution of a 3D Poisson equations in a spherical domain

We demonstrate oomph-lib's octree-based 3D mesh adaptation routines.
  • Setting up and solving 3D problems isn't any harder than doing it in 2D.
  • General conventions:
    • The namespace CommandLineArgs provides storage for the command line arguments to make them accessible throughout the code.
    • Plotting mesh boundaries.
complete
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.
  • The adaptive discretisation of the advection diffusion equation.
  • How to specify the "wind" and the Peclet number for the advection diffusion equation.
  • How to document the progress of oomph-lib's "black box" adaptive Newton solver.
complete
2D advection diffusion equation with Neumann (flux) boundary conditions.

We solve a 2D advection-diffusion equation with flux boundary conditions.
  • How to specify Neumann (flux) boundary conditions for the advection diffusion equation.
complete
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.
  • Petrov-Galerkin discretisation of the advection-diffusion equation.
  • General conventions:
    • The role of shape, basis and test functions.
    • The element building blocks: Geometric elements, equation classes and specific elements.
Driver code and pretty pictures
The unsteady heat equation and an introduction to time-stepping
The 2D unsteady heat equation

We solve the 2D unsteady heat equation and demonstrate oomph-lib's time-stepping procedures for parabolic problems.
  • Solving time-dependent problems with Problem::unsteady_newton_solve(...)
  • The functions Problem::actions_before_implicit_timestep() and Problem::actions_before_implicit_timestep().
  • The BDF timesteppers and how to set up initial conditions for parabolic problems.
  • Initialising the "previous" nodal positions for elements that are based on an ALE formulation.

  • General conventions:
    • Providing a default Steady timestepper for all Mesh constructors.
    • Steady and unsteady versions of functions -- position and interpretation of the (discrete) time index.
complete
The 2D unsteady heat equation with restarts

We demonstrate oomph-lib's dump/restart capabilities which allow time-dependent simulations to be restarted.
  • The functions Problem::dump(...) and Problem::read(...).
  • How to customise the generic dump/restart functions.

complete
The 2D unsteady heat equation with adaptive timestepping

We demonstrate oomph-lib's adaptive timestepping capabilities.
  • How to enable temporal adaptivity.
  • The function Problem::adaptive_unsteady_newton_solve().
  • The function Problem::global_temporal_error_norm().
  • How to choose the target for the global temporal error norm.
complete
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.
  • Spatial adaptvity in time-dependent problems.
  • Choosing the maximum number of spatial adaptations per timestep.
  • Using Problem::set_initial_condition() to assign initial conditions ensures that the initial conditions are re-assigned when mesh adaptations are performed while the first timestep is computed.
  • The functions Problem::dump(...) and Problem::read(...) can handle adaptive meshes.

complete
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.
  • The ALE form of the unsteady heat equation and its implementation in oomph-lib's unsteady heat elements.
  • The role of the positional TimeStepper and the importance of assigning history values for the nodal positions.

  • General conventions:
    • The function Mesh::node_update() automatically updates the nodal positions in response to the deformation/motion of time-dependent GeomObjects that define the Domain and Mesh boundaries.
complete
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.
  • Adaptive timestepping combined with spatial adaptivity.

complete
The linear wave equation
The 2D linear wave equation.

We solve a 2D wave equation and demonstrate oomph-lib's time-stepping procedures for hyperbolic problems.
  • Timestepping for hyperbolic problems: The Newmark scheme.
  • How to set up initial conditions for hyperbolic problems.
  • Default settings for the linear wave equation elements.
  • How to apply Neumann (flux) boundary conditions for the linear wave equation.

complete
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.
  • How to use refineable linear wave elements

driver code only
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.
  • Theory and implementation.
  • The use of spines for the representation of complicated air-liquid interfaces.
  • Natural boundary conditions along free contact lines.
  • How to use displacement control to compute (past) limit points in the load-displacement characteristics.

complete
Contact-angle boundary conditions for the Young-Laplace equation

We demonstrate how to apply contact angle-boundary conditions for the Young-Laplace equation.
  • Theory and implementation of contact angle-boundary conditions.
  • How to generate initial guesses for the solution
  • Limitations of the current approach and suggestions for improvement
  • An inherent difficulty in problems with zero contact angles.

complete
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.
  • Discretising the steady Navier-Stokes equations: The governing equations and their implementation in the stress-divergence and simplified forms.
  • Non-dimensional parameters and their default values.
  • The pressure representation in Taylor-Hood and Crouzeix-Raviart elements.
  • Pinning a pressure value in problems with Dirichlet boundary conditions for the velocity on all boundaries.

complete
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.
  • Treatment of pressure degrees of freedom in Navier-Stokes simulations with adaptive mesh refinement -- pinning "redundant" pressure degrees of freedom.

  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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.
  • Adapting the driven cavity problem to different domains.
  • How to apply body forces in the Navier-Stokes equations.
  • How to switch between the stress-divergence and the simplified form of the incompressible Navier-Stokes equations.

complete
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.
  • Adaptivity for 3D Navier-Stokes problems
  • How to determine the numbering scheme for mesh boundaries.
  • How to adjust parameters that control the behaviour of oomph-lib's Newton solver.
  • The natural (traction-free) boundary conditions for the Navier-Stokes equations.
complete
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.
  • Timestepping for the Navier-Stokes equations.
  • How to apply periodic boundary conditions.

  • General conventions:
    • Periodic boundary conditions should be applied in the Mesh constructor.
complete
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.
  • How to apply traction boundary conditions for the Navier-Stokes equations.

complete
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).
  • Solving the Navier-Stokes equations in a moving domain.
  • How to apply no-slip boundary conditions on moving walls, using the function FSI_functions::apply_no_slip_on_moving_wall(...)

complete
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.
  • The adaptive solution of the Navier-Stokes equations in a moving domain with traction boundary conditions.

complete
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.
  • How to customise the node-update, using oomph-lib's AlgebraicNode, AlgebraicElement and AlgebraicMesh classes.
  • Existing AlgebraicMeshes are easy to use: Simply "upgrade" the required element (of type ELEMENT, say) in the templated wrapper class AlgebraicElement<ELEMENT>.

complete
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.
  • Another example illustrating the use of algebraic and MacroElement/Domain-based node update techniques.
complete
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.
  • Another example illustrating the use of algebraic and MacroElement/Domain-based node update techniques.
complete
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.
  • How to use xfig/triangle-generated, unstructured meshes for flow problems.
complete
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.
  • How to use tetgen-generated, unstructured meshes for 3D flow problems.
  • Avoiding "locking" with the split_corner_elements flag.
complete
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.
  • How to use ImposeParallelOutflowElements to enforce parallel in- and outflow from cross-sections that are not aligned with any coordinate planes.
complete
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.
  • Another example of adaptivity for 3D Navier-Stokes problems
driver code and pretty pictures

The axisymmetric Navier-Stokes equations
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 axisymmetric Navier-Stokes equations
  • How to prescribe a constant reference value for the normalisation of the error in spatially-adaptive computations in which the solution approaches a "trivial" solution.
driver code and pretty pictures

The free-surface Navier-Stokes equations
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.
  • ***
  • General conventions:
    • ***
driver code and pretty pictures
Free-surface relaxation oscillations of a viscous fluid layer.

We study the oscillations of perturbed fluid layer.
  • ***
  • General conventions:
    • ***
driver code and pretty pictures
Relaxation oscillations of an interface between two viscous fluids.

We study the oscillations of two-layer fluid system.
  • ***
  • General conventions:
    • ***
driver code only
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!
  • ***
  • General conventions:
    • ***
driver code only
A static interface between two viscous fluids.

A hydrostatics problem: Compute the static interface between two viscous fluids -- harder than you might think!
  • ***
  • General conventions:
    • ***
driver code only
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.
  • ***
  • General conventions:
    • ***
driver code only

Solid mechanics problems
Solid mechanics: Theory and implementation

In this document we discuss the theoretical background and the practical implementation of oomph-lib's solid mechanics capabilities.
  • Theory:
    • Solid mechanics problems -- Lagrangian coordinates
    • The geometry
    • Equilibrium and the Principle of Virtual Displacements
    • Constitutive Equations for Purely Elastic Behaviour
    • Non-dimensionalisation
    • 2D problems: Plane strain.
    • Isotropic growth.
    • Specialisation to a cartesian basis and finite element discretisation
  • Implementation:
    • The SolidNode class
    • The SolidFiniteElement class
    • The SolidMesh class
    • The SolidTractionElement class
  • Timestepping and the generation of initial conditions for solid mechanics problems
complete
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.
  • How to formulate solid mechanics problems.
  • How to choose a constitutive equation.
  • How to apply traction boundary conditions, using SolidTractionElements.
complete
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.
  • How to upgrade an existing mesh to SolidMesh.
  • Why it is necessary to use "undeformed MacroElements" to ensure that the numerical results converge to the correct solution under mesh refinement if the domain has curvilinear boundaries.
  • How to switch between different constitutive equations
  • how to incorporate isotropic growth into the model.
complete
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.
  • Different formulations of the constitutive laws for compressible, near-incompressible and incompressible behaviour.
  • How to combine the various constitutive laws with the displacement and pressure/displacement formulations of the principle of virtual displacements.
  • The default setting: Incompressibility is not enforced automatically. It must be requested explicitly.
complete
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.
  • How to assign initial conditions for unsteady solid mechanics problems.
complete
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.
  • How to impose displacement boundary conditions in solid mechanics problems by Lagrange multipliers.
complete
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.
  • How to enforce incompressible behaviour.
  • How to solve 3D solid mechanics problems with spatial adaptivity.
complete
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.
  • How to solve 2D and 3D solid mechanics problems on unstructured meshes.
  • How to identify domain boundaries in xfig-generated unstructured meshes.
complete
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.
  • How to solve 3D solid mechanics problems on unstructured meshes.
complete
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.
  • How to solve physiological solid mechanics problems.
complete
Large-amplitude shock waves in a circular disk

We study the propagation of shock waves in an elastic 2D circular disk.
  • How to employ spatial adaptivity in time-dependent solid mechanics problems.
driver code only
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.
  • A validation problem.
driver code only
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 oomph-lib's geometrically non-linear Kirchhoff-Love-type HermiteBeamElement and compare the results against an (approximate) analytical solution.
  • How to specify the undeformed reference shape for the Kirchhoff-Love-type beam elements.
  • How to apply boundary conditions and loads for the HermiteBeamElement.
  • General conventions:
    • How to change control parameters for the Newton solver.
complete
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.
  • How to use oomph-lib's DisplacementControlElement to apply displacement control in solid mechanics problems.

  • General conventions:
    • What should be stored in a GeneralisedElement's "external" Data?
    • What should be stored in a Problem's "global" Data?
complete
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.
  • How to assign initial conditions for beam structures.
  • How to use the dump/restart function for HermiteBeamElements.
  • Demonstrate that Newmark timesteppers can be used with variable timesteps.
  • How to retrieve solutions at previous timesteps in computations with Newmark timesteppers.
  • Changing the default non-dimensionalsation for time.
  • The non-dimensionalisation of the kinetic and potential (strain) energies of HermiteBeamElements.
complete
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.
  • How to assign initial conditions for beam structures.
  • General conventions:
    • ***
driver code only
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.
  • How to specify the undeformed reference configuration with HermiteShellElement structures.
  • Using displacement control for HermiteShellElements.
  • General conventions:
    • ***
driver code only
(Fluid-structure) interaction problems
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.
  • How to use multiple inheritance to combine GeomObjects and GeneralisedElements.
  • How to "upgrade" a GeomObject to a GeneralisedElement so that it can be used to parameterise an unknown domain boundary.
  • What is a GeomObject's geometric Data?
  • What is a GeneralisedElement's external and internal Data?
complete
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.
  • How to use MacroElementNodeUpdateElements and MacroElementNodeUpdateMeshes to implement sparse node update operations in free-boundary problems.
  • Basic free-boundary problems: Making the domain boundary dependent on the solution in the domain.
  • General conventions:
    • MacroElementNodeUpdateElements and MacroElementNodeUpdateMeshes.
complete
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.
  • The FSIFluidElements and FSIWallElement base classes.
  • Representing a discretised beam/shell structure as a "compound" GeomObject: The MeshAsGeomObject class.
  • Using the function FSI_functions::setup_fluid_load_info_for_solid_elements(...) to set up the fluid-structure interaction.
  • The pros (convenient!) and cons (slow!) of the MacroElement/Domain - based node-update procedures in fluid-structure interaction problems.
  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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.
  • How to "sparsify" the node update with algebraic node update procedures.
  • The GeomObject::locate_zeta(...) function and its default implementation.
  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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.
  • How to use spatial adaptativity in fluid-structure interaction problems.
  • The Steady<NSTEPS> timestepper: How to assign positional history values for newly created nodes.
  • Updating the node-update data in refineable AlgebraicMeshes.
  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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.
  • The base SegregatableFSIProblem class
  • How to construct and solve a segregated problem from a (standard) "monolithic" problem
complete
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.
  • How to use oomph-lib's FSIPreconditioner
complete
Flow past a flexible leaflet

We study the flow in a 2D channel that is partially obstructed by an elastic leaflet.
  • FSI problems with fully immersed beam structures (i.e. beams that are subjected to the fuid traction on both faces).
  • Another application of oomph-lib's FSIPreconditioner.

  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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.
  • FSI problems with "proper" 2D solids (rather than beam or shell structures)
  • FSI problems with wall inertia.
  • Another application of oomph-lib's FSIPreconditioner.

  • Note: There is a separate tutorial that discusses the parallelisation of this code and shows to modify it to allow spatial adaptativity in the fluid and solid meshes.
complete
Using unstructured meshes for FSI problems.

We demonstrate how to use xfig/triangle-generated unstructured meshes for fluid-structure interaction problems.
  • How to use xfig/triangle-generated unstructured meshes for fluid-structure interaction problems.
  • The automatic generation of boundary coordinates for xfig/triangle-generated, unstructured meshes. How it works and what can go wrong...
complete
Using unstructured meshes for 3D FSI problems.

We demonstrate how to use tetgen-generated unstructured meshes for 3D fluid-structure interaction problems.
  • How to use tetgen-generated unstructured meshes for 3D fluid-structure interaction problems.
  • The automatic generation of boundary coordinates for tetgen-generated, unstructured meshes. How it works and what can go wrong...
complete
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).
  • How to attach multiple FaceElements to the same node -- distinguishing different Lagrange multipliers.
  • How to solve physiological fluid-structure interaction problems.
complete
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.
  • Fluid-structure interaction.
  • General conventions:
    • ***
driver code only
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.
  • Fluid-structure interaction.
  • General conventions:
    • ***
driver code only
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.
  • Fluid-structure interaction.
  • General conventions:
    • ***
driver code only
Multi-physics problems
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.
  • How to use multiple inheritance to combine two single-physics elements.
  • How to write single-physics elements that can be combined into multi-physics elements.
  • How to use the Problem::steady_newton_solve(...) function to find steady solutions of unsteady problems.

  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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.
  • How to use multiple inheritance to combine two refineable single-physics elements.
  • How to choose the "Z2 flux" for multi-physics elements that are both derived from the ElementWithZ2ErrorEstimator class.

  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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".
  • How to discretise multi-field problems with multi-domain approaches.
  • The Multi_domain_functions namespace.

  • Note: There is a separate tutorial that discusses the parallelisation of this code.
complete
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.
  • How to use multiple inheritance to combine a single-phyics element and a solid element
driver code and pretty pictures


Mesh generation

Mesh type oomph-lib features/conventions discussed Completeness of the documentation
Structured meshes


We list oomph-lib's existing structured meshes and provide a quick overview of their common features.
  • Reminder of oomph-lib's design features that facilitate the re-use of meshes.
  • What structured meshes are available?
complete
Unstructured meshes generated via input from third-party mesh generators


We describe oomph-lib's wrappers to third-party (unstructured) mesh generators.
complete
Mesh generation with xfig


oomph-lib's one-and-only GUI: Generating unstructured triangular meshes using xfig and Triangle
  • How to generated unstructured triangular meshes using xfig and Triangle.
complete



Linear solvers and preconditioners

Linear solvers and preconditioners
Example code oomph-lib features/conventions illustrated by the example code Completeness of the documentation
Direct and iterative linear solvers and general-purpose preconditioners
Overview

We provide an overview of oomph-lib's direct and iterative linear solvers and preconditioners.
  • How to change the linear solver for oomph-lib's Newton solver.
  • How to use oomph-lib's IterativeLinearSolvers and Preconditioners.
  • How to use oomph-lib's wrappers to the third-party iterative linear solvers/preconditioners from the Hypre and Trilinos libraries.
complete
Problem-specific 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.
  • How to use oomph-lib's Least-Squares-Commutator (LSC) Navier-Stokes preconditioner
complete
oomph-lib's fluid-structure interaction preconditioner

We discuss oomph-lib's preconditioner for the solution of monolithically-discretised fluid-structure interaction problems.
  • How to use oomph-lib's FSI preconditioner
complete



Visualisation of the results

Visualisation of the results
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.
  • How to display oomph-lib's results with paraview.
complete



Parallel driver codes

Please consult the general tutorial on oomph-lib's parallel processing capabilities.

Distributed problems
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.
  • Initialising and finalizing MPI
  • Distributing the problem
  • Specifying a pre-determined partition of the problem
  • Modifying the output filename
  • Pinning values in specific elements
complete
Parallel solution of the 2D Poisson problem with flux boundary conditions

We demonstrate the modifications required to distribute a problem involving FaceElements.
  • The actions before and after distribute functions and their use to strip off and re-attach FaceElements that are used to enforce Neumann/flux boundary conditions.
complete
Parallel solution of the Boussinesq convection problem

We demonstrate how to distribute a straightforward multi-physics problem where two domains interact.
  • More details on the Multi_domain_functions helper functions and their parallel implementation.
complete
Parallel solution of an FSI problem: Channel with an elastic leaflet

We demonstrate how to distribute FSI problems that use algebraic update methods.
  • How to distribute fluid-structure interaction problems in which algebraic node update methods are used to deform the fluid mesh in response to changes in the shape of the domain boundary
  • How to retain all elements in a mesh on all processors when the problem is distributed.
complete
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.
  • How to "upgrade" Turek & Hron's FSI benchmark problem to allow spatial adaptativity in the fluid and solid meshes.
  • How to retain selected elements on all processors when the problem is distributed.
complete



PDF file

A pdf version of this document is available.
Generated on Mon Aug 10 11:23:13 2009 by  doxygen 1.4.7