fields_electromagnetic Module

Module for advancing and initialising the fields when Electromagnetic effects are included

TODO-GA: add debug flag



Interfaces

public interface get_fields_electromagnetic

  • private subroutine get_fields_electromagnetic_kxkyzlo(g, phi, apar, bpar, dist)

    Layouts Arrays Parameters Grids Calculations

    integrate g to get sum_s Z_s n_s J0 g and store in phi integrate g to get - 2 beta sum_s n_s T_s J1 mu g and store in bpar

    Arguments

    Type IntentOptional Attributes Name
    complex, intent(in), dimension(:, :, kxkyz_lo%llim_proc:) :: g
    complex, intent(inout), dimension(:, :, -nzgrid:, :) :: phi
    complex, intent(inout), dimension(:, :, -nzgrid:, :) :: apar
    complex, intent(inout), dimension(:, :, -nzgrid:, :) :: bpar
    character(len=*), intent(in) :: dist
  • private subroutine get_fields_electromagnetic_vmulo(g, phi, apar, bpar, dist)

    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. This advances the fields when Electromagnetic effects are included, so we advance , , and .

    Layouts Arrays Parameters Grids Calculations Routines from other fields modules

    store result in phi, which will be further modified below to account for polarization term store result in bpar, which will be further modified below to account for polarization term store result in apar, which will be further modified below to account for apar pre-factor

    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

Subroutines

private subroutine get_fields_electromagnetic_vmulo(g, phi, apar, bpar, dist)

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. This advances the fields when Electromagnetic effects are included, so we advance , , and .

Read more…

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

private subroutine get_fields_electromagnetic_kxkyzlo(g, phi, apar, bpar, dist)

Layouts Arrays Parameters Grids Calculations

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, kxkyz_lo%llim_proc:) :: g
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: phi
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: apar
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: bpar
character(len=*), intent(in) :: dist

private subroutine get_phi_and_bpar(phi, bpar, dist)

Arrays Parameters Grids

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: phi
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: bpar
character(len=*), intent(in) :: dist

private subroutine get_apar(apar, dist)

Get_apar solves pre-factor * Apar = beta_ref * sum_s Z_s n_s vth_s int d3v vpa * J0 * pdf for apar, with pdf being either g or gbar (specified by dist input). the input apar is the RHS of the above equation and is overwritten by the true apar the pre-factor depends on whether g or gbar is used (kperp2 in former case, with additional term appearing in latter case)

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: apar
character(len=*), intent(in) :: dist

public subroutine advance_apar(g, dist, apar)

Layouts Parameters Grids Calculations

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, kxkyz_lo%llim_proc:) :: g
character(len=*), intent(in) :: dist
complex, intent(out), dimension(:, :, -nzgrid:, :) :: apar

public subroutine init_fields_electromagnetic(nfields)

Fill arrays needed for the electromagnetic calculations

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: nfields

public subroutine allocate_fields_electromagnetic()

Allocate arrays needed for solving electromagnetic fields This includes Apar and Bpar

Read more…

Arguments

None

public subroutine finish_fields_electromagnetic()

TODO-GA:

Arguments

None