get_fields_fluxtube_vmlo Subroutine

private subroutine get_fields_fluxtube_vmlo(g, phi, apar, bpar, dist, skip_fsa)

If we are parallelising over (vpa,mu) then this subroutine is called This is the more common version used compared with parallelising over (kx,ky,z) and is the default for stella. Here we calculate: sum_s int dv (J0 * g) and then call get_phi which divides this by the appropriate gamtot factor TODO-GA: remove apar from this and make it only needed for EM stella

Layouts Arrays Parameters Grids Calculations Routines from other field modules Note that this advances phi for the electrostatic, fluxtube case. If electromagnetic effects are included then phi will be advanced below First gyroaverage the distribution function g at each phase space location and store this as g_scratch = = J_0 g in k-space If we are allowing for Radial Variation then we must modify . This is done in the fields_radialvariation module, but is not needed for standard stella (as these are false by default). Next, integrate over velocity space and sum over species and store the result in phi, which will be further modified below to account for polarization term Get phi routine inverts the appropriate 'Gamma_0' factor that multiplies the terms onto the RHS of the equation. The exact form of this factor depends on the simulation e.g. we may have adiabatic electrons, kinetic electrons etc. and also if Radial Varation effects are included (these are false by default) This is the inversion routine for electrostatic, fluxtube stella If we are allowing for radial variation this factor changes further If we have electromagnetic effects we need to add the terms due to A_parallel and B_parallel and also need to advance phi including electromagnetic effects

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
complex, intent(out), dimension(:, :, -nzgrid:, :) :: phi
complex, intent(out), dimension(:, :, -nzgrid:, :) :: apar
complex, intent(out), dimension(:, :, -nzgrid:, :) :: bpar
character(len=*), intent(in) :: dist
logical, intent(in), optional :: skip_fsa