penalisation_braginskii_m Module


Uses


Contents


Subroutines

public subroutine logne_penalisation(equi, mesh_cano, map, penalisation_cano, logne, logne_pen_vals)

Sets the logarithmic-density penalisation values.

Arguments

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

Equilibrium

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

Mesh (canonical)

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

Parallel map

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

Penalisation (canonical)

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

Logarithmic density

real(kind=GP), intent(out), dimension(mesh_cano%get_n_points_inner()) :: logne_pen_vals

Penalisation values for the logarithmic density

public subroutine logte_penalisation(equi, mesh_cano, map, penalisation_cano, ne, te, logte, full_upar, logte_pen_vals)

Sets the logarithmic electron temperature penalisation values.

Arguments

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

Equilibrium

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

Mesh (canonical)

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

Parallel map

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

Penalisation (canonical)

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

Variables to compute penalisation values from, in order of left to right non-logarithmic density, electron temperature logarithmic electron temperature parallel ion velocity mapped onto the canonical grid

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

Variables to compute penalisation values from, in order of left to right non-logarithmic density, electron temperature logarithmic electron temperature parallel ion velocity mapped onto the canonical grid

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

Variables to compute penalisation values from, in order of left to right non-logarithmic density, electron temperature logarithmic electron temperature parallel ion velocity mapped onto the canonical grid

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

Variables to compute penalisation values from, in order of left to right non-logarithmic density, electron temperature logarithmic electron temperature parallel ion velocity mapped onto the canonical grid

real(kind=GP), intent(out), dimension(mesh_cano%get_n_points_inner()) :: logte_pen_vals

Penalisation values for the logarithmic electron temperature

public subroutine logti_penalisation(equi, mesh_cano, map, penalisation_cano, ne, ti, logti, full_upar, logti_pen_vals)

Sets the logarithmic ion temperature penalisation values.

Arguments

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

Equilibrium

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

Mesh (canonical)

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

Parallel map

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

Penalisation (canonical)

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

Variables to compute penalisation values from, in order of left to right non-logarithmic density, ion temperature logarithmic ion temperature parallel ion velocity mapped to the canonical grid

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

Variables to compute penalisation values from, in order of left to right non-logarithmic density, ion temperature logarithmic ion temperature parallel ion velocity mapped to the canonical grid

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

Variables to compute penalisation values from, in order of left to right non-logarithmic density, ion temperature logarithmic ion temperature parallel ion velocity mapped to the canonical grid

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

Variables to compute penalisation values from, in order of left to right non-logarithmic density, ion temperature logarithmic ion temperature parallel ion velocity mapped to the canonical grid

real(kind=GP), intent(out), dimension(mesh_cano%get_n_points_inner()) :: logti_pen_vals

Penalisation values for the logarithmic ion temperature

public subroutine upar_penalisation(equi, equi_on_stag, mesh_stag, map, penalisation_stag, opsinplane_stag, upar, stag_te, stag_ti, stag_pot, upar_pen_vals)

Sets the parallel velocity penalisation values.

Arguments

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

Equilibrium

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

Equilibrium quantites on staggered mesh

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

Mesh (staggered)

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

Parallel map

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

Penalisation (staggered)

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

In-plane operators (staggered)

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

Parallel velocity

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

Electron temperature on staggered grid

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

Ion temperature on staggered grid

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

Electrostatic potential on staggered grid

real(kind=GP), intent(out), dimension(mesh_stag%get_n_points_inner()) :: upar_pen_vals

Penalisation values for the parallel velocity

public subroutine vort_penalisation(equi, mesh_cano, map, penalisation_cano, vort, vort_pen_vals)

Sets the vorticity penalisation values.

Arguments

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

Equilibrium

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

Mesh (canonical)

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

Parallel map

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

Penalisation (canonical)

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

Vorticity

real(kind=GP), intent(out), dimension(mesh_cano%get_n_points_inner()) :: vort_pen_vals

Penalisation values for the vorticity

public subroutine pot_penalisation(equi, mesh_cano, map, penalisation_cano, te, pot_pen_vals)

Sets the electrostatic potential penalisation values. The boundary condition BND_BRAGTYPE_FLOATING_POTENTIAL_LOCAL should always be combined with a zero-current boundary condition

Arguments

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

Equilibrium

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

Mesh (canonical)

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

Parallel map

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

Penalisation (canonical)

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

Non-logarithmic electron temperature

real(kind=GP), intent(out), dimension(mesh_cano%get_n_points_inner()) :: pot_pen_vals

Penalisation values for the potential

public subroutine psipar_penalisation(comm_handler, equi, mesh_stag, hsolver_stag, map, penalisation_stag, jpar_t_extrapolate, nevar_adv_stag, apar_pen, psipar_pen_vals, sinfo, res)

Sets the penalisation values for the modified electromagnetic potential. Currently, the only option is to set a dirichelet-zero value, which penalised jpar and apar to zero at the boundary

Arguments

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

Communicators

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

Equilibrium

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

Mesh (staggered)

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_stag

Penalisation (staggered)

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

Guess for parallel current at timestep t+1 (e.g. extrapolated)

real(kind=GP), intent(in), dimension(mesh_stag%get_n_points()) :: nevar_adv_stag

Density at timestep t+1 on staggered grid

real(kind=GP), intent(inout), dimension(mesh_stag%get_n_points()) :: apar_pen

Penalisation values for the parallel electromagnetic potential Attention: dimension is n_points here for solver On input: initial guess

real(kind=GP), intent(out), dimension(mesh_stag%get_n_points_inner()) :: psipar_pen_vals

Penalisation values for the modified electromagnetic potential

integer, intent(out) :: sinfo

Info from solver

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

Residual of penalisation solve