|
34 | 34 |
|
35 | 35 | Evolves plasma profiles forward in time using coupled physics models. |
36 | 36 |
|
37 | | -This compound actor advances the plasma state through time by coordinating multiple |
38 | | -physics models with proper temporal splitting and time step management. It handles |
39 | | -the complex coupling between transport, current evolution, heating, equilibrium, |
| 37 | +This compound actor advances the plasma state through time by coordinating multiple |
| 38 | +physics models with proper temporal splitting and time step management. It handles |
| 39 | +the complex coupling between transport, current evolution, heating, equilibrium, |
40 | 40 | and magnetic control systems. |
41 | 41 |
|
42 | 42 | Time integration strategy: |
43 | | -- Uses second-order accurate time-stepping with sub-cycling |
44 | | -- Splits fast (equilibrium, PF) and slow (transport, pedestal) physics appropriately |
45 | | -- Handles time-dependent boundary conditions from pulse schedule |
46 | | -- Supports plasma current control via feedback systems |
| 43 | +
|
| 44 | + - Uses second-order accurate time-stepping with sub-cycling |
| 45 | + - Splits fast (equilibrium, PF) and slow (transport, pedestal) physics appropriately |
| 46 | + - Handles time-dependent boundary conditions from pulse schedule |
| 47 | + - Supports plasma current control via feedback systems |
47 | 48 |
|
48 | 49 | Evolution workflow (each time step): |
49 | | -1. **Phase 1**: Current evolution and heating sources (δt steps) |
50 | | -2. **Phase 2**: Pedestal and transport evolution (δt steps) |
51 | | -3. **Both phases**: Sawteeth, equilibrium, and PF control (δt/2 sub-steps) |
| 50 | +
|
| 51 | + 1. **Phase 1**: Current evolution and heating sources (δt steps) |
| 52 | + 2. **Phase 2**: Pedestal and transport evolution (δt steps) |
| 53 | + 3. **Both phases**: Sawteeth, equilibrium, and PF control (δt/2 sub-steps) |
52 | 54 |
|
53 | 55 | Key features: |
54 | | -- Configurable evolution of individual physics components |
55 | | -- Optional plasma current feedback control via loop voltage |
56 | | -- Time derivative sources for energy and particle balance |
57 | | -- Progress tracking and convergence monitoring |
58 | | -- Automatic cleanup of post-simulation time data |
| 56 | +
|
| 57 | + - Configurable evolution of individual physics components |
| 58 | + - Optional plasma current feedback control via loop voltage |
| 59 | + - Time derivative sources for energy and particle balance |
| 60 | + - Progress tracking and convergence monitoring |
| 61 | + - Automatic cleanup of post-simulation time data |
59 | 62 |
|
60 | 63 | Physics models coordinated: |
61 | | -- **ActorCurrent**: Current density diffusion and resistive evolution |
62 | | -- **ActorHCD**: Time-dependent heating and current drive |
63 | | -- **ActorPedestal**: Pedestal evolution and L-H transitions |
64 | | -- **ActorCoreTransport**: Transport flux evolution |
65 | | -- **ActorSawteeth**: Sawtooth instability cycling |
66 | | -- **ActorEquilibrium**: MHD equilibrium with evolving profiles |
67 | | -- **ActorPFactive**: PF coil current control for plasma shape |
| 64 | +
|
| 65 | + - **ActorCurrent**: Current density diffusion and resistive evolution |
| 66 | + - **ActorHCD**: Time-dependent heating and current drive |
| 67 | + - **ActorPedestal**: Pedestal evolution and L-H transitions |
| 68 | + - **ActorCoreTransport**: Transport flux evolution |
| 69 | + - **ActorSawteeth**: Sawtooth instability cycling |
| 70 | + - **ActorEquilibrium**: MHD equilibrium with evolving profiles |
| 71 | + - **ActorPFactive**: PF coil current control for plasma shape |
68 | 72 |
|
69 | 73 | Control options: |
70 | | -- `ip_controller`: Feedback control of plasma current via loop voltage |
71 | | -- Individual physics component enable/disable switches |
72 | | -- Configurable time step size and number of steps |
| 74 | +
|
| 75 | + - `ip_controller`: Feedback control of plasma current via loop voltage |
| 76 | + - Individual physics component enable/disable switches |
| 77 | + - Configurable time step size and number of steps |
73 | 78 | """ |
74 | 79 | function ActorDynamicPlasma(dd::IMAS.dd, act::ParametersAllActors; kw...) |
75 | 80 | actor = ActorDynamicPlasma(dd, act.ActorDynamicPlasma, act; kw...) |
@@ -175,6 +180,10 @@ function _step(actor::ActorDynamicPlasma) |
175 | 180 | substep(actor, Val(:run_pf_active), δt / 2; progr) |
176 | 181 | end |
177 | 182 |
|
| 183 | + catch e |
| 184 | + @warn "ActorDynamicPlasma failed at $(dd.global_time) [s], trimming the last time slice which might be in a corrupted state" |
| 185 | + IMAS.trim_time!(dd, (-Inf, dd.global_time - 1E-6)) |
| 186 | + rethrow(e) |
178 | 187 | finally |
179 | 188 | actor_logging(dd, old_logging) |
180 | 189 | end |
@@ -508,7 +517,17 @@ function plot_plasma_overview(dd::IMAS.dd, time0::Float64=dd.global_time; |
508 | 517 | plot!(dd1.thomson_scattering, :n_e; time0, lw=2.0, xlabel="", ylabel="", label="", primary=false) |
509 | 518 | end |
510 | 519 | if IMAS.hasdata(dd1.charge_exchange) |
511 | | - plot!(dd1.charge_exchange, :n_imp; time0, lw=2.0, xlabel="", ylabel="", label="", normalization=dd1.core_profiles.profiles_1d[time0].ion[2].element[1].z_n, primary=false) |
| 520 | + plot!( |
| 521 | + dd1.charge_exchange, |
| 522 | + :n_imp; |
| 523 | + time0, |
| 524 | + lw=2.0, |
| 525 | + xlabel="", |
| 526 | + ylabel="", |
| 527 | + label="", |
| 528 | + normalization=dd1.core_profiles.profiles_1d[time0].ion[2].element[1].z_n, |
| 529 | + primary=false |
| 530 | + ) |
512 | 531 | end |
513 | 532 | end |
514 | 533 | if dd !== dd1 |
|
0 commit comments