benam_class Module Reference

Subroutines needed to initialise the network. More...

Functions/Subroutines

subroutine, private load_network (net_source)
 Reads isotope names from file 'net_source' and saves them in net_names(). Returns number of isotopes in network. More...
 
character(50) function, public reaction_string (reac)
 Return a string to represent a given reaction. More...
 
subroutine lowercase (str)
 Returns lowercase of input string. Numbers are not changed. More...
 
subroutine, public convert (wnam, rnam)
 Converts isotope names of weak-table format to the ones in reaclib. More...
 
integer function, public benam (name)
 Returns the index number of isotope 'name'. More...
 
character(:) function, allocatable, public get_net_name (index, trimmed)
 Getter of net_names, translating indices to a nucleus name. More...
 
subroutine, public getcoefficients (rate_array, length_rate_array)
 Returns the 1/n! factor where n is the number of equal isotopes entering a reaction. in addition the amount by which an isotope is changed in the reaction is saved (+1 / -1) More...
 
subroutine, private read_binary_network_data (path)
 Read the general network information from a binary file. More...
 
subroutine, public output_binary_network_data (path)
 Save the general network information to a binary file. More...
 
subroutine, private read_ascii_network_data ()
 Reads nuclear properties (name,a,n,z,spin,mass excess,partition functions) from file 'winvn' and htpf file and writes them into isotope(:). Also the arrays of the partition function grid and temperature grid are initialized here. More...
 
subroutine, public get_nuclear_properties ()
 Reads nuclear properties (name,a,n,z,spin,mass excess,partition functions) from file 'winvn' and htpf file and writes them into isotope(:). Also the arrays of the partition function grid and temperature grid are initialized here. More...
 
subroutine, private read_winvn (winvn)
 Reads nuclear properties (name,a,n,z,spin,mass excess,partition functions) from file 'winvn' and writes them into isotope(:). An example entry of a winvn can look like: More...
 
subroutine, private sunet_check (ref_array)
 Checks if sunet file contains valid isotope names. More...
 
subroutine, private read_htpf (source)
 Read the file with high-temperature partition function (normally datafile2.dat). An example of the file may look like: More...
 
integer function, public findaz (ai, zi)
 Finds an isotope index in the network table, given its A and Z. In case it was not found, -1 is returned. More...
 
subroutine, public get_minmax ()
 Returns Amin and Amax for each isotopic chain in minmax. More...
 
subroutine, private read_neutrino_loss (filename)
 Read a file with neutrino loss energy. More...
 
subroutine, public ident (z1, n1, z2, n2, nam1, nam2, ind1, ind2, err)
 Identifies the nuclide names and indices corresponding to z,n combinations (z1,n1), (z2,n2). More...
 

Variables

integer, dimension(:,:), allocatable minmax
 TODO: add description. More...
 
character(len= *), parameter, private network_binary_name ='network.windat'
 

Detailed Description

Subroutines needed to initialise the network.

Function/Subroutine Documentation

◆ benam()

integer function, public benam_class::benam ( character(len=5), intent(in)  name)

Returns the index number of isotope 'name'.

Edited:

  • 11.01.14
  • 20.05.19
Parameters
[in]namename of the isotope to be 'indexed'
Returns
index of the isotope called 'name'

Definition at line 250 of file benam_class.f90.

◆ convert()

subroutine, public benam_class::convert ( character*4, dimension(2)  wnam,
character*5, dimension(2), intent(out)  rnam 
)

Converts isotope names of weak-table format to the ones in reaclib.

Example:

a = ' h1'
call convert(a,b)
a = ' n01'
call convert(a,c)

After this, b will be ' p' and c will be ' n'

Returns
Reaclib names of neutrons and protons for input "h1" or "n01"

Edited:

  • 09.03.2017
Parameters
wnamisotope names in weak-table format
[out]rnamisotope names in reaclib format

Definition at line 222 of file benam_class.f90.

Here is the call graph for this function:

◆ findaz()

integer function, public benam_class::findaz ( integer, intent(in)  ai,
integer, intent(in)  zi 
)

Finds an isotope index in the network table, given its A and Z. In case it was not found, -1 is returned.

Edited: 11.01.14

Parameters
[in]aiA
[in]ziZ
Returns
return index

Definition at line 886 of file benam_class.f90.

◆ get_minmax()

subroutine, public benam_class::get_minmax

Returns Amin and Amax for each isotopic chain in minmax.

Edited: 11.01.14

Definition at line 915 of file benam_class.f90.

◆ get_net_name()

character(:) function, allocatable, public benam_class::get_net_name ( integer, intent(in)  index,
logical, intent(in), optional  trimmed 
)

Getter of net_names, translating indices to a nucleus name.

The function will also complain in case the index is out of range when the verbose_level is larger than 0.

Author
Moritz Reichert
Date
21.01.21
Parameters
[in]indexindex of the isotope called 'name'
[in]trimmedIf present, return a name without whitespaces
Returns
name of the isotope

Definition at line 279 of file benam_class.f90.

◆ get_nuclear_properties()

subroutine, public benam_class::get_nuclear_properties

Reads nuclear properties (name,a,n,z,spin,mass excess,partition functions) from file 'winvn' and htpf file and writes them into isotope(:). Also the arrays of the partition function grid and temperature grid are initialized here.

Edited:

  • 11.01.14
  • 11.02.21 - MR: Implemented a switch for htpf functions and moved things to additional subroutine

Definition at line 641 of file benam_class.f90.

Here is the call graph for this function:

◆ getcoefficients()

subroutine, public benam_class::getcoefficients ( type(reactionrate_type), dimension(length_rate_array), intent(inout)  rate_array,
integer, intent(in)  length_rate_array 
)

Returns the 1/n! factor where n is the number of equal isotopes entering a reaction. in addition the amount by which an isotope is changed in the reaction is saved (+1 / -1)

Edited:

  • 11.01.14
  • 28.07.22, MR: implemented counting factor for all chapters (not only original)
Parameters
[in]length_rate_arrayLength of the rate array
[in,out]rate_arrayInput rate array

Definition at line 306 of file benam_class.f90.

◆ ident()

subroutine, public benam_class::ident ( integer  z1,
integer  n1,
integer  z2,
integer  n2,
character(5), intent(out)  nam1,
character(5), intent(out)  nam2,
integer, intent(out)  ind1,
integer, intent(out)  ind2,
integer, intent(out)  err 
)

Identifies the nuclide names and indices corresponding to z,n combinations (z1,n1), (z2,n2).

If any of the two nuclides is not part of the network, err=1 and all other properties are set to 0 or " " respectively.

Edited:

Parameters
n2proton and neutron numbers
[out]nam2nuclide names as they appear in sunet
[out]ind2nuclide index in the network
[out]err0 if nuclides are identified successfully 1 if any of the two (z,n) combinations could not be assigned to a nuclide in the network

Definition at line 1038 of file benam_class.f90.

◆ load_network()

subroutine, private benam_class::load_network ( character(*), intent(in)  net_source)
private

Reads isotope names from file 'net_source' and saves them in net_names(). Returns number of isotopes in network.

This function reads the sunet with the same format as the following example:

    n
    p
    d
    t
  he3
  he4
  he6
  li6
  li7
  li8
  li9
 ...

Edited:

  • 11.01.14
Parameters
[in]net_sourcefile where isotopes are specified

Definition at line 55 of file benam_class.f90.

Here is the call graph for this function:

◆ lowercase()

subroutine benam_class::lowercase ( character(len=*), intent(inout)  str)

Returns lowercase of input string. Numbers are not changed.

Example:

a = 'Ti44'
call lowercase(a)
b = 'This Is A Text 123'
call lowercase(b)

After this, a will be 'ti44' and b will be 'this is a text 123'

Returns
The lowercase of the input string
Parameters
[in,out]strString to be converted to lower case

Definition at line 186 of file benam_class.f90.

◆ output_binary_network_data()

subroutine, public benam_class::output_binary_network_data ( character(len=*), intent(in)  path)

Save the general network information to a binary file.

This subroutine saves the information that is contained in the winvn and sunet. This is necessary if the code is run in network preparation mode for the parameter use_prepared_network .

Author
M. Reichert
Date
21.07.23
Parameters
[in]pathPath to the output file

Definition at line 498 of file benam_class.f90.

Here is the call graph for this function:

◆ reaction_string()

character(50) function, public benam_class::reaction_string ( type(reactionrate_type), intent(in)  reac)

Return a string to represent a given reaction.

This routine is useful for error messages in case a rate is not working as intented.

Example

For rrate(i) being the decay of ni56

a = reaction_string(rrate(i))

will return a="ni56 => co56".

Author
Moritz Reichert

Definition at line 118 of file benam_class.f90.

Here is the call graph for this function:

◆ read_ascii_network_data()

subroutine, private benam_class::read_ascii_network_data
private

Reads nuclear properties (name,a,n,z,spin,mass excess,partition functions) from file 'winvn' and htpf file and writes them into isotope(:). Also the arrays of the partition function grid and temperature grid are initialized here.

Edited:

  • 11.01.14
  • 11.02.21 - MR: Implemented a switch for htpf functions and moved things to additional subroutine

Definition at line 557 of file benam_class.f90.

Here is the call graph for this function:

◆ read_binary_network_data()

subroutine, private benam_class::read_binary_network_data ( character(len=*), intent(in)  path)
private

Read the general network information from a binary file.

This subroutine reads the information that is contained in the winvn and sunet from a previously saved binary file. This is necessary if the parameter use_prepared_network is set to .true. and the network is read from a prepared network file.

Author
M. Reichert
Date
21.07.23
Parameters
[in]pathPath to the input file

Definition at line 419 of file benam_class.f90.

Here is the call graph for this function:

◆ read_htpf()

subroutine, private benam_class::read_htpf ( integer, intent(in)  source)
private

Read the file with high-temperature partition function (normally datafile2.dat). An example of the file may look like:

 Title: Nuclear Partition Functions at Temperatures Exceeding 10^10^ K
 Author: Rauscher T.
 Table: Renormalized partition functions G(T_9_) including high temperature
        corrections. The values given here were calculated with level densities
        based on FRDM input (see text).
 ================================================================================
 Byte-by-byte Description of file: datafile2.txt
 --------------------------------------------------------------------------------
    Bytes Format Units Label  Explanations
 --------------------------------------------------------------------------------
    1-  5 A5     ---   Name   Nuclide name
    7-  8 I2     ---   Z      Charge number of nuclide
   10- 12 I3     ---   A      Mass number of nuclide
   15- 17 F3.1   ---   J0     Ground-state spin of nuclide
   19- 27 E9.2   ---   G12    Renormalized partition function for T = 12E9
   ....
   o13    8  13  1.5 1.00E+000 1.00E+000 9.99E-001 9.95E-001 9.90E-001 9.84E-001 9.76E-001 9.68E-001 9.59E-001 ...
 ...

Edited: 11.01.14

Parameters
[in]sourceHTPF file name

Definition at line 828 of file benam_class.f90.

◆ read_neutrino_loss()

subroutine, private benam_class::read_neutrino_loss ( character(len=*), intent(in)  filename)
private

Read a file with neutrino loss energy.

This file contains the neutrino loss energy for the beta decays in the network. The information is used in case nuclear heating is turned on. An example of the file could look like this:

...
 al34     4.803857E+00
 al35     6.072946E+00
 al37     5.639200E+00
 si25     4.794861E+00
 si26     1.968612E+00
 si27     2.070827E+00
 si31     8.963707E-01
 si32     1.581000E-01
 si34     1.778200E+00
 si35     3.314272E+00
 si36     3.432230E+00
 si38     3.446900E+00
... 

The first column is the isotope name, the second column is the average neutrino loss energy in MeV.

Author
Moritz Reichert
Date
31.03.2023
Parameters
[in]filenameName of the file to read

Definition at line 980 of file benam_class.f90.

Here is the call graph for this function:

◆ read_winvn()

subroutine, private benam_class::read_winvn ( integer, intent(in)  winvn)
private

Reads nuclear properties (name,a,n,z,spin,mass excess,partition functions) from file 'winvn' and writes them into isotope(:). An example entry of a winvn can look like:

 ne33      33.000  10  23   1.5    45.997 reac1
  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0
  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0  1.00000E+0  1.01000E+0
  1.01000E+0  1.02000E+0  1.03000E+0  1.07000E+0  1.12000E+0  1.19000E+0  1.28000E+0  1.40000E+0
 ...

Edited:

  • 11.02.21 - MR: Moved it from get_nuclear_properties to this subroutine
Parameters
[in]winvnFile ID of the winvn

Definition at line 674 of file benam_class.f90.

Here is the call graph for this function:

◆ sunet_check()

subroutine, private benam_class::sunet_check ( character(5), dimension(:), intent(in)  ref_array)
private

Checks if sunet file contains valid isotope names.

Edited:

  • 11.01.14
Parameters
[in]ref_arrayarray of isotope names

Definition at line 756 of file benam_class.f90.

Here is the call graph for this function:

Variable Documentation

◆ minmax

integer, dimension(:,:), allocatable benam_class::minmax

TODO: add description.

Definition at line 14 of file benam_class.f90.

◆ network_binary_name

character(len=*), parameter, private benam_class::network_binary_name ='network.windat'
private

Definition at line 16 of file benam_class.f90.