-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update Toroidal Flux Objective for Finite Beta Equilibria #1159
base: master
Are you sure you want to change the base?
Conversation
| benchmark_name | dt(%) | dt(s) | t_new(s) | t_old(s) |
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
test_build_transform_fft_lowres | -0.60 +/- 7.72 | -3.22e-03 +/- 4.14e-02 | 5.32e-01 +/- 3.3e-02 | 5.36e-01 +/- 2.5e-02 |
test_build_transform_fft_midres | -1.17 +/- 5.38 | -7.28e-03 +/- 3.36e-02 | 6.18e-01 +/- 2.2e-02 | 6.25e-01 +/- 2.5e-02 |
test_build_transform_fft_highres | +0.51 +/- 5.00 | +5.16e-03 +/- 5.09e-02 | 1.02e+00 +/- 3.2e-02 | 1.02e+00 +/- 3.9e-02 |
test_equilibrium_init_lowres | +0.10 +/- 5.95 | +4.08e-03 +/- 2.32e-01 | 3.90e+00 +/- 1.4e-01 | 3.89e+00 +/- 1.8e-01 |
test_equilibrium_init_medres | +1.27 +/- 6.64 | +5.68e-02 +/- 2.96e-01 | 4.52e+00 +/- 2.3e-01 | 4.46e+00 +/- 1.8e-01 |
test_equilibrium_init_highres | -0.68 +/- 4.88 | -3.95e-02 +/- 2.82e-01 | 5.73e+00 +/- 1.3e-01 | 5.77e+00 +/- 2.5e-01 |
test_objective_compile_dshape_current | -0.95 +/- 1.75 | -3.72e-02 +/- 6.85e-02 | 3.87e+00 +/- 5.4e-02 | 3.91e+00 +/- 4.2e-02 |
test_objective_compile_atf | -0.93 +/- 1.63 | -7.82e-02 +/- 1.37e-01 | 8.34e+00 +/- 7.0e-02 | 8.42e+00 +/- 1.2e-01 |
test_objective_compute_dshape_current | +1.38 +/- 3.61 | +1.75e-05 +/- 4.56e-05 | 1.28e-03 +/- 3.4e-05 | 1.26e-03 +/- 3.1e-05 |
test_objective_compute_atf | -3.18 +/- 6.50 | -1.43e-04 +/- 2.92e-04 | 4.36e-03 +/- 1.4e-04 | 4.50e-03 +/- 2.6e-04 |
test_objective_jac_dshape_current | -5.40 +/- 9.55 | -2.07e-03 +/- 3.66e-03 | 3.62e-02 +/- 2.3e-03 | 3.83e-02 +/- 2.8e-03 |
test_objective_jac_atf | -0.60 +/- 3.81 | -1.16e-02 +/- 7.33e-02 | 1.91e+00 +/- 3.8e-02 | 1.92e+00 +/- 6.3e-02 |
test_perturb_1 | +1.99 +/- 3.37 | +2.78e-01 +/- 4.71e-01 | 1.43e+01 +/- 1.3e-01 | 1.40e+01 +/- 4.5e-01 |
test_perturb_2 | +0.62 +/- 5.03 | +1.18e-01 +/- 9.58e-01 | 1.92e+01 +/- 8.8e-01 | 1.90e+01 +/- 3.8e-01 |
test_proximal_jac_atf | -0.39 +/- 0.78 | -3.14e-02 +/- 6.28e-02 | 8.07e+00 +/- 6.0e-02 | 8.10e+00 +/- 2.0e-02 |
test_proximal_freeb_compute | -0.57 +/- 0.86 | -1.03e-03 +/- 1.55e-03 | 1.79e-01 +/- 1.1e-03 | 1.80e-01 +/- 1.1e-03 |
test_proximal_freeb_jac | -0.16 +/- 1.45 | -1.21e-02 +/- 1.07e-01 | 7.37e+00 +/- 9.5e-02 | 7.38e+00 +/- 5.0e-02 |
test_solve_fixed_iter | -0.18 +/- 12.42 | -3.30e-02 +/- 2.27e+00 | 1.82e+01 +/- 1.6e+00 | 1.83e+01 +/- 1.6e+00 | |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1159 +/- ##
==========================================
- Coverage 95.43% 95.43% -0.01%
==========================================
Files 87 87
Lines 22313 22309 -4
==========================================
- Hits 21294 21290 -4
Misses 1019 1019
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, at finite plasma current I think we need to change the compute function to account for the contribution to the flux from the plasma field?
Ah I think you are right, I can add that. |
actually im now doubting myself. Can plasma current produce toroidal flux? i thought that wasn't possible (or maybe it just cant produce "enough" flux?) |
Any poloidally circulating current in the plasma would produce a toroidal flux right? so I think you're right in that for finite beta this is something that should be taken into account for this objective. I am imagining simplest case of a theta-pinch, the currents flow in the theta direction and the toroidal (Z-directed at least) flux enclosed by the bdry certainly has a contribution from those poloidal currents |
Actually the poloidal currents wouuld be the diamagnetic currents right? so if anything they would reduce the toroidal flux... this is something I have not thought about the subtleties of, nor have I seen it in any papers on finite beta coil stuff |
I think we should use the Not completely sure how to implement, need to think if A_fixed_bdry/2 needs to be added at the surface like with the B calc in virtual casing, and if so how to get the A equivalent of the fixed bdry B is not obvious to me |
@dpanici check Helander 2014 for this |
Removes the warnings when a finite beta equilibrium is passed into
ToroidalFlux
objective, and accounts for the plasma currents as well.In relation to comment in #1158
With finite beta stage 2 optimization, no objective on toroidal flux or coil curents is needed for the coils to make the correct toroidal flux and field magnitude, assuming that normal field error is zero. With finite normal field error, the coils may not create the necessary fluxes or have the requisite net poloidal linking current for the given equilbrium.