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

https://github.com/NaokiHori/SimpleTCSolver/blob/main/docs/source/thumbnail.png

Overview

This library numerically solves the incompressible Navier-Stokes equations in two-dimensional and three-dimensional planar and curved channels using a finite-difference method. Although the main objective is to simulate Taylor-Couette flows, this project also serves as a simulator for planar domains. The governing equations and their numerical descriptions to achieve conservative and consistent schemes are written in the documentation.

Features

  • An energy-consistent treatment of advective, pressure-gradient, and diffusive terms, correctly replicating properties of the conservation laws.
  • MPI parallelisation.
  • Efficient FFT-based direct Poisson solver.
  • Explicit / implicit treatments of diffusive terms in all spatial directions.
  • Scalar transport.

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:

https://raw.githubusercontent.com/NaokiHori/SimpleTCSolver/artifacts/artifacts/typical/snapshot.png

Maximum divergence:

https://raw.githubusercontent.com/NaokiHori/SimpleTCSolver/artifacts/artifacts/typical/divergence.png

Normalised energy injection and dissipation:

https://raw.githubusercontent.com/NaokiHori/SimpleTCSolver/artifacts/artifacts/typical/balance_main.png

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:

https://raw.githubusercontent.com/NaokiHori/SimpleTCSolver/artifacts/artifacts/typical/balance_dif.png

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.

Planar flows

This solver is designed to be used as a solver for planar flows (normal channel flows). Change is_curved flag defined in the flow initialiser to false. See the documentation for more details.

Acknowledgement

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