vmec_geometry Module


Variables

Type Visibility Attributes Name Initial
integer, public :: radial_coordinate_option
integer, public, parameter :: radial_coordinate_sgnpsitpsit = 1
integer, public, parameter :: radial_coordinate_minuspsit = 2
integer, public, parameter :: radial_coordinate_r = 3
real, private :: alpha0
real, private :: nfield_periods
real, private :: zeta_center
real, private :: torflux
integer, private :: n_tolerated_test_arrays_inconsistencies
integer, private :: zgrid_refinement_factor
integer, private :: surface_option
logical, private :: verbose
logical, private :: rectangular_cross_section
character(len=2000), private :: vmec_filename
character(len=20), private :: radial_coordinate

Subroutines

public subroutine read_vmec_parameters()

Arguments

None

public subroutine get_vmec_geometry(nzgrid, nalpha, naky, surf, grho, bmag, b_dot_grad_z_averaged, b_dot_grad_z, grad_alpha_grad_alpha, grad_alpha_grad_psit, grad_psit_grad_psit, gds23_psitalpha, gds24_psitalpha, gds25_psitalpha, gds26_psitalpha, gbdrift_alpha, gbdrift0_psi, cvdrift_alpha, cvdrift0_psi, gradzeta_gradpsit_R2overB2, gradzeta_gradalpha_R2overB2, b_dot_grad_zeta_RR, sign_torflux, theta_vmec, dzetadz, L_reference, B_reference, alpha, zeta, field_period_ratio, psit_displacement_fac)

calculate_vmec_geometry returns psitor/psitor_lcfs as rhoc stella uses rhoc = rho = sqrt(psitor/psitor_lcfs) = rhotor

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nzgrid
integer, intent(in) :: nalpha
integer, intent(in) :: naky
type(flux_surface_type), intent(out) :: surf
real, intent(out), dimension(:, -nzgrid:) :: grho
real, intent(out), dimension(:, -nzgrid:) :: bmag
real, intent(out), dimension(-nzgrid:) :: b_dot_grad_z_averaged
real, intent(out), dimension(:, -nzgrid:) :: b_dot_grad_z
real, intent(out), dimension(:, -nzgrid:) :: grad_alpha_grad_alpha
real, intent(out), dimension(:, -nzgrid:) :: grad_alpha_grad_psit
real, intent(out), dimension(:, -nzgrid:) :: grad_psit_grad_psit
real, intent(out), dimension(:, -nzgrid:) :: gds23_psitalpha
real, intent(out), dimension(:, -nzgrid:) :: gds24_psitalpha
real, intent(out), dimension(:, -nzgrid:) :: gds25_psitalpha
real, intent(out), dimension(:, -nzgrid:) :: gds26_psitalpha
real, intent(out), dimension(:, -nzgrid:) :: gbdrift_alpha
real, intent(out), dimension(:, -nzgrid:) :: gbdrift0_psi
real, intent(out), dimension(:, -nzgrid:) :: cvdrift_alpha
real, intent(out), dimension(:, -nzgrid:) :: cvdrift0_psi
real, intent(out), dimension(:, -nzgrid:) :: gradzeta_gradpsit_R2overB2
real, intent(out), dimension(:, -nzgrid:) :: gradzeta_gradalpha_R2overB2
real, intent(out), dimension(:, -nzgrid:) :: b_dot_grad_zeta_RR
integer, intent(out) :: sign_torflux
real, intent(out), dimension(:, -nzgrid:) :: theta_vmec
real, intent(out) :: dzetadz
real, intent(out) :: L_reference
real, intent(out) :: B_reference
real, intent(out), dimension(:) :: alpha
real, intent(out), dimension(:, -nzgrid:) :: zeta
real, intent(out) :: field_period_ratio
real, intent(out), dimension(:, -nzgrid:) :: psit_displacement_fac

private subroutine filter_geo_coef(naky, geocoef)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: naky
real, intent(inout), dimension(:) :: geocoef