Skip to content
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

Rc/toroidal angle #568

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft

Rc/toroidal angle #568

wants to merge 23 commits into from

Conversation

f0uriest
Copy link
Member

@f0uriest f0uriest commented Jul 5, 2023

  • near axis constraints with omega
  • constant offset surface
  • Proximal projection
  • Add stuff for spectral condensation / optimal fitting
  • Default to fixing zeta==phi?
  • to_FourierRZCurve methods should now be possible?
  • Fix calculation of A, a_major/a_minor, other stuff that needs to be computed at const phi, not const zeta

Resolves #465

@f0uriest f0uriest marked this pull request as draft July 5, 2023 18:49
@unalmis
Copy link
Collaborator

unalmis commented Jul 21, 2023

Are you sure that DSHAPE should have non positive curvature? tests/test_objective_funs.py::test_mean_curvature is failing

@unalmis unalmis mentioned this pull request Aug 1, 2023
Copy link
Contributor

github-actions bot commented Feb 23, 2024

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_lowres         |     +0.44 +/- 5.26     | +2.33e-03 +/- 2.81e-02 |  5.37e-01 +/- 2.0e-02  |  5.35e-01 +/- 1.9e-02  |
 test_build_transform_fft_midres         |     -0.36 +/- 4.18     | -2.25e-03 +/- 2.58e-02 |  6.16e-01 +/- 2.2e-02  |  6.18e-01 +/- 1.4e-02  |
 test_build_transform_fft_highres        |     +0.43 +/- 3.38     | +4.39e-03 +/- 3.41e-02 |  1.01e+00 +/- 2.9e-02  |  1.01e+00 +/- 1.7e-02  |
 test_equilibrium_init_lowres            |     -0.58 +/- 2.92     | -2.26e-02 +/- 1.13e-01 |  3.86e+00 +/- 5.7e-02  |  3.88e+00 +/- 9.8e-02  |
 test_equilibrium_init_medres            |     +0.20 +/- 3.63     | +8.58e-03 +/- 1.59e-01 |  4.37e+00 +/- 9.0e-02  |  4.37e+00 +/- 1.3e-01  |
 test_equilibrium_init_highres           |     +1.96 +/- 2.08     | +1.12e-01 +/- 1.19e-01 |  5.84e+00 +/- 9.9e-02  |  5.73e+00 +/- 6.5e-02  |
-test_objective_compile_dshape_current   |     +9.36 +/- 1.41     | +3.61e-01 +/- 5.44e-02 |  4.21e+00 +/- 4.7e-02  |  3.85e+00 +/- 2.8e-02  |
-test_objective_compile_atf              |    +37.31 +/- 1.25     | +3.12e+00 +/- 1.05e-01 |  1.15e+01 +/- 9.0e-02  |  8.36e+00 +/- 5.4e-02  |
 test_objective_compute_dshape_current   |    +19.74 +/- 6.98     | +2.62e-04 +/- 9.26e-05 |  1.59e-03 +/- 4.7e-05  |  1.33e-03 +/- 8.0e-05  |
-test_objective_compute_atf              |    +41.36 +/- 6.77     | +1.77e-03 +/- 2.90e-04 |  6.06e-03 +/- 2.4e-04  |  4.29e-03 +/- 1.6e-04  |
-test_objective_jac_dshape_current       |    +88.80 +/- 15.22    | +3.24e-02 +/- 5.56e-03 |  6.89e-02 +/- 4.3e-03  |  3.65e-02 +/- 3.5e-03  |
-test_objective_jac_atf                  |    +76.56 +/- 2.48     | +1.46e+00 +/- 4.72e-02 |  3.37e+00 +/- 4.2e-02  |  1.91e+00 +/- 2.2e-02  |
-test_perturb_1                          |     +9.63 +/- 2.33     | +1.32e+00 +/- 3.19e-01 |  1.50e+01 +/- 1.8e-01  |  1.37e+01 +/- 2.6e-01  |
-test_perturb_2                          |    +11.95 +/- 1.54     | +2.26e+00 +/- 2.90e-01 |  2.12e+01 +/- 1.7e-01  |  1.89e+01 +/- 2.4e-01  |
-test_proximal_jac_atf                   |    +123.23 +/- 2.37    | +9.97e+00 +/- 1.92e-01 |  1.81e+01 +/- 1.8e-01  |  8.09e+00 +/- 5.8e-02  |
-test_proximal_freeb_compute             |     +9.17 +/- 0.91     | +1.64e-02 +/- 1.62e-03 |  1.95e-01 +/- 1.4e-03  |  1.79e-01 +/- 8.1e-04  |
-test_proximal_freeb_jac                 |    +313.17 +/- 5.85    | +2.31e+01 +/- 4.31e-01 |  3.05e+01 +/- 4.2e-01  |  7.37e+00 +/- 7.4e-02  |
-test_solve_fixed_iter                   |    +76.09 +/- 19.61    | +1.37e+01 +/- 3.54e+00 |  3.18e+01 +/- 3.1e+00  |  1.81e+01 +/- 1.7e+00  |

@dpanici
Copy link
Collaborator

dpanici commented Apr 10, 2024

test_compute_everything try also with omega nonzero or something

@dpanici
Copy link
Collaborator

dpanici commented May 1, 2024

just load and resave all the eqs after merge, dont resolve as there is not consistnecy to set omega to zero yet on this branch

@unalmis
Copy link
Collaborator

unalmis commented May 4, 2024

Note to self:

  • in bounce integrals you used d zeta / B dot grad zeta for field line differential length where the zeta in dzeta denotes the field line zeta, and the zeta in B dot grad zeta denotes DESC's coordinate zeta. this is fine currently, but work through the math when desc zeta is generalized with stream function. nothing changes with bounce/field line stuff.
  • and check for any 2d divergence theorems in zeta surface. Edit: The integration over boundaries we do (2d divergence theorems etc.) no longer work. I have done the math to fix them. Once this gets up to date with master, feel free to ping me and I'll push the update

@unalmis
Copy link
Collaborator

unalmis commented Jun 15, 2024

alpha_t should be corrected to
data["alpha_t"] = data["theta_PEST_t"] - data["iota"] * data["phi_t"]

@unalmis
Copy link
Collaborator

unalmis commented Jun 19, 2024

Also the formula for alpha uses zeta while its derivatives use phi.

@dpanici
Copy link
Collaborator

dpanici commented Aug 20, 2024

@unalmis I merged master, gonna see which tests fail but I think there needs to be some extra logic added to "A" and "A(z)" to prevent ZernikeRZToroidalSection objects from getting an error when they try to compute "A", or at least there is a test failing due to that. They have no W_lmn attribute but somewhere we try to access it when computing with those objects

@unalmis
Copy link
Collaborator

unalmis commented Aug 20, 2024

@unalmis I merged master, gonna see which tests fail but I think there needs to be some extra logic added to "A" and "A(z)" to prevent ZernikeRZToroidalSection objects from getting an error when they try to compute "A", or at least there is a test failing due to that. They have no W_lmn attribute but somewhere we try to access it when computing with those objects

Note they aren't computed correctly here yet because you need to use source grids to do coordinate mapping. I think the error you see is due to #1127 . Also A(z) and A` compute functions will change in #1094 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generalize toroidal angle beyond phi cylindrical
3 participants