This code solves the following system of partial differential equations in an axisymmetric spherical domain
by expanding the fields
To use this code first clone the repository and then create a conda environment (or python virtual environment)
conda create -n DoubleDiffusiveConvection
activate it
conda activate DoubleDiffusiveConvection
and then install the requirements
python -m pip install -r requirements.txt
Using the above discretisation the following algorithims are implemented:
Linear Stability
This routine solves the system above linearised about the conductive base state
python3 Linear_Problem.py
This computes the eigenvalues/eigenvectors for the parameters selected and can also compute the neutral stability curves over a given parameter range.
Time integration
Starting from a random initial condition (default) or a precomputed solution such as a eigenvector or steady state this routine time-integrates the full system of nonlinear equations using a Crank-Nicolson scheme for the linear terms and an Adams-Bashforth scheme for the nonlinear terms. It can be run by executing
'python3 Time_Continuation.py'
This time-integrates the equations over the time-interval specified for a given set of parameters. The output stored in a .h5py
file can then be plotted using the Plot_Tools.py
module.
Steady state solver (Netwon-iteration)
In order to compute steady-state solutions of the system of equations, a matrix free Netwon-iteration routine is implemented. Starting from an initial condition which is "close" to the solution for a given set of parameters this routine solves the full system of nonlinear equations. It can be run by executing
'python3 Main.py'
The output stored in a .h5py
file can then be plotted using the Plot_Tools.py
module.
Arc length continuation
In order to follow branches of solutions to understand how they depend on system parameters such as
'python3 Main.py'
The output stored in a .h5py
file can then be plotted using the Plot_Tools.py
module.
Please cite the following paper in any publication where you find the present codes useful:
Paul M. Mannix & Cedric Beaume. Spatially localised double-diffusive convection in an axisymmetric spherical shell, JFM, 2025.
@article{Mannix_2024,
author = {Paul M. Mannix and Cedric Beaume},
title = {Spatially localised double-diffusive convection in an axisymmetric spherical shell},
journal = {Journal of fluid dynamics},
pages = {},
publisher = {Cambridge University Press},
volume = {},
year = {2025}
}