iol_source_t Derived Type

type, public :: iol_source_t

Contains information/routines to compute ion-orbit-loss effects See interface description of ion-orbit-loss standalone routines


Contents


Finalization Procedures

final :: destructor_iol

  • public subroutine destructor_iol(self)

    Deallocates stuff related with iol source

    Arguments

    Type IntentOptional Attributes Name
    type(iol_source_t), intent(inout) :: self

    Instance of the type


Type-Bound Procedures

procedure, public :: init => init_iol

  • interface

    public module subroutine init_iol(self, filename, equi, mesh, polars)

    Initialises IOL source

    Arguments

    Type IntentOptional Attributes Name
    class(iol_source_t), intent(inout) :: self

    Instance of the type

    character(len=*), intent(in) :: filename

    Filename, to read parameters from

    class(equilibrium_t), intent(inout) :: equi

    Equilibrium

    type(mesh_cart_t), intent(in) :: mesh

    Mesh

    type(polars_t), intent(in) :: polars

    Polar grid and operators

procedure, public :: get_init_continue

  • public pure function get_init_continue(self)

    Getter routine

    Arguments

    Type IntentOptional Attributes Name
    class(iol_source_t), intent(in) :: self

    Instance of the type

    Return Value logical

procedure, public :: driver => driver_iol

  • interface

    public module subroutine driver_iol(self, comm_handler, equi, mesh, polars, tau, dtau, ne, pot, ti, src_vort, update_performed, force_no_update)

    Driver routine for computing IOL sources. Takes care of time averaging procedure, i.e. (Re-)computes IOL sources at time frames tau_average based on internal average fields. Adds contribution of fields to current internal average fields

    Arguments

    Type IntentOptional Attributes Name
    class(iol_source_t), intent(inout) :: self

    Instance of the type

    type(comm_handler_t), intent(in) :: comm_handler

    Communication handler

    class(equilibrium_t), intent(inout) :: equi

    Equilibrium

    type(mesh_cart_t), intent(inout) :: mesh

    Mesh within poloidal plane

    type(polars_t), intent(in) :: polars

    Polar grid and operators

    real(kind=GP), intent(in) :: tau

    Current time of simulation

    real(kind=GP), intent(in) :: dtau

    Timestep of simulation

    type(variable_t), intent(in) :: ne

    Electron density

    type(variable_t), intent(in) :: pot

    Electrostatic potential

    type(variable_t), intent(in) :: ti

    Ion temperature

    real(kind=GP), intent(inout), dimension(mesh%get_n_points_inner()) :: src_vort

    Vorticity source, on output with IOL contribution added

    logical, intent(out) :: update_performed

    Indicates if update of IOL source was performed

    logical, intent(in), optional :: force_no_update

    Switch that enforces that IOL source is not updated

procedure, public :: display => display_iol_source

  • interface

    public module subroutine display_iol_source(self)

    Displays parameters for iol_source

    Arguments

    Type IntentOptional Attributes Name
    class(iol_source_t), intent(inout) :: self

    Instance of the type

procedure, public :: write_netcdf => write_netcdf_iol_source

  • interface

    public module subroutine write_netcdf_iol_source(self, tau, fexist, fgid)

    Writes current IOL source to NETCDF file

    Arguments

    Type IntentOptional Attributes Name
    class(iol_source_t), intent(in) :: self

    Instance of the type

    real(kind=GP), intent(in) :: tau

    Timestamp of current IOL source

    logical, intent(in) :: fexist

    Indicates if file

    integer, intent(in) :: fgid

    File or group id number of existing NETCDF file

procedure, public :: read_netcdf => read_netcdf_iol_source

  • interface

    public module subroutine read_netcdf_iol_source(self, fgid, nsnaps_req, nsnaps, tau)

    Reads IOL source from NETCDF file

    Arguments

    Type IntentOptional Attributes Name
    class(iol_source_t), intent(inout) :: self

    Instance of the type

    integer, intent(in) :: fgid

    File or group id number of existing NETCDF file

    integer, intent(in), optional :: nsnaps_req

    Number of requested snapshot

    integer, intent(out), optional :: nsnaps

    Number of snapshot returned

    real(kind=GP), intent(out), optional :: tau

    Tme stamp of snapshot

procedure, public :: write_ascii => write_ascii_iol_source

  • interface

    public module subroutine write_ascii_iol_source(self, dirpath)

    Writes information of IOL to ASCII format Useful for running test case with IOL-standalone see https://gitlab.mpcdf.mpg.de/phoenix/ion-orbit-loss-standalone

    Arguments

    Type IntentOptional Attributes Name
    class(iol_source_t), intent(inout) :: self

    Instance of the type

    character(len=*), intent(in) :: dirpath

    Directory, where files are written