Repository navigation
RadCluster v2.1.2: Frenkel-pair conservation correction
RadCluster v2.1.2: Frenkel-pair conservation correction
The problem
The regression case im5vm2 had a Frenkel-pair residual δ_FP = 1.24×10⁻² at t = 10⁻² s. That is above the 10⁻³ level that signals a coding error.
Cause
In all three C++ right-hand sides (rhs_case2, rhs_case1, rhs_bin_moment in radcluster_code/cpp_utils/materials/eurofer97/rate_kernels.cpp), SIA thermal emission I₍ₙ₊₁₎ → Iₙ + I₁ moved the emitting cluster down one size. It never added the emitted monomer to I₁; vacancy emission does this, through emit_mono. One SIA was lost per emission event, and this is the whole residual:
- the vacancy arm of δ_FP closed to 10⁻¹²;
- the time integral of the emitted-monomer flux equals the SIA arm's deficit at every output time.
Fix
The monomer is now returned to I₁. On im5vm2 at 10⁻² s:
| before (v2.1.1) | v2.1.2 | |
|---|---|---|
| δ_FP | 1.24×10⁻² | 2.9×10⁻⁷ |
| δ_He | 1.0×10⁻¹⁵ | 1.9×10⁻¹⁴ |
| C_SIA_tot (m⁻³) | 2.0648×10¹⁸ | 2.0754×10¹⁸ (+0.5 %) |
| C_VAC_tot, C_He_tot, mean sizes, swelling | unchanged to 2×10⁻⁶ |
Reproducing earlier results. Set sim.input_data.reactions["sia_emission_monomer"] = "dropped" (the default is "returned"). This restores the arithmetic before v2.1.2 bit for bit: im5vm2 then gives δ_FP = 0.012442841061051264 exactly. In the solver parameter file the key is sia_emission_monomer; it is 0 when absent.
A second residual remains in long loop-coarsening runs. There, the loop distribution can outgrow the size axis, and content leaves through the upper boundary. Check δ_FP against the axis length.
The correction was found in the migration of RadCluster into GSD (v2.0.0, Stage 5). GSD's declared equations cannot lose content, and they match this C++ kernel at round-off. See README §2.9.