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

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) and EPSM (the same plus SEG(6,J) and SEG(7,J)), THDIFM (thermal diffusivity), VISCM (viscosity). Read by SETUPV (which interpolates most of them to the interfaces, into INTVAR_MOD), VCIRC (THDIFM, VISCM), ROTMIX (DELM), ROTGRID and MIXGRID (EPSM), and LIBURN, LIBURN2 (DELAM, DELRM, to find the convective boundary); MIDMOD itself uses DELAM − DELRM to 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, by CHECKC (from the new composition) and GETW (corrected for the change over the step); read by SETUPV and VCIRC (the μ-gradient terms).

Design

A blanket USE MDPHY_MOD. At rp_1, CODIFF and MIXCZ also declared the block; they no longer do.

Definitions

moduleMDPHY_MOD

lines 19–41 · GitHub

Uses modules DIMENSIONS_MOD

Used by (10 units)

CHECKC, GETW, LIBURN, LIBURN2, MIDMOD, MIXGRID, ROTGRID, ROTMIX, SETUPV, VCIRC

Change log

The changes since rp_1

Changed since rp_1. New file: COMMON/MDPHY/ as a module.