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

Update equations to match physics and boozer fit for general toroidal angle #1177

Merged
merged 23 commits into from
Aug 27, 2024

Conversation

unalmis
Copy link
Collaborator

@unalmis unalmis commented Aug 12, 2024

Resolves #1176.

  • Update equations to use poloidal and toroidal angles rather than a particular choice of stream function. No changes were made in places where a particular choice of stream function is necessary to simplify the computation.
  • Genearlizes boozer fit for arbitrary toroidal angle

Use theta_PEST and phi instead of stream functions
so that the equations are generalized to represent the physcis
rather than our arbitrary choice of poloidal and toroidal angles
@unalmis unalmis changed the base branch from master to ku/bugfix_angles August 12, 2024 22:08
@unalmis unalmis added the documentation Add documentation or better warnings etc. label Aug 12, 2024
@unalmis unalmis marked this pull request as ready for review August 12, 2024 22:26
@unalmis unalmis added theory Requires theory work before coding and removed theory Requires theory work before coding labels Aug 12, 2024
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.33%. Comparing base (225d44e) to head (1c88963).
Report is 2025 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1177   +/-   ##
=======================================
  Coverage   95.33%   95.33%           
=======================================
  Files          90       90           
  Lines       22643    22699   +56     
=======================================
+ Hits        21586    21640   +54     
- Misses       1057     1059    +2     
Files with missing lines Coverage Δ
desc/compute/_core.py 100.00% <100.00%> (ø)
desc/compute/_field.py 100.00% <100.00%> (ø)
desc/compute/_omnigenity.py 99.21% <100.00%> (ø)
desc/compute/_profiles.py 99.19% <ø> (ø)

... and 3 files with indirect coverage changes

Copy link
Contributor

github-actions bot commented Aug 12, 2024

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_lowres         |     -1.18 +/- 6.46     | -6.52e-03 +/- 3.56e-02 |  5.45e-01 +/- 3.2e-02  |  5.52e-01 +/- 1.5e-02  |
 test_build_transform_fft_midres         |     +2.36 +/- 3.53     | +1.47e-02 +/- 2.20e-02 |  6.38e-01 +/- 1.5e-02  |  6.23e-01 +/- 1.6e-02  |
 test_build_transform_fft_highres        |     -0.87 +/- 2.60     | -8.96e-03 +/- 2.67e-02 |  1.02e+00 +/- 2.5e-02  |  1.03e+00 +/- 1.0e-02  |
 test_equilibrium_init_lowres            |     +2.39 +/- 2.25     | +9.56e-02 +/- 9.01e-02 |  4.10e+00 +/- 7.3e-02  |  4.00e+00 +/- 5.2e-02  |
 test_equilibrium_init_medres            |     -2.43 +/- 3.95     | -1.11e-01 +/- 1.80e-01 |  4.44e+00 +/- 1.2e-01  |  4.55e+00 +/- 1.3e-01  |
 test_equilibrium_init_highres           |     +4.01 +/- 4.76     | +2.28e-01 +/- 2.70e-01 |  5.90e+00 +/- 2.5e-01  |  5.67e+00 +/- 9.1e-02  |
 test_objective_compile_dshape_current   |     -0.20 +/- 1.22     | -7.85e-03 +/- 4.79e-02 |  3.93e+00 +/- 4.2e-02  |  3.93e+00 +/- 2.2e-02  |
 test_objective_compile_atf              |     -0.33 +/- 2.15     | -2.70e-02 +/- 1.74e-01 |  8.06e+00 +/- 1.6e-01  |  8.09e+00 +/- 7.2e-02  |
 test_objective_compute_dshape_current   |     -1.76 +/- 7.64     | -6.35e-05 +/- 2.75e-04 |  3.54e-03 +/- 7.8e-05  |  3.60e-03 +/- 2.6e-04  |
 test_objective_compute_atf              |     +1.92 +/- 6.10     | +2.04e-04 +/- 6.46e-04 |  1.08e-02 +/- 4.5e-04  |  1.06e-02 +/- 4.7e-04  |
 test_objective_jac_dshape_current       |     -4.42 +/- 8.45     | -1.86e-03 +/- 3.56e-03 |  4.03e-02 +/- 2.8e-03  |  4.21e-02 +/- 2.2e-03  |
 test_objective_jac_atf                  |     -0.89 +/- 2.46     | -1.73e-02 +/- 4.78e-02 |  1.93e+00 +/- 4.0e-02  |  1.94e+00 +/- 2.6e-02  |
 test_perturb_1                          |     -0.13 +/- 1.41     | -1.73e-02 +/- 1.82e-01 |  1.29e+01 +/- 1.6e-01  |  1.29e+01 +/- 9.3e-02  |
 test_perturb_2                          |     -0.26 +/- 2.01     | -4.65e-02 +/- 3.65e-01 |  1.81e+01 +/- 2.1e-01  |  1.82e+01 +/- 3.0e-01  |
 test_proximal_jac_atf                   |     -0.35 +/- 1.20     | -2.91e-02 +/- 9.93e-02 |  8.22e+00 +/- 7.7e-02  |  8.25e+00 +/- 6.2e-02  |
 test_proximal_freeb_compute             |     +0.01 +/- 1.13     | +2.33e-05 +/- 2.07e-03 |  1.83e-01 +/- 1.2e-03  |  1.83e-01 +/- 1.7e-03  |
 test_proximal_freeb_jac                 |     +1.35 +/- 1.19     | +1.02e-01 +/- 8.91e-02 |  7.62e+00 +/- 4.4e-02  |  7.52e+00 +/- 7.7e-02  |
 test_solve_fixed_iter                   |     -0.22 +/- 62.88    | -1.12e-02 +/- 3.19e+00 |  5.07e+00 +/- 2.3e+00  |  5.08e+00 +/- 2.2e+00  |

@unalmis unalmis marked this pull request as draft August 13, 2024 02:17
@unalmis unalmis changed the title Ku/angles Update equations to use angles rather than stream functions Aug 13, 2024
@unalmis unalmis added the low priority Nice to have, but not needed right away label Aug 13, 2024
@unalmis unalmis changed the title Update equations to use angles rather than stream functions Update equations to match phyiscs using general angles instead of particular choice of stream function Aug 13, 2024
Base automatically changed from ku/bugfix_angles to master August 14, 2024 19:20
@unalmis unalmis changed the title Update equations to match phyiscs using general angles instead of particular choice of stream function Update equations to match phyiscs and boozer fit for general toroidal angle Aug 17, 2024
@unalmis unalmis changed the title Update equations to match phyiscs and boozer fit for general toroidal angle Update equations to match physics and boozer fit for general toroidal angle Aug 17, 2024
sqrt_g_B is generalized in upstream PR, this one just update B_zeta_mn
@unalmis unalmis marked this pull request as ready for review August 17, 2024 04:49
@unalmis unalmis removed the documentation Add documentation or better warnings etc. label Aug 21, 2024
desc/compute/_core.py Outdated Show resolved Hide resolved
desc/compute/_core.py Outdated Show resolved Hide resolved
@unalmis unalmis requested a review from dpanici August 22, 2024 19:32
dpanici
dpanici previously approved these changes Aug 26, 2024
@unalmis unalmis requested review from dpanici, a team, rahulgaur104, f0uriest, ddudt, kianorr, sinaatalay and YigitElma and removed request for a team August 26, 2024 18:37
f0uriest
f0uriest previously approved these changes Aug 27, 2024
desc/compute/_core.py Show resolved Hide resolved
desc/compute/_core.py Show resolved Hide resolved
@unalmis unalmis merged commit 9f5cb55 into master Aug 27, 2024
18 checks passed
@unalmis unalmis deleted the ku/angles branch August 27, 2024 22:54
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.

Change equations to match physics
4 participants