Temperature profile
Computes the temperature column of the structure profile. calculate_temperature_profile dispatches on the configured mode (isothermal, linear, prescribed, adiabatic); compute_adiabatic_temperature integrates an adiabat using native EOS gradient tables, with two anchor choices: anchor='surface' (default, historic) sets \(T(R) = T_{\mathrm{surf}}\) and integrates inward, while anchor='cmb' sets \(T(r_{\mathrm{cmb}}) = T_{\mathrm{cmb}}\) and integrates outward through the mantle only (used when an interior energetics solver downstream of Aragog or SPIDER already constrains the CMB temperature). For multi-material layers nabla_ad is mass-fraction-weighted across components.
temperature
Adiabatic temperature profile computation and temperature mode dispatch.
Provides compute_adiabatic_temperature (using native EOS gradient tables)
and calculate_temperature_profile (mode-based dispatch for isothermal,
linear, prescribed, and adiabatic profiles).
compute_adiabatic_temperature(radii, pressure, mass_enclosed, surface_temperature, cmb_mass, core_mantle_mass, layer_mixtures, material_dictionaries, interpolation_functions=None, solidus_func=None, liquidus_func=None, mushy_zone_factors=None, condensed_rho_min=CONDENSED_RHO_MIN_DEFAULT, condensed_rho_scale=CONDENSED_RHO_SCALE_DEFAULT, binodal_T_scale=50.0, anchor='surface', cmb_temperature=None)
Compute an adiabatic temperature profile using native EOS gradient tables.
Supports single-material and multi-material (volume-additive) layers. For multi-material layers, nabla_ad is mass-fraction-weighted across components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radii
|
ndarray
|
Radial grid in ascending order from center to surface, in m. |
required |
pressure
|
ndarray
|
Pressure at each radius, in Pa. |
required |
mass_enclosed
|
ndarray
|
Enclosed mass at each radius, in kg. |
required |
surface_temperature
|
float
|
Temperature at the surface, in K. Used as the anchor when
|
required |
cmb_mass
|
float
|
Core-mantle boundary mass, in kg. |
required |
core_mantle_mass
|
float
|
Total core-plus-mantle mass, in kg. |
required |
layer_mixtures
|
dict
|
Per-layer LayerMixture objects. |
required |
material_dictionaries
|
dict
|
EOS registry dict keyed by EOS identifier string. |
required |
interpolation_functions
|
dict
|
Cache of interpolation functions used to avoid redundant loading. |
None
|
solidus_func
|
callable
|
Interpolation function for the solidus melting curve. |
None
|
liquidus_func
|
callable
|
Interpolation function for the liquidus melting curve. |
None
|
mushy_zone_factors
|
dict or float or None
|
Per-EOS mushy zone factors. Dict keyed by EOS name, a single float (applied to all), or None (default 1.0 for all). |
None
|
condensed_rho_min
|
float
|
Sigmoid center for phase-aware suppression (kg/m^3). Default 322. |
CONDENSED_RHO_MIN_DEFAULT
|
condensed_rho_scale
|
float
|
Sigmoid width for phase-aware suppression (kg/m^3). Default 50. |
CONDENSED_RHO_SCALE_DEFAULT
|
binodal_T_scale
|
float
|
Binodal sigmoid width in K for H2 miscibility suppression. Default 50. |
50.0
|
anchor
|
('surface', 'cmb')
|
Where the adiabat is anchored. |
'surface'
|
cmb_temperature
|
float
|
Temperature at the core-mantle boundary, in K. Required when
|
None
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Temperature at each radial point, in K. |
Source code in src/zalmoxis/eos/temperature.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 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 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 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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
calculate_temperature_profile(radii, temperature_mode, surface_temperature, center_temperature, input_dir, temp_profile_file, cmb_temperature=None)
Return a callable temperature profile for a planetary interior model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radii
|
array_like
|
Radial grid of the planet, in m. |
required |
temperature_mode
|
('isothermal', 'linear', 'prescribed', 'adiabatic', 'adiabatic_from_cmb')
|
Temperature profile mode.
|
"isothermal"
|
surface_temperature
|
float
|
Temperature at the surface, in K. |
required |
center_temperature
|
float
|
Temperature at the center, in K. Used for |
required |
cmb_temperature
|
float
|
Temperature at the core-mantle boundary, in K. Required for
|
None
|
input_dir
|
str or path - like
|
Directory containing the prescribed temperature profile file. |
required |
temp_profile_file
|
str
|
Name of the file containing the prescribed temperature profile from
center to surface. Required when |
required |
Returns:
| Type | Description |
|---|---|
callable
|
Function of radius returning temperature in K. The callable accepts a scalar or array-like radius and returns a float or NumPy array. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
ValueError
|
If the prescribed temperature profile length does not match
|
ValueError
|
If |
Source code in src/zalmoxis/eos/temperature.py
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 390 391 392 393 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 430 | |
_compute_paleos_dtdp(pressure, temperature, mat_PALEOS, solidus_func, liquidus_func, interpolation_functions)
Compute dT/dP from PALEOS nabla_ad with phase-aware weighting.
Uses solid nabla_ad below solidus, liquid nabla_ad above liquidus, and melt-fraction-weighted average in the mushy zone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pressure
|
float
|
Pressure in Pa. |
required |
temperature
|
float
|
Temperature in K. |
required |
mat_PALEOS
|
dict
|
PALEOS material properties dict. |
required |
solidus_func
|
callable or None
|
Solidus melting curve interpolation function. |
required |
liquidus_func
|
callable or None
|
Liquidus melting curve interpolation function. |
required |
interpolation_functions
|
dict
|
Shared interpolation cache. |
required |
Returns:
| Type | Description |
|---|---|
float or None
|
dT/dP in K/Pa, or None if lookup fails. |
Source code in src/zalmoxis/eos/temperature.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 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 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | |