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

momi.f

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

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

Variables on this page (6)

cc13, cc23, cgl, cln, json, walpcz

Purpose

Computes the moment of inertia HI of each shell of a rotating, distorted model, and its derivative with respect to $\ln A$, $A$ being the distortion parameter below, QIW $= dI/d\ln A$, which at fixed shape ($\eta_2$, $r_0$) is $\tfrac12\,\Omega\,\partial I/\partial\Omega$ (since $A \propto \Omega^2$; the comments name it a derivative in $\Omega$, line 50↗, and SOLID uses it as one, a suspected bug: solid.f, suspected bug 2). The comment: "Moment of inertia is calculated by the method used in Wai-Yuen Law's thesis (Yale, 1980) p.61," and "MOMI assumes that SHAPE has already been called."

How it fits

  • Inputs: the shape parameters ETA2 (Radau's $\eta_2$) and R0 (the characteristic radius $r_0$ of the equipotential, $r = r_0(1 - AP_2)$) per shell, from SHAPE; $\log r$ (HR), $\log m$ (HS), the shell masses HS2, the angular velocities OMEGA, and the shell range JSTART..JEND.
  • Who calls it: HPOINT, SOLID and STARIN.
  • What it calls: INTMOM, which evaluates the integral at each shell.
  • Outputs: HI and QIW per shell.
  • Modules: NMLPAR_MOD (WALPCZ), CONSTANTS_MOD (CLN, CC13, CC23, and $\log G$, CGL), DIMENSIONS_MOD (JSON). The unused /CCOUT/ and /LUOUT/ of rp_1 are no longer declared.

The method

  • Spherical shortcut. If WALPCZ $\ne 0$ (WALPCZ is the exponent of the rotation law $\Omega\, r^{\mathrm{WALPCZ}} =$ constant in the surface convection zone, as GETNEWENV's comment says; PARMIN keeps it between −2 and 0, so 0 is solid-body rotation), each shell is a thin spherical shell, $I = \tfrac23\,\Delta m\, r^2$, with $dI/d\Omega = 0$; the central shell is a sphere, $I = 0.4\,\Delta m\, r^2$, at the mean of the first two $\log r$ (lines 62–72↗).

Definitions

subroutineMOMI

lines 3–92 · GitHub

Uses modules CONSTANTS_MOD, DIMENSIONS_MOD, NMLPAR_MOD

Called by HPOINT ×2, SOLID, STARIN

Flowchart of its calls, in order (1)
for I = JSTART,JEND (DO 20), lines 73–90
Compiler warnings (1)

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

  • line 62: Inequality comparison for REAL(8) [-Wcompare-reals]

Change log

The changes since rp_1

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