aragog.core
The aragog.core package carries the core evolution module: the core as a component with its own state rather than an isothermal reservoir. Radial structure uses the closed-form Gaussian profile family (Labrosse et al. 2001; Nimmo 2015), so every budget term is an analytic integral or a fixed-order quadrature and the module stays at ODE cost. All evaluation runs through jax.numpy at 64-bit precision and is jit- and grad-safe.
| Name | Role |
|---|---|
GaussianCoreProfiles |
Density, enclosed mass, gravity (exact erf form), hydrostatic pressure (quadrature or the printed Labrosse closed form), gravitational potential, and the adiabat of the core. |
IronMeltingCurve |
Pure-iron melting curve (Anzellini et al. 2013, the PALEOS prescription) with a multiplicative light-element depression. |
QuadraticMeltingCurve |
The quadratic-in-pressure parameterisation of Nimmo (2015, Eq. 6), interchangeable with the iron curve; the form benchmark models are defined in. |
CoreEnergyBudget |
Effective-heat-capacity energy balance: secular cooling, inner-core-nucleation latent heat, and the gravitational energy of light-element rejection; a legacy mode reproduces the isothermal-reservoir closure exactly. |
CoreEntropyBudget |
Entropy balance on top of the energy budget: cooling, latent, gravitational, and radiogenic sources against the conduction sink (closed form for the Gaussian adiabat), the dynamo entropy margin, and field strength via the Christensen, Holzwarth & Reiners (2009) energy-flux scaling. |
CoreModule |
Standalone coupling: holds the core state and advances it over an externally supplied heat-flow interval with jit-compiled Runge-Kutta sub-steps, recording the sub-step trajectory. |
build_core_module_budget |
Config-dict factory for the solver coupling (core_bc = 'core_module'); geometry always comes from the mesh. |
check_ra_crit |
Validate the CMB critical Rayleigh number: a positive, finite real number, returned as a float. |
cmb_boundary_layer_flux |
CMB heat flux of the solver coupling from the core-mantle temperature contrast through a mantle-side boundary layer (Foley & Driscoll 2016; Thiriet et al. 2019), never below conduction across the bottom half cell. |
crystallization_regime |
Regime code from the superheat profile: fully liquid, bottom-up, top-down, snow, or fully frozen (taxonomy of Breuer et al. 2015). refuse_unmodelled_regime raises for the regimes the budget does not model. |
adiabatic_ratio, stratification_depth |
Subadiabatic-onset ratio and the equilibrium thickness of the stably stratified sub-CMB layer from conductive matching. |
The budget terms are cross-validated against the open-source Leeds thermal_history implementation (secular exact, boundary terms to 0.5%), and the profile and melting machinery is pinned against Nimmo (2015) Table 2 (adiabatic length scales, ICB temperatures, melting gradients, adiabatic heat flows). The budget assumes bottom-up crystallization; parameter sets whose melting curve rises above the adiabat at the CMB (a top-down or snow topology) book no boundary terms, and the solver refuses a call that enters such a regime.
core
Core evolution module.
Replaces the isothermal-reservoir core boundary condition with a core that carries its own state: energy budget with inner-core nucleation, entropy budget and dynamo diagnostics, and stable stratification with crystallization-regime flags. The module receives the CMB heat flow and returns the CMB temperature; with every feature disabled it reproduces the isothermal-reservoir closure, which is the regression anchor.
All radial structure uses the closed-form Gaussian profile family (Labrosse et al. 2001; Nimmo 2015, Treatise on Geophysics 9.08), so every budget term is an analytic integral and the whole module stays at ODE cost.
CoreEnergyBudget(profiles, melting_curve, *, ds_fusion, icn_width, latent_heat=None, alpha_c=0.0, c_light=0.0, capacity_mode='profile', legacy_rho_core=None, legacy_tfac=None, stratification=False, k_core=None, layer=None)
Energy budget of a well-mixed core with inner-core growth.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profiles
|
GaussianCoreProfiles
|
Radial structure the budget integrates over. |
required |
melting_curve
|
IronMeltingCurve or QuadraticMeltingCurve
|
Alloy melting curve; sets the freezing point profile T_m(P). |
required |
ds_fusion
|
float
|
Entropy of fusion at the inner-core boundary [J kg-1 K-1]; sets the
latent heat per unit mass as |
required |
icn_width
|
float
|
Temperature width [K] of the nucleation diagnostic sigmoid. Positive; governs diagnostic regime indicators. |
required |
latent_heat
|
float
|
Constant latent heat of fusion [J/kg]. When given it replaces the
|
None
|
alpha_c
|
float
|
Compositional expansivity of the outer-core alloy (fractional density decrease per unit light-element mass fraction), for the gravitational-energy term. Zero disables the term. |
0.0
|
c_light
|
float
|
Light-element mass fraction of the outer core, rejected entirely by the solid on freezing (the complete-rejection limit). Zero disables the gravitational term. |
0.0
|
capacity_mode
|
str
|
|
'profile'
|
legacy_rho_core
|
float
|
Uniform core density [kg m-3] of the legacy closure (required in legacy mode). |
None
|
legacy_tfac
|
float
|
Core-temperature factor of the legacy closure (required in legacy mode; 1.147 is the Earth-like default used across the ecosystem). |
None
|
stratification
|
bool
|
When true, the outer core above the base of a resolved shell
(:class: |
False
|
k_core
|
float
|
Core thermal conductivity [W m-1 K-1]; required when |
None
|
layer
|
dict
|
Keyword arguments of :class: |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
On a non-positive |
Source code in src/aragog/core/budget.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
r_icb_batch
cached
property
r_icb vectorised and compiled, once per budget.
regime_batch
cached
property
crystallization_regime vectorised and compiled, once per budget.
t_freeze
property
CMB temperature [K] for full core freeze-out at the CMB.
t_onset
property
CMB temperature [K] for inner-core nucleation onset at the centre.
conducted_adiabatic_flow(r, t_cmb)
Heat flow [W] conducted along the adiabat through radius r (needs k_core).
Source code in src/aragog/core/budget.py
158 159 160 161 162 | |
core_rates(t_cmb, t_shell, q_cmb, q_sources=0.0)
Rates of the convecting core [K/s] and of the shell cells [K/s] of a stratified core.
The convecting core loses the flow into the shell base and keeps the mass share of the
internal sources q_sources [W] below it; the shell gets the rest, cell by cell.
Source code in src/aragog/core/budget.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 | |
dtcmb_dt(t_cmb, q_cmb, q_sources=0.0)
CMB cooling rate [K/s] for heat flow q_cmb [W] out of an unstratified core.
dT_cmb/dt = (q_sources - q_cmb) / C_eff(T_cmb); positive
q_cmb cools the core, and internal sources (radiogenic, tidal)
offset it. A stratified core has shell state: see :meth:core_rates.
Source code in src/aragog/core/budget.py
431 432 433 434 435 436 437 438 439 440 | |
effective_capacity(t_cmb, *, gravitational_upper=None)
Total dQ/d(dT_cmb/dt) [J/K] of the convecting core: secular plus latent plus gravitational (profile mode).
The secular integral runs to the convecting radius, the CMB or the shell base; the
light elements mix up to gravitational_upper (default the same radius), the base of
the stable layer when a shell is resolved.
Source code in src/aragog/core/budget.py
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | |
effective_tfac()
Mass-weighted mean of T_a/T_cmb over the core (profile mode).
Source code in src/aragog/core/budget.py
185 186 187 188 189 190 191 192 193 | |
gravitational_capacity(t_cmb, upper=None)
Gravitational contribution to the effective heat capacity [J/K].
Light elements rejected by the growing inner core mix through the
outer core and release gravitational energy. Per unit cooling:
[int_oc rho psi dV - M_oc psi(r_icb)] * alpha_c * Cc *
|dr_icb/dT_cmb| with Cc = 4 pi r_icb^2 rho(r_icb) c_light /
M_oc the enrichment per unit boundary advance in the
complete-rejection limit; the structure of the Leeds
thermal_history core model (Greenwood et al. 2021 lineage,
Gubbins et al. 2003 formalism). Zero when either compositional
parameter is zero, before onset, and after freeze-out. The
outer-core region runs to upper (default the CMB radius),
which the stratified budget reduces to the convecting radius.
Source code in src/aragog/core/budget.py
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | |
heat_content(t_cmb)
Core heat content [J] at CMB temperature t_cmb of the full, unstratified core.
t_cmb * C_secular minus the latent and gravitational energy released
between nucleation onset and t_cmb (zero above onset), so that
heat_content(T2) - heat_content(T1) is the integral of the effective
capacity from T1 to T2. The substitution T = T_onset - u^2
turns the square-root cusp of the latent and gravitational terms at onset,
C ~ (T_onset - T)^(1/2), into a smooth integrand.
Evaluated eagerly (t_onset is a Python float).
Raises:
| Type | Description |
|---|---|
ValueError
|
For a stratified budget, whose capacity covers only the convecting volume and depends on the CMB heat flow. |
Source code in src/aragog/core/budget.py
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | |
latent_capacity(t_cmb)
Latent contribution to the effective heat capacity [J/K].
L rho(r_icb) 4 pi r_icb^2 |dr_icb/dT_cmb| with the latent heat
per unit mass L either the prescribed constant or
T_icb * ds_fusion. Zero before nucleation onset and after
freeze-out completion when the boundary is pinned.
Source code in src/aragog/core/budget.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | |
nucleation_factor(t_cmb)
Diagnostic activation in [0, 1]: sigmoid of centre subcooling.
Source code in src/aragog/core/budget.py
290 291 292 | |
r_icb(t_cmb)
Inner-core boundary radius [m] at t_cmb.
Fixed-iteration bisection of the superheat on [0, r_cmb]; with no
crossing it converges to 0 (fully liquid) or r_cmb (fully frozen),
so the value is always defined and trace-safe. A liquid centre
returns zero regardless of frozen shells above it (the top-down
and snow topologies have no inner core in the bottom-up sense);
the boundary terms drop to zero there, and the solver refuses those
states (aragog.core.regime.refuse_unmodelled_regime).
The derivative is the implicit-function sensitivity attached as a custom JVP: a comparison-driven bisection carries no gradient of its own (autodiff sees only the converged constant trace), so without this rule anything differentiating through the boundary would silently read zero.
Source code in src/aragog/core/budget.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
secular_capacity(upper=None)
Secular heat capacity dQ_s / d(dT_cmb/dt) [J/K].
Profile mode: c_p int rho(r) f(r) 4 pi r^2 dr over the
convecting volume (upper defaults to the CMB radius), with
f the adiabat shape T_a(r)/T_cmb, i.e. c_p M
tfac_eff. Legacy mode: (4/3) pi r_cmb^3 rho c_p tfac, the
reservoir constant.
Source code in src/aragog/core/budget.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
superheat(r, t_cmb)
Adiabat minus melting curve [K] at radius r; positive = liquid.
Source code in src/aragog/core/budget.py
210 211 212 213 | |
CoreEntropyBudget(budget, *, k_core, f_ohm=1.0, flux_geometry='const_flux')
Entropy balance and dynamo diagnostics on top of the energy budget.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
budget
|
CoreEnergyBudget
|
The energy budget whose profiles, melting curve, and capacity terms this balance reuses; entropy efficiencies attach to its terms. |
required |
k_core
|
float
|
Thermal conductivity of the core [W m-1 K-1], treated as constant. |
required |
f_ohm
|
float
|
Fraction of dissipation that is ohmic, in (0, 1]; CHR09 adopt 1 for planets. |
1.0
|
flux_geometry
|
str
|
|
'const_flux'
|
Raises:
| Type | Description |
|---|---|
ValueError
|
On non-positive |
Source code in src/aragog/core/entropy.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
adiabatic_heat_flow(t_cmb)
Heat conducted down the adiabat at the CMB, Qk [W].
Source code in src/aragog/core/entropy.py
217 218 219 220 | |
b_dipole_cmb(t_cmb, q_cmb, dipolarity=1.0)
Dipole field at the CMB [T]: the core rms field times a
dipolarity fraction; a potential-field continuation to the planet
surface is the caller's (r_cmb / r_planet)^3 factor.
Source code in src/aragog/core/entropy.py
248 249 250 251 252 | |
b_rms_core(t_cmb, q_cmb)
Volume-averaged core field strength [T] from CHR09 Eq. 2.
The reference flux is the superadiabatic part of the CMB heat flow over the CMB area; with nothing superadiabatic the field estimate is zero even where compositional convection keeps the entropy margin positive (a conservative floor, see the module docstring).
Source code in src/aragog/core/entropy.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | |
chr09_efficiency_factor()
The printed Earth-core F: 0.88 (or 0.45) alpha g r / c_p.
Source code in src/aragog/core/entropy.py
222 223 224 225 226 | |
conduction_sink(upper=None)
Entropy sink of conduction along the adiabat, Ek [W/K].
4 pi k int (dTa/dr / Ta)^2 r^2 dr over the convecting volume (upper
defaults to the CMB radius), independent of T_cmb: by quadrature, or in the
small-radius mode, where the ratio is 2 r / D^2, as 16 pi k upper^5 / (5 D^4).
Source code in src/aragog/core/entropy.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
entropy_margin(t_cmb, q_cmb, q_radio=0.0, *, t_shell=None)
Entropy production available to the dynamo, dE [W/K].
The cooling rate follows from the energy budget for the given heat
flow, the three cooling-proportional sources scale with it, and
conduction subtracts. Positive margin sustains a dynamo. A stratified
core needs its shell temperatures t_shell: the convecting core and the shell
each add their sources and sinks, all delivered at the temperature of the top shell
cell (Greenwood et al. 2021, eq. 4).
Source code in src/aragog/core/entropy.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |
gravitational_entropy_capacity(t_cmb, upper=None, *, t_ref=None)
Entropy per unit cooling from gravitational energy [J/K^2].
Gravitational energy dissipates in full within the convecting
core: C_grav / T_ref (default T_cmb).
Source code in src/aragog/core/entropy.py
145 146 147 148 149 150 151 152 | |
latent_entropy_capacity(t_cmb, *, t_ref=None)
Entropy per unit cooling from latent heat [J/K^2].
The latent capacity released at T_icb and delivered at
T_ref (default T_cmb): C_lat (T_icb - T_ref) / (T_icb T_ref).
Source code in src/aragog/core/entropy.py
133 134 135 136 137 138 139 140 141 142 143 | |
radiogenic_entropy(t_cmb, q_radio, upper=None, *, t_ref=None)
Entropy rate from internal heating [W/K].
int h rho (1/T_ref - 1/Ta) dV with the heating rate per unit
mass h = q_radio / M_core uniform, integrated over the
convecting volume (upper defaults to the CMB radius, T_ref to T_cmb).
Source code in src/aragog/core/entropy.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
secular_entropy_capacity(t_cmb, upper=None, *, t_ref=None)
Entropy per unit cooling from secular cooling [J/K^2].
int rho c_p (Ta/T_ref - 1) dV / T_cmb: heat extracted at
temperature Ta and delivered at T_ref (default T_cmb) produces entropy in
proportion to the temperature drop. Integrated over the
convecting volume (upper defaults to the CMB radius).
Source code in src/aragog/core/entropy.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
CoreModule(budget, *, t_cmb, entropy=None, q_radio=0.0, n_substeps=32)
Stateful core evolving under an externally supplied CMB heat flow.
The core is one temperature, so a stratified budget, whose shell is state, is refused; the solver evolves it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
budget
|
CoreEnergyBudget
|
The energy budget that supplies the cooling rate. |
required |
t_cmb
|
float
|
Initial CMB temperature [K], positive. |
required |
entropy
|
CoreEntropyBudget
|
When given, diagnostics include the entropy margin and field strength alongside the energy-side quantities. |
None
|
q_radio
|
float
|
Internal source power [W] passed to every cooling-rate call. |
0.0
|
n_substeps
|
int
|
Fixed classical Runge-Kutta sub-steps per :meth: |
32
|
Source code in src/aragog/core/module.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
diagnostics(q_cmb=None)
Current core state as plain floats.
Always contains t_cmb, t_cen, r_icb,
nucleation_factor, effective_capacity, and the phase flags
inner_core_present / fully_frozen. With an entropy budget
attached and q_cmb given, adds entropy_margin,
dynamo_active, and b_rms_core.
Source code in src/aragog/core/module.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | |
step(q_cmb, dt, q_cmb_end=None)
Advance T_cmb over dt seconds of heat flow q_cmb [W].
The heat flow ramps linearly from q_cmb to q_cmb_end (equal
to q_cmb when omitted) across the interval, and the state
advances with n_substeps classical RK4 sub-steps. The sub-step
trajectory is stored on last_times / last_t_cmb /
last_q_cmb so the caller can see through the coupling interval
instead of only its endpoints. Returns the new T_cmb [K].
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/aragog/core/module.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | |
GaussianCoreProfiles(*, rho_cen, length_scale, r_cmb, p_cmb, alpha, c_p, pressure_mode='quadrature', adiabat_mode='exact')
Radial density, mass, gravity, pressure, and adiabat of the core.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rho_cen
|
float
|
Density at the planet centre [kg m-3]. |
required |
length_scale
|
float
|
Gaussian density length scale |
required |
r_cmb
|
float
|
Core-mantle boundary radius [m]. |
required |
p_cmb
|
float
|
Pressure at the CMB [Pa]; anchors the hydrostatic integration. |
required |
alpha
|
float
|
Thermal expansion coefficient [K-1], treated as constant. |
required |
c_p
|
float
|
Isobaric specific heat capacity [J kg-1 K-1], treated as constant. |
required |
pressure_mode
|
str
|
|
'quadrature'
|
adiabat_mode
|
str
|
|
'exact'
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If any parameter is non-positive, or |
Source code in src/aragog/core/profiles.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
r_peak
cached
property
Radius [m] where the heat conducted down the adiabat, r^2 g T, peaks; r_cmb
when it rises through the whole core. D sqrt(3/2) for linear gravity.
adiabat(r, t_cmb)
Adiabatic temperature [K] at radius r anchored at t_cmb; see adiabat_mode.
Hotter inward, equal to t_cmb at the CMB by construction.
Source code in src/aragog/core/profiles.py
219 220 221 222 223 224 225 226 227 | |
adiabat_gradient(r, t_cmb)
dT/dr [K/m] of the adiabat, -alpha g T / c_p, with the gravity of the mode.
Source code in src/aragog/core/profiles.py
229 230 231 232 233 234 235 236 237 | |
density(r)
Density [kg m-3] at radius r [m].
Source code in src/aragog/core/profiles.py
133 134 135 136 | |
enclosed_mass(r)
Mass [kg] inside radius r: the closed-form Gaussian integral.
4 pi rho_cen [ (sqrt(pi) L^3 / 4) erf(r/L) - (L^2 r / 2)
exp(-r^2/L^2) ], the exact antiderivative of
4 pi rho(s) s^2.
Source code in src/aragog/core/profiles.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
from_structure(*, m_core, p_cen, r_cmb, p_cmb, alpha, c_p, pressure_mode='quadrature', adiabat_mode='exact')
classmethod
Fit central density and length scale to core mass and central pressure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m_core
|
float
|
Total core mass [kg], positive. |
required |
p_cen
|
float
|
Central pressure [Pa], must exceed |
required |
r_cmb
|
float
|
Core-mantle boundary radius [m], positive. |
required |
p_cmb
|
float
|
Pressure at the core-mantle boundary [Pa], positive. |
required |
alpha
|
float
|
Thermal expansion coefficient [K-1], positive. |
required |
c_p
|
float
|
Isobaric specific heat capacity [J kg-1 K-1], positive. |
required |
pressure_mode
|
str
|
Pressure mode: |
'quadrature'
|
adiabat_mode
|
str
|
Adiabat mode: |
'exact'
|
Returns:
| Type | Description |
|---|---|
GaussianCoreProfiles
|
Profile instance with fitted |
Raises:
| Type | Description |
|---|---|
ValueError
|
If parameters are non-positive, if |
Source code in src/aragog/core/profiles.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | |
gravity(r)
Gravitational acceleration magnitude [m s-2] at radius r.
Exact for the Gaussian density: G M(r) / r^2, with the removable
singularity at the centre replaced by its analytic limit
(4 pi / 3) G rho_cen r.
Source code in src/aragog/core/profiles.py
153 154 155 156 157 158 159 160 161 162 163 164 165 | |
potential(r)
Gravitational potential [J/kg] at radius r, zero at the CMB.
psi(r) = -int_r^{r_cmb} g(s) ds on the same fixed 32-point
Gauss-Legendre panel as the pressure; negative inside the core,
which is the reference the gravitational-energy budget term uses.
Source code in src/aragog/core/profiles.py
203 204 205 206 207 208 209 210 211 212 213 214 215 | |
pressure(r)
Pressure [Pa] at radius r, from hydrostatic balance.
Quadrature mode: P(r) = p_cmb + int_r^{r_cmb} rho(s) g(s) ds on
a fixed 32-point Gauss-Legendre panel, jit-safe with no adaptive
control flow. Labrosse mode: the printed closed form.
Source code in src/aragog/core/profiles.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
t_cen(t_cmb)
Centre temperature [K] on the adiabat anchored at t_cmb.
Source code in src/aragog/core/profiles.py
258 259 260 | |
IronMeltingCurve(*, light_element_fraction=0.0, depression=0.0)
Melting temperature of the core alloy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
light_element_fraction
|
float
|
Mole fraction |
0.0
|
depression
|
float
|
Melting-point depression per unit mole fraction (the |
0.0
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/aragog/core/melting.py
88 89 90 91 92 93 | |
t_melt(pressure, light_element_fraction=None)
Alloy melting temperature [K] at pressure [Pa].
light_element_fraction overrides the instance value when given,
which allows callers to evolve the alloy composition without
rebuilding the curve. A concrete override (a real scalar or array) is
taken in float64 and checked like the instance value (in [0, 1), with
the depressed curve kept positive); a traced override is the caller's
responsibility, since a trace cannot raise on data.
Raises:
| Type | Description |
|---|---|
ValueError
|
If a concrete override is not a real number (a bool, string,
bytes or complex value included), is outside |
Source code in src/aragog/core/melting.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
t_melt_pure(pressure)
staticmethod
Pure-iron melting temperature [K] at pressure [Pa]: the two Anzellini
branches joined by the smootherstep blend of the module docstring.
Source code in src/aragog/core/melting.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
QuadraticMeltingCurve(*, t_m0, t_m1, t_m2)
Quadratic-in-pressure melting curve, T_m0 (1 + T_m1 P + T_m2 P^2).
The parameterisation of Nimmo (2015, Treatise on Geophysics 9.08,
Eq. 6), where T_m0 already incorporates the light-element
depression; it is the form the Table 2 benchmark models are defined in,
and a configurable alternative to the PALEOS prescription wherever a
fitted curve is preferred. Valid over core pressures only; T_m0 is
not a zero-pressure melting temperature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_m0
|
float
|
Prefactor [K], positive. |
required |
t_m1
|
float
|
Linear coefficient [Pa-1]; either sign occurs in published fits. |
required |
t_m2
|
float
|
Quadratic coefficient [Pa-2]; either sign occurs in published fits. |
required |
Notes
The fit is only meaningful over the pressure range it was constructed for; outside it a negative-coefficient curve can fall through zero. Callers own the range check.
Source code in src/aragog/core/melting.py
163 164 165 166 167 168 | |
gradient(pressure)
Melting-curve slope dT_m/dP [K/Pa] at pressure [Pa].
Source code in src/aragog/core/melting.py
180 181 182 183 | |
t_melt(pressure, light_element_fraction=None)
Melting temperature [K] at pressure [Pa].
The unused light_element_fraction keeps the call signature
interchangeable with :class:IronMeltingCurve; the depression is
already folded into t_m0 in this parameterisation.
Source code in src/aragog/core/melting.py
170 171 172 173 174 175 176 177 178 | |
adiabatic_ratio(entropy, t_cmb, q_cmb)
ADR = Q_cmb / Q_k: below one the top of the core is subadiabatic.
Source code in src/aragog/core/stratification.py
67 68 69 | |
build_core_module_budget(params, *, r_cmb, p_cmb_fallback, m_core=None, p_cen=None)
Build a :class:CoreEnergyBudget from a flat config dict.
Recognised keys: profile parameters (rho_cen, length_scale,
p_cmb, alpha, c_p, pressure_mode, adiabat_mode, m_core,
p_cen, fit_profile), the melting-curve selector
melting_curve ('iron' with light_element_fraction and
depression, or 'quadratic' with t_m0/t_m1/t_m2),
and the budget parameters (ds_fusion, icn_width,
latent_heat, alpha_c, c_light, capacity_mode,
legacy_rho_core, legacy_tfac, stratification,
k_core), and the shell of a stratified core (layer_base_fraction,
layer_cells, layer_top_cell, layer_k_mix, layer_g_mix). The CMB radius comes from the caller (the solver's
mesh), never from the dict, and p_cmb falls back to the
caller's value when absent.
When both m_core and p_cen are provided (and fit_profile is
not False), rho_cen and length_scale are fitted to the
structure constraints via :meth:GaussianCoreProfiles.from_structure.
Raises:
| Type | Description |
|---|---|
ValueError
|
From the underlying constructors on any invalid value, or here on
an unknown melting-curve selector, an unrecognised key, a quadratic
curve without its three coefficients, a |
Source code in src/aragog/core/module.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
check_ra_crit(ra_crit)
Return the CMB critical Rayleigh number as a float.
Raises:
| Type | Description |
|---|---|
ValueError
|
When |
Source code in src/aragog/core/boundary_layer.py
29 30 31 32 33 34 35 36 37 38 39 40 41 | |
cmb_boundary_layer_flux(t_core, t_mantle, *, conductivity, density, heat_capacity, expansivity, viscosity, gravity, dr_half, ra_crit=RA_CRIT_CMB_DEFAULT)
Heat flux out of the core across the CMB [W/m^2].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_core
|
float or Array
|
Core temperature at the CMB [K]. |
required |
t_mantle
|
float or Array
|
Mantle temperature at the CMB [K]: the bottom cell's entropy evaluated at the CMB pressure in the solver. |
required |
conductivity
|
float
|
Bottom-cell thermal conductivity [W/m/K], density [kg/m^3], heat
capacity [J/kg/K], thermal expansivity [1/K] and dynamic viscosity
[Pa s]. The thermal diffusivity is |
required |
density
|
float
|
Bottom-cell thermal conductivity [W/m/K], density [kg/m^3], heat
capacity [J/kg/K], thermal expansivity [1/K] and dynamic viscosity
[Pa s]. The thermal diffusivity is |
required |
heat_capacity
|
float
|
Bottom-cell thermal conductivity [W/m/K], density [kg/m^3], heat
capacity [J/kg/K], thermal expansivity [1/K] and dynamic viscosity
[Pa s]. The thermal diffusivity is |
required |
expansivity
|
float
|
Bottom-cell thermal conductivity [W/m/K], density [kg/m^3], heat
capacity [J/kg/K], thermal expansivity [1/K] and dynamic viscosity
[Pa s]. The thermal diffusivity is |
required |
viscosity
|
float
|
Bottom-cell thermal conductivity [W/m/K], density [kg/m^3], heat
capacity [J/kg/K], thermal expansivity [1/K] and dynamic viscosity
[Pa s]. The thermal diffusivity is |
required |
gravity
|
float
|
Gravitational acceleration at the CMB [m/s^2]. |
required |
dr_half
|
float
|
Distance from the CMB to the bottom staggered node [m], positive. |
required |
ra_crit
|
float
|
Critical Rayleigh number of the boundary layer. |
RA_CRIT_CMB_DEFAULT
|
Returns:
| Type | Description |
|---|---|
Array
|
|
Source code in src/aragog/core/boundary_layer.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
crystallization_regime(budget, t_cmb)
Regime code (see REGIME_NAMES) at t_cmb.
The superheat T_a - T_m is sampled on a fixed radial grid; its
sign at the centre and the CMB plus the number of sign changes
classify the state:
- no solid anywhere:
fully_liquid - no liquid anywhere:
fully_frozen - one interface, solid centre:
bottom_up - one interface, solid top:
top_down - more than one interface:
snow(at least one interior solid or liquid shell)
The grid resolves shells wider than r_cmb / 512; a thinner shell
than that reads as its surrounding regime.
Source code in src/aragog/core/regime.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
regime_name(code)
Human-readable name for a regime code (eager helper for logs).
Source code in src/aragog/core/regime.py
130 131 132 | |
stratification_depth(entropy, t_cmb, q_cmb)
Equilibrium thickness [m] of the stably stratified sub-CMB layer.
Solves Q_ad(r_s) = Q_cmb for the layer base r_s by fixed
bisection on the inner rising branch of Q_ad(r) = 4 pi r^2 k |dT_a/dr|,
which peaks at profiles.r_peak (D sqrt(3/2) on the small-radius adiabat) and
decreases beyond it; the thickness is r_cmb - r_s. For Earth-scale cores
the peak sits outside the CMB and the branch spans the whole core;
for larger cores the search is bracketed at the peak, and a layer
reaching the peak is reported clamped there, since the thin-layer
conductive-matching estimate has no meaning deeper. Zero when the
flow is superadiabatic at the CMB (ADR >= 1); the whole core
when the flow is non-positive (q_cmb <= 0).
Source code in src/aragog/core/stratification.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |