PyREC scaffolding (from YREC development, 7be4133)/ amcalc.fGlossary

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

The method

  1. 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).

  2. $L/L_\odot = 10^{\mathtt{BL}}$.

  3. 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.

  4. If LROSSBY, the overturn time likewise, $\tau/\tau_\odot = [\tau_0 + f(\tau - \tau_0)]/\tau_\odot$; otherwise 1.

  5. 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

lines 5–89 · GitHub

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

Called by MCOWIND, MWIND

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.