envstruct_mod.f
47 lines · 1 definitions · on GitHub (7be4133)
Python version: envstruct_mod.py, 35 lines, on the right (switch to Python above the code).
Variables on this page (19)
ebetas, edels, efxions, egam1, envd, envl, envo, envp, envr, envs, envt, envx, envz, eqcp, eqdt, evels, json, lcenv, numenv
Purpose
ENVSTRUCT_MOD holds the run of the envelope's structure, point by point, as stored by the envelope integration, shared by 7 routines. It replaces COMMON/ENVSTRUCT/ (MHP via Claude, 10/14/26); JSON comes from DIMENSIONS_MOD.
What its variables hold, who sets them, who reads them.
NUMENV(INTEGER*4): the number of stored points.- At each point (
JSONeach):ENVP,ENVT,ENVD,ENVR($\log P$, $\log T$, $\log\rho$, $\log r$),ENVS($\log(m/M_*)$),ENVX,ENVZ($X$, $Z$),ENVO(opacity),ENVL(luminosity),LCENV(convective,EVEL> 0),EVELS(convective velocity),EDELS(3,JSON)(the three gradients),EBETAS,EGAM1($\Gamma_1$),EQCP,EQDT(thermodynamic derivatives),EFXIONS(3,JSON)(ionization fractions). ENVINTfills them fromENVPRT_MOD, starting at the surface, and then reverses their order, so that point 1 is the bottom; it passes them toTAUCAL.GETNEWENVandSTARINshift the structure variables when the fitting point moves (points above the new interior mass kept, offset by the jump in each variable), and use them to add envelope points to the interior model.- Read also by
CALCAD,GETTAU,TAUINT(convective velocity beyond the interior) andSTITCH(which writes them out).
Design
A blanket USE ENVSTRUCT_MOD. At rp_1, tauintnew.f also declared the block; it no longer does.
Definitions
moduleENVSTRUCT_MOD
Uses modules DIMENSIONS_MOD
Change log
The changes since rp_1
Changed since rp_1. New file: COMMON/ENVSTRUCT/ as a module.