This module simulates an LBO injection with full Aurora transport. It follows
every charge state as the impurity enters, ionizes and leaves, without
assuming coronal equilibrium, and fits the transport coefficients to the
measured core-line curve (W44, Fe23, Ni25). It is used in
notebooks/10W3-10W4/10W4b_entregable.ipynb.
from aug.analysis.atomic import load_adf11_subset
from aug.analysis.aurora_lbo import fit_injection
from aug.io import read_lbo_profiles
atom = load_adf11_subset("cache/w_adf11_subset.txt") # o feni_..., element="Fe"
p = read_lbo_profiles(shot.lbo_paths[0])
rho = p["Te"].rho.to_numpy()
prof = dict(rho=rho, ne=np.interp(rho, p["ne"].rho, p["ne"].value), Te=p["Te"].value.to_numpy())
f = fit_injection("W", res.details[(shot.shot, 1)], prof, atom) # estático
f2 = fit_injection("W", res.details[(shot.shot, 1)], prof, atom, mode="switch") # D_ped cambia en el tiempo
f["params"], f["chi2"], f["metrics"]
Model
| What | How |
|---|---|
| Geometry | No magnetic equilibrium (we have no geqdsk). Uses ρ_pol ≈ r_vol/r_vol,LCFS with r_vol,LCFS = 64 cm (AUG: V ≈ 13.5 m³) and R = 165 cm |
| Profiles | IDA ne and Te from the -lbo file, constant in time |
| Atomic data | ADF11 scd/acd (see atomic.md) |
| Source | Aurora's synth_LBO: 1 ms rise and a t_src fall (fitted), 1 cm outside the LCFS |
| Transport | D = D_core (ρ < 0.9), D_ped (0.9 to 1), 1 m²/s in the SOL; v = v_core·ρ/0.9 (core), v_ped (pedestal), 0 in the SOL |
| Signal | Σ_ n_e n_q Δr: central chord, no PEC |
| Fit | least_squares on the normalized curve (y − base)/A, with a free (linear) amplitude and a free time shift |
Both modes fit six parameters: D_core, D_ped, v_core, v_ped, t_src and the
time shift. Switch mode adds two more, because D_ped changes to D_ped2 at
t_switch.
Each simulation takes ~1 s, and a fit takes ~2 min in static mode or ~5 min in
switch mode. Each aurora_sim stores ~200 MB of rates, so the fit keeps at
most 2 in memory.
Limitations
- With a single line, D and v are degenerate: many combinations give almost
the same curve. The values are useful for comparing groups fitted with the
same model, not as absolute measurements. - The geometry is approximate (no geqdsk), and the signal comes from the
central chord, not the real line of sight. - The profiles are fixed, so the model leaves out cooling and ECRH changes
during the decay. - There is no recycling: material that leaves the confined plasma is lost.
Technical details
- Timing:
dt_start = 1e-5anddt_increase = 1.005. With
dt_increase = 1.01the LBO source is missed and the simulation returns
zero. - OMFIT: Aurora imports
omfit_classes.utils_math.atomic_element. If OMFIT is
not installed,_prepare_aurora()registers a minimal stand-in (Z and A). - numpy ≥ 2:
np.trapz = np.trapezoidis added, since Aurora still uses it.