global_class.f90
Go to the documentation of this file.
1 !> @file global_class.f90
2 !!
3 !! The error file code for this file is ***W23***.
4 !! @brief Modules: \ref global_class, \ref hydro_trajectory
5 !!
6 
7 !> Contains types and objects shared between multiple modules
8 !!
9 !! This module is reserved as a container for objects used by
10 !! multiple modules. In general, it is a good practice to define
11 !! new variables or types according to their functionality
12 !! within their respective specialized modules, rather than as
13 !! globals.
14 !!
15 !! @author Oleg Korobkin
16 !! @date 11.01.2014
17 !!
18 #include "macros.h"
20 
21 implicit none
22 
23 !> data fields for the nuclides contained in the network
24 type,public :: isotope_type
25  character(5) :: name !< isotope name
26  integer :: mass !< number of nucleons
27  integer :: p_nr !< number of protons
28  integer :: n_nr !< number of neutrons
29  logical :: is_stable !< true if isotope is stable
30  real(r_kind) :: spin !< ground state spin
31  real(r_kind) :: mass_exc !< mass excess [MeV]
32  real(r_kind),dimension(:),allocatable :: part_func !< tabulated partition functions (given by Rauscher XY)
33 end type isotope_type
34 type(isotope_type),dimension(:),allocatable,public :: isotope !< all nuclides used in the network
35 
36 !> Variables related to tracking individual nuclei
37 integer,dimension(:),allocatable,public :: track_nuclei_indices !< indices of tracked nuclei
38 integer,public :: track_nuclei_nr !< amount of tracked nuclei
39 
40 !> Variables related to nuclear heating
41 logical,public :: heating_switch !< factor to switch on/off nuclear heating
42 
43 !> reaction rate type
44 type,public :: reactionrate_type
45  integer :: group !< group index of reaction [1:11]
46  integer,dimension(6) :: parts !< isotope index of reaction participants (0 if empty)
47  character(4) :: source !< source of reaction rate
48  integer,dimension(6) :: ch_amount !< defines whether participant is destroyed (-1) or created (+1)
49  integer,dimension(4,6) :: cscf_ind !< cscf_ind (i,j) gives the position of the entry \f$\frac{d\dot{Y}_{j}}{dY_{i}}\f$ in the cscf data array
50  real(r_kind) :: one_over_n_fac !< 1/n! factor, where n is the number of equal isotopes entering reaction i. Needed to prevent multiple counts of a single reaction.
51  logical :: is_weak !< true if reaction is a weak reaction
52  logical :: is_resonant !< true if reaction fit corresponds to a resonance [unused]
53  logical :: is_reverse !< true if reaction rate is calculated via detailed balance from corresponding forward reaction
54  logical :: is_const !< true if reaction rate is constant (param(2:7) .eq. 0.d0)
55  integer :: reac_type !< "rrt_sf": spontaneous fission, "rrt_bf": beta-delayed fission, "rrt_nf": neutron-induced fission,
56  !< "rrt_ng": n-gamma, "rrt_ag":alpha-gamma, "rrt_gn": gamma-n, "rrt_ga": gamma-alpha, "rrt_nu":neutrino ,"rrt_o":other
57  !< "rrt_betm: beta-minus, "rrt_betp": beta-plus, "rrt_alpd": alpha-decay, "rrt_nemi": neutron emission, "rrt_pemi": proton emission
58  integer :: reac_src !< "rrs_reacl": Reaclib, "rrs_tabl": Tabulated, "rrs_nu": neutrino, "rrs_detb": detailed balance , "rrs_twr": theoretical weak rate
59  real(r_kind) :: q_value !< reaction Q-value [MeV]
60  real(r_kind) :: nu_frac !< Energy fraction of neutrinos radiated away
61  real(r_kind),dimension(9) :: param !< REACLIB fit parameters
62  real(r_kind) :: cached !< computed rate
63  real(r_kind) :: cached_p !< computed rate without density, one_over_nfrac, pf, and screening
64 end type reactionrate_type
65 type(reactionrate_type),dimension(:),allocatable,public :: rrate !< array containing all reaction rates used in the network
66 type(reactionrate_type),dimension(:),allocatable,public :: rrate_weak_exp !< array saving the exp. weak rates from reaclib that are replaced by theo weak rates
67 
68 
69 !> data fields for neutrino rates given in Langanke&Kolbe 2001
70 type,public :: nurate_type
71  integer,dimension(6) :: parts !< isotope index of participants
72  integer,dimension(6) :: ch_amount !< defines whether participant is destroyed
73  character(4) :: source !< source of reaction rate
74  real(r_kind),dimension(7) :: cs !< tabulated reaction cross section
75  real(r_kind),dimension(7) :: ave !< tabulated average energy of the absorped neutrino
76  real(r_kind) :: rave !< interpolated average energy of the absorped neutrino
77  real(r_kind) :: rcs_e !< interpolated cross section for electron neutrinos
78  real(r_kind) :: rcs_x !< interpolated cross section for muon and tauon neutrinos
79  integer :: kind !< kind of neutrino reaction 1=nue,2=anue,3=numx,4=anumx
80 end type nurate_type
81 type(nurate_type),dimension(:),allocatable,public :: nurate !< neutrino rates
82 
83 
84 !> Flow type to store flows
85 type,public :: flow_vector
86  integer :: iin !< Index of ingoing nucleus
87  integer :: iout!< Index of outgoing nucleus
88  real(r_kind) :: fwd !< Forward flow
89  real(r_kind) :: bwd !< Backward flow
90 end type flow_vector
91 
92 ! -- network-related variables
93 integer,public :: net_size !< total number of isotopes (network size)
94 integer,public :: ihe4,ineu,ipro !< index of alphas, neutrons and protons
95 character*5,dimension(:),allocatable,public :: net_names !< list of isotopes contained in the network
96 real(r_kind),dimension(:),allocatable,public :: qnuloss !< Qnu for decay of each isotope [MeV]
97 real(r_kind),dimension(:),allocatable,public :: t9_data !< temperatures at which partition functions are given [GK]
98 integer,public :: nreac !< total number of reactions
99 
100 !> @todo Move the following to tw_rate_module
101 integer :: common_weak_rates !< Counter for rates that are included in Reaclib and theoretical weak rates
102 integer :: only_theo_weak_rates !< Counter for rates that are not included in Reaclib, but in theoretical weak rates
103 
104 !---- debug
105 real(r_kind),dimension(5) :: nag_state !< t,t9,rho_b for debugging
106 !---- end debug
107 
108 end module global_class
global_class::heating_switch
logical, public heating_switch
Variables related to nuclear heating.
Definition: global_class.f90:41
global_class::net_names
character *5, dimension(:), allocatable, public net_names
list of isotopes contained in the network
Definition: global_class.f90:95
global_class::ipro
integer, public ipro
index of alphas, neutrons and protons
Definition: global_class.f90:94
global_class::reactionrate_type
reaction rate type
Definition: global_class.f90:44
global_class::rrate
type(reactionrate_type), dimension(:), allocatable, public rrate
array containing all reaction rates used in the network
Definition: global_class.f90:65
global_class::common_weak_rates
integer common_weak_rates
Counter for rates that are included in Reaclib and theoretical weak rates.
Definition: global_class.f90:101
global_class::t9_data
real(r_kind), dimension(:), allocatable, public t9_data
temperatures at which partition functions are given [GK]
Definition: global_class.f90:97
global_class::ihe4
integer, public ihe4
Definition: global_class.f90:94
global_class::flow_vector
Flow type to store flows.
Definition: global_class.f90:85
global_class::isotope_type
data fields for the nuclides contained in the network
Definition: global_class.f90:24
global_class::rrate_weak_exp
type(reactionrate_type), dimension(:), allocatable, public rrate_weak_exp
array saving the exp. weak rates from reaclib that are replaced by theo weak rates
Definition: global_class.f90:66
global_class::nurate_type
data fields for neutrino rates given in Langanke&Kolbe 2001
Definition: global_class.f90:70
global_class::ineu
integer, public ineu
Definition: global_class.f90:94
global_class::track_nuclei_indices
integer, dimension(:), allocatable, public track_nuclei_indices
Variables related to tracking individual nuclei.
Definition: global_class.f90:37
global_class::isotope
type(isotope_type), dimension(:), allocatable, public isotope
all nuclides used in the network
Definition: global_class.f90:34
global_class::qnuloss
real(r_kind), dimension(:), allocatable, public qnuloss
Qnu for decay of each isotope [MeV].
Definition: global_class.f90:96
global_class::nurate
type(nurate_type), dimension(:), allocatable, public nurate
neutrino rates
Definition: global_class.f90:81
global_class::only_theo_weak_rates
integer only_theo_weak_rates
Counter for rates that are not included in Reaclib, but in theoretical weak rates.
Definition: global_class.f90:102
global_class::net_size
integer, public net_size
total number of isotopes (network size)
Definition: global_class.f90:93
global_class::track_nuclei_nr
integer, public track_nuclei_nr
amount of tracked nuclei
Definition: global_class.f90:38
r_kind
#define r_kind
Definition: macros.h:46
global_class
Contains types and objects shared between multiple modules.
Definition: global_class.f90:19
global_class::nreac
integer, public nreac
total number of reactions
Definition: global_class.f90:98
global_class::nag_state
real(r_kind), dimension(5) nag_state
t,t9,rho_b for debugging
Definition: global_class.f90:105