mdphy_mod.f
41 lines · 1 definitions · on GitHub (7be4133)
Python version: mdphy_mod.py, 28 lines, on the right (switch to Python above the code).
Variables on this page (13)
amum, cpm, delam, delm, delrm, epsm, esumm, json, om, qdtm, thdifm, velm, viscm
Purpose
MDPHY_MOD holds physical quantities at each shell at an intermediate time of the model step, for the rotational-mixing and angular-momentum transport loop, shared by 10 routines. It replaces COMMON/MDPHY/ (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. MIDMOD sets them by linear interpolation, with weight FX, between the old model (…O) and the new one:
DELRM,DELAM,DELM: the radiative, adiabatic and actual temperature gradients;CPM($c_P$),QDTM(a thermodynamic derivative),OM(opacity),ESUMM(energy generation,SESUM) andEPSM(the same plusSEG(6,J)andSEG(7,J)),THDIFM(thermal diffusivity),VISCM(viscosity). Read bySETUPV(which interpolates most of them to the interfaces, intoINTVAR_MOD),VCIRC(THDIFM,VISCM),ROTMIX(DELM),ROTGRIDandMIXGRID(EPSM), andLIBURN,LIBURN2(DELAM,DELRM, to find the convective boundary); MIDMOD itself usesDELAM−DELRMto decide whether a shell that changes state over the step is convective.VELM: the convective velocity, interpolated where the shell keeps its state, the larger of the two where it becomes convective, 0 where it becomes radiative (midmod.f, lines 178–188↗); read nowhere: unused?AMUM: the mean molecular weight, set by MIDMOD, byCHECKC(from the new composition) andGETW(corrected for the change over the step); read bySETUPVandVCIRC(the μ-gradient terms).
Design
Definitions
moduleMDPHY_MOD
Uses modules DIMENSIONS_MOD
Change log
The changes since rp_1
Changed since rp_1. New file: COMMON/MDPHY/ as a module.