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

oeqos06.f

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

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

Variables on this page (7)

cgas, eos, ishort, mv, mx, nr, nt

Purpose

The interface to the 2006 OPAL equation of state ("LLP, October 17, 2006"), with the same arguments and outputs as OEQOS and OEQOS01 (removed since rp_1); it is now the only OPAL equation of state. Its inline comments document the entries of EOS it uses: EOS(5) is $c_V = dE/dT_6$ at constant volume, EOS(6) is $\partial\log P/\partial\log\rho$ at constant $T_6$, EOS(7) is $\partial\log P/\partial\log T_6$ at constant $\rho$, EOS(8) is $\Gamma_1$, and EOS(9) is $\Gamma_2/(\Gamma_2-1)$.

How it fits

  • Inputs: T10 $=\log T$, P10 $=\log P$, XC, Z; the tables read by READCOEOS06.
  • Who calls it: EQSTAT2.
  • What it calls: RHOOFP06, ESAC06 (IORDER = 9) and MU.
  • Outputs: $T$, $P$, $\log\rho$ and $\rho$, BETA, BETAI, BETA14, RMU, AMU, EMU, QDT, QDP, QCP, DELA, and the alternate return.
  • Modules: EOS06MISC_MOD (the result EOS(10), formerly /EEOS06/; shared with ESAC06, RADSUB06, READCOEOS06, RHOOFP06, T6RINTEOS06 and CALCAD), CONSTANTS_MOD (CGAS), IOUNITS_MOD (ISHORT). The unused /COMP/, /CTLIM/, /CONST1/ and /CCOUT2/ of rp_1 are no longer declared. The parameters MX, MV, NR, NT (the table's dimensions, line 51↗) are declared but not used here (unused?), and ZTAB is set to Z (line 91↗) but no longer passed on (unused?).

The method

  1. Density. From $T$ and $P$ (given as logs T10, P10), with $T_6 = T/10^6$ K and $P_{12} = P/10^{12}$ dyn cm⁻², the table routine finds $\rho(P, T, X)$ (RHOOFP…), with radiation included (IRAD = 1). A value $\le -998$ means failure.
  2. Thermodynamics. The table routine ESAC… fills the array EOS at $(X, T_6, \rho)$. From it: $$\texttt{QDP} = \left(\frac{\partial\ln\rho}{\partial\ln P}\right)_T = \frac{1}{\chi_\rho},\qquad \texttt{QDT} = \left(\frac{\partial\ln\rho}{\partial\ln T}\right)_P = -\frac{\chi_T}{\chi_\rho},$$ $$c_P = 10^{6}\,\frac{c_V\,\Gamma_1}{\chi_\rho}\ \ (\texttt{QCP};\ c_V\ \text{per}\ 10^6\ \mathrm{K}\ \text{in the table}),\qquad \nabla_\mathrm{ad} = \frac{\Gamma_2 - 1}{\Gamma_2}\ \ (\texttt{DELA}),$$ where $\chi_\rho = (\partial\ln P/\partial\ln\rho)_T$, $\chi_T = (\partial\ln P/\partial\ln T)_\rho$.

  3. Radiation. $1-\beta = aT^4/(3P)$, coded as BETA14 $= 2.521971383\times10^{-3}\,T_6^4/P_{12}$; BETA $=\beta$, BETAI $= 1/\beta$.

  4. Mean molecular weight. RMU $= \beta P/(\rho T)$; MU gives the ion and electron terms AMU and EMU; if EMU $\le 0$, it is set to zero and AMU $=$ RMU$/\mathcal{R}$.

The alternate return (RETURN 1) tells the caller to fall back on another equation of state when the point is outside the table or the table fails.

Range. $0.00187 \le T_6 \le 200$.

Definitions

subroutineOEQOS06

lines 30–132 · GitHub

Uses modules CONSTANTS_MOD, EOS06MISC_MOD, IOUNITS_MOD

Called by EQSTAT2

Flowchart of its calls, in order (3)
Compiler warnings (4)

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

  • line 48: Unused parameter ‘mv’ declared [-Wunused-parameter]
  • line 48: Unused parameter ‘mx’ declared [-Wunused-parameter]
  • line 48: Unused parameter ‘nr’ declared [-Wunused-parameter]
  • line 48: Unused parameter ‘nt’ declared [-Wunused-parameter]

Change log

The changes since rp_1

Changed since rp_1. Declarations only: COMMON blocks to modules, IMPLICIT NONE; the unused parameters IVARX, CNVS and ZERO removed.