RadCluster
Graph-based cluster dynamics for irradiated materials
Loading...
Searching...
No Matches
Functions | Variables
growth_diagnostic Namespace Reference

Functions

 n_to_d_nm (n)
 

Variables

 MODULE_ROOT = Path(__file__).resolve().parent.parent.parent
 
 REPO_ROOT = MODULE_ROOT.parent
 
float Omega = 1.18e-29
 
float b_111 = 2.482e-10
 
dict SOLVER_CONFIG
 
 I_SIM
 
 V_SIM
 
int i_mobile = 10
 
dict OVERRIDES
 
 saved = sys.stdout, sys.stderr
 
 stdout
 
 stderr
 
 sim
 
 inp = sim.input_data
 
bool placed = False
 
 results
 
 d = inp.derived
 
 G = d['G']
 
 dose = results['dose']
 
 idx_01 = np.argmin(np.abs(dose - 0.1))
 
 actual_dose = dose[idx_01]
 
 t_01 = results['t'][idx_01]
 
 y = results['y'][:, idx_01]
 
 c_i = np.maximum(y[0:I_SIM], 0.0)
 
 c_v = np.maximum(y[I_SIM:2*I_SIM], 0.0)
 
 ci1 = c_i[0]
 
 cv1 = c_v[0]
 
float s2m = 1.0 / d['Omega']
 
 rr = sim.reaction_rates
 
 re = sim.rate_equations
 
 cn = c_i[n-1]
 
 K_g = rr.K_SIA_grow[n-1]
 
 K_s = rr.K_SIA_shrink[n-1]
 
 G_em = rr.G_SIA[n-1]
 
 k2 = rr.k2_SIA[n-1]
 
 v_net = K_g * ci1 - K_s * cv1
 
 growth_flux = K_g * ci1 * cn
 
 shrink_flux = K_s * cv1 * cn
 
int ratio = growth_flux / max(shrink_flux, 1e-300) if shrink_flux > 0 else float('inf')
 
 Pr_1 = re.Pr_SIA[0]
 
 sink_loss = rr.k2_SIA[0] * ci1
 
 growth_loss = ci1 * np.dot(rr.K_SIA_grow, c_i)
 
 recom_loss = rr.K_iv * ci1 * cv1
 
 K_3D = rr.K_3D_cav_pref
 
 m13 = np.arange(1, V_SIM+1)**(1./3.)
 
 cav_loss = ci1 * K_3D * np.dot(m13, c_v)
 
 total_loss = sink_loss + growth_loss + recom_loss + cav_loss
 
 v_growth = np.array([rr.K_SIA_grow[n-1]*ci1 - rr.K_SIA_shrink[n-1]*cv1 for n in range(1, I_SIM+1)])
 
 sorted_idx = np.argsort(c_i)[::-1]
 
int n = sorted_idx[rank] + 1
 

Detailed Description

Growth rate diagnostic — examines WHY the SIA peak doesn't move.

At ~0.1 dpa, extracts the SIA distribution and computes:
  - Net growth rate v(n) = K_grow(n)*c_1 - K_shrink(n)*c_v1  [size increments per second]
  - Production contribution at each n
  - Sink loss at each n
  - Monomer SIA and vacancy concentrations

This tells us whether loops are growing (v > 0) or shrinking (v < 0) at each size.

Function Documentation

◆ n_to_d_nm()

growth_diagnostic.n_to_d_nm (   n)

Definition at line 42 of file growth_diagnostic.py.

Variable Documentation

◆ actual_dose

growth_diagnostic.actual_dose = dose[idx_01]

Definition at line 116 of file growth_diagnostic.py.

◆ b_111

float growth_diagnostic.b_111 = 2.482e-10

Definition at line 40 of file growth_diagnostic.py.

◆ c_i

growth_diagnostic.c_i = np.maximum(y[0:I_SIM], 0.0)

Definition at line 120 of file growth_diagnostic.py.

◆ c_v

growth_diagnostic.c_v = np.maximum(y[I_SIM:2*I_SIM], 0.0)

Definition at line 121 of file growth_diagnostic.py.

◆ cav_loss

growth_diagnostic.cav_loss = ci1 * K_3D * np.dot(m13, c_v)

Definition at line 190 of file growth_diagnostic.py.

◆ ci1

growth_diagnostic.ci1 = c_i[0]

Definition at line 123 of file growth_diagnostic.py.

◆ cn

growth_diagnostic.cn = c_i[n-1]

Definition at line 151 of file growth_diagnostic.py.

◆ cv1

growth_diagnostic.cv1 = c_v[0]

Definition at line 124 of file growth_diagnostic.py.

◆ d

growth_diagnostic.d = inp.derived

Definition at line 112 of file growth_diagnostic.py.

◆ dose

growth_diagnostic.dose = results['dose']

Definition at line 114 of file growth_diagnostic.py.

◆ G

growth_diagnostic.G = d['G']

Definition at line 113 of file growth_diagnostic.py.

◆ G_em

growth_diagnostic.G_em = rr.G_SIA[n-1]

Definition at line 154 of file growth_diagnostic.py.

◆ growth_flux

growth_diagnostic.growth_flux = K_g * ci1 * cn

Definition at line 159 of file growth_diagnostic.py.

◆ growth_loss

growth_diagnostic.growth_loss = ci1 * np.dot(rr.K_SIA_grow, c_i)

Definition at line 180 of file growth_diagnostic.py.

◆ i_mobile

int growth_diagnostic.i_mobile = 10

Definition at line 60 of file growth_diagnostic.py.

◆ I_SIM

growth_diagnostic.I_SIM

Definition at line 59 of file growth_diagnostic.py.

◆ idx_01

growth_diagnostic.idx_01 = np.argmin(np.abs(dose - 0.1))

Definition at line 115 of file growth_diagnostic.py.

◆ inp

growth_diagnostic.inp = sim.input_data

Definition at line 80 of file growth_diagnostic.py.

◆ k2

growth_diagnostic.k2 = rr.k2_SIA[n-1]

Definition at line 155 of file growth_diagnostic.py.

◆ K_3D

growth_diagnostic.K_3D = rr.K_3D_cav_pref

Definition at line 188 of file growth_diagnostic.py.

◆ K_g

growth_diagnostic.K_g = rr.K_SIA_grow[n-1]

Definition at line 152 of file growth_diagnostic.py.

◆ K_s

growth_diagnostic.K_s = rr.K_SIA_shrink[n-1]

Definition at line 153 of file growth_diagnostic.py.

◆ m13

growth_diagnostic.m13 = np.arange(1, V_SIM+1)**(1./3.)

Definition at line 189 of file growth_diagnostic.py.

◆ MODULE_ROOT

growth_diagnostic.MODULE_ROOT = Path(__file__).resolve().parent.parent.parent

Definition at line 18 of file growth_diagnostic.py.

◆ n

int growth_diagnostic.n = sorted_idx[rank] + 1

Definition at line 222 of file growth_diagnostic.py.

◆ Omega

float growth_diagnostic.Omega = 1.18e-29

Definition at line 39 of file growth_diagnostic.py.

◆ OVERRIDES

dict growth_diagnostic.OVERRIDES
Initial value:
1= {
2 'eta': 0.3, 'f_cl_i': 0.3, 'f_cl_v': 0.25,
3 'E_m_1D': 0.4, 'i_mobile': i_mobile, 'L_hat': 71.8,
4 'c_C': 1.94e-4, 'E_b_C_SIA': 0.65,
5 'rho_d': 1e13, 'Z_i': 1.05, 'Z_ii': 1.2,
6 'shape_function': 'linear',
7}

Definition at line 62 of file growth_diagnostic.py.

◆ placed

bool growth_diagnostic.placed = False

Definition at line 82 of file growth_diagnostic.py.

◆ Pr_1

growth_diagnostic.Pr_1 = re.Pr_SIA[0]

Definition at line 172 of file growth_diagnostic.py.

◆ ratio

int growth_diagnostic.ratio = growth_flux / max(shrink_flux, 1e-300) if shrink_flux > 0 else float('inf')

Definition at line 161 of file growth_diagnostic.py.

◆ re

growth_diagnostic.re = sim.rate_equations

Definition at line 135 of file growth_diagnostic.py.

◆ recom_loss

growth_diagnostic.recom_loss = rr.K_iv * ci1 * cv1

Definition at line 184 of file growth_diagnostic.py.

◆ REPO_ROOT

growth_diagnostic.REPO_ROOT = MODULE_ROOT.parent

Definition at line 19 of file growth_diagnostic.py.

◆ results

growth_diagnostic.results
Initial value:
1= sim.run_adaptive(
2 solver_config=SOLVER_CONFIG, save_output=False,
3 progress_callback=None, boundary_threshold=0.1,
4 max_doublings=0, points_per_segment=10,
5 )

Definition at line 99 of file growth_diagnostic.py.

◆ rr

growth_diagnostic.rr = sim.reaction_rates

Definition at line 134 of file growth_diagnostic.py.

◆ s2m

float growth_diagnostic.s2m = 1.0 / d['Omega']

Definition at line 126 of file growth_diagnostic.py.

◆ saved

growth_diagnostic.saved = sys.stdout, sys.stderr

Definition at line 71 of file growth_diagnostic.py.

◆ shrink_flux

growth_diagnostic.shrink_flux = K_s * cv1 * cn

Definition at line 160 of file growth_diagnostic.py.

◆ sim

growth_diagnostic.sim
Initial value:
1= RadClusterSimulation(
2 I=I_SIM, V=V_SIM,
3 solver_mode='active_window', physics_option='full_CD_fission',
4 C_floor=1e-25, he_kinetics='quasi_steady_state',
5 i_mobile=i_mobile, v_mobile=5,
6 )

Definition at line 74 of file growth_diagnostic.py.

◆ sink_loss

growth_diagnostic.sink_loss = rr.k2_SIA[0] * ci1

Definition at line 176 of file growth_diagnostic.py.

◆ SOLVER_CONFIG

dict growth_diagnostic.SOLVER_CONFIG
Initial value:
1= {
2 't_span': (1e-6, 1e5),
3 'n_points': 100,
4 'log_time': True,
5 'rtol': 1e-5,
6 'atol': 1e-20,
7 'solver_method': {
8 'linsol': 'gmres',
9 'window_width': 50,
10 'concentration_threshold': 1e-18, 'window_pad': 10,
11 }
12}

Definition at line 46 of file growth_diagnostic.py.

◆ sorted_idx

growth_diagnostic.sorted_idx = np.argsort(c_i)[::-1]

Definition at line 220 of file growth_diagnostic.py.

◆ stderr

growth_diagnostic.stderr

Definition at line 72 of file growth_diagnostic.py.

◆ stdout

growth_diagnostic.stdout

Definition at line 72 of file growth_diagnostic.py.

◆ t_01

growth_diagnostic.t_01 = results['t'][idx_01]

Definition at line 117 of file growth_diagnostic.py.

◆ total_loss

growth_diagnostic.total_loss = sink_loss + growth_loss + recom_loss + cav_loss

Definition at line 193 of file growth_diagnostic.py.

◆ v_growth

growth_diagnostic.v_growth = np.array([rr.K_SIA_grow[n-1]*ci1 - rr.K_SIA_shrink[n-1]*cv1 for n in range(1, I_SIM+1)])

Definition at line 206 of file growth_diagnostic.py.

◆ v_net

growth_diagnostic.v_net = K_g * ci1 - K_s * cv1

Definition at line 157 of file growth_diagnostic.py.

◆ V_SIM

growth_diagnostic.V_SIM

Definition at line 59 of file growth_diagnostic.py.

◆ y

growth_diagnostic.y = results['y'][:, idx_01]

Definition at line 119 of file growth_diagnostic.py.