oldrot2_mod.f
38 lines · 1 definitions · on GitHub (7be4133)
Python version: oldrot2_mod.py, 25 lines, on the right (switch to Python above the code).
Purpose
OLDROT2_MOD holds the terms of the time derivative of $\theta$ in the Maeder–Zahn (1998) advection–diffusion treatment of angular momentum ("MHP 06/02 added term for the time evolution of the angular velocity distribution"), at the start of the step and during the substeps, shared by 5 routines. It replaces COMMON/OLDROT2/ (MHP via Claude, 10/14/26); JSON comes from DIMENSIONS_MOD. All members are arrays of JSON.
What its variables hold, who sets them, who reads them. At each interface I (between shells I-1 and I):
THM: $r^4/(\sqrt{m}\,G)$ (in logs,2(log r) − ½ log m − log G), set bySETUPV("added for $d\theta/dt$ term from Zahn & Maeder 1998").THO,QWRST: $\theta$ =THM$\bar\Omega\,d\Omega/dr$ and $d\Omega/dr$ of the old model, set byHPOINT;GETWcopies them intoTHP,QWRMSTon the first iteration.THP,QWRMST,WMST: $\theta$, $d\Omega/dr$ and $\Omega$ at the start of the current substep, set byGETW(from the old model on the first iteration, recomputed from the current $\Omega$ after it).THPis read byVCIRC;WMSTbySECULR(the starting surface $\Omega$ for the wind);QWRMSTnowhere (getw.f, line 275↗, getw.f, line 287↗): unused?THN: the $d\theta/dt$ term,FESTIME(THM$\bar\Omega\,d\Omega/dr$ −THP)/$\Delta t$, set and read byVCIRC, which adds it to the circulation velocities.FESTIME: $P/(g\,\Delta\nabla\,\rho)$ at the interface, set bySETUPV(0 where unused) and rescaled byVCIRCwith the μ-gradient factor.DDELM: $\nabla_\mathrm{ad} - \nabla$, set by HPOINT from the old model and by SETUPV (with the μ term, not below a floor); read by SETUPV and VCIRC.
Design
A blanket USE OLDROT2_MOD. DDELM has two meanings, set by HPOINT and then overwritten by SETUPV.
Definitions
moduleOLDROT2_MOD
Uses modules DIMENSIONS_MOD
Change log
The changes since rp_1
Changed since rp_1. New file: COMMON/OLDROT2/ as a module.