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.
- 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.
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.
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.
I would like to acknowledge Dr. Kazuyasu Sugiyama for fruitful discussions at Flow for Future - PoF25 and 37th CFD Symposium.