get_geometry_arrays_from_VMEC Subroutine

private subroutine get_geometry_arrays_from_VMEC(nalpha, naky)


                 BOUNDARY CONDITIONS IN VMEC                     !

Calculate = dkx/dky * jtwist Minus its sign gives the direction of the shift in kx for the twist-and-shift BC Note that the default BC are the unconnected BC in the module

Regardless of the choice of coordinates we have kψ = (dx/dψ) kx kα = (dy/dα) ky hat{s} = -(rho/iota)(diota/drho)

For VMEC we use alpha = theta - iotazeta z = zeta = 2piP = 2pifield_period_ratio = 2pi*nfield_periods/nfp

Standard twist-and-shift boundary conditions
dkpsi/dkalpha * jtwist = 2piP(diota/dψ) = 2piP * (drho/dψ) (diota/drho) dkx/dky * jtwist = -2pi*P * (dψ/dx) (dy/dα) * (drho/dψ) * hat{s} (iota/rho)

Stellarator symmetric twist-and-shift boundary conditions
dkpsi/dkalpha * jtwist = -2 (∇ψ . ∇α) / |∇ψ|^2 (at the last z-point) dkx/dky * jtwist = -2 * (dψ/dx) (dy/dα) * (∇ψ . ∇α) / |∇ψ|^2



                  ALLOCATE TEMPORARY ARRAYS                      !


                 DEALLOCATE TEMPORARY ARRAYS                     !

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nalpha
integer, intent(in) :: naky