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
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6ea35e6
Change equations to match physics:
unalmis Aug 12, 2024
2dfcb67
Fix bugs in boozer tranform and boozer harmonics
unalmis Aug 12, 2024
b64570a
Revert changes to B_theta_mn in previous commit
unalmis Aug 12, 2024
cf49ba5
Merge branch 'ku/bugfix_angles' into ku/angles
unalmis Aug 12, 2024
2f32d99
Merge branch 'ku/bugfix_angles' into ku/angles
unalmis Aug 13, 2024
535bafd
Merge branch 'ku/angles' into ku/fix_boozer
unalmis Aug 13, 2024
583675f
Merge branch 'ku/bugfix_angles' into ku/angles
unalmis Aug 13, 2024
a779c38
Merge branch 'ku/bugfix_angles' into ku/angles
unalmis Aug 13, 2024
2b2fffa
Merge branch 'ku/angles' into ku/fix_boozer
unalmis Aug 13, 2024
a2a8b81
Register angle derivatives as copies of stream functions
unalmis Aug 17, 2024
e627311
Merge branch 'ku/angles' into ku/fix_boozer
unalmis Aug 17, 2024
e238c54
Update master data for new alias
unalmis Aug 17, 2024
f2d2563
Merge branch 'master' into ku/angles
unalmis Aug 17, 2024
b5f0727
Merge branch 'ku/angles' into ku/fix_boozer
unalmis Aug 17, 2024
9270292
update boozer fit for general toroidal angle (#1179)
unalmis Aug 17, 2024
3aa9dda
Add psi_rrr = 0 to assumptions in test_axis_limits
unalmis Aug 18, 2024
2ce481e
Merge branch 'master' into ku/angles
dpanici Aug 20, 2024
440664f
Merge branch 'master' into ku/angles
unalmis Aug 20, 2024
01513a8
Merge branch 'master' into ku/angles
unalmis Aug 22, 2024
bac9401
improve descriptions of angle derivatives
unalmis Aug 22, 2024
2fb656d
Merge branch 'master' into ku/angles
unalmis Aug 26, 2024
c381196
Merge branch 'master' into ku/angles
unalmis Aug 27, 2024
1c88963
Merge branch 'master' into ku/angles
unalmis Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 249 additions & 1 deletion desc/compute/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,25 @@
return data


@register_compute_fun(
name="phi_rrz",
label="\\partial_{\\rho \\rho \\zeta} \\phi",
units="rad",
units_long="radians",
description="Toroidal angle in lab frame, second derivative wrt radial coordinate "
unalmis marked this conversation as resolved.
Show resolved Hide resolved
"and first wrt DESC toroidal coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["omega_rrz"],
)
def _phi_rrz(params, transforms, profiles, data, **kwargs):
data["phi_rrz"] = data["omega_rrz"]
return data

Check warning on line 2783 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L2782-L2783

Added lines #L2782 - L2783 were not covered by tests


@register_compute_fun(
name="phi_rt",
label="\\partial_{\\rho \\theta} \\phi",
Expand All @@ -2783,6 +2802,25 @@
return data


@register_compute_fun(
name="phi_rtz",
label="\\partial_{\\rho \\theta \\zeta} \\phi",
units="rad",
units_long="radians",
description="Toroidal angle in lab frame, third derivative wrt radial, "
"poloidal, and toroidal coordinates",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["omega_rtz"],
)
def _phi_rtz(params, transforms, profiles, data, **kwargs):
data["phi_rtz"] = data["omega_rtz"]
return data

Check warning on line 2821 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L2820-L2821

Added lines #L2820 - L2821 were not covered by tests


@register_compute_fun(
name="phi_rz",
label="\\partial_{\\rho \\zeta} \\phi",
Expand All @@ -2802,6 +2840,25 @@
return data


@register_compute_fun(
name="phi_rzz",
label="\\partial_{\\rho \\zeta \\zeta} \\phi",
units="rad",
units_long="radians",
description="Toroidal angle in lab frame, first derivative wrt radial and "
"second derivative wrt DESC toroidal coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["omega_rzz"],
)
def _phi_rzz(params, transforms, profiles, data, **kwargs):
data["phi_rzz"] = data["omega_rzz"]
return data

Check warning on line 2859 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L2858-L2859

Added lines #L2858 - L2859 were not covered by tests


@register_compute_fun(
name="phi_t",
label="\\partial_{\\theta} \\phi",
Expand Down Expand Up @@ -2843,12 +2900,31 @@
return data


@register_compute_fun(
name="phi_ttz",
label="\\partial_{\\theta \\theta \\zeta} \\phi",
units="rad",
units_long="radians",
description="Toroidal angle in lab frame, second derivative wrt poloidal "
dpanici marked this conversation as resolved.
Show resolved Hide resolved
"coordinate and first derivative wrt toroidal coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["omega_ttz"],
)
def _phi_ttz(params, transforms, profiles, data, **kwargs):
data["phi_ttz"] = data["omega_ttz"]
return data

Check warning on line 2919 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L2918-L2919

Added lines #L2918 - L2919 were not covered by tests


@register_compute_fun(
name="phi_tz",
label="\\partial_{\\theta \\zeta} \\phi",
units="rad",
units_long="radians",
description="Toroidal angle in lab frame, second derivative wrt poloidal and "
description="Toroidal angle in lab frame, derivative wrt poloidal and "
"toroidal coordinate",
dim=1,
params=[],
Expand All @@ -2862,6 +2938,25 @@
return data


@register_compute_fun(
name="phi_tzz",
label="\\partial_{\\theta \\zeta \\zeta} \\phi",
units="rad",
units_long="radians",
description="Toroidal angle in lab frame, derivative wrt poloidal coordinate and "
"second derivative wrt toroidal coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["omega_tzz"],
)
def _phi_tzz(params, transforms, profiles, data, **kwargs):
data["phi_tzz"] = data["omega_tzz"]
return data

Check warning on line 2957 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L2956-L2957

Added lines #L2956 - L2957 were not covered by tests


@register_compute_fun(
name="phi_z",
label="\\partial_{\\zeta} \\phi",
Expand Down Expand Up @@ -2903,6 +2998,25 @@
return data


@register_compute_fun(
name="phi_zzz",
label="\\partial_{\\zeta \\zeta \\zeta} \\phi",
units="rad",
units_long="radians",
description="Toroidal angle in lab frame, third derivative wrt toroidal "
"coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["omega_zzz"],
)
def _phi_zzz(params, transforms, profiles, data, **kwargs):
data["phi_zzz"] = data["omega_zzz"]
return data

Check warning on line 3017 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L3016-L3017

Added lines #L3016 - L3017 were not covered by tests


@register_compute_fun(
name="rho",
label="\\rho",
Expand Down Expand Up @@ -2986,6 +3100,83 @@
return data


@register_compute_fun(
name="theta_PEST_rt",
label="\\partial_{\\rho \\theta} \\vartheta",
units="rad",
units_long="radians",
description="PEST straight field line poloidal angular coordinate, derivative wrt "
"radial and DESC poloidal coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["lambda_rt"],
)
def _theta_PEST_rt(params, transforms, profiles, data, **kwargs):
data["theta_PEST_rt"] = data["lambda_rt"]
rahulgaur104 marked this conversation as resolved.
Show resolved Hide resolved
return data


@register_compute_fun(
name="theta_PEST_rrt",
label="\\partial_{\\rho \\rho \\theta} \\vartheta",
units="rad",
units_long="radians",
description="PEST straight field line poloidal angular coordinate, second "
"derivative wrt radial coordinate and first derivative wrt DESC poloidal "
"coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["lambda_rrt"],
)
def _theta_PEST_rrt(params, transforms, profiles, data, **kwargs):
data["theta_PEST_rrt"] = data["lambda_rrt"]
return data

Check warning on line 3139 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L3138-L3139

Added lines #L3138 - L3139 were not covered by tests


@register_compute_fun(
name="theta_PEST_rtz",
label="\\partial_{\\rho \\theta \\zeta} \\vartheta",
units="rad",
units_long="radians",
description="PEST straight field line poloidal angular coordinate, derivative wrt "
"radial and DESC poloidal and toroidal coordinates",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["lambda_rtz"],
)
def _theta_PEST_rtz(params, transforms, profiles, data, **kwargs):
data["theta_PEST_rtz"] = data["lambda_rtz"]
return data

Check warning on line 3158 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L3157-L3158

Added lines #L3157 - L3158 were not covered by tests


@register_compute_fun(
name="theta_PEST_rtt",
label="\\partial_{\\rho \\theta \\theta} \\vartheta",
units="rad",
units_long="radians",
description="PEST straight field line poloidal angular coordinate, derivative wrt "
"radial coordinate once and DESC poloidal coordinate twice",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["lambda_rtt"],
)
def _theta_PEST_rtt(params, transforms, profiles, data, **kwargs):
data["theta_PEST_rtt"] = data["lambda_rtt"]
return data

Check warning on line 3177 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L3176-L3177

Added lines #L3176 - L3177 were not covered by tests

unalmis marked this conversation as resolved.
Show resolved Hide resolved

@register_compute_fun(
name="theta_PEST_t",
label="\\partial_{\\theta} \\vartheta",
Expand Down Expand Up @@ -3024,6 +3215,25 @@
return data


@register_compute_fun(
name="theta_PEST_ttt",
label="\\partial_{\\theta \\theta \\theta} \\vartheta",
units="rad",
units_long="radians",
description="PEST straight field line poloidal angular coordinate, third "
"derivative wrt poloidal coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["lambda_ttt"],
)
def _theta_PEST_ttt(params, transforms, profiles, data, **kwargs):
data["theta_PEST_ttt"] = data["lambda_ttt"]
return data

Check warning on line 3234 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L3233-L3234

Added lines #L3233 - L3234 were not covered by tests


@register_compute_fun(
name="theta_PEST_tz",
label="\\partial_{\\theta \\zeta} \\vartheta",
Expand All @@ -3043,6 +3253,25 @@
return data


@register_compute_fun(
name="theta_PEST_tzz",
label="\\partial_{\\theta \\zeta \\zeta} \\vartheta",
units="rad",
units_long="radians",
description="PEST straight field line poloidal angular coordinate, derivative wrt "
"poloidal coordinate once and toroidal coordinate twice",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["lambda_tzz"],
)
def _theta_PEST_tzz(params, transforms, profiles, data, **kwargs):
data["theta_PEST_tzz"] = data["lambda_tzz"]
return data

Check warning on line 3272 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L3271-L3272

Added lines #L3271 - L3272 were not covered by tests


@register_compute_fun(
name="theta_PEST_z",
label="\\partial_{\\zeta} \\vartheta",
Expand Down Expand Up @@ -3081,6 +3310,25 @@
return data


@register_compute_fun(
name="theta_PEST_ttz",
label="\\partial_{\\theta \\theta \\zeta} \\vartheta",
units="rad",
units_long="radians",
description="PEST straight field line poloidal angular coordinate, second "
"derivative wrt poloidal coordinate and derivative wrt toroidal coordinate",
dim=1,
params=[],
transforms={},
profiles=[],
coordinates="rtz",
data=["lambda_ttz"],
)
def _theta_PEST_ttz(params, transforms, profiles, data, **kwargs):
data["theta_PEST_ttz"] = data["lambda_ttz"]
return data

Check warning on line 3329 in desc/compute/_core.py

View check run for this annotation

Codecov / codecov/patch

desc/compute/_core.py#L3328-L3329

Added lines #L3328 - L3329 were not covered by tests


@register_compute_fun(
name="zeta",
label="\\zeta",
Expand Down
Loading
Loading