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

scrtch_mod.f

39 lines · 1 definitions · on GitHub (7be4133)

Python version: scrtch_mod.py, 27 lines, on the right (switch to Python above the code).

Variables on this page (11)

json, locons, sbeta, scp, sdel, seg, sesum, seta, sfxion, so, svel

Purpose

SCRTCH_MOD holds the local physics of the interior at each shell, as computed in the last pass of the structure equations: energy generation, opacity, temperature gradients, ionization, convective velocity. Many routines read it later in the step (mixing, burning, regridding, output). Shared by 16 routines. It replaces COMMON/SCRTCH/ (MHP via Claude, 10/14/26); JSON comes from DIMENSIONS_MOD.

What its variables hold, who sets them, who reads them. COEFFT stores all of them at each shell IM; PHYSIC stores SO, SDEL and SVEL again when it recomputes the physics.

  • SESUM(JSON): the sum of the nuclear energy generation's five terms EG(1)…EG(5) (0 below the cutoff temperature TCUT(1)); SEG(7,JSON): those five as fractions of SESUM, then the neutrino term EG(6) and the gravitational term HHC (EGRAV) (SEG(6), SEG(7)). Read by HPOINT (which interpolates them, through OSPLIN, to the grid at the start of the step), MIDMOD, WRTMIL, the setup of rotation (FRACNUC in ROTDER_MOD) and the output (PUTSTORE, STITCH, WRTMOD).
  • SO(JSON): the opacity. Read by HPOINT, MIDMOD, VISCOS and the output (PUTSTORE, STITCH, WRTMOD, WRTOUT).
  • SDEL(3,JSON): $\nabla_\mathrm{rad}$, $\nabla$, $\nabla_\mathrm{ad}$. ROTMIX replaces SDEL(2,·) for a while and restores it. Read by the burning and mixing routines (LIBURN, LIBURN2, MICRODIFF_MTE, SETUP_GRSETT, ROTMIX), GETTAU, HPOINT, MIDMOD, PHYSIC and the output.
  • SVEL(JSON): the convective velocity (cm/s); read by GETTAU, HPOINT, MIDMOD and the output.
  • SBETA(JSON), SETA(JSON), SFXION(3,JSON), SCP(JSON): $\beta$ (gas over total pressure), the degeneracy parameter $\eta$, the three ionization fractions and $c_P$, for the stored model (PUTSTORE, STITCH).
  • LOCONS(JSON): meant to say whether conduction dominates the opacity; set by COEFFT from its LOCOND, which it always sets to true (coefft.f, line 161↗; coefft.f, line 444↗), and read by no routine (unused?).

Design

A blanket USE SCRTCH_MOD in each routine.

Definitions

moduleSCRTCH_MOD

lines 19–39 · GitHub

Uses modules DIMENSIONS_MOD

Used by (16 units)

COEFFT, GETTAU, HPOINT, LIBURN, LIBURN2, MICRODIFF_MTE, MIDMOD, PHYSIC, PUTSTORE, ROTMIX, SETUP_GRSETT, STITCH, VISCOS, WRTMIL, WRTMOD, WRTOUT

Change log

The changes since rp_1

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