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

Fix definition of b0 in vmec output #1012

Merged
merged 1 commit into from
May 8, 2024
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions desc/vmec.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
data_quad = eq.compute(
["R0/a", "V", "<|B|>_rms", "<beta>_vol", "<beta_pol>_vol", "<beta_tor>_vol"]
)
data_axis = eq.compute(["G", "p", "R", "<|B|^2>"], grid=grid_axis)
data_axis = eq.compute(["G", "p", "R", "<|B|^2>", "<|B|>"], grid=grid_axis)

Check warning on line 271 in desc/vmec.py

View check run for this annotation

Codecov / codecov/patch

desc/vmec.py#L271

Added line #L271 was not covered by tests
data_lcfs = eq.compute(["G", "I", "R", "Z"], grid=grid_lcfs)
data_half = eq.compute(
[
Expand Down Expand Up @@ -488,7 +488,7 @@
b0 = file.createVariable("b0", np.float64)
b0.long_name = "average B_tor on axis"
b0.units = "T"
b0[:] = data_axis["G"][0] / data_axis["R"][0]
b0[:] = data_axis["<|B|>"][0]

Check warning on line 491 in desc/vmec.py

View check run for this annotation

Codecov / codecov/patch

desc/vmec.py#L491

Added line #L491 was not covered by tests

betaxis = file.createVariable("betaxis", np.float64)
betaxis.long_name = "2 * mu_0 * pressure / <|B|^2> on the magnetic axis"
Expand Down
Loading