-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Big differences from CHEASE after FUSE.init, and hangs on EquilibriumTransport #43
Comments
This is likely related to #42 and was "fixed" by 95063fb. I suspect this case initializes a very high pressure profile and very high current-density profile. This needs to be scaled down to match the target Ip. CHEASE appears to do a Bateman scaling to keep the flux surfaces unchanged, so it scales the pressure down too. This results in less Shafranov shift and easier convergence, but the pressure is not what is input to the equilibrium actor. TEQUILA only scales the current profile, maintaining whatever pressure profile is requested. This is huge compared to the target Ip, so the Shafranov shift is very large. TEQUILA struggles to do a full Picard iteration with such a high Shafranov shift, so I introduced an optional relaxation parameter with 95063fb. I don't think this has been coupled to FUSE yet. I'll double check that that's what's happening in this case, but if so, it's not an issue for TEQUILA, but for FUSE in my opinion. I'll leave the issue open until I confirm though. |
So the solution is to reduce ini.equilibrium.pressure_core? I've tried this, and it doesn't seem to help. In fact, the resulting P0 produced by FUSE.init using TEQUILA is 2.6x the ini value. Note that the CHEASE solution above converges to P0 = 1.29MPa, so I'll reduce ini.equilibrium.pressure_core to that value before running FUSE.init :
|
One more update: If I further reduce ini.equilibrium.pressure_core, then FUSE.init gives a reasonable core solution. However, EquilibriumTransport still hangs with TEQUILA when it runs with this initial input. Why?
which still hangs indefinitely... |
Trying to investigate, but I'm getting some runtime errors. @daveweisberg are you running on any special branches?
runs but reports
Then
errors with
|
I switched FUSE back to master and the second error disappears, so there's something inconsistent with this run case and the ProjectTorreyPines/FUSE.jl#348. Perhaps @TimSlendebroek knows why |
@bclyons12 I'm using the |
@bclyons12 the pressure in the digest is evaluated here:
|
So there's a big inconsistency after |
The logic for setting the equilibrium pressure when initializing dd is here You can see that |
Right, I just think @daveweisberg was expecting the digest |
This appears to be caused by large pressures relative to the current density profiles provided, so you get large Shafranov shifts. This is not a bug in TEQUILA, just difficult cases to converge and typically a sign that something has gone awry in FUSE. You can set I'm okay leaving this issue open, though most of the development to prevent it should probably be on the FUSE side. |
@bclyons12 sometimes TEQUILA hangs. Interrupting (SIGINT) the Julia process does not do anything, which makes me suspect this happens somewhere deep in the C/FORTRAN of some of the optimization routines. Could we perhaps try adding a maximum number of iterations or a timeout to the optimization routines and raise an error when those conditions are met, so that at least the whole Jupyter notebook does not need to be restarted? |
This failure is another example where the large Shafranov shift makes it difficult to solve without relaxation. As noted above, you'll want to decrease |
Great! Thanks @bclyons12 TEQUILA should have a good internal estimate of the Shafranov shift as it iterates towards convergence. I wonder if it would be possible to automatically set the relaxation parameter based on the Shafranov shift at the previous iteration. |
On a typical FPP optimization run, the following case is an example of how TEQUILA and CHEASE produce very different results after the FUSE.init step. While CHEASE produces a reasonable initialized core solution and converges after 4 EquilibriumTransport iterations, TEQUILA produces a very high-temp initialized core solution and then hangs indefinitely during the EquilibriumTransport actor.
Executed code:
This does not produce any output, seemingly hanging before the 1st EquilibriumTransport iteration is completed.
The text was updated successfully, but these errors were encountered: