This lagrangian code follows the adiabatic expansion of a hot spherical bubble in a uniform ambient medium. The present setup is adjusted to spherical geometry.
This code is based on the Fortran version included in: Numerical methods in astrophysics: an Introduction - Peter Bodenheimer
These instructions will get you a copy of the project up and running on your local machine for development and usage purposes.
First, clone the repository:
- Create a directory
my_repo
on your local machine - run:
git clone https://github.com/eliotayache/1D-Lagrangian-hydrocode my-repo
The main directory contains four sub-folders:
- C : Contains the lagrangian hydro source code in C
- C_Bondi : Same code with Bondi accretion feature
- Fortran : Contains the lagrangian hydro source code in Fortran
- Python : Contains plotting procedures
You can compile the code in the C and C_Bondi directories by typing:
cd C_Bondi # moving to C_bondi directory
gcc -o lh1 lh1.c
You now have an up and running version of the code!
Dynamical evolution is computed either in C
or C_Bondi
. Plotting is done by using the
plot.py
python script located in the directory Python
.
Input values are set up in lh1.dat
. After updating these values, just run the code by typing:
./lh1
Output is saved in lh1.out
and lh2.out
.
Explain what these tests test and why
Give an example
- Eliot Ayache - Initial work - github
This code is based on the Fortran version included in: Numerical methods in astrophysics: an Introduction - Peter Bodenheimer