Skip to content

adam_prism_particle_injection_object

ADAM, PRISM Particle-in-Cell class definition, CPU backend.

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

Dependencies

Contents

Variables

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=18)parameter
SPACE_RANDOM_NUMBER_GENERATORcharacter(len=29)parameter
SPACE_LAYERED_NUMBER_GENERATORcharacter(len=30)parameter
UNIFORM_MAXWELLIAN_VELOCITY_DISTRIBUTIONcharacter(len=18)parameter
NON_UNIFORM_MAXWELLIAN_VELOCITY_DISTRIBUTIONcharacter(len=22)parameter
PURE_DRIFT_VELOCITY_DISTRIBUTIONcharacter(len=10)parameter
VELOCITY_RANDOM_NUMBER_GENERATORcharacter(len=32)parameter
VELOCITY_LAYERED_NUMBER_GENERATORcharacter(len=33)parameter
space_rand_num_generator procedure(space_random_number_generator_interface)pointerSpace random number
velocity_rand_num_generatorprocedure(velocity_random_number_generator_interface)pointerSpace random number

Derived Types

prism_particle_injection_object

Components

NameTypeAttributesDescription
space_random_number_generatorcharacter(len=99)Type of random number generator for space distribution
box_numberreal(kind=R8P)Number of boxes in which ensure charge neutrality
space_pairinglogicalEnable space pairing of particles
electrons_velocity_distributioncharacter(len=99)Electrons velocity distribution type.
ions_velocity_distributioncharacter(len=99)Ions velocity distribution type.
neutrals_velocity_distributioncharacter(len=99)Neutrals velocity distribution type.
T_ireal(kind=R8P)Ionic plasma temperature (uniform)
T_i_xreal(kind=R8P)Ionic plasma temperature along x (non-uniform)
T_i_yreal(kind=R8P)Ionic plasma temperature along y (non-uniform)
T_i_zreal(kind=R8P)Ionic plasma temperature along z (non-uniform)
T_ereal(kind=R8P)Electronic plasma temperature (uniform)
T_e_xreal(kind=R8P)Electronic plasma temperature along x (non-uniform)
T_e_yreal(kind=R8P)Electronic plasma temperature along y (non-uniform)
T_e_zreal(kind=R8P)Electronic plasma temperature along z (non-uniform)
T_nreal(kind=R8P)Neutrals plasma temperature (uniform)
T_n_xreal(kind=R8P)Neutrals plasma temperature along x (non-uniform)
T_n_yreal(kind=R8P)Neutrals plasma temperature along y (non-uniform)
T_n_zreal(kind=R8P)Neutrals plasma temperature along z (non-uniform)
x_positionreal(kind=R8P)x coordinate of the initial position of the particle in single particle problem
y_positionreal(kind=R8P)y coordinate of the initial position of the particle in single particle problem
z_positionreal(kind=R8P)z coordinate of the initial position of the particle in single particle problem
chargereal(kind=R8P)charge of the particle in single particle problem
massreal(kind=R8P)mass of the particle in single particle problem
velocity_random_number_generatorcharacter(len=99)Type of random number generator for space distribution
velocity_pairinglogicalEnable space pairing of particles
v_drift_xreal(kind=R8P)Single particle drift velocity along x
v_drift_yreal(kind=R8P)Single particle drift_velocity along y
v_drift_zreal(kind=R8P)Single particle drift velocity along z
electrons_drift_xreal(kind=R8P)Electrons drift velocity along x
electrons_drift_yreal(kind=R8P)Electrons drift_velocity along y
electrons_drift_zreal(kind=R8P)Electrons drift velocity along z
ions_drift_xreal(kind=R8P)Ions drift velocity along x
ions_drift_yreal(kind=R8P)Ions drift_velocity along y
ions_drift_zreal(kind=R8P)Ions drift velocity along z
neutrals_drift_xreal(kind=R8P)Neutrals drift velocity along x
neutrals_drift_yreal(kind=R8P)Neutrals drift_velocity along y
neutrals_drift_zreal(kind=R8P)Neutrals drift velocity along z
v_av_correctionlogicalFlag to correct the average v
particle_space_injection procedure(particle_space_injection_interface)pass(self), pointerParticle space injection.
electrons_velocity_injectionprocedure(electrons_velocity_injection_interface)pass(self), pointerElectrons velocity injection.
ions_velocity_injectionprocedure(ions_velocity_injection_interface)pass(self), pointerIons velocity injection.
neutrals_velocity_injectionprocedure(neutrals_velocity_injection_interface)pass(self), pointerNeutrals velocity injection.

Type-Bound Procedures

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize IC.
load_from_filepass(self)Load config from file.
set_particle_initial_injectionpass(self)
uniform_domain_space_injectionpass(self)
uniform_cilinder_space_injectionpass(self)
uniform_cell_space_injectionpass(self)
uniform_maxwellian_velocity_injectionpass(self)
non_uniform_maxwellian_velocity_injectionpass(self)
pure_drift_velocity_injectionpass(self)
single_particle_injectionpass(self)

Interfaces

particle_space_injection_interface

space_random_number_generator_interface

electrons_velocity_injection_interface

ions_velocity_injection_interface

neutrals_velocity_injection_interface

velocity_random_number_generator_interface

Subroutines

initialize

Initialize particle_injection.

fortran
subroutine initialize(self, file_parameters, pic)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inoutExternal fields.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
pictype(prism_pic_object)inPic object

Call graph

load_from_file

Load PIC configuration from file.

fortran
subroutine load_from_file(self, file_parameters, pic, go_on_fail)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inoutParticle injection object.
file_parameterstype(file_ini)inFile handler.
pictype(prism_pic_object)inPIC object
go_on_faillogicalinoptionalGo on if load fails.

Call graph

set_particle_initial_injection

fortran
subroutine set_particle_initial_injection(self, field, grid, pic, q_pic)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inout
fieldtype(field_object)in
gridtype(grid_object)in
pictype(prism_pic_object)inout
q_picreal(kind=R8P)inout

Call graph

single_particle_injection

fortran
subroutine single_particle_injection(self, q_pic)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inout
q_picreal(kind=R8P)inout

Call graph

uniform_domain_space_injection

fortran
subroutine uniform_domain_space_injection(self, field, grid, pic, q_pic)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inout
fieldtype(field_object)in
gridtype(grid_object)inGrid (sibling realm component, threaded in).
pictype(prism_pic_object)in
q_picreal(kind=R8P)inout

Call graph

uniform_cilinder_space_injection

fortran
subroutine uniform_cilinder_space_injection(self, field, grid, pic, q_pic)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inout
fieldtype(field_object)in
gridtype(grid_object)inGrid (sibling realm component, threaded in).
pictype(prism_pic_object)in
q_picreal(kind=R8P)inout

Call graph

cylindrical_to_cartesian

Convert cylindrical coordinates to cartesian coordinates with respect to the coil center and normal direction.

Attributes: pure

fortran
subroutine cylindrical_to_cartesian(r, theta, axial, x_c, y_c, z_c, normal, x, y, z)

Arguments

NameTypeIntentAttributesDescription
rreal(kind=R8P)in
thetareal(kind=R8P)in
axialreal(kind=R8P)in
x_creal(kind=R8P)in
y_creal(kind=R8P)in
z_creal(kind=R8P)in
normalcharacter(len=1)in
xreal(kind=R8P)out
yreal(kind=R8P)out
zreal(kind=R8P)out

Call graph

uniform_cell_space_injection

fortran
subroutine uniform_cell_space_injection(self, field, grid, pic, q_pic)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inout
fieldtype(field_object)in
gridtype(grid_object)inGrid (sibling realm component, threaded in).
pictype(prism_pic_object)in
q_picreal(kind=R8P)inout

Call graph

uniform_maxwellian_velocity_injection

fortran
subroutine uniform_maxwellian_velocity_injection(self, field, grid, pic, q_pic, particle_type)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inout
fieldtype(field_object)in
gridtype(grid_object)inGrid (sibling realm component, threaded in).
pictype(prism_pic_object)in
q_picreal(kind=R8P)inout
particle_typecharacter(len=1)in

Call graph

non_uniform_maxwellian_velocity_injection

fortran
subroutine non_uniform_maxwellian_velocity_injection(self, field, grid, pic, q_pic, particle_type)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inout
fieldtype(field_object)in
gridtype(grid_object)inGrid (sibling realm component, threaded in).
pictype(prism_pic_object)in
q_picreal(kind=R8P)inout
particle_typecharacter(len=1)in

Call graph

pure_drift_velocity_injection

Inject a particle distribution with a uniform drift velocity

fortran
subroutine pure_drift_velocity_injection(self, field, grid, pic, q_pic, particle_type)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inout
fieldtype(field_object)in
gridtype(grid_object)inGrid (sibling realm component, threaded in).
pictype(prism_pic_object)in
q_picreal(kind=R8P)inout
particle_typecharacter(len=1)in

Call graph

write_initial_injection_tab

fortran
subroutine write_initial_injection_tab(filename, q_pic, np)

Arguments

NameTypeIntentAttributesDescription
filenamecharacter(len=*)in
q_picreal(kind=R8P)in
npinteger(kind=I4P)in

Call graph

random_number_generator

fortran
subroutine random_number_generator(N, shuffled_list, i_numb, r_n)

Arguments

NameTypeIntentAttributesDescription
Ninteger(kind=I4P)in
shuffled_listinteger(kind=I4P)inout
i_numbinteger(kind=I4P)in
r_nreal(kind=R8P)inout

layered_number_generator

fortran
subroutine layered_number_generator(N, shuffled_list, i_numb, r_n)

Arguments

NameTypeIntentAttributesDescription
Ninteger(kind=I4P)in
shuffled_listinteger(kind=I4P)inout
i_numbinteger(kind=I4P)in
r_nreal(kind=R8P)inout

Call graph

add_drift_velocity

fortran
subroutine add_drift_velocity(q_pic, v_drift)

Arguments

NameTypeIntentAttributesDescription
q_picreal(kind=R8P)inout
v_driftreal(kind=R8P)in

Call graph

apply_vel_av_correction

fortran
subroutine apply_vel_av_correction(q_pic, v_drift)

Arguments

NameTypeIntentAttributesDescription
q_picreal(kind=R8P)inout
v_driftreal(kind=R8P)in

Call graph

Functions

description

Return a pretty-formatted object description.

Returns: character(len=:)

fortran
function description(self, pic) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_particle_injection_object)inExternal fields.
pictype(prism_pic_object)inPIC object

Call graph

fisher_yates_shuffle

Returns: integer(kind=I4P)

fortran
function fisher_yates_shuffle(index_list, nn) result(shuffled_list)

Arguments

NameTypeIntentAttributesDescription
index_listinteger(kind=I4P)in
nninteger(kind=I4P)in

Call graph