DESC
DESC copied to clipboard
Resolve Discrepancy in asymmetric boozmn output file compared to SIMSOPT booz_xform
In #680 , the ability to create booz_xform style boozmn.nc output files was implemented in DESC. It agrees well with the hidden symmetries booz_xform code except in the numnc variable (techincally pmnc), which has the opposite sign in the simsopt and DESC output files. I am not sure what this discrepancy is, and it does not seem to affect the rest of the quantities, confusingly. Because it is numnc, it is only non-stellarator-symmetric calcuations which are affected.
Regardless, the DESC boozmn output files, when re-loaded and compared to the DESC quantities for R,Z, |B| etc, compare well, and the saved Fourier coefficients also agree well with those of the SIMSOPT booz_xform. The only discrepancy is with numnc.
In stellarator symmetry, every quantity agrees between the DESC output and the hidden symmetries booz_xform output
It may be related to the way we save asymmetric wout files and convert from our lambda to the VMEC-equivalent lambda, if the lmnc is somehow saved with the wrong sign, then maybe that could explain this? though I definitely thought we had compared and got agreement in our asym wout... worth another check
linking the comment where we explain our logic when saving lambda to wout: https://github.com/PlasmaControl/DESC/blob/329b1053485393edb9cddb5f08224e5ea065a357/desc/vmec.py#L868
# should negate lambda coefs bc theta_DESC + lambda = theta_PEST,
# since we are reversing the theta direction (and the theta_PEST direction),
# so -theta_PEST = -theta_DESC - lambda, so the negative of lambda is what
# should be saved, so that would be negating all of eq.L_lmn
# BUT since we are also reversing the poloidal angle direction, which
# would negate only the coeffs of L_lmn corresponding to m<0
# (sin theta modes in DESC), the effective result is to only
# negate the cos(theta) (m>0) lambda modes