-
Notifications
You must be signed in to change notification settings - Fork 2
Description
In gpeq.f/gpeq_sol(psi), the contravariant magnetic fields are calculated -- this is also found in rmatch/match.f/match_output_solution(). In gpeq.f, the grad-psi component of the contravariant b field is:
bwp_mn=(chi1*singfac*twopi*ifac*xsp_mn)
However, in rmatch, it also calculates the magnetic field,
outtotsol(:,ip)=chi1*ifac*singfac*outtotsol(:,ip)
In Jong-Kyu's thesis, the contravariant B fields are found in equation 2.58, where it states,
This makes sense as in both codes, singfac=m-nq, chi1outtotsol is the same thing that gets written in the rpec workflow to make u1 in gpec, so those should be the same. The only thing different between them is a factor of