Skip to content

MichielsenM/stellar_grids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stellar_grids

Package to aid in constructing MESA/GYRE grids of stellar models.
This repository is an open-source package, GNU-licensed, and any improvements provided by the users are well accepted. See GNU License in LICENSE.

Installation (click to expand)

Git clone this repository, and install using poetry (https://python-poetry.org/docs/) with command poetry install in the folder with the pyproject.toml file. This will install the package with all its dependencies, using the dependency versions as specified in the poetry.lock file. (The package will be installed in editable mode, so it will link the package to the original location, meaning any changes to the original package will be reflected directly in your environment.)

If you do not wish to use poetry, you could install by running pip install .. Note that this will install it as a package in your python environment, but in non-editable mode.

Usage (click to expand)

To make a MESA grid, check the docstring of the make_mesa_setup function in file grid_building_vsc for all the available and required parameters. The current setup is tuned to have 6 varied parameters 'Zini', 'Mini', 'logD', 'aov', 'fov' that are put in a csv file (together with the MESA work directory and the output folder). These are read by the job scheduler and passed to the MESA run_star_extras. The run_star_extras should then read these in as command line arguments, and set the appropriate variables in the run_star_extras instead of the inlist. These scripts can of course be modified to suit your specific needs.
To make a GYRE grid based on the MESA grid computed before, check make_gyre_setup in file grid_building_vsc for all the available and required parameters.

As an example: run the following lines in a python script to make a grid with 2 different initial masses (M_ini, numbers are in solar mass), and 3 different metallicities (Z_ini, numbers are mass fraction).

from stellar_grids import grid_building_vsc as gbv

gbv.make_mesa_setup(M_ini_list=[1,2], Z_ini_list=[0.010, 0.014, 0.018])

contents

  1. stellar_grids: Package for the grid construction
  2. LICENSE: GNU general public license
  3. poetry.lock: List of dependencies and their exact versions.
  4. pyproject.toml: Installation configuration file.

Author

Developed by Mathias Michielsen

mathias.michielsen[at]kuleuven.be
Instituut voor Sterrenkunde
KU Leuven, Belgium

About

Setup for MESA/GYRE grids

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published