Commit 5128ac1
TokaMaker+TORAX updates (OpenFUSIONToolkit#318)
Most important changes
- Profile convolution replaces hard-coded FF′/p′ fallbacks; Jphi input to TokaMaker first, then FF' used as fallback
- New pedestal architecture (set_pedestal overhauled) -- full pedestal config (config_mode, ped_height_{Te,Ti,ne}, formation_model for the L/H transition), adaptive-source prefactors, a manual-IBC pedestal mode, and an L->H core boost. Default remains ADAPTIVE_SOURCE with new MTANH pedestal shape.
- Coil current rate limiting -- set_coil_rate_limits(dIdt | V+R, dt_floor) tightens each coil's GS bounds to a slew rate window around the last solved current, clipped to the global bounds.
- Unified coil configuration -- all coil settings now live in tm_inputs under coil_* keys, with one global coil_bounds feeding seed-eqdsk generation, the coupled GS solves, and the rate-limit clip.
- Coil limits accept A/turn as well as A-turns -- coil_bounds_units='A/turn' lets you specify limits in TokaMaker's native per-winding unit. Default stays A-turns; inputs convert on the way in and are stored internally in A-turns, so state/plots/rate-limits are unchanged. Applies to both bounds and dI/dt limits.
- Diverted-window config merged + LCFS shape override -- set_diverted_shape_targets(...) replaces set_x_points(...): same X-point / strike-point / trim args plus a new shape_target that overrides the seed-eqdsk LCFS shape during the diverted window only (same isoflux weights; trim and strike points still apply).
- Config save/load workflow — save_tmtx_config() / run_tmtx_from_config() with seed-eqdsk generation from trajectories; TORAX configs dumped as JSON in debug mode.
- fly() gains loop0, steady_state_mode, relax_dt
- EQDSK failure handling improved -- TORAX interpolates between good eqdsk files; save_eqdsk retries across (nr, nz) until one succeeds.
- New diagnostics/plots -- plot_coil_current_tunnel, plot_PLH_components (P_SOL vs P_LH), IBC debug plotting, TM solve-level diagnostics, Tau_E/H98 and vol-avg Te/Ti on scalar plots.
- ITER example rebuilt
**Breaking / behavior-changing updates:**
- `set_x_points()` removed -> `set_diverted_shape_targets()`. The old name is a stub that raises NotImplementedError (a hard raise rather than a silent no-op, so a stale call can't leave the diverted window unconfigured). Config key x_points -> diverted_shape_targets (loader still accepts the old key). The unrelated x_points key inside seed_eqdsk_config is unchanged.
- set_heating default physics changed -- generic_heat_absorption_fraction now defaults to 1.0 (was ~0.0) and generic_heat_electron_heat_fraction to 0.4 (was 0.6).
---------
Co-authored-by: Freddie Sheehan <f.sheehan@columbia.edu>
Co-authored-by: John L <j42558080+1@gmail.com>
Co-authored-by: Chris Hansen <cjh2199@columbia.edu>1 parent 9a24e4f commit 5128ac1
6 files changed
Lines changed: 8809 additions & 1744 deletions
File tree
- src
- examples/TokaMaker/AdvancedWorkflows/Pulse_Design
- ITER_TokaMaker_TORAX
- TokaMaker_TORAX
- ITER
- python/OpenFUSIONToolkit/TokaMaker
- tests/physics
Lines changed: 0 additions & 1326 deletions
This file was deleted.
Lines changed: 4040 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 4758 additions & 417 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
274 | 284 | | |
275 | 285 | | |
276 | 286 | | |
| |||
0 commit comments