Skip to content

pabolmasov/SLayer

Repository files navigation

SLayer: the shallow-water two-dimensional code simulating a spreading layer

Shallow-water hydrodynamic simulations on the surface of a spherical gravitating object. The code uses spherical harmonics to compute atmospheric circulations. Hydrodynamic solver is tweaked to deal with highly supersonic flows present in plasma flows on top of rapidly rotating neutron stars.

Based on https://github.com/natj/swm, but the variables are normalized to the natural relativistic units GM=c=1, for a neutron star rotating at a millisecond-range period. We are either using an isothermal equation of state Π = cs^2 Σ, or solving an energy equation. Details of the physics and solution methods are given in the description.

Basic equations:

See out paper (coming soon!)

Installation

shtns

First we need to install the spherical harmonic transformation library shtns.

After downloading/cloning the repository run:

./configure --enable-python
make
make install

h5py

Code uses hdf5 to store simulation and analysis data. For this we need h5py python package. See h5py website

Usually it is enough to use pip with

pip2 install h5py

(or pip3, if you use python3)

future

To be used equally well with both python2 and python3, the code makes use of the rutines of python-future routines. Probably, you will need to install it with pip

pip2 install future

Code

All the parameters of the problem are listed in the configuration file conf.c. The code may be simply run from python as

%run swarm

alternatively, you can use your own configuration file (where all the parameters should be set, there are no default values), and run the code as

%run swarm <your_conf>

To restart an interrupted simulation, change the ifrestart, nrest, and restartfile parameters in conf.c, and make sure the restart file name corresponds to the hdf5 output you are going to read from (probably, you will need to rename your out/run.hdf5 to out/runOLD.hdf5).

References

About

Shallow-water-based spreading layer in a highly supersonic regime

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors