Module for advancing and initialising the fields when Full Flux Surface effects are included
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(coupled_alpha_type), | private, | dimension(:, :, :), allocatable | :: | gam0_ffs |
arrays allocated/used if simulating a full flux surface |
||
type(gam0_ffs_type), | private, | dimension(:, :), allocatable | :: | lu_gam0_ffs | |||
complex, | private, | dimension(:), allocatable | :: | adiabatic_response_factor | |||
logical, | private | :: | fields_initialised | = | .false. |
get_fields_ffs accepts as input the guiding centre distribution function g and calculates/returns the electronstatic potential phi for full_flux_surface simulations
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | g | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
logical, | intent(in), | optional | :: | implicit_solve |
change from rhs defined on grid with ky >=0 and kx from 0,...,kxmax,-kxmax,...,-dkx
to rhs_swap defined on grid with ky = -kymax,...,kymax and kx >= 0
solve sum_s Z_s int d^3v
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:) | :: | rhs | ||
complex, | intent(out), | dimension(:, :, -nzgrid:) | :: | phi |
Layouts Parameters Arrays Grids Calculations
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gold | ||
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | phiold | ||
complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | source |
Layouts
Parameters
Grids
Calculations
assume there is only a single flux surface being simulated
integrate
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | g | ||
complex, | intent(inout), | dimension(:, :, -nzgrid:) | :: | source |
calculate and LU factorise the matrix multiplying the electrostatic potential in quasineutrality this involves the factor 1-Gamma_0(kperp(alpha))
solves Delta * phi_hom = -delta_{ky,0} * ne/Te for phi_hom this is the vector describing the response of phi_hom to a unit impulse in phi_fsa it is the sum over ky and integral over kx of this that is needed, and this is stored in adiabatic_response_factor
arrays only allocated/used if simulating a full flux surface