MODgvec_lambda_solve Module

Module lambda_solve

CONTAINS routine to solve for lambda at a specific flux surface (for example for the boudnary condition at the last flux surface)


Uses

  • module~~modgvec_lambda_solve~~UsesGraph module~modgvec_lambda_solve MODgvec_lambda_solve module~modgvec_globals MODgvec_Globals module~modgvec_lambda_solve->module~modgvec_globals iso_fortran_env iso_fortran_env module~modgvec_globals->iso_fortran_env

Used by

  • module~~modgvec_lambda_solve~~UsedByGraph module~modgvec_lambda_solve MODgvec_lambda_solve proc~get_boozer_sinterp t_sfl_boozer%Get_Boozer_sinterp proc~get_boozer_sinterp->module~modgvec_lambda_solve proc~init_la_from_solution Init_LA_from_Solution proc~init_la_from_solution->module~modgvec_lambda_solve proc~initsolution InitSolution proc~initsolution->module~modgvec_lambda_solve

Subroutines

public subroutine Lambda_solve(spos_in, hmap_in, hmap_xv, X1_base_in, X2_base_in, LA_fbase_in, X1_in, X2_in, LA_s, phiPrime_s, chiPrime_s)

Solve for lambda on one given flux surface (spos_in), using weak form of J^s=0: d/dzeta(B_theta)-d/dtheta(B_zeta)=0

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: spos_in

s position to evaluate lambda

class(c_hmap), intent(in) :: hmap_in
class(c_hmap_auxvar), intent(in) :: hmap_xv(X1_base_in%f%mn_IP)
class(t_base), intent(in) :: X1_base_in
class(t_base), intent(in) :: X2_base_in
type(t_fBase), intent(in) :: LA_fbase_in
real(kind=wp), intent(in) :: X1_in(1:X1_base_in%s%nBase,1:X1_base_in%f%modes)

U%X1 variable, is reshaped to 2D at input

real(kind=wp), intent(in) :: X2_in(1:X2_base_in%s%nBase,1:X2_base_in%f%modes)

U%X2 variable, is reshaped to 2D at input

real(kind=wp), intent(out) :: LA_s(1:LA_fbase_in%modes)

lambda at spos

real(kind=wp), intent(in) :: phiPrime_s

toroidal flux derivative phi' at the position s

real(kind=wp), intent(in) :: chiPrime_s

poloidal flux derivative chi' at the position s

public subroutine Lambda_setup_and_solve(LA_fbase_in, phiPrime_s, ChiPrime_s, gam_tt, gam_tz, gam_zz, LA_s)

Arguments

Type IntentOptional Attributes Name
type(t_fBase), intent(in) :: LA_fbase_in
real(kind=wp), intent(in) :: phiPrime_s

toroidal and poloidal flux s derivatives at s_pos

real(kind=wp), intent(in) :: ChiPrime_s

toroidal and poloidal flux s derivatives at s_pos

real(kind=wp), intent(in), DIMENSION(1:LA_fbase_in%mn_IP) :: gam_tt

g_tt/J evaluated on IP points

real(kind=wp), intent(in), DIMENSION(1:LA_fbase_in%mn_IP) :: gam_tz

g_tz/J evaluated on IP points

real(kind=wp), intent(in), DIMENSION(1:LA_fbase_in%mn_IP) :: gam_zz

g_zz/J evaluated on IP points

real(kind=wp), intent(out) :: LA_s(1:LA_fbase_in%modes)

lambda at spos