Skip to content

Update Ip in core_profiles before controller#1038

Closed
bclyons12 wants to merge 3 commits intomasterfrom
update_ip_control
Closed

Update Ip in core_profiles before controller#1038
bclyons12 wants to merge 3 commits intomasterfrom
update_ip_control

Conversation

@bclyons12
Copy link
Copy Markdown
Collaborator

A user pointed out that the time_dependent_iter.ipynb fails. After a few time steps, the plasma current was going negative leading to an equilibrium solve failure. I was able to bisect the offending commit to 749eb09. Claude thinks the issues is that cp1d.j_total is not being set inside the time loop, so the controller never sees the plasma current updating, which makes sense to me. This is meant to fix that. I also found, for speed, I need to use :broyden or :simple_dfsane for the FluxMatcher. That said, there are still issues:

  1. I'm seeing some crazy behavior of the current in the core. I would guess this is related to the sawteeth?
  2. The flux matching looks quite poor.

I'll have to look into this more, but any insight or recommendations @orso82 ?

ITER_time_dep

@bclyons12 bclyons12 self-assigned this Dec 20, 2025
@bclyons12 bclyons12 added bug Something isn't working physics work in progress labels Dec 20, 2025
@bclyons12
Copy link
Copy Markdown
Collaborator Author

@orso82 It looks like the flapping is related to how the sources get defined between a "transport step" and a "current diffusion" step. I see in the DIII-D case that you just plot every other step, which eliminates that visually. @jmcclena seems to recall you "fixing" this flapping issue in the past. Any insight?

Separately, I'm working on the flux-matching issue.

@bclyons12
Copy link
Copy Markdown
Collaborator Author

bclyons12 commented Jan 13, 2026

The flapping and the flux matching were both predominantly caused by the fusion power bug in IMAS (ProjectTorreyPines/IMAS.jl#289). The run was correct, but the fusion power was deleted from the dd for all but the final time, which impacted the plotting. Flux matching is also affected by using act.ActorFluxMatcher.relax=0.5, which blends the profiles.

With these IMAS fix and the changes in this PR, plus using act.ActorFluxMatcher.relax=1.0, I see the following. Note that it's shortened compared to the full simulation:
ITER_time_dep_2

@bclyons12
Copy link
Copy Markdown
Collaborator Author

These changes were included in #1045

@bclyons12 bclyons12 closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working physics work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant