172def production_rates(G, spectrum, I_max, V_max, G_He_r, spec_over=None):
174 Compute cascade production rates P_i^SIA [s^-1] and P_v^VAC [s^-1]
175 scaled by displacement rate G [dpa/s].
177 Returns arrays indexed from 1:
178 Pr_SIA[i] = η·G·ε_i^SIA for i=2..i_cascade; P_1 absorbs exact remainder
179 Pr_VAC[v] = η·G·ε_v^VAC for v=2..v_cascade; P_1 absorbs exact remainder
184 spectrum : str 'fission' | 'fusion'
185 I_max : int — maximum SIA cluster size tracked
186 V_max : int — maximum vacancy cluster size tracked
187 G_He_r : float [appm He/dpa]
188 He production rate. SINGLE AUTHORITATIVE SOURCE — supplied by the
189 caller from the Excel Reactions-sheet value loaded into
190 InputData.derived['G_He_r']. No hard-coded fallback lives here.
194 Pr_SIA : ndarray [I_max+1] (index 0 unused; Pr_SIA[1]=monomer)
195 Pr_VAC : ndarray [V_max+1] (index 0 unused; Pr_VAC[1]=monomer)
196 G_He : float [atom frac/s] — He transmutation production rate
198 spec = FISSION
if 'fiss' in spectrum.lower()
else FUSION
202 f_cl_i = spec[
'f_cl_i']
205 f_cl_v = spec[
'f_cl_v']
210 i_top = min(i_cascade, I_max)
212 Pr_SIA = np.zeros(I_max + 1)
213 for i
in range(2, i_top + 1):
214 Pr_SIA[i] = eta * G * eps_i[i]
218 clustered_i = sum(m * eps_i[m]
for m
in range(2, i_top + 1))
219 Pr_SIA[1] = eta * G * (1.0 - clustered_i)
222 v_top = min(v_cascade, V_max)
224 Pr_VAC = np.zeros(V_max + 1)
225 for v
in range(2, v_top + 1):
226 Pr_VAC[v] = eta * G * eps_v[v]
228 clustered_v = sum(m * eps_v[m]
for m
in range(2, v_top + 1))
229 Pr_VAC[1] = eta * G * (1.0 - clustered_v)
233 G_He = G_He_r * 1.0e-6 * G
235 return Pr_SIA, Pr_VAC, G_He