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

temp_mod.f

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

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

Variables on this page (6)

cp, hamu, json, sqdt, thdif, visc

Purpose

TEMP_MOD holds physics at each shell for rotational mixing: specific heat, mean molecular weight, a density derivative, and the radiative diffusivity and viscosity. Shared by 5 routines. It replaces COMMON/TEMP/ (MHP via Claude, 10/14/26); JSON comes from DIMENSIONS_MOD.

What its variables hold, who sets them, who reads them.

  • CP, SQDT (JSON each): $c_P$ and $\partial\ln\rho/\partial\ln T$ (QCP, QDT), and HAMU(JSON): the mean molecular weight of a fully ionized gas, set by PHYSIC. CP is read by VISCOS, HAMU by GETW.
  • VISC(JSON): the viscosity, radiative plus molecular, and THDIF(JSON): the radiative diffusivity $16\sigma T^3/(3\kappa\rho^2 c_P)$, set by VISCOS.
  • All five are read by HPOINT and MIDMOD, HPOINT saves them as the values at the start of the step, and MIDMOD interpolates between those and the current ones.

Design

A blanket USE TEMP_MOD in each routine.

Definitions

moduleTEMP_MOD

lines 19–34 · GitHub

Uses modules DIMENSIONS_MOD

Used by (5 units)

GETW, HPOINT, MIDMOD, PHYSIC, VISCOS

Change log

The changes since rp_1

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