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

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 (JSON each): 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).
  • ENVINT fills them from ENVPRT_MOD, starting at the surface, and then reverses their order, so that point 1 is the bottom; it passes them to TAUCAL.
  • GETNEWENV and STARIN shift 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) and STITCH (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

lines 19–47 · GitHub

Uses modules DIMENSIONS_MOD

Used by (7 units)

CALCAD, ENVINT, GETNEWENV, GETTAU, STARIN, STITCH, TAUINT

Change log

The changes since rp_1

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