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

eqbound06.f

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

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

Variables on this page (10)

k3, l2, mv, mx, nr, nra, nt, nta, rho, t6a

Purpose

EQBOUND06 decides whether $(T,\rho)$ lies inside the OPAL 2006 equation-of-state table and, near its edges, returns the weight for blending OPAL with the Yale/SCV equation of state ("LLP 10/16/06"). Unlike the 1995 and 2001 versions, it follows the table's irregular edge in both temperature and density, and combines the ramps.

How it fits

  • Who calls it: only EQSTAT2, after OEQOS06, when LOPALE06 is set and $1870 \le T \le 2\times10^8$ K and $\log\rho \le 7$ (EQSTAT2's own density).
  • Inputs and outputs: T (K) and DL ($\log_{10}\rho$) in; LTAB, LRAMP and FAC out.
  • Modules: AEOS06_MOD (formerly /AEOS06/) holds the table (T6A, RHO), shared with ESAC06, READCOEOS06, RHOOFP06 and T6RINTEOS06. EOS06MISC_MOD (formerly /BEOS06/ and /BBEOS06/) holds NTA (for each density, the index of the lowest allowed temperature) and NRA (for each temperature, the index of the highest allowed density), set by DATA statements in the module (formerly in ESAC06), and the interpolation indices K3 and L2 that ESAC06 found on its last call; this routine starts its search from them.

The method

With $T_6 = T/10^6$, $\rho = 10^{\mathrm{DL}}$, T6A decreasing and RHO increasing:

  1. Out of table if $\rho < \rho_1$, $\rho \ge \rho_{N}$, $T_6 > T_{6,1}$ or $T_6 \le T_{6,N}$.
  2. Ramps at the "easy borders": at high temperature, $f_T = (T_6 - T_{6,1})/(T_{6,2} - T_{6,1})$ when $T_6 > T_{6,2}$; at low density, $f_\rho = (\rho - \rho_1)/(\rho_2 - \rho_1)$ when $\rho < \rho_2$.
  3. Find $k$ and $l$ with $T_{6,k-1} \ge T_6 > T_{6,k}$ and $\rho_{l-1} < \rho \le \rho_l$, by a linear search from K3 and L2. EQSTAT2 calls this routine only after OEQOS06 has returned normally, so ESAC06 has just set K3 and L2 for the same point (settled from the code, Nov 9, 2026: eqstat2.f, lines 313–317↗, oeqos06.f, lines 94–102↗).

  4. The irregular edge: out of table if $l > $ NRA(k) or $k > $ NTA(l). On the last allowed row or column, a ramp: $f_\rho = (\rho_l - \rho)/(\rho_l - \rho_{l-1})$ if $l = $ NRA(k); $f_T = (T_6 - T_{6,k})/(T_{6,k-1} - T_{6,k})$ if $k = $ NTA(l).

  5. The weight is the product, $f = f_\rho f_T$.

The ramps are linear in $\rho$ and $T_6$, not in their logarithms.

A high-temperature ramp of step 2 ($k = 2$) and an edge ramp in temperature of step 4 ($k = $ NTA(l)) never meet, nor do the two density ramps ($l = 2$ and $l = $ NRA(k)): The smallest NTA is 26 and the smallest NRA is 87 (settled from the code, Nov 9, 2026: eos06misc_mod.f, lines 61–70↗), so step 4's assignment of $f_T$ or $f_\rho$ never replaces one from step 2.

Definitions

subroutineEQBOUND06

lines 5–130 · GitHub

In-table test and blending weight $f = f_\rho f_T$ for the OPAL 2006 table, following its irregular edge (NTA, NRA).

Uses modules AEOS06_MOD, EOS06MISC_MOD

Called by EQSTAT2

Compiler warnings (2)

gfortran -Wall -Wextra, compiling only; nothing was run.

  • line 16: Unused parameter ‘mv’ declared [-Wunused-parameter]
  • line 16: Unused parameter ‘mx’ declared [-Wunused-parameter]

Change log

The changes since rp_1

Changed since rp_1. Declarations only: COMMON blocks to modules, IMPLICIT NONE.