Skip to content

adam_prism_plasma_frequencies_object ​

Source: src/app/prism/common/adam_prism_plasma_frequencies_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
DT_SOURCE_CFLcharacter(len=3)parameterdt set by the fields (CFL, GLM, PML).
DT_SOURCE_PLASMAcharacter(len=18)parameterdt set by the plasma frequencies.

Derived Types ​

prism_plasma_frequencies_object ​

Components ​

NameTypeAttributesDescription
activelogicalPIC model: frequencies evaluated and the limit applied.
omega_dt_maxreal(kind=R8P)Accuracy threshold on omega_max dt.
beta_ireal(kind=R8P)Imaginary-axis stability bound of the RK scheme (0: none).
single_steplogicalField and PIC time schemes are single-step RK (dt may vary).
inv_epsreal(kind=R8P)1/eps0 (1 for the non-dimensional models).
wpereal(kind=R8P)Max electron plasma frequency [rad/s].
wpireal(kind=R8P)Max ion plasma frequency [rad/s].
wcereal(kind=R8P)Max electron cyclotron frequency [rad/s].
wcireal(kind=R8P)Max ion cyclotron frequency [rad/s].
wuhreal(kind=R8P)Upper hybrid frequency [rad/s].
wlhreal(kind=R8P)Lower hybrid frequency [rad/s].
wrreal(kind=R8P)R cutoff [rad/s].
wlreal(kind=R8P)L cutoff [rad/s].
woreal(kind=R8P)O cutoff (= omega_pe) [rad/s].
wmaxreal(kind=R8P)Highest characteristic frequency (omega_R) [rad/s].
transitreal(kind=R8P)Max over the particles of max_d |v_d|/dx_d [1/s].
wp2real(kind=R8P)allocatableCPU work: omega_p^2 per interior cell [2,ni,nj,nk,nb].

Type-Bound Procedures ​

NameAttributesDescription
initializepass(self)
descriptionpass(self)
compute_cpupass(self)
set_maximapass(self)
dt_limitpass(self)
dt_sourcepass(self)
check_steppass(self)

Subroutines ​

initialize ​

Activate for the PIC models, read the threshold from pic, set beta_I from the RK scheme.

fortran
subroutine initialize(self, pic, physics, numerics, rk_scheme)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inoutPlasma frequencies.
pictype(prism_pic_object)inPIC (omega_dt_max, time scheme).
physicstype(prism_physics_object)inPhysics.
numericstype(prism_numerics_object)inNumerics (field time scheme).
rk_schemecharacter(len=*)inRK scheme name.

Call graph

compute_cpu ​

Local maxima on the CPU, then the global ones (set_maxima, collective).

fortran
subroutine compute_cpu(self, pic, field, q_pic, pic_fields, blocks_number, ni, nj, nk)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inoutPlasma frequencies.
pictype(prism_pic_object)inPIC (particles, neighbour list).
fieldtype(field_object)inField (cell sizes).
q_picreal(kind=R8P)inParticles [8,np].
pic_fieldsreal(kind=R8P)inFields at the particles [6,np].
blocks_numberinteger(kind=I4P)inBlocks of this rank.
niinteger(kind=I4P)inBlock cells.
njinteger(kind=I4P)inBlock cells.
nkinteger(kind=I4P)inBlock cells.

Call graph

set_maxima ​

Reduce the local maxima over the ranks (collective) and derive the composite frequencies (section 3).

fortran
subroutine set_maxima(self, wpe2, wpi2, wce, wci, transit)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inoutPlasma frequencies.
wpe2real(kind=R8P)inLocal max omega_pe^2.
wpi2real(kind=R8P)inLocal max omega_pi^2.
wcereal(kind=R8P)inLocal max Omega_ce.
wcireal(kind=R8P)inLocal max Omega_ci.
transitreal(kind=R8P)inLocal max |v|/dx.

Call graph

check_step ​

Stop when the particles cross more than one cell per step, or when the plasma limit acts on a constant-dt scheme.

fortran
subroutine check_step(self, dt)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inPlasma frequencies.
dtreal(kind=R8P)inGlobal step.

Call graph

Functions ​

description ​

Frequencies, omega dt and the transit, for the log.

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inPlasma frequencies.

Call graph

dt_limit ​

The step: dt_CFL while omega_max dt_CFL < omega_dt_max, otherwise the accuracy limit (and the RK stability bound).

Attributes: pure

Returns: real(kind=R8P)

fortran
function dt_limit(self, dt_cfl) result(dt)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inPlasma frequencies.
dt_cflreal(kind=R8P)inStep limited by the fields.

Call graph

dt_source ​

'plasma_frequencies' when the global step is the plasma limit, 'CFL' otherwise.

Attributes: pure

Returns: character(len=:)

fortran
function dt_source(self, dt) result(source)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inPlasma frequencies.
dtreal(kind=R8P)inGlobal step (forest reduction).

Call graph