network_init_module Module Reference

Module to prepare the reaction network. More...

Functions/Subroutines

subroutine, private network_init ()
 Main initialising subroutine. calls reading subroutines and fills the reactionrate array. More...
 
subroutine, public prepare_simulation
 All the necessary initializations and settings before the main loop. More...
 
subroutine create_rate_folder (path)
 Create a folder with binary files that contain all necessary reaction data. More...
 
subroutine, public switch_evolution_mode (init)
 Switches between NSE and network modes (EM_NSE / EM_NETHOT / EM_NETCOLD) More...
 
subroutine, private print_reactions ()
 Print an overview of the reactions involved in the calculation. More...
 
subroutine, private print_debug ()
 Print a debug file of the reaction. More...
 
subroutine, private getnames (ind, names)
 Get the names of a certain reaction. More...
 

Detailed Description

Module to prepare the reaction network.

This module contains subroutines that call other modules initialization. In addition it reads reaction rates and many other things.

Function/Subroutine Documentation

◆ create_rate_folder()

subroutine network_init_module::create_rate_folder ( character(len=*), intent(in)  path)

Create a folder with binary files that contain all necessary reaction data.

This routine creates binary files in the exact format that WinNet needs to initialize the rate arrays. The reading of these files can be done much faster then reading the original files. The files are stored in the folder specified by the path argument. The folder is created if it does not exist. Using these files is specifically useful when running many trajectories.

Author
M. Reichert
Date
21.07.23

Definition at line 447 of file network_init_module.f90.

Here is the call graph for this function:

◆ getnames()

subroutine, private network_init_module::getnames ( integer, intent(in)  ind,
character*5, dimension(6), intent(out)  names 
)
private

Get the names of a certain reaction.

Returns
all nuclei names that participate in a reaction with index ind
Parameters
[in]indIndex of the reaction
[out]namesNames of the participating isotopes

Definition at line 948 of file network_init_module.f90.

◆ network_init()

subroutine, private network_init_module::network_init
private

Main initialising subroutine. calls reading subroutines and fills the reactionrate array.

Reads included nuclei, Reaclib, theoretical weak rates, neutrino rates, tabulated rates, fission rates (and more) and prepares in this way the reaction rates global_class::rrate.

Returns
global_class::rrate

Edited:

  • 14.04.15
  • OK 15.06.17, made into a module

Definition at line 53 of file network_init_module.f90.

Here is the call graph for this function:

◆ prepare_simulation()

subroutine, public network_init_module::prepare_simulation

All the necessary initializations and settings before the main loop.

To initialize it calls the init subroutines from other modules, e.g., readini::readini_init, analysis::analysis_init. It also prepares the first time depending on parameter_class::initemp and it fills the abundance array single_zone_vars::y and single_zone_vars::y_p.

Edited:

  • OK 15.06.2017
  • OK 27.08.2017

Definition at line 165 of file network_init_module.f90.

Here is the call graph for this function:

◆ print_debug()

subroutine, private network_init_module::print_debug
private

Print a debug file of the reaction.

In contrast to print_reactions, this subroutine prints additional flags of a reaction. The structure of a file looks like:

File structure
Reaclib chapter isotope names Q-Value Source label
Amount destroyed/synthesized double counting factor
"is_weak" "is_resonant" "is_reverse"

An example of the file (debug_reac.dat) looks like:

...
 5     n na32    p ne32            -16.606  rath
 -1 -1  1  1  0  0      1.000
     F    F    T
 5     p na32    n mg32             18.317  rath
 -1 -1  1  1  0  0      1.000
     F    F    F
 ...

Definition at line 918 of file network_init_module.f90.

Here is the call graph for this function:

◆ print_reactions()

subroutine, private network_init_module::print_reactions
private

Print an overview of the reactions involved in the calculation.

An example file (debug_all-reactions.txt ) looks like:

...
 O N E P A R T I C L E R E A C T I O N S
 1         n --->    p                              Q=  0.782 MEV     ffn
 Reaction type: weak
 2         n --->    p                              Q=  0.000 MEV     nen
 Reaction type: neutrino
 3         p --->    n                              Q= -0.782 MEV     ffn
 Reaction type: weak
 ...

Furthermore, a file ( debug_weak-reactions.txt ) containing all weak reactions is created that looks like:

 OVERVIEW OF ALL WEAK-REACTIONS IN THE NETWORK
 1         n --->    p                              Q=  0.782 MEV     ffn
 2         n --->    p                              Q=  0.000 MEV     nen
 3         p --->    n                              Q= -0.782 MEV     ffn
 4         p --->    n                              Q=  0.000 MEV    nebp 
Note
Fission reactions do not obey the default reaclib format and are not visualized correct.

Edited:

  • MR: 21.01.21 - included interface (get_net_name) to net_names instead of accessing it directly

Definition at line 651 of file network_init_module.f90.

Here is the call graph for this function:

◆ switch_evolution_mode()

subroutine, public network_init_module::switch_evolution_mode ( logical, intent(inout)  init)

Switches between NSE and network modes (EM_NSE / EM_NETHOT / EM_NETCOLD)

The following conditions are included to switch the evolution mode:

Evolution mode switches
Evolution mode Condition
EM_NSE \(T_9\) > parameter_class::nsetemp_hot
EM_NETHOT parameter_class::temp_reload_exp_weak_rates < \(T_9\) < parameter_class::nsetemp_cold
EM_NETCOLD \(T_9\) < parameter_class::temp_reload_exp_weak_rates
EM_TERMINATE Depends on termination criterion, see parameter_class::termination_criterion

The following figure illustrates the different regions for an example trajectory:

Note
This subroutine also changes the timestep at the transition from NSE to the network. For the gear solver, gear_module::set_timestep has to be called.
See also
single_zone_vars::evolution_mode

Edited:

  • 17.12.16
Parameters
[in,out]initFlag that indicates a necessary initialization

Definition at line 523 of file network_init_module.f90.

Here is the call graph for this function: