Appearance
adam_prism_plasma_frequencies_object
Source: src/app/prism/common/adam_prism_plasma_frequencies_object.F90
Dependencies
Contents
- prism_plasma_frequencies_object
- initialize
- compute_cpu
- set_maxima
- check_step
- description
- dt_limit
- dt_source
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
DT_SOURCE_CFL | character(len=3) | parameter | dt set by the fields (CFL, GLM, PML). |
DT_SOURCE_PLASMA | character(len=18) | parameter | dt set by the plasma frequencies. |
Derived Types
prism_plasma_frequencies_object
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
active | logical | PIC model: frequencies evaluated and the limit applied. | |
omega_dt_max | real(kind=R8P) | Accuracy threshold on omega_max dt. | |
beta_i | real(kind=R8P) | Imaginary-axis stability bound of the RK scheme (0: none). | |
single_step | logical | Field and PIC time schemes are single-step RK (dt may vary). | |
inv_eps | real(kind=R8P) | 1/eps0 (1 for the non-dimensional models). | |
wpe | real(kind=R8P) | Max electron plasma frequency [rad/s]. | |
wpi | real(kind=R8P) | Max ion plasma frequency [rad/s]. | |
wce | real(kind=R8P) | Max electron cyclotron frequency [rad/s]. | |
wci | real(kind=R8P) | Max ion cyclotron frequency [rad/s]. | |
wuh | real(kind=R8P) | Upper hybrid frequency [rad/s]. | |
wlh | real(kind=R8P) | Lower hybrid frequency [rad/s]. | |
wr | real(kind=R8P) | R cutoff [rad/s]. | |
wl | real(kind=R8P) | L cutoff [rad/s]. | |
wo | real(kind=R8P) | O cutoff (= omega_pe) [rad/s]. | |
wmax | real(kind=R8P) | Highest characteristic frequency (omega_R) [rad/s]. | |
transit | real(kind=R8P) | Max over the particles of max_d |v_d|/dx_d [1/s]. | |
wp2 | real(kind=R8P) | allocatable | CPU work: omega_p^2 per interior cell [2,ni,nj,nk,nb]. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
initialize | pass(self) | |
description | pass(self) | |
compute_cpu | pass(self) | |
set_maxima | pass(self) | |
dt_limit | pass(self) | |
dt_source | pass(self) | |
check_step | pass(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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_plasma_frequencies_object) | inout | Plasma frequencies. | |
pic | type(prism_pic_object) | in | PIC (omega_dt_max, time scheme). | |
physics | type(prism_physics_object) | in | Physics. | |
numerics | type(prism_numerics_object) | in | Numerics (field time scheme). | |
rk_scheme | character(len=*) | in | RK 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_plasma_frequencies_object) | inout | Plasma frequencies. | |
pic | type(prism_pic_object) | in | PIC (particles, neighbour list). | |
field | type(field_object) | in | Field (cell sizes). | |
q_pic | real(kind=R8P) | in | Particles [8,np]. | |
pic_fields | real(kind=R8P) | in | Fields at the particles [6,np]. | |
blocks_number | integer(kind=I4P) | in | Blocks of this rank. | |
ni | integer(kind=I4P) | in | Block cells. | |
nj | integer(kind=I4P) | in | Block cells. | |
nk | integer(kind=I4P) | in | Block 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_plasma_frequencies_object) | inout | Plasma frequencies. | |
wpe2 | real(kind=R8P) | in | Local max omega_pe^2. | |
wpi2 | real(kind=R8P) | in | Local max omega_pi^2. | |
wce | real(kind=R8P) | in | Local max Omega_ce. | |
wci | real(kind=R8P) | in | Local max Omega_ci. | |
transit | real(kind=R8P) | in | Local 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_plasma_frequencies_object) | in | Plasma frequencies. | |
dt | real(kind=R8P) | in | Global step. |
Call graph
Functions
description
Frequencies, omega dt and the transit, for the log.
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_plasma_frequencies_object) | in | Plasma 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_plasma_frequencies_object) | in | Plasma frequencies. | |
dt_cfl | real(kind=R8P) | in | Step 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_plasma_frequencies_object) | in | Plasma frequencies. | |
dt | real(kind=R8P) | in | Global step (forest reduction). |
Call graph