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.
- 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.
x
andy
in the codeThis library is based on the Cartesian version and I try to keep the interface as similar as possible. So
x
andy
are used in the code to describe the radial and the azimuthal directions, respectively. Also note that the indicesi
,j
, andk
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.
Python is only needed to initialise flow fields as the NPY format.
Prepare workplace
mkdir -p /path/to/your/directory cd /path/to/your/directory
Get source
git clone --recurse-submodules https://github.com/NaokiHori/SimpleTCSolver cd SimpleTCSolver
Set initial condition
Here
Python3
is used to initialise the flow fields asNPY
files.cd initial_condition make output bash main.sh cd ..
Build NS solver
make output make all
Typical results are as follows.
An instantaneous velocity field:
Maximum divergence:
Normalised energy injection and dissipation:
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:
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).
I would like to thank Dr. Kazuyasu Sugiyama for fruitful discussions at Flow for Future - PoF25 and 37th CFD Symposium.