Skip to content

Massively-parallelized 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 Last Commit CI Documentation

Thumbnail

Overview

This library numerically solves the incompressible Navier-Stokes equations in both two-dimensional and three-dimensional planar and curved channels using the finite-difference method. While the primary objective is to simulate Taylor-Couette flows, the solver can also be applied to planar flow simulations.

For details on the governing equations and numerical methods ensuring conservative and consistent schemes, refer to the documentation.

Features

  • Energy-consistent treatment of advective, pressure-gradient, and diffusive terms, ensuring proper conservation properties.
  • MPI parallelization.
  • Efficient FFT-based direct Poisson solver.
  • Explicit and implicit treatments of diffusive terms in all spatial directions.
  • Scalar transport simulation.

Dependencies

Quick Start

  1. Set up your workspace

    mkdir -p /path/to/your/directory
    cd /path/to/your/directory
  2. Clone the repository

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

    Python3 is used to generate the initial flow fields as NPY files.

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

    make output
    make all

Example Results

Instantaneous Velocity Field

Velocity Field

Maximum Divergence

Divergence

Normalized Energy Injection and Dissipation

Energy Balance

The black-dashed line represents reference results from Ostilla et al., J. Fluid Mech. (719), 2013.

The numerical scheme is designed to ensure energy injection and dissipation remain perfectly balanced (up to rounding error) in steady states:

Energy Dissipation

2D Version

Since Taylor-Couette flows are inherently three-dimensional, the default solver is designed for 3D simulations. However, a 2D version that extracts radial-azimuthal motions is available in the 2d branch.

Planar Flows

This solver can also be used for planar flow simulations (e.g., normal channel flows). To enable this mode, set the is_curved flag in the flow initializer to false. For more details, refer to the documentation.

Acknowledgement

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