init_braginskii_m Module

Sets initial state for BRAGINSKII model


Used by


Contents


Interfaces

interface

  • public module subroutine init_state_profile(comm_handler, equi, equi_on_cano, equi_on_stag, mesh_cano, mesh_stag, hsolver_cano, hsolver_stag, map, penalisation_cano, penalisation_stag, polars_cano, polars_stag, opsinplane_cano, opsinplane_stag, filename, boundaries, ne, pot, vort, upar, jpar, apar, te, ti)

    Initialises variables according to equilibrium profile

    Arguments

    Type IntentOptional Attributes Name
    type(comm_handler_t), intent(in) :: comm_handler

    Communicators

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

    Equilibrium

    class(equilibrium_storage_t), intent(in) :: equi_on_cano

    Equilibrim quantities on canonical mesh

    class(equilibrium_storage_t), intent(in) :: equi_on_stag

    Equilibrim quantities on staggered mesh

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

    Mesh (canonical)

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

    Mesh (staggered)

    class(helmholtz_solver_t), intent(inout) :: hsolver_cano

    Elliptic (2D) solver on canonical mesh

    class(helmholtz_solver_t), intent(inout) :: hsolver_stag

    Elliptic (2D) solver on staggered mesh

    type(parallel_map_t), intent(in) :: map

    Parallel map

    type(penalisation_t), intent(in) :: penalisation_cano

    Penalisation (canonical)

    type(penalisation_t), intent(in) :: penalisation_stag

    Penalisation (staggered)

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

    Polar grid and operators (canonical)

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

    Polar grid and operators (staggered)

    type(inplane_operators_t), intent(in) :: opsinplane_cano

    In-plane operators (canonical)

    type(inplane_operators_t), intent(in) :: opsinplane_stag

    In-plane operators (staggered)

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

    Filename, where parameters are possibly read from

    type(boundaries_braginskii_t), intent(inout) :: boundaries

    Boundary information for the BRAGINSKII model

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

    Electron density

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

    Electrostatic potential

    type(variable_t), intent(inout) :: vort

    Generalised vorticity

    type(variable_t), intent(inout) :: upar

    Parallel ion velocity

    type(variable_t), intent(inout) :: jpar

    Parallel current

    type(variable_t), intent(inout) :: apar

    Parallel electromagnetic potential

    type(variable_t), intent(inout) :: te

    Electron temperature

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

    Ion temperature


Subroutines

public subroutine build_braginskii_initial_state(comm_handler, equi, equi_on_cano, equi_on_stag, mesh_cano, mesh_stag, hsolver_cano, hsolver_stag, map, penalisation_cano, penalisation_stag, polars_cano, polars_stag, opsinplane_cano, opsinplane_stag, init_select, filename, snaps, boundaries, isnaps, tau, ne, pot, vort, upar, jpar, apar, apar_fluct, te, ti)

Builds initial state

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), intent(in) :: comm_handler

Communicators

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

Equilibrium

class(equilibrium_storage_t), intent(in) :: equi_on_cano

Equilibrim quantities on canonical mesh

class(equilibrium_storage_t), intent(in) :: equi_on_stag

Equilibrim quantities on staggered mesh

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

Mesh (canonical)

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

Mesh (staggered)

class(helmholtz_solver_t), intent(inout) :: hsolver_cano

Elliptic (2D) solver on canonical mesh

class(helmholtz_solver_t), intent(inout) :: hsolver_stag

Elliptic (2D) solver on staggered mesh

type(parallel_map_t), intent(in) :: map

Parallel map

type(penalisation_t), intent(in) :: penalisation_cano

Penalisation (canonical)

type(penalisation_t), intent(in) :: penalisation_stag

Penalisation (staggered)

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

Polar grid and operators (canonical)

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

Polar grid and operators (staggered)

type(inplane_operators_t), intent(in) :: opsinplane_cano

In-plane operators (canonical)

type(inplane_operators_t), intent(in) :: opsinplane_stag

In-plane operators (staggered)

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

Type of initial state

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

Filename, where parameters are possibly read from

type(snapshot_t), intent(in) :: snaps

Snapshot, where initial state is possibly read from

type(boundaries_braginskii_t), intent(inout) :: boundaries

Boundary information for the BRAGINSKII model

integer, intent(out) :: isnaps

Snapshot number

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

Time of initial state

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

Electron density

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

Electrostatic potential

type(variable_t), intent(inout) :: vort

Generalised vorticity

type(variable_t), intent(inout) :: upar

Parallel ion velocity

type(variable_t), intent(inout) :: jpar

Parallel current

type(variable_t), intent(inout) :: apar

Parallel electromagnetic potential

type(variable_t), intent(inout) :: apar_fluct

Fluctuation of apar used for flutter operators

type(variable_t), intent(inout) :: te

Electron temperature

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

Ion temperature

public subroutine initialise_timesteppers(mesh_cano, mesh_stag, tstep_order, dtau, tstep_continuity, tstep_vort, tstep_parmom, tstep_ohm, tstep_etemp, tstep_itemp)

Initialises the timesteppers. This automatically will use a lower-order method for the first few timesteps to fill the storage

Arguments

Type IntentOptional Attributes Name
type(mesh_cart_t), intent(in) :: mesh_cano

Mesh (canonical)

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

Mesh (staggered)

integer, intent(in) :: tstep_order

Order of time-stepping scheme

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

Time-step size (base, not bdf)

type(karniadakis_t), intent(inout) :: tstep_continuity

Time integrator for continuity equation

type(karniadakis_t), intent(inout) :: tstep_vort

Time-step integrator for vorticity equation

type(karniadakis_t), intent(inout) :: tstep_parmom

Time-step integrator for parallel momentum equation

type(karniadakis_t), intent(inout) :: tstep_ohm

Time-step integrator for Ohm's law

type(karniadakis_t), intent(inout) :: tstep_etemp

Time-step integrator for electron temperature equation

type(karniadakis_t), intent(inout) :: tstep_itemp

Time-step integrator for ion temperature equation

public subroutine initialise_timesteppers_with_mms(equi, mesh_cano, mesh_stag, tstep_order, dtau, tstep_continuity, tstep_vort, tstep_parmom, tstep_ohm, tstep_etemp, tstep_itemp)

Initialise the timesteppers, and fills their storage with the MMS solution and derivative at previous "timesteps" (which have t < 0)

Arguments

Type IntentOptional Attributes Name
class(equilibrium_t), intent(inout) :: equi

Equilibrium

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

Mesh (canonical)

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

Mesh (staggered)

integer, intent(in) :: tstep_order

Order of time-stepping scheme

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

Time-step size (base, not bdf)

type(karniadakis_t), intent(inout) :: tstep_continuity

Time integrator for continuity equation

type(karniadakis_t), intent(inout) :: tstep_vort

Time-step integrator for vorticity equation

type(karniadakis_t), intent(inout) :: tstep_parmom

Time-step integrator for parallel momentum equation

type(karniadakis_t), intent(inout) :: tstep_ohm

Time-step integrator for Ohm's law

type(karniadakis_t), intent(inout) :: tstep_etemp

Time-step integrator for electron temperature equation

type(karniadakis_t), intent(inout) :: tstep_itemp

Time-step integrator for ion temperature equation

public subroutine init_braginskii_halos(comm_handler, ne, pot, vort, upar, jpar, apar, apar_fluct, te, ti)

Allocates halo points of Braginskii fields

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), intent(in) :: comm_handler

Communicators

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

Electron density

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

Electrostatic potential

type(variable_t), intent(inout) :: vort

Generalised vorticity

type(variable_t), intent(inout) :: upar

Parallel ion velocity

type(variable_t), intent(inout) :: jpar

Parallel current

type(variable_t), intent(inout) :: apar

Parallel electromagnetic potential

type(variable_t), intent(inout) :: apar_fluct

Fluctuation of apar used for flutter operators

type(variable_t), intent(inout) :: te

Electron temperature

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

Ion temperature