From 1675e123f13cff26146aee2985c57915fa57a33b Mon Sep 17 00:00:00 2001 From: Rory Conlin Date: Tue, 7 May 2024 10:50:29 -0400 Subject: [PATCH] Fix definition of b0 in vmec output --- desc/vmec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desc/vmec.py b/desc/vmec.py index c6d09a7510..14280a4ca2 100644 --- a/desc/vmec.py +++ b/desc/vmec.py @@ -268,7 +268,7 @@ def save(cls, eq, path, surfs=128, verbose=1): # noqa: C901 - FIXME - simplify data_quad = eq.compute( ["R0/a", "V", "<|B|>_rms", "_vol", "_vol", "_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) data_lcfs = eq.compute(["G", "I", "R", "Z"], grid=grid_lcfs) data_half = eq.compute( [ @@ -488,7 +488,7 @@ def save(cls, eq, path, surfs=128, verbose=1): # noqa: C901 - FIXME - simplify 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] betaxis = file.createVariable("betaxis", np.float64) betaxis.long_name = "2 * mu_0 * pressure / <|B|^2> on the magnetic axis"