Computer codes
This page contains links to some useful computer source codes that I have written and are available for you to download and use.
Check the instructions for each of the code samples for terms of use!
Stellar evolution code
My main tool is a stellar evolution code. This is a version of Peter Eggleton's stellar evolution code (more precisely, the TWIN code), although it is extensively modified from the original. Changes include:
- Code to facilitate the evolution of stellar collision products and merger remnants, as calculated with smooth particle hydrodynamics (SPH) or the MakeMeAStar recipe.
- A treatment of thermohaline mixing, for collision products and binaries.
- Convection treatment based on the Ledoux stability condition rather than the Schwarzschild condition (optionally).
- A treatment of gravitational settling (together with Richard Stancliffe).
- An elaborate mass loss routine that determines the mass loss rate based on global (surface) stellar parameters using a wide selection of mass loss recipes.
- A treatment of pair production at high temperatures, relevant for evolved massive stars.
- An experimental treatment of differential rotation.
- The ability to embed the code as a stellar evolution module in a larger framework.
- Many small changes/updates to the physics, numerics and user interface.
If all you need is a basic stellar evolution code, then the older version available here might be all you need - terms of conditions are in the README file in the archive.
If, on the other hand, you have a use for one or more of the features listed above, you should contact me.
Stellar evolution recipe for collision products
This paper describes a recipe for a simple calculation of the lifetime of stellar collision products, which can be incorporated in a stellar evolution package (for instance, BSE).
Below are two links that will provide this functionality for BSE: a FORTRAN source file containing two new functions required for the recipe, and a patch for BSE's mix.diff.
To use these files, you should follow these steps:
- Download both files, effective_core_mass.f and mix.diff, and place them in your BSE directory.
- Open BSE's Makefile and add ``effective_core_mass.f'' to the list of source files in the SRCE2 variable.
- Apply the patch to ``mix.f''. If you're not familiar with how to do
this, give the following command in a terminal window in the BSE
directory:
patch -p0 < mix.diff
- Recompile BSE
Files:
effective_core_mass.f
mix.diff
Read the terms-of-use at the top of effective_core_mass.f!