Used to represent the input configuration of species
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | exist | = | .false. |
Does the related namelist exist in the target input file? |
|
integer, | public | :: | index | = | 0 |
Used to hold the specific index of numbered namelists |
|
logical, | public | :: | skip_read | = | .false. |
Do we want to skip the read step in init? |
|
logical, | public | :: | skip_broadcast | = | .false. |
Do we want to skip the broadcast step in init? |
|
real, | public | :: | bess_fac | = | 1.0 |
Multiplies the argument of the Bessel function for this species. Useful for exploring the effect of the Bessel functions. |
|
real, | public | :: | dens | = | 1.0 |
Set the normalised density for this species |
|
real, | public | :: | dens0 | = | 1.0 |
Parameter used for a few specific initial condition types. TodoConsider moving this parameter to init_g_knobs. |
|
character(len=20), | public | :: | f0type | = | "default" |
Select which type of background distribution should be assumed for this species. Must be one of:
See G. Wilkie thesis. |
|
real, | public | :: | fprim | = | 2.2 |
Normalised inverse density gradient: (Note here is the normalised radius . |
|
real, | public | :: | mass | = | 1.0 |
Normalised mass of this species |
|
real, | public | :: | nu_h | = | 0.0 |
Set the species hyper collision frequency used in the pitch
angle scattering collision operator if
[[collision_knobs::hypermult]] is |
|
real, | public | :: | temp | = | 1.0 |
Set the normalised species temperature |
|
real, | public | :: | tpar0 | = | 0. |
Parameter used for a few specific initial condition types. TodoConsider moving this parameter to init_g_knobs. |
|
real, | public | :: | tperp0 | = | 0. |
Parameter used for a few specific initial condition types. TodoConsider moving this parameter to init_g_knobs. |
|
real, | public | :: | tprim | = | 6.9 |
Normalised inverse temperature gradient: (Note here is the normalised radius . |
|
character(len=20), | public | :: | type | = | "default" |
Sets the characterisation of the species. Should be one of
This primarily controls the treatment in the collision operator, the detection of adiabatic species. Tracer species do not contribute to velocity space integrals. |
|
real, | public | :: | u0 | = | 1.0 |
Parameter used for a few specific initial condition types. TodoConsider moving this parameter to init_g_knobs. |
|
real, | public | :: | uprim | = | 0.0 |
Controls an energy independent part of a source term. NoteDocumentation needs improving, looks like it's an early attempt at adding in the parallel flow shear drive term. This effectively provides a constant offset to the parallel flow shear term, allowing one to add a species dependent shift. |
|
real, | public | :: | uprim2 | = | 0.0 |
Controls an energy dependent part of a source term. NoteDocumentation needs improving, looks like it's an early attempt at adding in the parallel flow shear drive term. This effectively provides a energy dependent offset to the parallel flow shear term, allowing one to add a species and energy dependent shift. |
|
real, | public | :: | vcprim | = | -999.9 |
Part of the |
|
real, | public | :: | vcrit | = | -1.0 |
Part of the |
|
real, | public | :: | vnewk | = | 0.0 |
Sets the normalised species-species collisionality
frequency. For species s, |
|
real, | public | :: | z | = | 1.0 |
Normalised species charge |
Is this instance initialised?
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
Fully initialise the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(inout) | :: | self | |||
character(len=*), | intent(in), | optional | :: | name | ||
logical, | intent(in), | optional | :: | requires_index | ||
integer, | intent(in), | optional | :: | index |
Do some standard setup/checking
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(inout) | :: | self | |||
character(len=*), | intent(in), | optional | :: | name | ||
logical, | intent(in), | optional | :: | requires_index | ||
integer, | intent(in), | optional | :: | index |
Write the namelist header for this instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
integer, | intent(in) | :: | unit |
Returns the namelist name. Not very useful at the moment but may want to do more interesting things in the future
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
Returns the requires_index value. Allows access whilst keeping the variable private
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
Write the namelist footer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type character
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
character(len=*), | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type real
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
real, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type complex
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
complex, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type integer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
integer, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type logical
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
logical, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type real array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
real, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type complex array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
complex, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type integer array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
integer, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Reads in the species_parameters namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(species_element_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(species_element_config_type), | intent(in) | :: | self | |||
integer, | intent(in), | optional | :: | unit |
Resets the config object to the initial empty state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(species_element_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(species_element_config_type), | intent(inout) | :: | self |
Gets the default name for this namelist
Gets the default requires index for this namelist
type, extends(abstract_config_type) :: species_element_config_type
! namelist : species_parameters
! indexed : true
!> Multiplies the argument of the Bessel function for this
!> species. Useful for exploring the effect of the Bessel
!> functions.
real :: bess_fac = 1.0
!> Set the normalised density for this species
real :: dens = 1.0
!> Parameter used for a few specific initial condition types.
!>
!> @todo Consider moving this parameter to [[init_g_knobs]].
real :: dens0 = 1.0
!> Select which type of background distribution should be assumed
!> for this species. Must be one of:
!>
!> - 'default' : equivalent to maxwellian
!> - 'maxwellian' : Standard maxwellian
!> - 'tabulated' : A general tabulated form
!> - 'sdanalytic' : A analytic slowing down form.
!>
!> See [G. Wilkie
!> thesis](https://drum.lib.umd.edu/handle/1903/17302).
character(len = 20) :: f0type = "default"
!> Normalised inverse density gradient: \(-\frac{1}{n}\frac{dn}{d
!> \rho_N}\) (Note here \(\rho_N\) is the normalised radius
!> \(\frac{\rho}{L_\textrm{ref}}\).
real :: fprim = 2.2
!> Normalised mass of this species
real :: mass = 1.0
!> Set the species hyper collision frequency used in the pitch
!> angle scattering collision operator if
!> [[collision_knobs::hypermult]] is `true`.
real :: nu_h = 0.0
!> Set the normalised species temperature
real :: temp = 1.0
!> Parameter used for a few specific initial condition types.
!>
!> @todo Consider moving this parameter to [[init_g_knobs]].
real :: tpar0 = 0.
!> Parameter used for a few specific initial condition types.
!>
!> @todo Consider moving this parameter to [[init_g_knobs]].
real :: tperp0 = 0.
!> Normalised inverse temperature gradient: \(-\frac{1}{T}\frac{dT}{d
!> \rho_N}\) (Note here \(\rho_N\) is the normalised radius
!> \(\frac{\rho}{L_\textrm{ref}}\).
real :: tprim = 6.9
!> Sets the characterisation of the species. Should be one of
!>
!> - 'ion' : Thermal ion species
!> - 'default' : Same as 'ion'
!> - 'electron' : Thermal electron species
!> - 'e' : Same as 'electron'
!> - 'trace' : Tracer species
!> - 'hybrid_electron' : Adiabatic passing electrons, full
!> trapped electron treatment. *NOTE: This option is currently
!> considered experimental and is intended for use in
!> electrostatic simulations.*
!>
!> This primarily controls the treatment in the collision
!> operator, the detection of adiabatic species. Tracer species
!> do not contribute to velocity space integrals.
character(len = 20) :: type = "default"
!> Parameter used for a few specific initial condition types.
!>
!> @todo Consider moving this parameter to [[init_g_knobs]].
real :: u0 = 1.0
!> Controls an energy independent part of a source term.
!>
!> @note Documentation needs improving, looks like it's an early
!> attempt at adding in the parallel flow shear drive term. This
!> effectively provides a constant offset to the parallel flow
!> shear term, allowing one to add a species dependent shift.
real :: uprim = 0.0
!> Controls an energy dependent part of a source term.
!>
!> @note Documentation needs improving, looks like it's an early
!> attempt at adding in the parallel flow shear drive term. This
!> effectively provides a energy dependent offset to the parallel
!> flow shear term, allowing one to add a species and energy
!> dependent shift.
real :: uprim2 = 0.0
!> Part of the `sdanalytic` slowing down model. See [G. Wilkie
!> thesis](https://drum.lib.umd.edu/handle/1903/17302).
real :: vcprim = -999.9
!> Part of the `sdanalytic` slowing down model. See [G. Wilkie
!> thesis](https://drum.lib.umd.edu/handle/1903/17302).
real :: vcrit = -1.0
!> Sets the normalised species-species collisionality
!> frequency. For species s, `vnewk = nu_ss Lref/vref` where Lref
!> is the reference length, `vref` is the reference thermal speed
!> (not the thermal speed of species s!), \(\nu_{ss}=\sqrt{2}\pi
!> n_s Z_s^4 e^4 \log(\lambda)/\sqrt{m_s}T^{3/2}_s\) is a
!> dimensional collision frequency, e is the proton charge,
!> \(\log(\lambda)\) is the Coloumb logarithm, and
!> \(Z_s,T_s,n_s,m_s\) are the (charge, temperature, density,
!> mass) of species s. (The dimensional collision frequency given
!> here is in Gaussian units. For SI units, include an extra
!> factor \((4\pi\epsilon_0)^2\) in the denominator of the
!> definition of \(\nu_{ss}\).
real :: vnewk = 0.0
!> Normalised species charge
real :: z = 1.0
contains
procedure, public :: read => read_species_element_config
procedure, public :: write => write_species_element_config
procedure, public :: reset => reset_species_element_config
procedure, public :: broadcast => broadcast_species_element_config
procedure, public, nopass :: get_default_name => get_default_name_species_element_config
procedure, public, nopass :: get_default_requires_index => get_default_requires_index_species_element_config
end type species_element_config_type