HydrothermalFoam Lecture Logo

Course information

  • Course details

Lecture 1

  • Lecture overview
  • Accompanying slide deck
  • Installation guide
  • Getting started with OpenFoam
  • A first test case - heat diffusion

Lecture 2

  • Lecture overview
  • Accompanying slide deck
  • Navier-Stokes flow with OpenFoam
    • Theoretical background
      • Solution strategies - the SIMPLE algorithm
  • Example
  • Excercise

Lecture 3

  • Lecture overview
  • Accompanying slide deck
  • Porous Flow - Submarine Hydrothermal Systems
  • Hydrothermal convection test case
  • Excercises

Lecture 4

  • Lecture overview
  • Upflow temperatures in submarine hydrothermal systems
  • Exercise 1
  • Exercise 2
  • Exercise 3

Lecture 5

  • Lecture overview
  • Structural controls on hydrothermal flow
  • Exercise 1
  • Exercise 2

Lecture 6

  • Lecture overview
  • FVM and OpenFoam
  • Exercise 1

Projects

  • Project 1: Flow along a detachment fault
  • Project 2: How long can a magmatic intrusion sustain high temperature venting?
  • Project 3: Hydrofracturing and localized venting above sill intrusion?

References

  • References

Getting help

  • Imprint
  • Prof. Lars Ruepke
  • Dr. Zhikui Guo
  • HydrothermalFoam
  • OpenFOAM
  • Public site
  • University site
HydrothermalFoam Lecture
  • »
  • Navier-Stokes flow with OpenFoam
  • Edit on GitHub

Navier-Stokes flow with OpenFoam

Theoretical background

The dynamics of fluids is described by the Navier-Stokes equation. It is based on mass and momentum conservation in a moving fluid.

For simplified incompressible case, these equations take the following form:

(4)\[\nabla \cdot \vec{U} = 0\]
(5)\[\frac{\partial \vec{U} }{\partial t} + \nabla \cdot (\vec{U} \vec{U}) = \nabla \cdot (\nu \nabla \vec{U}) - \nabla p\]

Solution strategies - the SIMPLE algorithm

The 3-D Navier-Stokes equation has four unknowns (three velocity components and one pressure) but the standard formulation does not include an explicit “pressure equation”, which complicated solving the system of equations.

Tip

There is a very nice youtube video by FluidDynamics101 (Aidan Winshurst) that explains the SIMPLE algorithm. We are here following his derivation and notation.

There are different solution strategies implemented in OpenFoam. The simplest one is the SIMPLE algorithm for the steady-state form of the incompressible Navier-Stokes equation.

(6)\[\nabla \cdot \vec{U} = 0\]
(7)\[\nabla \cdot (\vec{U} \vec{U}) = \nabla \cdot (\nu \nabla \vec{U}) - \nabla p\]

The SIMPLE algorithm solves these equations by deriving a pressure equation by combining the momentum and continuity equations and by formulating a corrector equation to make the velocity field satisfy the continuity equation.

Step 1 is to formulate the momentum balance as general matrix equation:

(8)\[\nabla \cdot (\vec{U} \vec{U}) = \nabla \cdot (\nu \nabla \vec{U}) - \nabla p\]
(9)\[M \vec{U} = - \nabla p\]

Next we split the matrix \(M\) into a diagonal part and remaining part.

(10)\[M \vec{U} = - \nabla p\]
(11)\[A \vec{U} -H = - \nabla p\]

The nice thing about diagonal matrices is that they are easy to invert.

Step 2 is to solve for \(\vec U\) using an initial guess for the pressure field.

(12)\[\vec{U} = A^{-1} H - A^{-1}A \nabla p\]

and plug it into the continuity equation:

(13)\[ \nabla \cdot \vec{U} = 0\]
(14)\[ \nabla \cdot (A^{-1} H - A^{-1}A \nabla p) = 0\]

to get

(15)\[ \nabla \cdot A^{-1} \nabla p = \nabla \cdot(A^{-1}H)\]

Equations equation (9) and equation (14) form a set of equations that are solved in sequence.

The actual solution sequence in the SIMPLE algorithm is this. First, we solve the momentum balance using an initial guess for pressure:

(16)\[M \vec{U} = - \nabla p\]

The we update pressure by solving the pressure equation equation (14)

(17)\[ \nabla \cdot A^{-1} \nabla p = \nabla \cdot(A^{-1}H)\]

Finally, the pressure is used to “correct” the velocity solution, so that it fulfills the continuity equation equation (6).

(18)\[ \vec{U} = A^{-1} H - A^{-1}A \nabla p\]

This is the SIMPLE algorithm for the steady-state incompressible Navier-Stokes equation. Later we will also learn about other algorithms for more general forms of the N-S stokes like the PISO and PIMPLE algorithms.

Previous Next

© Copyright 2020, Lars Ruepke and Zhikui Guo.

Built with Sphinx using a theme provided by Read the Docs.