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:

Work in progress
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
  1. Mesh generation
  1. Linear solvers and preconditioners
  1. Visualisation
  1. Parallel driver codes

How to use example code list

Problem solved by example code

Short description of problem.

  • oomph-lib features/conventions illustrated by the example code.

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.

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?

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?

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.

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().

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(...).

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.

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.

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.

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.

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.

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.
  • Note: the driver code is unannotated.

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.

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.

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.

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 computed results against the exact solution.

  • Spatial adaptivity 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.

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.

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.

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.

The Helmholtz equation

The Helmholtz equation.

We solve a 2D Helmholtz problem, simulating scattering of a planar wave from a circular cylinder.

  • The Helmholtz equation and its discretisation.
  • The Sommerfeld radiation condition and its approximation by approximate/absorbing boundary conditions and Dirichlet-to-Neumann mappings.

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.

  • How to solve the Helmholtz equation on 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.

  • The Helmholtz equation and its azimuthal Fourier decomposition.
  • Dirichlet to Neumann mapping.
  • Validation with an exact solution formed by a superposition of outgoing waves from a sphere.

The spatially adaptive solution of the azimuthally Fourier-decomposed 3D Helmholtz equation on unstructured meshes.

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

  • Spatial adaptivity on unstructured meshes for the azimuthally Fourier-decomposed 3D Helmholtz equation.

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 Helmholtz equation.
  • The Sommerfeld radiation condition and its approximation by perfectly matched layers (PMLs).

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 azimuthally Fourier-decomposed 3D Helmholtz equation.
  • The Sommerfeld radiation condition and its approximation 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.

  • 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.

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.

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.

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.

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.

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.

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.

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.

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(...)

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.

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>.

Steady 2D finite-Reynolds-number-flow in a 2D channel of non-uniform width: An Introduction to Spine meshes

We consider a variation of the problem studied in the previous example and demonstrate an alternative node-update procedure, based on oomph-lib's SpineNode, SpineElement and SpineMesh classes. Spine node updates are an alternative to algebraic nodes updates for the efficient implementation of fluid problems in deforming domains.

  • Introduction to the method of spines.
  • How to create a custom SpineMesh.

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.

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.

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.

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.

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.

Motion of elliptical particles in shear flow: unstructured adaptivity

We solve the classical problem of shear flow past a immersed ellipse

  • An example of using inline mesh generation for adaptivity in unstructured meshes
  • ImmersedRigidBodyElements to describe the interaction of fluids with rigid bodies

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
  • Note: the documentation for this problem is incomplete.

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.

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.
  • Theory
    • Geometry of Surfaces
    • Differential Operators On A Surface
    • Free Surface and Interface Boundary Conditions
    • Surface Transport Equations
  • Implementation
    • The FluidInterfaceElement class
    • Spine and Elastic formulations of free surface elements

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.

  • Boundary conditions at a free surface
  • How to solve free-boundary problems using a pseudo-solid node update approach.

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.

  • Boundary conditions at an interface between two immiscible fluids.
  • Adaptivity in free-surface/interfacial problems with a pseudo-solid node update approach.

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!

  • Imposing a volume constraint in steady free-surface problems.
  • Imposing static contact angle constraints when a free-surface meets a solid boundary.
  • Hijacking (overwriting) data from within elements.

A static interface between two viscous fluids.

A hydrostatics problem: Compute the static interface between two viscous fluids – harder than you might think!

  • Adapting an existing mesh to include an interface.
  • Imposing a static contact angle when an interface meets a solid boundary.

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.

  • Comparison between spine-based and pseudo-solid node update strategies for free surface problems.
  • Applying time-dependent perturbations to steady solutions.
  • Open flow boundary conditions.

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.

  • Another example for the solution of a free-surface problem using the Method of Spines.
  • Use of external Data to implement non-local interactions between elements.

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.

  • Mesh adaptation for closed free boundaries – what happens "under the hood" and how to customise the default behaviour, specifically:
    • Selecting the refinement and unrefinement tolerances on the free boundaries.
    • Redistributing segments between polylines in cases when the nodes on the free surface all get convected into one region.
    • Why you shouldn't use TriangleMeshCurviLines to describe the initial shape of (initially curvilinear) free boundaries.
  • How to impose a volume constraint onto an enclosed "bubble" in a viscous fluid.

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.

  • How to use regions in an unstructured two-fluid problem.
  • How to impose and then remove a volume constraint onto an enclosed "droplet" in a viscous fluid.

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.

  • Free-surface/interfacial problems in an axisymmetric domain with a pseudo-solid node update approach and spatial adaptivity.

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.

  • Trivial differences between two-dimensional and axisymmetric static problems.

Nonlinear solid mechanics problems

Nonlinear solid mechanics: Theory and implementation

In this document we discuss the theoretical background and the practical implementation of oomph-lib's nonlinear solid mechanics capabilities.

  • Theory:
    • Nonlinear 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

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.

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.

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.

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.

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.

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.

  • How to enforce incompressible behaviour.
  • How to solve 3D solid mechanics problems with spatial adaptivity.

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.

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.

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.

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.
  • Note: this driver code is currently undocumented.

Solid Mechanics using unstructured meshes with adaptivity

We study the deflection of a 2D rectangular solid under a lateral pressure load.

  • How to employ spatial adaptivity in solid mechanics problems using unstructured meshes.

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.

  • A validation problem.
  • Note: this driver code is currently undocumented.

Linear elasticity

Linear Elasticity: Theory and implementation

In this document we discuss the theoretical background and the practical implementation of oomph-lib's linear elasticity elements and demonstrate their use in a 2D model problem.

  • The equations of linear elasticity and their non-dimensionalisation.
  • Implementation of the equations, based on a displacement formulation.
  • The solution of a 2D model problem: The deformation of a linearly elastic strip, loaded by a spatially periodic surface traction.

Spatially-adaptive simulation of the deformation of a linearly elastic strip, loaded by a spatially periodic surface traction.

We demonstrate how to compute the deformation of a linearly elastic strip, loaded by a spatially periodic surface traction, using spatial adaptivity.

  • How to apply periodic boundary conditions in spatially adaptive computations.

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 oomph-lib's axisymmetric linear elasticity elements and demonstrate their use in time-dependent test problem.

  • The equations of axisymmetric linear elasticity and their non-dimensionalisation.
  • Implementation of the equations, based on a displacement formulation.
  • The solution of a 2D model problem: The time-dependent deformation of an annular region and the validation against a manufactured exact solution.

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.

  • The time-harmonic equations of linear elasticity and their non-dimensionalisation.
  • Implementation of the equations, based on a displacement formulation.
  • The solution of test problem: The forced oscillations of an annular elastic region, computed with and without spatial adaptation.

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.

  • Solving the equations of time-harmonic linear elasticity on unstructured meshes, with and without adaptation.
  • How to assign different material properties to different parts of the domain.

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

  • The generalised time-harmonic equations of linear elasticity and their non-dimensionalisation.
  • Perfectly matched layers
  • The solution of test problem: Oscillations of an infinite 2D medium forced by the prescribed oscillations of an embedded circular disk.

Azimuthally Fourier-decomposed 3D time-harmonic linear elasticity

The azimuthally Fourier-decomposed equations of 3D 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, non-axisymmetric oscillations of axisymmetric elastic bodies.

  • The time-harmonic equations of linear elasticity and their non-dimensionalisation.
  • Fourier decomposition of general three-dimensional disturbances.
  • Implementation of the equations, based on a displacement formulation.
  • The solution of a "manufactured" test problem.

The spatially-adaptive solution of the azimuthally Fourier-decomposed equations of 3D time-harmonic linear elasticity on unstructured meshes.

We simulate the forced, time-harmonic oscillations of a hollow cylinder loaded by a spatially-constant pressure load on its inner surface.

  • The use of spatial adaptivity in the solution of the azimuthally Fourier-decomposed equations of 3D time-harmonic linear elasticity on unstructured meshes.

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.

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?

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-dimensionalisation for time.
  • The non-dimensionalisation of the kinetic and potential (strain) energies of HermiteBeamElements.

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:
    • ***
  • Note: this driver code is currently undocumented.

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:
    • ***
  • Note: this driver code is currently undocumented.

Large-displacement 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 parametrise 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 parametrise an unknown domain boundary.
  • What is a GeomObject's geometric Data?
  • What is a GeneralisedElement's external and internal Data?

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.

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.

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.

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 adaptivity 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.

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

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 in which the node update in the fluid mesh is performed by algebraic node updates.

  • How to use oomph-lib's FSIPreconditioner

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 fluid traction on both faces).
  • Another application of oomph-lib's FSIPreconditioner.
  • Note: There is a separate tutorial that discusses the parallelisation of this code.

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 adaptivity in the fluid and solid meshes.

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.

  • How to use pseudo-elasticity to update fluid meshes in FSI 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...

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...

2D FSI on unstructured meshes with adaptivity

We demonstrate how to use spatial adaptivity on unstructured meshes for 2D fluid-structure interaction problems.

  • How to use inline mesh generation to provide spatial adaptivity for 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).

  • How to attach multiple FaceElements to the same node – distinguishing different Lagrange multipliers.
  • How to solve physiological fluid-structure interaction problems.

oomph-lib's preconditioner for the solution of fluid-structure interaction problems with pseudo-solid node updates for the fluid mesh

We discuss oomph-lib's preconditioner for the solution of FSI problems in which the fluid node update is performed by pseudo-elasticity.

  • How to use oomph-lib's for the solution of FSI problems in which the fluid node update is performed by pseudo-elasticity.

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:
    • ***
  • Note: this driver code is currently undocumented.

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:
    • ***
  • Note: this driver code is currently undocumented.

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:
    • ***
  • Note: this driver code is currently undocumented.

Acoustic fluid-structure interaction problems

A time-harmonic acoustic fluid-structure interaction problem: Sound radiation from an immersed oscillating cylinder that is coated with an elastic layer.

We provide an overview of oomph-lib's methodology for the solution of time-harmonic acoustic fluid-structure interaction problems which are based on a coupled solution of the time-harmonic equations of linear elasticity and the Helmholtz equation.

  • Theory: The formulation and non-dimensionalisation of time-harmonic acoustic fluid-structure interaction problems.
  • Coupling time-harmonic equations of linear elasticity and the Helmholtz equation, using the Multi_domain_functions::setup_bulk_elements_adjacent_to_face_mesh(...) helper function
  • Validation of the methodology via a comparison against an analytical solution.

A time-harmonic acoustic fluid-structure interaction problem: Sound radiation from an immersed oscillating cylinder that is coated with an elastic layer – this time solved on an unstructured mesh.

A brief extension of the previous tutorial illustrating how to solve the problem with unstructured meshes.

  • The solution of time-harmonic acoustic fluid-structure interaction problems on unstructured meshes.
  • How to assign different material properties to different regions of the elastic body.

Azimuthally Fourier-decomposed 3D acoustic fluid-structure interaction problems

An azimuthally Fourier-decomposed time-harmonic acoustic fluid-structure interaction problem: Sound radiation from an immersed oscillating sphere that is coated with an elastic layer.

We provide an overview of oomph-lib's methodology for the solution of azimuthally Fourier-decomposed time-harmonic acoustic fluid-structure interaction problems which are based on a coupled solution of the time-harmonic equations of linear elasticity and the Helmholtz equation.

  • Theory: The formulation and non-dimensionalisation of time-harmonic acoustic fluid-structure interaction problems in cylindrical polar coordinates, using a Fourier-decomposition of all fields in the azimuthal direction.
  • Coupling time-harmonic equations of linear elasticity and the Helmholtz equation, using the Multi_domain_functions::setup_bulk_elements_adjacent_to_face_mesh(...) helper function
  • Validation of the methodology via a comparison against an analytical solution.

A time-harmonic acoustic fluid-structure interaction problem: Sound radiation from an immersed oscillating sphere that is coated with an elastic layer – this time solved on an unstructured mesh with spatial adaptivity.

A brief extension of the previous tutorial illustrating how to solve the problem on adaptive, unstructured meshes.

  • The spatially-adaptive solution of Fourier-decomposed time-harmonic acoustic fluid-structure interaction problems on unstructured meshes.
  • How to assign different material properties to different regions of the elastic body.

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 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.

Refineable multi-physics problem: How to combine existing 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.

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.

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-physics element and a solid element
  • Note: this driver code is currently undocumented.

Surfactant Transport: How to add surface transport equations to free surface elements.

We demonstrate how to add general surface transport equations to the FluidInterfaceElements and apply them to determine the effects of insoluble surfactant on the Rayleigh–Plateau instability.

  • How to use the member function add_additional_residual_contributions_interface() to include additional terms in free surface problems.

Eigenproblems

How to formulate and solve an eigenproblem.

We demonstrate how to write QHarmonicElements that solve the eigenvalues and eigenfunctions of the one-dimensional Laplace operator.

  • A brief introduction to linear stability theory.
  • How to use oomph-lib's interfaces to eigensolvers.
  • How to write elements that can be used in eigenproblems.
  • How to use the Problem::solve_eigenproblem(...) function to find solutions of the eigenproblems.
  • Post-processing of eigenvalue problems.

How to formulate and solve an eigenproblem involving complex eigenvalues.

We demonstrate how to write QComplexHarmonicElements that determine the eigenvalues and eigenfunctions of the shifted one-dimensional Laplace operator as a quadratic eigenvalue problem.

  • How to write eigenproblems that involve more than one field.
  • How to write a quadratic eigenproblem as two linear eigenproblems.
  • How to output complex eigenvalues and eigenvectors.


Mesh generation

Structured meshes

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? .

Unstructured meshes using input from third-party mesh generators

Unstructured meshes generated via input from third-party mesh generators

We describe oomph-lib's wrappers to third-party (unstructured) mesh generators.

Inline unstructured mesh generation

We describe how to generate unstructured 2D meshes from within an oomph-lib driver code.

  • How to generated inline unstructured 2D meshes using Triangle.
  • How to create unstructured meshes with curvilinear boundaries
  • How to perform spatial adaptivity on unstructured meshes via complete remeshing

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 oomph-lib driver code.

  • How to generated more complicated inline unstructured 2D meshes using Triangle.
  • How to create additional regions in space

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.

Linear solvers and preconditioners

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.

(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.
  • The OomphCommunicator.
  • The LinearAlgebraDistribution and the DistributedLinearAlgebraObject base class.
  • The CRDoubleMatrix and the DoubleVector.

(Distributed) Block preconditioners We provide an overview of oomph-lib's (distributed) block preconditioning framework and demonstrate how to write a new block preconditioner.
  • Theory
  • Block preconditionable elements: Classifying the block and dof types.
  • Master and subsidiary preconditioners.
  • An example: A simple implementation of an FSI preconditioner.

(Distributed) General-purpose block preconditioners We provide an overview of oomph-lib's (distributed) general purpose block preconditioners
  • Theory
  • Block diagonal and block triangular preconditioners.
  • Two-level parallelisation for block diagonal preconditioning.
  • How to specify subsidiary preconditioners for the (approximate) solution of the linear systems involving the diagonal blocks.
  • How to specify the dof types.

Problem-specific preconditioners

oomph-lib's Least-Squares-Commutator (LSC) Navier-Stokes preconditioner

We discuss oomph-lib's implementation of Elman, Silvester & Wathen's Least-Squares-Commutator (LSC) Navier-Stokes preconditioner.

  • How to use oomph-lib's Least-Squares-Commutator (LSC) Navier-Stokes preconditioner.

oomph-lib's fluid-structure interaction preconditioner

We discuss oomph-lib's preconditioner for the solution of monolithically-discretised fluid-structure interaction problems with algebraic node updates.

  • How to use oomph-lib's FSI preconditioner for problems with algebraic node updates.

oomph-lib's preconditioner for the solution of solid mechanics problems with prescribed boundary displacements

We discuss oomph-lib's preconditioner for the solution of solid mechanics problems in which the displacement of a boundary is prescribed and imposed by Lagrange multipliers. This preconditioner is an important building block for the solution of FSI problems in which the fluid node update is performed by pseudo-elasticity.

  • How to use oomph-lib's for the solution of solid mechanics problems with prescribed boundary displacements.
  • How to specify subsidiary preconditioners (inexact solvers) with any of oomph-lib's existing block preconditioners.

oomph-lib's preconditioner for the solution of fluid-structure interaction problems with pseudo-solid node updates for the fluid mesh

We discuss oomph-lib's preconditioner for the solution of FSI problems in which the fluid node update is performed by pseudo-elasticity.

  • How to use oomph-lib's for the solution of FSI problems in which the fluid node update is performed by pseudo-elasticity.

Visualisation of the results

Paraview

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.

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

Parallel solution of the adaptive driven cavity problem

We demonstrate how to distribute a straightforward single-physics problem.

  • Initialising and finalising MPI
  • Distributing the problem
  • Specifying a pre-determined partition of the problem
  • Modifying the output filename
  • Pinning values in specific elements

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

  • Load balancing a problem
  • The build_mesh function
  • The use of a default partition when performing a test run
  • The actions before and after load balance functions

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.

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.

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.

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 adaptivity in the fluid and solid meshes.
  • How to retain selected elements on all processors when the problem is distributed.
  • How to implement load-balancing of a distributed multi-domain problem, with particular reference to the actions before and after load balance functions.