-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #504 from chunliangmu/master [skip ci]
Added documentation for stellar relaxation
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
Stellar relaxation | ||
================== | ||
|
||
|
||
When mapping 1D profile from MESA to a 3D code such as Phantom, a relaxation procedure is required to ensure that the particles are in hydrostatic equilibrium. | ||
|
||
In phantom this is achieved by a process called ``relax-o-matic`` | ||
(`Lau et al., 2022 <https://doi.org/10.1093/mnras/stac049>`_ - **please see its appendix C for full details of how it works**). | ||
|
||
|
||
To run ``relax-o-matic`` after setting up a star, | ||
just follow the instructions during setup (from ``phantomsetup``) and type ``yes`` when prompted "Relax star automatically during setup?"; | ||
|
||
Then, modify the ``.setup`` file and fill in the relaxation options, which are pretty self-explanatory:: | ||
|
||
relax_star = T ! relax star automatically during setup | ||
tol_ekin = 1.000E-07 ! tolerance on ekin/epot to stop relaxation | ||
tol_dens = 1.000 ! % error in density to stop relaxation | ||
maxits = 1000 ! maximum number of relaxation iterations | ||
write_rho_to_file = F ! write density profile to file | ||
|
||
Run the ``phantomsetup`` again to start the auto relaxation process. | ||
You are now good to go! | ||
|
||
If interruptted during the relaxation, run ``phantomsetup`` again and it will pick up from where it left off automatically. | ||
|
||
If in doubt, you can always run the star in isolation for a few years to see if relaxation procedure worked. | ||
|