nuflux_class Module Reference

Contains variables and parameters related to neutrino fluxes. More...

Data Types

type  nu_channel_type
 Channel type for neutrino reactions according to Sieverding et al. 2018 More...
 

Functions/Subroutines

subroutine, public init_nuflux ()
 Initialize nuflux module. More...
 
subroutine, public nuflux (time, rkm)
 Determines neutrino flux for current time (in units of cm^-2 s^-1). More...
 
subroutine, public calculate_nu_rate (rrate, rat_calc)
 Calculates the cross section times the neutrino flux. More...
 
subroutine, public nucs ()
 Interpolate neutrino cross sections. More...
 
subroutine, public nutemp (time)
 Calculates (anti-) neutrino temperatures. More...
 
subroutine, private write_reac_verbose_out ()
 Write the amount of individual reactions to the out. More...
 
subroutine, private read_neutrino_rates ()
 Read neutrino reactions and fill the global_class::nurate array. More...
 
subroutine, private read_binary_neutrino_reaction_data (path)
 Read the reactions from a file in binary format. More...
 
subroutine, public output_binary_neutrino_reaction_data (path)
 Write the reactions to a file in binary format. More...
 
subroutine, private read_reactions_sieverding (reaction_file_path, reactype)
 Read the reactions from a file in the format of Sieverding et al 2018. More...
 
character(50) function nurate_string (nurate)
 This function returns a string with the reaction information. More...
 
subroutine read_channels (channel_file_path)
 Read the channels from a file in the format of Sieverding et al 2018. More...
 
subroutine readnucs (nufile, typ)
 Reads neutrino-nuclei reaction file. More...
 
subroutine, public merge_neutrino_rates (rrate_array, rrate_length)
 Routine to merge neutrino rates into rrate array. More...
 
subroutine, private set_nutype (nnu_in)
 Set the type of a neutrino reaction. More...
 

Variables

type(nu_channel_type), dimension(:), allocatable nu_channels
 Array of neutrino channels. More...
 
integer nnu
 Amount of neutrino reactions. More...
 
type(reactionrate_type), dimension(:), allocatable rrate_nu
 Neutrino rate array. More...
 
real(r_kind), dimension(4), public fluxnu
 Neutrino fluxes This variable is calculated and set in nuflux. The dimension 4 accounts for the different neutrino flavors, however, only (anti-)electron neutrinos are implemented at the moment. More...
 
real(r_kind), dimension(4), private tempnu
 Neutrino temperatures. This variable is set in nutemp either from the values of a trajectory or from an analytic expression. The dimension 4 accounts for the different neutrino flavors, however, only (anti-)electron neutrinos are implemented at the moment. More...
 
integer, parameter nt_nugrid =7
 Length of the neutrino rate grid. More...
 
real(r_kind), dimension(nt_nugrid), private sigtempnu = (/2.8d0,3.5d0,4.0d0,5.0d0,6.4d0,8.0d0,10.0d0/)
 temperature grid for neutrino cross sections More...
 
real(r_kind), private rs
 Schwarzschild radius for M=mns [km], calculated in init_nuflux. More...
 
type(nurate_type), dimension(:), allocatable, private anunuc
 anti-neutrino reactions on nuclides More...
 
type(nurate_type), dimension(:), allocatable, private nunuc
 neutrino reactions on nuclides More...
 
integer, private lumin_debugfile
 Debug file to write neutrino luminosities, neutrinospheres, and temperatures. More...
 
real(r_kind), dimension(:), allocatable, public tnue
 
real(r_kind), dimension(:), allocatable, public tnuebar
 (anti-)electron neutrino temperatures from trajectory More...
 
real(r_kind), dimension(:), allocatable, public tnux
 
real(r_kind), dimension(:), allocatable, public tnuxbar
 (anti-)mu and tau neutrino temperatures from trajectory More...
 
real(r_kind), dimension(:), allocatable, public nlume
 
real(r_kind), dimension(:), allocatable, public nlumebar
 (anti-)electron neutrino number luminosities from trajectory More...
 
real(r_kind), dimension(:), allocatable, public nlumx
 
real(r_kind), dimension(:), allocatable, public nlumxbar
 (anti-)mu and tau neutrino number luminosities from trajectory More...
 
logical, private include_nc_reactions
 Flag to include neutrino reactions that are not charged current. More...
 
integer, private n_nuclei
 
integer, private n_anuclei
 
integer, private n_nucleo
 
integer, private n_cc
 
integer, private n_nc
 
character(len= *), parameter, private nu_binary_name = "nu_binary.windat"
 Name of the neutrino binary file. More...
 

Detailed Description

Contains variables and parameters related to neutrino fluxes.

The neutrino temperature grid that is used for the reaction rates can be changed here.

Function/Subroutine Documentation

◆ calculate_nu_rate()

subroutine, public nuflux_class::calculate_nu_rate ( type(reactionrate_type), intent(inout)  rrate,
real(r_kind), intent(out)  rat_calc 
)

Calculates the cross section times the neutrino flux.

This subroutine calculates the cross section times the neutrino flux for a given neutrino reaction. Here, the different neutrino types are distinguised. 1: CC reaction (electron neutrino) 2: CC reaction (anti-electron neutrino) 3: NC reaction (all neutrinos) 4: NC reaction (all anti-neutrinos) Edited:

  • 12.02.23 MR: Moved this from the jacobian class here
Parameters
[in,out]rraterate instance
[out]rat_calcrate value

Definition at line 335 of file nuflux_class.f90.

◆ init_nuflux()

subroutine, public nuflux_class::init_nuflux

Initialize nuflux module.

Calculates the Schwarzschild radius and opens debug files and writes headers to them. Furthermore it reads the neutrino reactions

Edited:

  • 12.04.17
  • 25.01.21, MR - Moved the reading of the nu-rates to this place

Definition at line 125 of file nuflux_class.f90.

Here is the call graph for this function:

◆ merge_neutrino_rates()

subroutine, public nuflux_class::merge_neutrino_rates ( type(reactionrate_type), dimension(:), intent(inout), allocatable  rrate_array,
integer, intent(inout)  rrate_length 
)

Routine to merge neutrino rates into rrate array.

This subroutine merges the neutrino rates into a larger rate array via a mergesort (see mergesort_module::rrate_ms)

Remarks
This used to be done after reading chapter 2 in the reaclib while the reaclib file is still open. Now it is done afterwards which may be not as efficient, but more clear.
Author
M. Reichert
Date
27.01.21
Parameters
[in,out]rrate_arrayLarge rate array, containing all reactions
[in,out]rrate_lengthlength of rrate_array

Definition at line 1345 of file nuflux_class.f90.

Here is the call graph for this function:

◆ nucs()

subroutine, public nuflux_class::nucs

Interpolate neutrino cross sections.

The subroutine lin-log interpolates the neutrino cross sections depending on the neutrino temperature (stored in tempnu). For this it also uses the temperature grid sigtempnu. The final interpolated cross sections are stored in global_class::nurate%rcs.

Returns
reaction cross sections for neutrino reactions into global_class::nurate%rcs.

Edited:

  • 13.01.14
  • 27.01.21
  • 19.07.22, M.R., removed small bug when at the interpolation boundary
  • 22.02.23, M.R., removed possible division by zero

Definition at line 398 of file nuflux_class.f90.

◆ nuflux()

subroutine, public nuflux_class::nuflux ( real(r_kind), intent(in)  time,
real(r_kind rkm 
)

Determines neutrino flux for current time (in units of cm^-2 s^-1).

The flux is hereby either based on an analytic forumlas of the neutrino luminosities and energies or on the trajectory file.

Note
In previous versions, also GR corrections were applied here, c.f., Otsuki et al. 2000.

Edited:

  • 11.01.14
  • MR 18.12.20
Parameters
[in]timecurrent time
rkmradius in km

Definition at line 176 of file nuflux_class.f90.

Here is the call graph for this function:

◆ nurate_string()

character(50) function nuflux_class::nurate_string ( type(nurate_type), intent(in)  nurate)

This function returns a string with the reaction information.

The string starts with the kind of reaction (1: cc with nue, 2: cc wit anue, 3: nc with nux, 4: nc with anux) followed by the reactant and the products seperated by "=>".

The function is only used for debugging purposes.

Author
Moritz Reichert
Date
12.02.2023

Definition at line 995 of file nuflux_class.f90.

Here is the call graph for this function:

◆ nutemp()

subroutine, public nuflux_class::nutemp ( real(r_kind), intent(in)  time)

Calculates (anti-) neutrino temperatures.

The determination depends on the parameter_class::neutrino_mode. In case of an analytic expression for the neutrino temperatures (or energies) it evaluates and parses a string. In case of a trajectory determining the temperatures, this subroutine lin-log interpolates (inside, e.g., ztime and tnue). The subroutine also ensures that the temperature does not become negative.

Edited:

  • 13.01.14
  • MR: 18.12.20
Parameters
[in]timecurrent time

Definition at line 501 of file nuflux_class.f90.

Here is the call graph for this function:

◆ output_binary_neutrino_reaction_data()

subroutine, public nuflux_class::output_binary_neutrino_reaction_data ( character(len=*), intent(in)  path)

Write the reactions to a file in binary format.

This subroutine writes the reactions to a file in binary format. This is done for preparing a folder with all reaction rates that can be read in later on from many tracers.

Author
M. Reichert
Date
21.06.2023
Parameters
[in]pathPath to the output directory

Definition at line 773 of file nuflux_class.f90.

Here is the call graph for this function:

◆ read_binary_neutrino_reaction_data()

subroutine, private nuflux_class::read_binary_neutrino_reaction_data ( character(len=*), intent(in)  path)
private

Read the reactions from a file in binary format.

This subroutine reads neutrino reactions and all neutrino data from a binary file. This file has to be previously prepared.

Author
M. Reichert
Date
21.06.2023
Parameters
[in]pathPath to the output directory

Definition at line 735 of file nuflux_class.f90.

Here is the call graph for this function:

◆ read_channels()

subroutine nuflux_class::read_channels ( character(len=*), intent(in)  channel_file_path)

Read the channels from a file in the format of Sieverding et al 2018.

This subroutine reads in the channels from a file in the format of Sieverding et al 2018. The file is read in line by line and the information is stored in the global variable nuchannels.

An example of the file looks like:

 id    type     particle emission
 
001 nue (cc) 0p 0n 0a 002 nue (cc) 1p 0n 0a 003 nue (cc) 0p 1n 0a 004 nue (cc) 0p 0n 1a 005 nue (cc) 2p 0n 0a ...

where the type "cc" stands for charged current and "nc" for neutral current. The particle emission is the number of particles emitted in the reaction. The first line is a header line and is ignored.

See also
Sieverding et al 2018, read_reactions_sieverding
Author
M. Reichert
Date
12.02.2023
Parameters
[in]channel_file_pathpath to the channel file

Definition at line 1065 of file nuflux_class.f90.

Here is the call graph for this function:

◆ read_neutrino_rates()

subroutine, private nuflux_class::read_neutrino_rates
private

Read neutrino reactions and fill the global_class::nurate array.

Depending on the nuflag parameter, different files will be opened and read.

See also
readnucs

Edited:

Definition at line 632 of file nuflux_class.f90.

Here is the call graph for this function:

◆ read_reactions_sieverding()

subroutine, private nuflux_class::read_reactions_sieverding ( character(len=*), intent(in)  reaction_file_path,
integer, intent(in)  reactype 
)
private

Read the reactions from a file in the format of Sieverding et al 2018.

This subroutine reads the reactions from a file in the format of Sieverding et al 2018. The file contains the reaction rates for charged and neutral current neutrino reactions on heavy nuclei. An example of the file looks like:

  000  Z = 2    A = 4   channels:  6
  002  1.099778E-03  7.960983E-03  2.308440E-02  1.163089E-01  5.736357E-01  2.100826E+00  6.820661E+00
  023  1.145175E-03  7.713879E-03  2.115540E-02  9.541441E-02  4.077819E-01  1.295820E+00  3.633845E+00
  ...
 

Here the first line contains the atomic number, the mass number and the amount of reactions. The second line contains the channel specified in the channel file (see read_channels) followed by the reaction rates. The reaction rates are tabulated on a (neutrino) temperature grid of Tnu (MeV) = 2.800 3.500 4.000 5.000 6.400 8.000 10.000.

Author
M. Reichert
Date
12.02.2023
Parameters
[in]reaction_file_pathPath to the neutrino reaction file
[in]reactype0: charged current only,

Definition at line 816 of file nuflux_class.f90.

Here is the call graph for this function:

◆ readnucs()

subroutine nuflux_class::readnucs ( integer, intent(in)  nufile,
integer, intent(in)  typ 
)

Reads neutrino-nuclei reaction file.

This subroutine reads in neutrino reactions depending on the input typ. The type of the call is dependent on parameter_class::nuflag. For nuflag = 1, this subroutine is called with typ 1 only, for e.g., nuflag = 2 it is called 3 times with types 1, 2, and 3.

typ translation
typ Example filename Meaning
1 neunucleons.dat Reads (anti-)neutrino reactions on neutrons and protons
2 neunuclei.dat Reads neutrino reactions on nuclei
3 aneunuclei.dat Reads Antineutrino reactions on nuclei

The file neunucleons.dat looks like:

 n    p                             nen
 12.37     18.61     23.85     36.32     58.26     89.82    139.06
 p    n                            nebp
 6.96     11.14     14.63     22.82     36.66     55.40     82.45  

The file neunuclei.dat:

 Cross sections for (nue,e-) reactions on nuclei for alpha=0.0
 =============================================================
 
T [MeV] 2.8 3.5 4.0 5.0 6.4 8.0 10.0
N = 2 Z = 2 (4He ) Integrated 0.00 0.01 0.03 0.15 0.71 2.50 7.91 ...

and the file aneunuclei.dat:

 T [MeV]              2.8          3.5          4.0         5.0          6.4          8.0          10.0
 
N = 2 Z = 2 (4He ) Integrated 0.00 0.01 0.02 0.09 0.41 1.29 3.64 ...
Returns
Array of neutrino reactions, depending on input typ either global_class::nurate (typ 1), global_class::nunuc (typ 2), or global_class::anunuc (typ 3).
See also
Bruenn et al. 2002, Froehlich et al. 2006 Langanke & Kolbe 2001

Edited:

Remarks
This routine is used to read the reactions on nucleons only (typ 1).
Parameters
[in]nufileneutrino cross section file unit
[in]typtype of nu-reaction: 1 -> nu/anu on n/p; 2 -> nu on nuclide; 3 -> anu on nuclide.

Definition at line 1230 of file nuflux_class.f90.

Here is the call graph for this function:

◆ set_nutype()

subroutine, private nuflux_class::set_nutype ( integer, intent(in)  nnu_in)
private

Set the type of a neutrino reaction.

This subroutine modifies the "kind" entry in global_class::nurate based on the neutrino labels. It is only called for reactions in the format of Froehlich et al. 2006 and for neutrino reactions on nucleons. The different kinds of neutrino reactions are:

Neutrino reaction types
kind Explanation
1 Electron neutrino reaction
2 Electron anti-neutrino reaction
3 Muon/tau neutrino reaction
4 Muon/tau anti-neutrino reaction

Kind 3 and 4 are not implemented at the moment.

Warning
This subroutine uses the neutrino reaction labels nen, lznu, nebp, and lzan hard coded. It is only used for neutrino reactions on nucleons.
Parameters
[in]nnu_inLength of global_class::nurate

Definition at line 1412 of file nuflux_class.f90.

◆ write_reac_verbose_out()

subroutine, private nuflux_class::write_reac_verbose_out
private

Write the amount of individual reactions to the out.

The rates are always counted, for a certain verbose level they are also printed to the OUT file

Author
M. Reichert
Date
27.01.21

Definition at line 591 of file nuflux_class.f90.

Here is the call graph for this function:

Variable Documentation

◆ anunuc

type(nurate_type), dimension(:), allocatable, private nuflux_class::anunuc
private

anti-neutrino reactions on nuclides

Definition at line 73 of file nuflux_class.f90.

◆ fluxnu

real(r_kind), dimension(4), public nuflux_class::fluxnu

Neutrino fluxes This variable is calculated and set in nuflux. The dimension 4 accounts for the different neutrino flavors, however, only (anti-)electron neutrinos are implemented at the moment.

Definition at line 45 of file nuflux_class.f90.

◆ include_nc_reactions

logical, private nuflux_class::include_nc_reactions
private

Flag to include neutrino reactions that are not charged current.

Definition at line 94 of file nuflux_class.f90.

◆ lumin_debugfile

integer, private nuflux_class::lumin_debugfile
private

Debug file to write neutrino luminosities, neutrinospheres, and temperatures.

Definition at line 78 of file nuflux_class.f90.

◆ n_anuclei

integer, private nuflux_class::n_anuclei
private

Definition at line 95 of file nuflux_class.f90.

◆ n_cc

integer, private nuflux_class::n_cc
private

Definition at line 95 of file nuflux_class.f90.

◆ n_nc

integer, private nuflux_class::n_nc
private

Definition at line 95 of file nuflux_class.f90.

◆ n_nuclei

integer, private nuflux_class::n_nuclei
private

Definition at line 95 of file nuflux_class.f90.

◆ n_nucleo

integer, private nuflux_class::n_nucleo
private

Definition at line 95 of file nuflux_class.f90.

◆ nlume

real(r_kind), dimension(:), allocatable, public nuflux_class::nlume

Definition at line 91 of file nuflux_class.f90.

◆ nlumebar

real(r_kind), dimension(:), allocatable, public nuflux_class::nlumebar

(anti-)electron neutrino number luminosities from trajectory

Definition at line 91 of file nuflux_class.f90.

◆ nlumx

real(r_kind), dimension(:), allocatable, public nuflux_class::nlumx

Definition at line 92 of file nuflux_class.f90.

◆ nlumxbar

real(r_kind), dimension(:), allocatable, public nuflux_class::nlumxbar

(anti-)mu and tau neutrino number luminosities from trajectory

Definition at line 92 of file nuflux_class.f90.

◆ nnu

integer nuflux_class::nnu

Amount of neutrino reactions.

Definition at line 39 of file nuflux_class.f90.

◆ nt_nugrid

integer, parameter nuflux_class::nt_nugrid =7

Length of the neutrino rate grid.

Definition at line 62 of file nuflux_class.f90.

◆ nu_binary_name

character(len=*), parameter, private nuflux_class::nu_binary_name = "nu_binary.windat"
private

Name of the neutrino binary file.

Definition at line 98 of file nuflux_class.f90.

◆ nu_channels

type(nu_channel_type), dimension(:), allocatable nuflux_class::nu_channels

Array of neutrino channels.

Definition at line 37 of file nuflux_class.f90.

◆ nunuc

type(nurate_type), dimension(:), allocatable, private nuflux_class::nunuc
private

neutrino reactions on nuclides

Definition at line 74 of file nuflux_class.f90.

◆ rrate_nu

type(reactionrate_type), dimension(:), allocatable nuflux_class::rrate_nu

Neutrino rate array.

Definition at line 41 of file nuflux_class.f90.

◆ rs

real(r_kind), private nuflux_class::rs
private

Schwarzschild radius for M=mns [km], calculated in init_nuflux.

Definition at line 70 of file nuflux_class.f90.

◆ sigtempnu

real(r_kind), dimension(nt_nugrid), private nuflux_class::sigtempnu = (/2.8d0,3.5d0,4.0d0,5.0d0,6.4d0,8.0d0,10.0d0/)
private

temperature grid for neutrino cross sections

Warning
This neutrino temperature grid has to match with the one in the files neunuclei.dat, neunucleon.dat, and aneunuclei.dat

Definition at line 64 of file nuflux_class.f90.

◆ tempnu

real(r_kind), dimension(4), private nuflux_class::tempnu
private

Neutrino temperatures. This variable is set in nutemp either from the values of a trajectory or from an analytic expression. The dimension 4 accounts for the different neutrino flavors, however, only (anti-)electron neutrinos are implemented at the moment.

Definition at line 53 of file nuflux_class.f90.

◆ tnue

real(r_kind), dimension(:), allocatable, public nuflux_class::tnue

Definition at line 89 of file nuflux_class.f90.

◆ tnuebar

real(r_kind), dimension(:), allocatable, public nuflux_class::tnuebar

(anti-)electron neutrino temperatures from trajectory

Definition at line 89 of file nuflux_class.f90.

◆ tnux

real(r_kind), dimension(:), allocatable, public nuflux_class::tnux

Definition at line 90 of file nuflux_class.f90.

◆ tnuxbar

real(r_kind), dimension(:), allocatable, public nuflux_class::tnuxbar

(anti-)mu and tau neutrino temperatures from trajectory

Definition at line 90 of file nuflux_class.f90.