stellar

Contents

stellar.c

Subroutines that control the evolution of the star.

Author

Rodrigo Luger (rodluger@gmail.com)

Date

May 12 2015

Description

This module implements the Baraffe stellar evolution tracks :cite:`Baraffe15`, the Ribas XUV evolution model :cite:`Ribas05`, and a simple wind/magnetic braking model.

Functions

void BodyCopyStellar(BODY *dest, BODY *src, int foo, int iNumBodies, int iBody)
void ReadSatXUVFrac(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadSatXUVTime(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadXUVBeta(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadStellarModel(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadMagBrakingModel(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadWindModel(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadXUVModel(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadHZModel(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadRossbyCut(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadEvolveRG(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadHaltEndBaraffeGrid(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void InitializeOptionsStellar(OPTIONS *options, fnReadOption fnRead[])
void ReadOptionsStellar(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, fnReadOption fnRead[], int iBody)
void VerifyRotRate(BODY *body, CONTROL *control, OPTIONS *options, UPDATE *update, double dAge, int iBody)
void VerifyLostAngMomStellar(BODY *body, CONTROL *control, OPTIONS *options, UPDATE *update, double dAge, int iBody)
void VerifyLostEngStellar(BODY *body, CONTROL *control, OPTIONS *options, UPDATE *update, double dAge, int iBody)
void VerifyLuminosity(BODY *body, CONTROL *control, OPTIONS *options, UPDATE *update, double dAge, int iBody)
void VerifyRadius(BODY *body, CONTROL *control, OPTIONS *options, UPDATE *update, double dAge, int iBody)
void VerifyRadGyra(BODY *body, CONTROL *control, OPTIONS *options, UPDATE *update, double dAge, int iBody)
void VerifyTemperature(BODY *body, CONTROL *control, OPTIONS *options, UPDATE *update, double dAge, int iBody)
void fnPropsAuxStellar(BODY *body, EVOLVE *evolve, IO *io, UPDATE *update, int iBody)
void fnForceBehaviorStellar(BODY *body, MODULE *module, EVOLVE *evolve, IO *io, SYSTEM *system, UPDATE *update, fnUpdateVariable ***fnUpdate, int iBody, int iModule)
void AssignStellarDerivatives(BODY *body, EVOLVE *evolve, UPDATE *update, fnUpdateVariable ***fnUpdate, int iBody)
void NullStellarDerivatives(BODY *body, EVOLVE *evolve, UPDATE *update, fnUpdateVariable ***fnUpdate, int iBody)
void VerifyStellar(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, OUTPUT *output, SYSTEM *system, UPDATE *update, int iBody, int iModule)
void InitializeModuleStellar(CONTROL *control, MODULE *module)
void InitializeUpdateStellar(BODY *body, UPDATE *update, int iBody)
void FinalizeUpdateEccStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateLuminosityStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateRadiusStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateRadGyraStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateRotRateStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateLostAngMomStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateLostEngStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateTemperatureStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateOblStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateSemiStellar(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
int fbHaltEndBaraffeGrid(BODY *body, EVOLVE *evolve, HALT *halt, IO *io, UPDATE *update, fnUpdateVariable ***fnUpdate, int iBody)
void CountHaltsStellar(HALT *halt, int *iHalt)
void VerifyHaltStellar(BODY *body, CONTROL *control, OPTIONS *options, int iBody, int *iHalt)
void WriteLuminosity(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char cUnit[])
void WriteTemperature(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char cUnit[])
void WriteLXUV(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char cUnit[])
void WriteLXUVFrac(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char cUnit[])
void WriteRossbyNumber(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char cUnit[])
void WriteDRotPerDtStellar(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char cUnit[])
void InitializeOutputStellar(OUTPUT *output, fnWriteOutput fnWrite[])
void LogOptionsStellar(CONTROL *control, FILE *fp)
void LogStellar(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UPDATE *update, fnWriteOutput fnWrite[], FILE *fp)
void LogBodyStellar(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UPDATE *update, fnWriteOutput fnWrite[], FILE *fp, int iBody)
void AddModuleStellar(CONTROL *control, MODULE *module, int iBody, int iModule)
double fdLuminosity(BODY *body, SYSTEM *system, int *iaBody)
double fdRadius(BODY *body, SYSTEM *system, int *iaBody)
double fdTemperature(BODY *body, SYSTEM *system, int *iaBody)
double fdRadGyra(BODY *body, SYSTEM *system, int *iaBody)
double fdDRadiusDtStellar(BODY *body, SYSTEM *system, int *iaBody)

Compute the instataneous change in stellar radius according to the Baraffe models. Valid for the Baraffe stellar models

double fdDRadGyraDtStellar(BODY *body, SYSTEM *system, int *iaBody)

Compute the instataneous change in stellar radius according to the Baraffe models. Valid for the Baraffe stellar models

double fdDEDtPotConStellar(BODY *body, SYSTEM *system, int *iaBody)

Compute instataneous change in potential energy due to stellar radius evolution Note that this energy is released as radiation

double fdDEDtRotConStellar(BODY *body, SYSTEM *system, int *iaBody)

Compute instataneous change in rotational energy due to stellar radius evolution and considering angular momentum conservation

double fdDEDtRotRadGyraStellar(BODY *body, SYSTEM *system, int *iaBody)

Compute instataneous change in rotational energy due to stellar radius of gyration evolution and considering angular momentum conservation

double fdDEDtRotBrakeStellar(BODY *body, SYSTEM *system, int *iaBody)

Compute instataneous change in rotational energy due to stellar magnetic braking

double fdDEDtStellar(BODY *body, SYSTEM *system, int *iaBody)

Compute total energy lost due to stellar evolution

double fdDJDtMagBrakingStellar(BODY *body, SYSTEM *system, int *iaBody)

Calculate dJ/dt due to magnetic braking. This is from Reiners & Mohanty (2012); see eqn. (2.14) in Miles Timpe’s Master’s Thesis. Can also selected Skumanich 1972 model or no model

double fdDRotRateDtRadGyra(BODY *body, SYSTEM *system, int *iaBody)

Compute the change in rotation rate when the radius of gyration changes via conservation of angular momentum: dw/dt = -2 dRG/dt * w/RG

double fdDRotRateDtCon(BODY *body, SYSTEM *system, int *iaBody)

Compute the change in rotation rate when the radius changes via conservation of angular momentum: dw/dt = -2 dR/dt * w/R

double fdDRotRateDtMagBrake(BODY *body, SYSTEM *system, int *iaBody)

Compute the change in rotation rate due to magnetic braking via dw/dt = dJ/dt / I for moment of inertia I

double fdDRotRateDt(BODY *body, SYSTEM *system, int *iaBody)

Compute the change in rotation rate when the radius and total angular momentum are changing.

double fdLuminosityFunctionBaraffe(double dAge, double dMass)
double fdRadiusFunctionBaraffe(double dAge, double dMass)
double fdRadGyraFunctionBaraffe(double dAge, double dMass)
double fdTemperatureFunctionBaraffe(double dAge, double dMass)
double fdLuminosityFunctionProximaCen(double dAge, double dMass)
double fdTemperatureFunctionProximaCen(double dAge, double dMass)
double fdRadiusFunctionProximaCen(double dAge, double dMass)
double fdCranmerSaar2011TauCZ(double Teff)
double fdSurfEnFluxStellar(BODY *body, SYSTEM *system, UPDATE *update, int iBody, int iFoo)

stellar.h

Subroutines that control the evolution of the star.

Author

Rodrigo Luger (rodluger@gmail.com)

Date

May 12 2015

Defines

LSUN

Solar luminosity (W)

TSUN

Solar TEff (K)

RM12OMEGACRIT

Critical angular velocity (1/s) from Reiners & Mohanty (2012) \

RM12OMEGACRITFULLYCONVEC

Critical angular velocity (1/s) for fully convective stars, \ Reiners & Mohanty (2012)

RM12CONST

dJ/dt constant [(kg^5 m^-10 s^-3)^1/3] from Reiners & \ Mohanty (2012)

SK72CONST

dJ/dt constant from Skumanich 1972 (Repetto+2014)

MATT15T0

Matt+2015 T0 constant in Joules

MATT15X

Matt+2015 saturation ratio threshold

MATT15R0SUN

Matt+2015 solar Rossby number

MATT15TAUCZ

Matt+2015 solar TauCZ value in s

MATT15OMEGASUN

Matt+2015 solar angular rotation frequency in s^-1

ROSSBYCRIT

Critical Rossby number above which magnetic braking shuts off \ according to van Saders+2018

STELLAR_MODEL_NONE
STELLAR_MODEL_BARAFFE
STELLAR_MODEL_REINERS
STELLAR_MODEL_CONST
STELLAR_MODEL_RIBAS
STELLAR_MODEL_PROXIMACEN
STELLAR_DJDT_NONE

No stellar angular momentum loss via magnetic braking

STELLAR_DJDT_RM12

dJ/dt according to Reiners & Mohanty 2012

STELLAR_DJDT_SK72

dJ/dt according to Skumanich 1972 empirical law

STELLAR_DJDT_MA15

dJ/dt according to Matt+2015

HZ_MODEL_KOPPARAPU
DRYRGFLUX

W/m^2 from Abe et al. (2011)

OPTSTARTSTELLAR

Start of Stellar options

OPTENDSTELLAR

End of Stellar options

OPT_SATXUVFRAC

Saturation XUV luminosity fraction

OPT_STELLARMODEL

Luminosity evolution model

OPT_WINDMODEL

Wind model

OPT_XUVMODEL

XUV evol model

OPT_HALTENDBARAFFEFGRID

Halt when we reach the end of the Baraffe grid?

OPT_SATXUVTIME

XUV saturation time

OPT_XUVBETA

XUV power law decay exponent

OPT_ROSSBYCUT
OPT_HZMODEL

Habitable zone model

OPT_MAGBRAKINGMODEL

Magnetic braking model

OPT_EVOVLERG

Whether or not to evolve stellar radius of gyration

STELLARHALTSYSEND
STELLARHALTBODYEND
OUTSTARTSTELLAR
OUTENDSTELLAR
OUT_LUMINOSITY
OUT_LXUV
OUT_TEMPERATURE
OUT_LXUVFRAC
OUT_ROSSBYNUMBER
OUT_DROTPERDTSTELLAR