amcalc.f
89 lines · 1 definitions · on GitHub (7be4133)
Python version: amcalc.py, 55 lines, on the right (switch to Python above the code).
Variables on this page (18)
c4pil, cln, clsunl, crsun, csigl, exl, exm, expr, exr, extau, fracstep, lrossby, pmmsolp, pmmsoltau, pphot, pphot0, taucz, taucz0
Purpose
This file computes the structure-dependent factor of the magnetic-braking torque, "according to the Matt et al. (2012) formulation" (comment by G. Somers, 6/16). The factor scales the angular-momentum loss of the wind with the star's mass, radius, luminosity, photospheric pressure and, optionally, its convective overturn time.
How it fits
- Inputs: the arguments
SMASS(the star's mass in solar masses: MDOT updates it asSMASS + DELM/CMSUN, and COWIND's header says "stellar mass (solar units)"),BL($\log L/L_\odot$) andTEFFL($\log T_\mathrm{eff}$); the exponentsEXM,EXR,EXL,EXPR,EXTAU, the solar normalizationsPMMSOLPandPMMSOLTAUand the switchLROSSBY, all namelist parameters in NMLPAR_MOD (set in PARMIN); the photospheric pressurePPHOT,PPHOT0, the overturn timeTAUCZ,TAUCZ0andFRACSTEPin OVRTRN_MOD. - Who calls it: MWIND and MCOWIND.
- Output: the argument
STRUCTFACTOR, which MWIND and MCOWIND multiply withCONSTFACTORand the time step to get the spin-down. - Modules: CONSTANTS_MOD (
CLSUNL,C4PIL,CSIGL,CLN,CRSUN), NMLPAR_MOD and OVRTRN_MOD.
The method
-
The radius from the Stefan–Boltzmann law, in cgs units: $$\log R = \tfrac12\left(\log L - \log 4\pi - \log\sigma - 4\log T_\mathrm{eff}\right),$$ with $\log L$ =
BL + CLSUNL; then $R/R_\odot$ (RRAD). -
$L/L_\odot = 10^{\mathtt{BL}}$.
-
The photospheric pressure, interpolated within the step between its values at the start (
PPHOT0) and end (PPHOT) of the step, both $\log P$, and normalized to the solar value: $$\frac{P_\mathrm{phot}}{P_{\mathrm{phot},\odot}} = \frac{10^{\,p_0 + f\,(p - p_0)}}{10^{\,p_\odot}},$$ with $f$ =FRACSTEP. -
If
LROSSBY, the overturn time likewise, $\tau/\tau_\odot = [\tau_0 + f(\tau - \tau_0)]/\tau_\odot$; otherwise 1. - The factor: $$\mathtt{STRUCTFACTOR} = M^{a_M}\,\left(\frac{R}{R_\odot}\right)^{a_R}\left(\frac{L}{L_\odot}\right)^{a_L}\left(\frac{P_\mathrm{phot}}{P_{\mathrm{phot},\odot}}\right)^{a_P}\left(\frac{\tau}{\tau_\odot}\right)^{a_\tau}.$$
Design
The radius comes from $L$ and $T_\mathrm{eff}$, not from the model's outer radius. The mass is used as given, with no solar normalization in this routine.
From YREC's documentation
Physics Options: PMMSOLP (default 4.9304) is $\log P$ at $T_\mathrm{eff}$ in the solar model, for the magnetic field's calibration, and PMMSOLTAU (9.4805D5 s) the Sun's convective overturn time; LROSSBY scales the loss with the Rossby number.
Definitions
subroutineAMCALC
Sets STRUCTFACTOR, the product of $M$, $R/R_\odot$, $L/L_\odot$, $P_\mathrm{phot}/P_{\mathrm{phot},\odot}$ and optionally $\tau/\tau_\odot$, each to its exponent from NMLPAR_MOD (Matt et al. 2012), and returns it in STRUCTFACTOR.
Uses modules CONSTANTS_MOD, NMLPAR_MOD, OVRTRN_MOD
Change log
The changes since rp_1
Changed since rp_1. STRUCTFACTOR is now an output argument (/CWIND/ retired); COMMON blocks to modules, IMPLICIT NONE; the unused constants and AWIND are gone, which settles the former question on them.