aragog.rheology_lid
The aragog.rheology_lid module implements stagnant-lid identification, boundary-layer convective stress scaling (Foley and Bercovici, 2014), the minimum plastic yield viscosity closure (Moresi and Solomatov, 1998; Tackley, 2000), and the local strain-rate closure dispatcher. All functions accept an xp array namespace (numpy or jax.numpy) and run at 64-bit precision.
| Name | Role |
|---|---|
COHESION_FLOOR |
Minimum positive yield-stress floor (\(10^{-6}\text{ Pa}\)) preventing zero viscosity when cohesion and friction are zero at zero pressure. |
compute_stagnant_lid_state |
Identify the convecting interior state (\(T_i, P_{T_i}, \eta_i, \mu_i\)), stagnant-lid base and thickness (\(r_\mathrm{lid,base}, d_\mathrm{lid}, \delta_\mathrm{rh}\)), Frank-Kamenetskii contrast \(\theta\), convective velocity \(v_m\), driving stress \(\tau_d\), lid yield stress \(\tau_{y,\mathrm{lid}}\), smooth lid mask \(w_\mathrm{lid}\), and regime indicator lid_regime. |
compute_effective_viscosity |
Combine diffusion-creep viscosity and plastic yield viscosity via the minimum closure in boundary-layer 'lid' mode or local mixing-length 'local' mode. |
stress_closure |
Local strain-rate dispatcher for stress_closure_mode = 'local'. |
For the physical derivations and asymptotic regimes, see Solid-state convection and lithospheric rheology.
rheology_lid
Stagnant lid boundary layer indicators and effective viscosity closures.
Intentional non-smooth switches retained for boolean diagnostics and physical bounds
include is_convecting, has_lid, the is_convecting gate on v_i, the
cap of f at 1, f_int_max = max(f * interior_node_mask),
max(T_0, 1.0), max(T_1, 1.0), max(H_0, 1.0e-6), max(H_1, 1.0e-6),
the w_eff clip to [0, 1], dT_ep_nz, is_mono_T, the 1 - 1e-15
selectors on w_eff and w_weight, DeltaT_conv = max(T_i - T_surf, 1.0e-6),
max(theta, 1.0e-6), max(Ra_rh_raw, 1.0e-30), the elementwise maxima in
w_interior and w_hot_sol, dTdr_floor with max(dr_min, 1.0), the
r[-1] - r[0] cap on delta_rh, the COHESION_FLOOR yield-stress clamp,
if_lid (where(w_lid_present >= 1 - 1e-12)), d_geom, the max in d_lid_raw,
max(w_conv - w_conv_0, 0), f_int_scale, the v_m_raw branches, and the
1.0e-30 denominators.
compute_effective_viscosity(eta_diff, tau_d=None, tau_y_lid=None, stress_closure_mode='lid', unyielded_velocity=None, mixing_length=None, tau_y_profile=None, w_lid=None, strain_rate=None, tau_y=None, eta_i=None, xp=np)
Compute effective dynamic viscosity with boundary-layer or local stress closure.
Both boundary-layer lid mode and local stress closure mode use a smooth minimum closure of diffusion creep and plastic yield viscosity per Moresi & Solomatov (1998):
In boundary-layer lid mode, plastic yield viscosity is evaluated from the supplied
driving shear stress tau_d (in solver pass 2, stagnant_lid_state['tau_d_lid'],
corresponding to the lid strain-rate scale 2 * v_m / d_geom = tau_d_lid / eta_i):
log10(eta_y) = _softmin2(log10(eta_diff), log10(eta_i * (tau_y_lid / tau_d)), LOCAL_CAP_LOG10_WIDTH)
w_b = 0.5 * (1 + tanh(((tau_d / tau_y_lid) - 1) / YIELD_BLEND_RATIO_WIDTH))
log10(eta_eff_lid) = (1 - w_b) * log10(eta_diff) + w_b * log10(eta_y)
with linear stress-ratio width YIELD_BLEND_RATIO_WIDTH (0.025) and
yield-branch log10 cap width LOCAL_CAP_LOG10_WIDTH (0.01). eta_i,
tau_d, and tau_y_lid are required in 'lid' mode.
In local stress closure mode, eta_y = max(tau_y, COHESION_FLOOR) / (2 * sr_safe)
with sr_safe = sqrt(strain_rate**2 + LOCAL_STRAIN_RATE_FLOOR**2) and
smooth log10 softplus cap of width LOCAL_CAP_LOG10_WIDTH (0.01). In the
two-pass mixing-length solver, where the pass-1 viscous buoyancy stress
tau_buoy,1 = eta_diff * |v_visc,1| / l_v is independent of eta_diff,
yielding in 'local' mode lowers eta_eff by tau_y / tau_buoy,1 so
pass 2 scales the viscous velocity and eddy diffusivity by
tau_buoy,1 / tau_y; it is not a stress cap.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eta_diff
|
FloatOrArray
|
Unyielded diffusion-creep dynamic viscosity [Pa s], strictly positive
and finite |
required |
tau_d
|
FloatOrArray or None
|
Convective driving shear stress [Pa] for |
None
|
tau_y_lid
|
FloatOrArray or None
|
Representative lid Byerlee yield stress [Pa] for
|
None
|
stress_closure_mode
|
str
|
Plastic stress closure mode, either |
'lid'
|
unyielded_velocity
|
FloatOrArray or None
|
Unyielded pass-1 viscous convective velocity [m/s] for |
None
|
mixing_length
|
FloatOrArray or None
|
Convective mixing length [m] for |
None
|
tau_y_profile
|
FloatOrArray or None
|
Alias for |
None
|
w_lid
|
FloatOrArray or None
|
Dimensionless lid membership mask weight in |
None
|
strain_rate
|
FloatOrArray or None
|
Local convective strain rate [1/s] for |
None
|
tau_y
|
FloatOrArray or None
|
Local Byerlee yield stress [Pa] for |
None
|
eta_i
|
FloatOrArray or None
|
Representative interior viscosity [Pa s] for |
None
|
xp
|
module
|
Array backend ( |
numpy
|
Returns:
| Type | Description |
|---|---|
FloatOrArray
|
Effective dynamic viscosity |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Notes
Setting tau_y_lid = +inf in 'lid' mode (or tau_y = +inf in
'local' mode) represents infinite yield strength (no plastic yielding);
a double-where substitution replaces +inf with a finite placeholder
before the ratio so jax.grad remains finite while returning eta_diff
in the outer where without capping finite yield stresses or high
diffusion viscosities.
References
Moresi & Solomatov (1998), p. 672, eqs. 13-14, doi:10.1046/j.1365-246X.1998.00521.x (viscosity switch / minimum form eta_eff = min(eta_creep, eta_yield)) Foley & Bercovici (2014), p. 588, eq. 28, doi:10.1093/gji/ggu275 (convective driving shear stress tau_d = 2 * mu_i * v_m / d) Tackley (2000), eq. 8, p. 4, doi:10.1029/2000GC000036 (viscosity cap / minimum form eta_eff = min[eta, sigma_y / (2 e_dot)]) Foley & Becker (2009), eqs. 7-8, p. 3, doi:10.1029/2009GC002378 (alternative harmonic mean formulation)
Source code in src/aragog/rheology_lid.py
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 | |
compute_stagnant_lid_state(radii, temperature, pressure, convective_flux, total_flux, solidus_temperature, melt_fraction, params, viscosity_solid, phi_rheo, phi_width, unyielded_velocity=None, viscosity_mixture=None, density=3300.0, gravity=9.81, thermal_expansivity=3e-05, thermal_diffusivity=1e-06, a_rh_fb=1.3, C4=0.125, xp=np)
Compute stagnant lid boundary-layer indicators and convective driving stress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radii
|
array - like
|
Radial grid coordinates r [m] from core to surface. |
required |
temperature
|
array - like
|
Radial temperature profile T [K]. |
required |
pressure
|
array - like
|
Radial pressure profile P [Pa] (non-negative; negative round-off
excursions down to |
required |
convective_flux
|
array - like
|
Convective heat flux profile F_conv [W/m^2]. |
required |
total_flux
|
array - like
|
Total heat flux profile F_tot [W/m^2]. |
required |
solidus_temperature
|
float or array - like or None
|
Solidus temperature profile T_sol [K]. When provided, the solidus
crossing indicators |
required |
melt_fraction
|
array - like
|
Melt mass fraction profile phi [-]. |
required |
params
|
SolidRheologyParams
|
Rheology parameter set. |
required |
viscosity_solid
|
float
|
Reference solid mantle viscosity [Pa s] such that
|
required |
phi_rheo
|
float
|
Critical melt fraction for rheological transition [-]. |
required |
phi_width
|
float
|
Transition width for rheological melt fraction indicator [-]. |
required |
unyielded_velocity
|
float or array - like
|
Unyielded convective velocity profile v [m/s]. |
None
|
viscosity_mixture
|
float or array - like
|
Effective mixture viscosity profile [Pa s] of the convecting layer (in mush,
the blended two-phase viscosity used by the solver). When provided, mu_i
blends smoothly via |
None
|
density
|
float or array - like
|
Mantle density rho [kg/m^3]. |
3300.0
|
gravity
|
float or array - like
|
Gravitational acceleration g [m/s^2]. |
9.81
|
thermal_expansivity
|
float or array - like
|
Thermal expansivity alpha [1/K]. |
3.0e-5
|
thermal_diffusivity
|
float or array - like
|
Thermal diffusivity kappa [m^2/s]. |
1.0e-6
|
a_rh_fb
|
float
|
Rheological sublayer parameter fitted with C4 in FB2014 (p. 589). |
1.3
|
C4
|
float
|
Convective velocity prefactor in FB2014 (Eq. 26, p. 586-587; p. 589). |
0.125
|
xp
|
array module
|
Array namespace module (numpy or jax.numpy). |
np
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary of boundary layer state diagnostics, including
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Notes
See docs/Explanations/solid_state_convection.md for model formulation
and derivations.
The Frank-Kamenetskii parameter theta, rheological temperature scale
dT_rh, interior Arrhenius log-viscosity log10(eta_arr_i) (and thus
eta_i when viscosity_mixture is None), and geotherm diagnostics
(P_T_i, r_i) (on a monotone temperature profile) are endpoint-blended
between the conduction-limit state 0 at node 1 (T_0 = T[1], P_0 = P[1])
and the convecting-interior boundary state 1
(T_1 = sum(W_Ti_tilde * T), P_1 = sum(W_Ti_tilde * P)):
theta = w_eff * theta_1 + (1 - w_eff) * theta_0 and
dT_rh = w_eff * dT_rh_1 + (1 - w_eff) * dT_rh_0, where
theta_k = H_k * (T_k - T_surf) / (R_GAS * max(T_k, 1.0)**2) and
dT_rh_k = R_GAS * max(T_k, 1.0)**2 / max(H_k, 1.0e-6) for k in {0, 1},
with w_eff = clip((T_0 - T_i) / (T_0 - T_1), 0.0, 1.0) when
dT_ep_nz (|T_0 - T_1| > 1.0e-12) holds and w_weight otherwise.
Activation enthalpy H_k = H(P_k) follows the homologous law
H(P) = params.g_homologous * R_GAS * T_sol(P) when
params.activation_energy is None (using t_sol_0 + dt_sol_dp * P
when solidus_temperature is None), and the saturating integral law
H(P) = E_a + V_0 * P_decay * (1 - exp(-P / P_decay)) when
params.activation_energy is set (solidus_temperature, g_homologous,
t_sol_0, and dt_sol_dp are not used in H(P) when
params.activation_energy is set).
When convective layer weights place interior temperature T_i below lid base temperature T_lid (for example in cold_top_lid where T_i < T_lid), the solver evaluates theta and driving stress directly from the convective layer state T_i without clamping T_i to T_lid.
When convection is inactive or no physical conductive lid forms
(d_lid_raw <= NO_LID_THICKNESS_THRESHOLD of 1.0 m or
T_i - T_surf <= NO_LID_DT_THRESHOLD of 1.0e-3 K, where the w_active > 0.05
threshold sits at f_int_max = params.interior_flux_fraction + 0.01 * atanh(-0.9) = 0.035278
at the default interior_flux_fraction = 0.05), boundary-layer diagnostics
(d_lid, Ra_eff, Ra_rh, v_m, tau_d, tau_d_lid,
tau_buoy, tau_d_over_tau_buoy, w_y, lid_regime) are smoothly
gated by w_lid_present = w_d * w_T * w_act_gate * w_sum_gate * w_weight
(where w_d and w_sum_gate are \(C^0\) with a one-sided slope at the
domain edge d_lid_raw >= 0 and W_sum >= 0, and w_T uses the \(C^1\)
positive part where(dT_lid > 0, dT_lid * tanh(dT_lid / (0.3 * NO_LID_DT_WIDTH)), 0)
so w_lid_present vanishes identically when d_lid_raw <= 0,
T_i - T_surf <= 0, or W_sum <= 0) and has_lid is False, while
T_i, eta_i, mu_i, and theta serve as interior fallback
diagnostics and all solver-facing outputs vary continuously across uniform
convective flux fractions f in [0, 1e-3]. Intentional non-smooth
switches retained for boolean diagnostics and physical bounds include
is_convecting, has_lid, the is_convecting gate on the diagnostic
v_i, the cap of f at 1, f_int_max = max(f * interior_node_mask),
max(T_0, 1.0), max(T_1, 1.0), max(H_0, 1.0e-6), max(H_1, 1.0e-6),
the w_eff clip to [0, 1], dT_ep_nz, is_mono_T, the 1 - 1e-15
selectors on w_eff and w_weight,
DeltaT_conv = max(T_i - T_surf, 1.0e-6), max(theta, 1.0e-6),
max(Ra_rh_raw, 1.0e-30), the elementwise maxima in w_interior and
w_hot_sol, the temperature-gradient floor dTdr_floor with
max(dr_min, 1.0) in delta_rh, the domain-thickness cap r[-1] - r[0]
on delta_rh, the COHESION_FLOOR clamp on yield stress,
if_lid (where(w_lid_present >= 1 - 1e-12)), d_geom, the max in
d_lid_raw, max(w_conv - w_conv_0, 0), f_int_scale, the
v_m_raw branches, and the 1.0e-30 denominators (while the
5-node local interior RMS |F_tot| floor
F_tot_floor = _softmax2(F_TOT_FLOOR_FRAC * F_loc_rms, 1.0e-12, 0.01 * 1.0e-12)
replaces boundary nodes k = 0 and k = N - 1 by their adjacent interior
nodes F_tot[1] and F_tot[N - 2] before 2-node edge replication, is
continuous in every F_k, and differs from a scalar 1.0e-12 floor only at
nodes where F_conv > 0 and |F_tot| < 0.0014 * F_loc_rms when
1.0e-3 * F_loc_rms >> 1.0e-12 W/m2).
The lid-base locator W_base_tilde = _boundary_weights(w_interior, xp)[0] scans
w_interior (smoothed over the local cell temperature step
scale = lid_mask_width_cells * _softmax2(|grad T|, 1.0 K, SCALE_FLOOR_WIDTH)) from
the outermost node r[-1] inward, whereas the nodal lid mask
w_lid = (1 - w_interior_mask) * w_active uses the smooth capped width
scale_mask = _softmin2(scale, scale_cap, SCALE_MASK_REL_WIDTH * scale_cap) with
scale_cap = lid_mask_width_cells * _softmax2(dT_rh, 1.0 K, SCALE_FLOOR_WIDTH).
In 'fixed' mode (lid_base_mode = 'fixed'), both 1 - w_hot_iso and
1 - w_hot_iso_mask are multiplied by
w_nonconv = 1 - _melt_ramp(f, f_thresh, 0.2 * f_thresh, compact=True)
so a convecting node is never part of the lid; when no node is non-convecting
(w_nonconv == 0 everywhere), w_interior == 1 on all nodes and r_lid_base
sits at r[-1] with d_lid_raw = 0 and d_lid = 0.
The solidus crossing indicators w_hot_sol and w_hot_sol_mask evaluate the
compactly supported \(C^2\) quintic melt-fraction ramp w_sol_phi on
[SOLIDUS_MELT_FRACTION_THRESHOLD - SOLIDUS_MELT_FRACTION_WIDTH,
SOLIDUS_MELT_FRACTION_THRESHOLD + SOLIDUS_MELT_FRACTION_WIDTH] = [0.008, 0.012],
so that w_sol_phi == 0 for phi <= 0.008 and w_sol_phi == 1 for
phi >= 0.012, giving has_lid = False and d_lid = 0 for any column
with phi >= 0.012 at every node across all mesh resolutions N.
Raises:
| Type | Description |
|---|---|
ValueError
|
If any required parameter or array ( |
Source code in src/aragog/rheology_lid.py
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 231 232 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 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 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 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | |
stress_closure(mode, viscous_velocity, mixing_length=None, eps=1e-15, xp=np)
Calculate strain rate dispatching on stress closure mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Stress closure mode; |
required |
viscous_velocity
|
FloatOrArray
|
Viscous convective velocity [m/s], finite real scalar or array in
|
required |
mixing_length
|
FloatOrArray or None
|
Convective mixing length [m], non-negative and finite in |
None
|
eps
|
float
|
Positive regularisation scale [m] for |
1.0e-15
|
xp
|
module
|
Array backend ( |
numpy
|
Returns:
| Type | Description |
|---|---|
FloatOrArray
|
Local convective strain rate [1/s], non-negative in |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/aragog/rheology_lid.py
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 | |