|
RadCluster
Graph-based cluster dynamics for irradiated materials
|
Functions | |
| normalisation_constant (f_cl, s, m_max) | |
| compute_epsilon (f_cl, s, m_max) | |
| _spec_get (spec, key) | |
| _merge_spec (spec, over) | |
| production_rates (G, spectrum, I_max, V_max, G_He_r, spec_over=None) | |
Variables | |
| dict | FISSION |
| dict | FUSION |
| dict | _KEY_ALIASES = {'m1': 'i_cascade', 'n1': 'v_cascade'} |
defect_production.py — Cascade defect production fractions for bcc Fe / EUROFER97.
Implements the power-law cluster number distributions for SIA and vacancy
clusters produced in displacement cascades, for fission and fusion spectra.
Physics reference
-----------------
Ghoniem, N.M. (2026), Sections 1-2 (Rate_Equations.pdf):
Eqs. 1-13, Tables 2 and 5.
Production rates [atom frac / s]
---------------------------------
For SIA clusters (i = 2..i_cascade):
P_i^SIA = η · G · ε_i^SIA (Eq. 12)
ε_i^SIA = C_i · i^{−s_i} (Eq. 7)
C_i = f_i^cl / Σ_{i=2}^{i_cascade} i^{1−s_i} (Eq. 9)
For vacancy clusters (v = 2..v_cascade):
P_v^VAC = η · G · ε_v^VAC (Eq. 13)
ε_v^VAC = C_v · v^{−s_v} (Eq. 8)
C_v = f_v^cl / Σ_{v=2}^{v_cascade} v^{1−s_v} (Eq. 10)
Point-defect production (monomer):
P_1^SIA = η · G · (1 − Σ_{m≥2} m·ε_m^SIA) (Eq. 11 — surviving free SIAs)
P_1^VAC = η · G · (1 − Σ_{m≥2} m·ε_m^VAC) (Eq. 11 — surviving free vacancies)
The monomer term absorbs the EXACT remaining cascade mass over the
actually-used (possibly truncated) ε array. When the size grid is not
truncated (I_max ≥ i_cascade) the sum equals f_i^cl by construction, so this
reduces to the textbook P_1 = η·G·(1 − f_i^cl); when I_max < i_cascade it
guarantees exact atom conservation Σ_{m≥1} m·P_m = η·G.
|
protected |
Module-default cascade spec overlaid with workbook values. ``over`` is ``InputData.production_fission`` / ``production_fusion`` — the Production sheet as loaded from Excel. Only keys that are present AND numerically valid override the module default, so a blank cell or a text entry (e.g. 'user', '~10') falls back to the table value rather than poisoning the spectrum with NaN. Before this existed, ``production_rates`` read the module dicts directly and the Production sheet was never consulted: eta / f_cl_i / f_cl_v / s_i / s_v / i_cascade / v_cascade were silently un-settable from the workbook.
Definition at line 142 of file defect_production.py.
|
protected |
Get a value from a spectrum dict, supporting old key aliases.
Definition at line 128 of file defect_production.py.
| py_utils.defect_production.compute_epsilon | ( | f_cl, | |
| s, | |||
| m_max | |||
| ) |
Compute production fractions ε_m = C · m^{−s} for m = 2..m_max.
The fraction of surviving defects in clusters of size m is m·ε_m,
summing to f_cl over all cluster sizes.
Parameters
----------
f_cl : float — total clustering fraction
s : float — power-law exponent
m_max : int — maximum cluster size
Returns
-------
epsilon : ndarray [m_max+1]
epsilon[0] = 0 (size 0 unused)
epsilon[1] = 0 (monomer handled separately)
epsilon[m] = C · m^{−s} for m = 2..m_max
Notes
-----
Array length is m_max+1 so that epsilon[m] = ε_m (1-indexed access).
Definition at line 97 of file defect_production.py.
| py_utils.defect_production.normalisation_constant | ( | f_cl, | |
| s, | |||
| m_max | |||
| ) |
Compute the normalisation constant C such that:
Σ_{m=2}^{m_max} m · C · m^{−s} = f_cl
C = f_cl / Σ_{m=2}^{m_max} m^{1−s} (Eqs. 9-10)
Parameters
----------
f_cl : float — clustering fraction
s : float — power-law exponent
m_max : int — maximum cluster size
Returns
-------
C : float
Definition at line 75 of file defect_production.py.
| py_utils.defect_production.production_rates | ( | G, | |
| spectrum, | |||
| I_max, | |||
| V_max, | |||
| G_He_r, | |||
spec_over = None |
|||
| ) |
Compute cascade production rates P_i^SIA [s^-1] and P_v^VAC [s^-1]
scaled by displacement rate G [dpa/s].
Returns arrays indexed from 1:
Pr_SIA[i] = η·G·ε_i^SIA for i=2..i_cascade; P_1 absorbs exact remainder
Pr_VAC[v] = η·G·ε_v^VAC for v=2..v_cascade; P_1 absorbs exact remainder
Parameters
----------
G : float [dpa/s]
spectrum : str 'fission' | 'fusion'
I_max : int — maximum SIA cluster size tracked
V_max : int — maximum vacancy cluster size tracked
G_He_r : float [appm He/dpa]
He production rate. SINGLE AUTHORITATIVE SOURCE — supplied by the
caller from the Excel Reactions-sheet value loaded into
InputData.derived['G_He_r']. No hard-coded fallback lives here.
Returns
-------
Pr_SIA : ndarray [I_max+1] (index 0 unused; Pr_SIA[1]=monomer)
Pr_VAC : ndarray [V_max+1] (index 0 unused; Pr_VAC[1]=monomer)
G_He : float [atom frac/s] — He transmutation production rate
Definition at line 172 of file defect_production.py.
|
protected |
Definition at line 72 of file defect_production.py.
| dict py_utils.defect_production.FISSION |
Definition at line 41 of file defect_production.py.
| dict py_utils.defect_production.FUSION |
Definition at line 58 of file defect_production.py.