KORC_PARAMS Derived Type

type, public :: KORC_PARAMS

This KORC derived type contains the variables that control KORC's core behavior.


Inherits

type~~korc_params~~InheritsGraph type~korc_params KORC_PARAMS type~charcs_params CHARCS_PARAMS type~korc_params->type~charcs_params cpp type~korc_mpi KORC_MPI type~korc_params->type~korc_mpi mpi_params

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
character(len=MAX_STRING_LENGTH), public :: path_to_inputs

Absolute path to KORC's input file.

character(len=MAX_STRING_LENGTH), public :: path_to_outputs

Absolute path to the outputs' folder.

integer, public :: num_omp_threads

Number of open MP threads per MPI process used in the simulation.

logical, public :: restart

Flag to indicate if the simulations proceeds (restart=T) or not (restart=F). Restart simulation that exited before simulation_time reached.

logical, public :: proceed

Flag to indicate if the simulations continues (proceed=T) or not (proceed=F). Append simulation results after previous simulation_time reached.

logical, public :: load_balance
logical, public :: reinit

Flag to begin a new simulation, reinitializing from restart file state

real(kind=rp), public :: simulation_time

Total simulation time in seconds.

real(kind=rp), public :: snapshot_frequency

Time between snapshots in time of the simulation.

real(kind=rp), public :: restart_overwrite_frequency

Time between overwrites of restart file in time of the simulation.

real(kind=rp), public :: dt

Time step in the simulation as a fraction of the relativistic electron gyro-period .

real(kind=rp), public :: time =0.0_rp

Current physical time in the simulation.

integer(kind=ip), public :: ito =0_ip

Initial time iteration in the simulation, this is different from zero in case is a restarting simulation.

integer(kind=ip), public :: it =0_ip

Current time iteration in the simulation, this is different from zero in case is a restarting simulation.

real(kind=rp), public :: init_time =0.0_rp

Time at the beginning of a run with proceed=T

integer(kind=ip), public :: t_steps
integer(kind=ip), public :: prev_iter_2x1t

Number of time steps needed for evolving the electrons up to "simulation_time".

integer(kind=ip), public :: t_skip
integer(kind=ip), public :: t_it_SC =1_ip
integer(kind=ip), public :: output_cadence
integer(kind=ip), public :: coll_per_dump
integer(kind=ip), public :: orbits_per_coll
real(kind=rp), public :: coll_per_dump_dt

Time iteration offset used to decide when the outputs are generated.

integer(kind=ip), public :: restart_output_cadence

Time iteration offset used to decide when the restart files are generated.

integer(kind=ip), public :: coll_cadence
integer(kind=ip), public :: num_snapshots

Number of snapshots in time for generating the output files.

integer, public :: num_species

Number of different populations of simulated relativistic electrons in KORC.

real(kind=rp), public :: minimum_particle_energy

Minimum allowed energy of simulated electrons.

real(kind=rp), public :: minimum_particle_g

Minimum allowed relativistic factor of simulated electrons.

logical, public :: radiation

Flag to indicate if synchrotron radiation losses are included (radiation=T) or not (radiation=F).

logical, public :: collisions

Flag to indicate if collisionsare included (collisions=T) or not (collisions=F).

logical, public :: LargeCollisions
character(len=MAX_STRING_LENGTH), public :: GC_rad_model
character(len=MAX_STRING_LENGTH), public :: collisions_model

String with the name of the collisions model to be used in the simulation.

character(len=MAX_STRING_LENGTH), public :: bound_electron_model
character(len=MAX_STRING_LENGTH), public :: field_model
character(len=MAX_STRING_LENGTH), public :: profile_model

String with the name of the model for the fields and plasma profiles.

character(len=MAX_STRING_LENGTH), public :: magnetic_field_filename
character(len=MAX_STRING_LENGTH), public :: magnetic_field_directory
character(len=MAX_STRING_LENGTH), public :: magnetic_field_list
character(len=MAX_STRING_LENGTH), public, DIMENSION(:), ALLOCATABLE:: magnetic_field_filenames
real(kind=rp), public, DIMENSION(:), ALLOCATABLE:: time_of_filenames

String with the name of the model for the fields and plasma profiles.

character(len=MAX_STRING_LENGTH), public, DIMENSION(:), ALLOCATABLE:: outputs_list

List of electron variables to include in the outputs.

integer, public :: HDF5_error_handling

Flag to indicate whether we allow HDF5 to show warnings during runtime (HDF5_error_handling=1) or not (HDF5_error_handling=0)

type(KORC_MPI), public :: mpi_params

An instance of the KORC_MPI derived type.

type(CHARCS_PARAMS), public :: cpp

An instance of the CHARCS_PARAMS derived type.

logical, public :: FO_GC_compare
character(len=MAX_STRING_LENGTH), public :: orbit_model

String with the name of the orbit model ('FO' or 'GC').

character(len=MAX_STRING_LENGTH), public :: field_eval

String with the name of the field evaluation method for analytical fields ('interp' or 'eqn')

logical, public :: GC_coords

Flag to get_fields to control whether cartesian to cylindrical coordinate transformation needs to be performed

logical, public :: FokPlan

Flag to decouple spatial-dependence of evolution

logical, public :: SameRandSeed
logical, public :: SC_E
logical, public :: SC_E_add
integer, public :: time_slice
real(kind=rp), public :: rmax
real(kind=rp), public :: rmin
real(kind=rp), public :: zmax
real(kind=rp), public :: zmin
integer, public :: pchunk

number of particles per vectorized chunk

integer, public :: num_impurity_species
real(kind=rp), public, DIMENSION(:), ALLOCATABLE:: Zj
real(kind=rp), public :: gam_min

Source Code

  TYPE, PUBLIC :: KORC_PARAMS
     !! @note Core KORC parameters. @endnote
     !!  This KORC derived type contains the variables that control KORC's
     !! core behavior.

     CHARACTER(MAX_STRING_LENGTH) :: path_to_inputs 
     !! Absolute path to KORC's input file.
     CHARACTER(MAX_STRING_LENGTH) :: path_to_outputs 
     !! Absolute path to the outputs' folder.
     INTEGER 			:: num_omp_threads 
     !! Number of open MP threads per MPI process used in the simulation.
     LOGICAL 			:: restart 
     !! Flag to indicate if the simulations proceeds (restart=T) or not
     !! (restart=F). Restart simulation that exited before simulation_time
     !! reached.
     LOGICAL 			:: proceed 
     !! Flag to indicate if the simulations continues (proceed=T) or not
     !! (proceed=F). Append simulation results after previous simulation_time
     !! reached.
     LOGICAL 			:: load_balance
     LOGICAL  :: reinit
     !! Flag to begin a new simulation, reinitializing from restart file state
     REAL(rp) 			:: simulation_time 
     !! Total simulation time in seconds.
     REAL(rp) 			:: snapshot_frequency 
     !! Time between snapshots in time of the simulation.
     REAL(rp) 			:: restart_overwrite_frequency 
     !! Time between overwrites of restart file in time of the simulation.
     REAL(rp) 			:: dt 
     !! Time step in the simulation as a fraction of the relativistic electron
     !! gyro-period \(\tau_e = 2\pi\gamma m_e/eB_0\).
     REAL(rp) 			:: time = 0.0_rp 
     !! Current physical time in the simulation.
     INTEGER(ip) 			:: ito = 0_ip 
     !! Initial time iteration in the simulation, this is different from zero
     !! in case is a restarting simulation.
     INTEGER(ip) 			:: it = 0_ip 
     !! Current time iteration in the simulation, this is different from zero
     !! in case is a restarting simulation.
     REAL(rp)  :: init_time = 0.0_rp
     !! Time at the beginning of a run with proceed=T     
     INTEGER(ip) 			:: t_steps
     INTEGER(ip) 			:: prev_iter_2x1t 
     !! Number of time steps needed for evolving the electrons up to
     !! "simulation_time".
     INTEGER(ip) 			:: t_skip
     INTEGER(ip) 			:: t_it_SC=1_ip 
     INTEGER(ip) 			:: output_cadence
     INTEGER(ip) 			:: coll_per_dump
     INTEGER(ip) 			:: orbits_per_coll
     REAL(rp) 			:: coll_per_dump_dt
     !! Time iteration offset used to decide when the outputs are generated.
     INTEGER(ip) 			:: restart_output_cadence 
     !! Time iteration offset used to decide when the restart files are
     !! generated.
     INTEGER(ip) 			:: coll_cadence 
     INTEGER(ip) 			:: num_snapshots 
     !! Number of snapshots in time for generating the output files.
     INTEGER 			:: num_species 
     !! Number of different populations of simulated relativistic electrons
     !! in KORC.
     REAL(rp) 			:: minimum_particle_energy 
     !! Minimum allowed energy of simulated electrons. 
     !! @todo To improve the criterium to decide when an electron will not
     !! be followed anymore in the simulation.
     REAL(rp) 			:: minimum_particle_g 
     !! Minimum allowed relativistic factor \(\gamma\) of simulated electrons.
     LOGICAL 			:: radiation 
     !! Flag to indicate if synchrotron radiation losses are included
     !! (radiation=T) or not (radiation=F).
     LOGICAL 			:: collisions 
     !! Flag to indicate if collisionsare included (collisions=T) or not
     !! (collisions=F).
     LOGICAL 			:: LargeCollisions 
     CHARACTER(MAX_STRING_LENGTH) :: GC_rad_model
     CHARACTER(MAX_STRING_LENGTH) :: collisions_model 
     !! String with the name of the collisions model to be used in the
     !! simulation.
     CHARACTER(MAX_STRING_LENGTH) :: bound_electron_model 
     CHARACTER(MAX_STRING_LENGTH) :: field_model
     CHARACTER(MAX_STRING_LENGTH) :: profile_model 
     !! String with the name of the model for the fields and plasma profiles.
     CHARACTER(MAX_STRING_LENGTH) :: magnetic_field_filename
     CHARACTER(MAX_STRING_LENGTH) :: magnetic_field_directory
     CHARACTER(MAX_STRING_LENGTH) :: magnetic_field_list
     CHARACTER(MAX_STRING_LENGTH), DIMENSION(:), ALLOCATABLE :: magnetic_field_filenames
     REAL(rp), DIMENSION(:), ALLOCATABLE :: time_of_filenames
     !! String with the name of the model for the fields and plasma profiles.
     CHARACTER(MAX_STRING_LENGTH), DIMENSION(:), ALLOCATABLE :: outputs_list 
     !! List of electron variables to include in the outputs.
     INTEGER 			:: HDF5_error_handling 
     !! Flag to indicate whether we allow HDF5 to show warnings 
     !! during runtime (HDF5_error_handling=1) or not (HDF5_error_handling=0)
     TYPE(KORC_MPI) 		:: mpi_params 
     !! An instance of the KORC_MPI derived type.
     TYPE(CHARCS_PARAMS) 		:: cpp 
     !! An instance of the CHARCS_PARAMS derived type.
     LOGICAL :: FO_GC_compare
     CHARACTER(MAX_STRING_LENGTH) :: orbit_model
     !! String with the name of the orbit model ('FO' or 'GC').
     CHARACTER(MAX_STRING_LENGTH) :: field_eval
     !! String with the name of the field evaluation method for
     !! analytical fields ('interp' or 'eqn')
     LOGICAL :: GC_coords
     !! Flag to [[get_fields]] to control whether cartesian to cylindrical
     !! coordinate transformation needs to be performed
     LOGICAL :: FokPlan
     !! Flag to decouple spatial-dependence of evolution
     LOGICAL :: SameRandSeed
     LOGICAL :: SC_E
     LOGICAL :: SC_E_add
     INTEGER                      :: time_slice !< M3D-C1 time slice to use.
     REAL(rp)                     :: rmax !< Maximum r for M3D-C1 fields.
     REAL(rp)                     :: rmin !< Minimum r for M3D-C1 fields.
     REAL(rp)                     :: zmax !< Maximum z for M3D-C1 fields.
     REAL(rp)                     :: zmin !< Minimum z for M3D-C1 fields.
     INTEGER  :: pchunk
     !! number of particles per vectorized chunk
     INTEGER  :: num_impurity_species
     REAL(rp), DIMENSION(:), ALLOCATABLE        :: Zj
     REAL(rp) :: gam_min
  END TYPE KORC_PARAMS