Jupyter Notebook tutorials on how to run astrophysical simulations through a classic example of the gravitational collapse of a magnetized, rotating sphere.------------------------------------------------
Table of Contents
- 1-Setting Up FLASH
- 2-Creating Your Own Initial Conditions
- 3-Lane Emden Numerical Solution
- 4-Physics of an Isothermal Sphere
- 5-Running the Simulation
- 6-Data Analysis and visualization with yt
- 7-Sink Particles
- 8-Rotation and Discs
- 10-Tips and Tricks
How to use the tutorial?
The notebook links above are read-only, it is much cooler if you could actually run the code interactively by following one of these :
To save the fuss of installing all the dependencies, you can simply follow this link, which magically start off a computational environment for you to execute the code in the notebooks. Note that these instances only last for one hour if inactive, so while it provides a nice playground for learning the material. If you decide to make notes or significant code changes, remember to download your notebook to save your progress.
Alternatively, if you already have Python and Jupyter notebook installed, you can run it locally:
git clone firstname.lastname@example.org:dorisjlee/astroSim-tutorial.git cd astroSim/tutorial ipython notebook
These set of tutorial comes from an undergrad's attempt to learn how to use a hydro code to run astrophysical simulation. While most hydro code has fairly in-depth documentation,it is often difficult to piece together how different parts of the simulation workflow fits together: from submitting the jobs (HPC knkowledge), understanding numerical methods, writing the code (C,Fortran), data management(Bash,UNIX), analysis and visualization (Python,yt, VisIT..etc). We hope that this step-by-step tutorial of how to simulate the graviational collapse of young star illustrates how these pieces fit together.
After fiddling with different hydro codes over the past 2 years, we learned that most hydro codes are more alike than they are different (from the user's perspective). Since the tutorial contain not only information how to use the FLASH code but also regarding the phsyics and computation, these base templates makes it easy for developers to fork the repo and adapt it for another hydro code, such as Athena, RAMSES, Enzo ..etc. Also, feel free to submit any errata through pull requests to improve these tutorials. Thanks!