Skip to content

exoweather/polytrope

Repository files navigation

README

These are basic stratified fluid dynamics problems, for flows under the fully compressible Navier-Stokes equations in a polytropic background, executed with the Dedalus pseudospectral framework. To run these problems, first install Dedalus (and on bitbucket).

Initial Value Problems

Once Dedalus is installed and activated, do the following:

#!bash
mpirun -np 16 python3 FC_poly.py --run_time=0.1
mpirun -np 1 python3 plot_energies.py FC_poly_nrhocz3_Ra1e4_eps1e-4_a4/scalar/*.h5
mpirun -np 2 python3 plot_slices.py FC_poly_nrhocz3_Ra1e4_eps1e-4_a4/slices/*.h5

For multitropes, use

#!bash
mpirun -np 16 python3 FC_multi.py

and for exoplanet inspired (stable top, unstable bottom) atmospheres, consider

#!bash
mpirun -np 16 python3 FC_multi.py --oz

We are using docopt in these general driver cases, and

#!bash
python3 FC_multi.py --help

will describe various command-line options.

Rotating Runs

To run a rotating polytrope, you could type, for example:

#!bash
mpirun -np 64 python3 FC_poly.py --3D --rotating --nz=32 --nx=32 --ny=32 --mesh=8,8

Which will make a 3D rotating atmosphere, where both the x- and z- directions are broken up into 8 pieces (thus the 8,8 in the mesh).

Pleiades unicode fix

The rotating equations contain some Unicode greek letters which are particularly unhappy in the pleiades environment. In order to get around errors which could be thrown by this, perform the following steps:

First, create a file in your home directory called $HOME/.mpirun. Inside of that file, type

#!bash
#!/bin/bash
export LANG=en_US.UTF-8
/nasa/sgi/mpt/2.14r19/bin/mpiexec_mpt $*

Save and quit, then run

#!bash
chmod +x $HOME/.mpirun

to make that file executable. Now, any time you call ~/.mpirun, it will be a properly wrapped mpiexec_mpt call in the right language enviroment so that it understands unicode! Python3 often times needs to be wrapped individually, so you should make another file, $HOME/.python3, with the following inside:

#!bash
#!/bin/bash
export LANG=en_US.UTF-8
~/dedalus/bin/python3 $*

(with the appropriate python path for your install). Make it executable, as well. Then, on subsequent runs, just use:

#!bash
~/.mpirun -np <num procs> ~/.python3 <file name> <file args>,

and you should have a properly wrapped, unicode version of mpi-ified python!

Eigenvalue Problems (for finding onset of convection)

To find the critical Rayleigh number for convective onset in a low-Mach number polytropic atmosphere, try

#!bash
mpirun -n 200 python3 FC_onset_curve.py --epsilon=1e-4

For a high-stiffness multitropic atmosphere, try

#!bash
mpirun -n 200 python3 FC_onset_curve.py --Multitrope --nz=96,48 --stiffness=1e3 --rayleigh_steps=20 --kx_steps=20 --kx_start=0.3 --kx_stop=10

Images of Rayleigh number / wavenumber space will be output, with the growth rate of the maximum eigenvalue shown.

Contact the exoweather team for more details.

References: Brown, Vasil & Zweibel 2012, Vasil et al 2013, Lecoanet et al 2014.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •