aragog.config
The aragog.config package provides the modern attrs-based configuration classes and the Config facade used by the PROTEUS wrapper. Each subclass corresponds to one TOML section; the facade composes them into a legacy Parameters object that the solver consumes internally.
| Name | Role |
|---|---|
Config |
Top-level facade. Static constructors from_toml(path), from_dict(data), and from_file(*paths) return a legacy Parameters ready for EntropySolver. |
BoundaryConfig |
Surface and core boundary settings: outer_boundary_condition, inner_boundary_condition, emissivity, core_bc mode (quasi_steady default, energy_balance, gradient, bower2018), UTBL toggle. |
EnergyConfig |
Physics toggles (conduction, convection, gravitational separation, mixing, radionuclides, tidal), eddy-diffusivity ratio, tidal-array buffer. |
InitialConditionConfig |
IC type (linear, user-defined, adiabatic), surface and basal temperatures, init-file path. |
MeshConfig |
Mesh geometry, EOS method (Adams-Williamson or user-defined), surface density, gravity, bulk modulus, mass-coordinate flag, surface pressure. |
MixedPhaseConfig |
Mushy-zone parameters: latent heat, rheological transition, smoothing widths, solidus/liquidus paths, cp_blend strategy. |
PhaseConfig |
Single-phase (solid or liquid) properties: density, heat capacity, conductivity, expansivity, viscosity, optional entropy lookup. Each property accepts a float or a path-string lookup. |
RadionuclideConfig |
One radioisotope: name, reference time, abundance, concentration, heat production, half-life. Provides get_heating(time) (W/kg). |
SolverConfig |
ODE driver settings: start_time, end_time, atol, rtol, surface-T step cap. |
For the TOML field syntax expected on disk, see How-to: configuration.
The facade returns a Parameters dataclass tree from the legacy aragog.parser module; that is the object EntropySolver actually consumes internally. The attrs Config classes documented here are the public construction surface.
Facade
Config
Top-level Aragog configuration.
Facade that constructs a Parameters object from attrs-based
sub-configs or from TOML/dict input. Solver consumes the
Parameters instance directly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
solver
|
dict
|
ODE solver parameters. |
required |
boundary_conditions
|
dict
|
Boundary condition parameters. |
required |
mesh
|
dict
|
Mesh parameters. |
required |
energy
|
dict
|
Energy source toggles. |
required |
initial_condition
|
dict
|
Initial condition parameters. |
required |
phase_liquid
|
dict
|
Liquid phase properties. |
required |
phase_solid
|
dict
|
Solid phase properties. |
required |
phase_mixed
|
dict
|
Mixed phase parameters. |
required |
radionuclide_
|
Radionuclide sections (any key starting with 'radionuclide_'). |
required |
from_dict(data)
staticmethod
Construct a Parameters object from a nested dictionary.
This is the primary construction path used by the PROTEUS wrapper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
Nested dictionary with section names as keys. |
required |
Returns:
| Type | Description |
|---|---|
Parameters
|
Legacy Parameters object, ready for Solver. |
Source code in src/aragog/config/__init__.py
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 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
from_file(*filenames)
staticmethod
Load from a file, auto-detecting format (TOML or INI).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filenames
|
str
|
One or more file paths. |
()
|
Returns:
| Type | Description |
|---|---|
Parameters
|
|
Source code in src/aragog/config/__init__.py
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 | |
from_toml(filename)
staticmethod
Load configuration from a TOML file and return a Parameters object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the TOML file. |
required |
Returns:
| Type | Description |
|---|---|
Parameters
|
Legacy Parameters object, ready for Solver. |
Source code in src/aragog/config/__init__.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
Boundary conditions
BoundaryConfig
Boundary condition parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outer_boundary_condition
|
int
|
1: Grey-body, 2: Zahnle, 3: Atmodeller, 4: Prescribed flux, 5: Prescribed T |
required |
outer_boundary_value
|
float
|
Value for outer BC (flux in W/m^2 or T in K, depending on type). |
required |
inner_boundary_condition
|
int
|
1: Core cooling, 2: Prescribed flux, 3: Prescribed T |
required |
inner_boundary_value
|
float
|
Value for inner BC. |
required |
emissivity
|
float
|
Surface emissivity for grey-body BC. |
required |
equilibrium_temperature
|
float
|
Equilibrium temperature for grey-body BC [K]. |
required |
core_heat_capacity
|
float
|
Core heat capacity [J/(kg K)]. |
required |
tfac_core_avg
|
float
|
Core adiabat correction factor (Bower+2018). |
required |
param_utbl
|
bool
|
Enable upper thermal boundary layer parameterization. |
required |
param_utbl_const
|
float
|
UTBL constant. |
required |
Energy sources
EnergyConfig
Physics toggle flags, heating parameters, and solver knobs.
Defaults are aligned with the PROTEUS production path (SUNDIALS CVODE + JAX analytic Jacobian + tanh phase smoothing with the bottom-up gravitational-separation gate enabled and a phase-dependent eddy-diffusivity floor of 10 m^2/s).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conduction
|
bool
|
|
required |
convection
|
bool
|
|
required |
gravitational_separation
|
bool
|
|
required |
mixing
|
bool
|
|
required |
radionuclides
|
bool
|
|
required |
tidal
|
bool
|
|
required |
eddy_diffusivity_chemical
|
float
|
Ratio kappa_c / kappa_h for chemical eddy diffusivity. |
required |
eddy_diffusivity_thermal
|
float
|
Multiplier on the raw thermal eddy diffusivity \(\kappa_h\)
before the floor is applied. The SPIDER convention also
permits negative values, in which case the diffusivity is
pinned to |
required |
kappah_floor
|
float
|
Phase-dependent eddy-diffusivity floor [m^2/s]. Clamps the
eddy diffusivity from below by |
required |
bottom_up_grav_sep
|
bool
|
SPIDER-analogue bottom-up gate for the gravitational mass-flux: only allow melt/solid separation across an interface when the staggered cell below is non-pure. Default True; off only for regression tests against the pre-fix CMB drain at first crystallisation. |
required |
phase_smoothing
|
str
|
Phase-boundary smoothing scheme for J_grav and J_mix:
|
required |
solver_method
|
str
|
ODE backend: |
required |
use_jax_jacobian
|
bool
|
When True and |
required |
phi_step_cap
|
float
|
Per-call mass-weighted |
required |
tidal_array
|
ndarray
|
Tidal heating per unit mass [W/kg] at each layer. |
required |
Initial condition
InitialConditionConfig
Initial condition parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_condition
|
int
|
1: Linear profile, 2: User-defined from file, 3: Adiabatic profile. |
required |
surface_temperature
|
float
|
Surface temperature [K]. |
required |
basal_temperature
|
float
|
Basal temperature [K]. |
required |
init_file
|
str
|
Path to user-defined temperature file (for IC type 2). |
required |
Mesh
MeshConfig
Mesh and static pressure profile parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outer_radius
|
float
|
Outer radius of the mantle shell (planet radius minus atmosphere
depth, in practice the same as |
required |
inner_radius
|
float
|
Inner radius of the mantle shell, i.e. the core-mantle boundary (CMB) radius [m]. |
required |
number_of_nodes
|
int
|
Number of basic mesh nodes. |
required |
mixing_length_profile
|
str
|
'constant' or 'nearest_boundary'. |
required |
mixing_length_constant_fraction
|
float
|
Fraction of the mantle thickness to use as the mixing length
when |
required |
core_density
|
float
|
Core density [kg/m^3]. |
required |
eos_method
|
int
|
1: Adams-Williamson, 2: User-defined. |
required |
surface_density
|
float
|
Surface-mantle density anchor [kg/m^3]. Used only by the analytic
Adams-Williamson EOS ( |
required |
gravitational_acceleration
|
float
|
Gravitational acceleration [m/s^2]. |
required |
adiabatic_bulk_modulus
|
float
|
Adiabatic bulk modulus [Pa]. |
required |
surface_pressure
|
float
|
Surface pressure [Pa]. |
required |
mass_coordinates
|
bool
|
Use uniform spacing in mass-coordinate space instead of radius. Gives larger cells at the surface (lower density) and matches SPIDER's mesh. Default True matches the PROTEUS production path. |
required |
eos_file
|
str
|
Path to user-defined EOS file. |
required |
Phases (single and mixed)
PhaseConfig
Single-phase (solid or liquid) material properties.
Each property can be a float (constant value) or a str (path to a lookup table file).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
density
|
float or str
|
Density [kg/m^3] or path to lookup. |
required |
heat_capacity
|
float or str
|
Heat capacity [J/(kg K)] or path to lookup. |
required |
melt_fraction
|
float
|
Melt fraction (0 for solid, 1 for liquid). |
required |
thermal_conductivity
|
float or str
|
Thermal conductivity [W/(m K)] or path to lookup. |
required |
thermal_expansivity
|
float or str
|
Thermal expansivity [1/K] or path to lookup. |
required |
viscosity
|
float or str
|
Dynamic viscosity [Pa s] or path to lookup. |
required |
entropy
|
float or str
|
Entropy [J/(kg K)] or path to lookup. Empty string means unused. |
required |
MixedPhaseConfig
Mixed-phase (mushy zone) parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
latent_heat_of_fusion
|
float
|
Latent heat [J/kg]. |
required |
rheological_transition_melt_fraction
|
float
|
Melt fraction at rheological transition. |
required |
rheological_transition_width
|
float
|
Width of the tanh smoothing around the transition. |
required |
solidus
|
str
|
Path to solidus lookup file. |
required |
liquidus
|
str
|
Path to liquidus lookup file. |
required |
phase
|
str
|
Active phase mode: 'solid', 'liquid', 'mixed', or 'composite'. |
required |
phase_transition_width
|
float
|
Width of smoothing at phase boundaries. |
required |
grain_size
|
float
|
Grain size [m] for permeability calculations. |
required |
cp_blend
|
str
|
Mushy-zone Cp blending mode: |
required |
matprop_smooth_width
|
float
|
Half-width of the tanh used to smooth phase-dependent material properties around the rheological transition. Default 0.0 reproduces SPIDER's convention of no smoothing on the property side; 0.01 is the typical JAX setting. |
required |
const_properties
|
bool
|
Replace the EOS-tabulated \((\rho, c_p, \alpha, k)\) and
\(\log_{10}\eta\) with the seven constant-property values
below. Mirrors SPIDER's |
required |
const_rho
|
float
|
Constant density [kg/m^3] when |
required |
const_Cp
|
float
|
Constant heat capacity [J/(kg K)] when |
required |
const_alpha
|
float
|
Constant thermal expansivity [1/K] when |
required |
const_cond
|
float
|
Constant thermal conductivity [W/(m K)] when
|
required |
const_log10visc
|
float
|
Constant \(\log_{10}\) dynamic viscosity [log10(Pa s)] when
|
required |
const_T_ref
|
float
|
Reference temperature [K] for the constant-properties EOS, used to anchor \(T(P, S)\) on the analytic isentrope. |
required |
const_S_ref
|
float
|
Reference entropy [J/(kg K)] for the constant-properties
EOS, paired with |
required |
Radionuclides
RadionuclideConfig
Single radionuclide heating source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Isotope name (e.g., 'K40', 'U238'). |
required |
t0_years
|
float
|
Reference time for initial abundance [years]. |
required |
abundance
|
float
|
Isotopic abundance ratio (e.g., 40K/K). |
required |
concentration
|
float
|
Elemental concentration [ppm]. |
required |
heat_production
|
float
|
Specific heat production [W/kg]. |
required |
half_life_years
|
float
|
Half-life [years]. |
required |
get_heating(time)
Compute radiogenic heating at a given time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time
|
float or ndarray
|
Time [years]. |
required |
Returns:
| Type | Description |
|---|---|
float or ndarray
|
Heat production [W/kg]. |
Source code in src/aragog/config/radionuclides.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
Solver driver
SolverConfig
ODE solver parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_time
|
float
|
Start time [years]. |
required |
end_time
|
float
|
End time [years]. |
required |
atol
|
float
|
Absolute tolerance for BDF solver. |
required |
rtol
|
float
|
Relative tolerance for BDF solver. |
required |
tsurf_poststep_change
|
float
|
Maximum surface temperature change per step [K]. |
required |