Skip to content

Massively-parallelised Navier-Stokes solver for Taylor-Couette flows

License

Notifications You must be signed in to change notification settings

NaokiHori/SimpleTCSolver

Repository files navigation

Simple TC Solver

License LastCommit

CI DOC

image

Overview

This library numerically solves the incompressible Navier-Stokes equations in three-dimensional cylindrical domains using a finite-difference method, developed on top of another CFD solver for Cartesian domains. In particular, it aims to simulate the motion of fluid between two independently rotating coaxial cylinders, namely Taylor-Couette flows. The governing equations and their numerical descriptions to achieve conservative and consistent schemes are written in the documentation.

Features

  • An energy-conserving advective scheme and a consistent diffusive scheme, correctly replicating properties of the equations.
  • MPI parallelisation.
  • Efficient FFT-based direct Poisson solver.
  • Explicit/implicit treatments of diffusive terms in all (radial, azimuthal, and axial) directions are easily switchable.

Caveats

  • x and y in the code

    This library is based on the Cartesian version and I try to keep the interface as similar as possible. So x and y are used in the code to describe the radial and the azimuthal directions, respectively. Also note that the indices i, j, and k correspond to radial, azimuthal, and axial loops, respectively.

  • Boundary conditions

    I only consider Taylor-Couette flows which are periodic in the azimuthal / axial directions.

  • Singularity at the pole

    The Navier-Stokes equations are singular at the pole r = 0, which is out of focus in this project.

  • Fixed parameters

    The radius of the inner cylinder is fixed to 1. Also the azimuthal velocity of the inner cylinder is set to 1, while the outer cylinder is assumed to be at rest.

Dependency

Python is only needed to initialise flow fields as the NPY format.

Quick start

  1. Prepare workplace

    mkdir -p /path/to/your/directory
    cd       /path/to/your/directory
  2. Get source

    git clone --recurse-submodules https://github.com/NaokiHori/SimpleTCSolver
    cd SimpleTCSolver
  3. Set initial condition

    Here Python3 is used to initialise the flow fields as NPY files.

    cd initial_condition
    make output
    bash main.sh
    cd ..
  4. Build NS solver

    make output
    make all

Typical results are as follows.

An instantaneous velocity field:

image

Maximum divergence:

image

Normalised energy injection and dissipation:

image

The black-dashed line is the literature result to compare with (Ostilla et al., J. Fluid Mech. (719), 2013).

The numerical scheme is designed such that the energy injection and dissipation perfectly (up to rounding error) balances when the flow fields are in steady states:

image

2D version

Since Taylor-Couette flows are essentially three-dimensional, the three-dimensional version is set as a default. However, there is a two-dimensional version which extracts the radial-azimuthal motions for completeness, which is available at 2d branch. Note that the flow initialiser is not included (modify the 3d version by yourself).

Acknowledgement

I would like to thank Dr. Kazuyasu Sugiyama for fruitful discussions at Flow for Future - PoF25 and 37th CFD Symposium.