![]() |
Contains various routines for analysis and diagnostic output. More...
Functions/Subroutines | |
subroutine, public | analysis_init () |
Open files, write headers, allocate space etc. More... | |
subroutine, public | output_initial_step (ctime, T9, rho_b, entropy, Rkm, Y, pf) |
Output first step. More... | |
subroutine, public | output_final_step (cnt, ctime, T9, rho_b, entropy, Rkm, Y, pf) |
Output final step. More... | |
subroutine, public | output_iteration (cnt, ctime, T9, rho_b, entropy, Rkm, Y, pf) |
Periodic output of analysis data for current iteration. More... | |
subroutine, private | output_track_nuclei (ctime, Y) |
Output the abundances of specific nuclei. More... | |
subroutine, private | output_nu_loss (ctime, temp, rho, Rkm) |
Output the energy that enters and leaves the system. More... | |
subroutine, private | output_mainout (cnt, ctime, T9, rho_b, entropy, Rkm, Y) |
Output Mainout file. More... | |
subroutine, private | output_snapshot (ctime, T9, rho_b, Y) |
Output Snapshot files. More... | |
subroutine | output_flow (ctime, T9, rho_b, Y) |
Output flow files. More... | |
subroutine, public | output_nr_diagnostic (cnt, k, nr_c, ctime, T9, stepsize, mtot, Y_p, Y) |
Output of the Newton-Raphson loop diagnostics. More... | |
subroutine, public | output_final_stats (cnt, ctime) |
Print final statistics. More... | |
subroutine, private | printsnap (t, T9, rho_b, Y) |
Print current snapshot. More... | |
subroutine, private | calc_nseparation_energy (Y) |
Calculates average neutron separation energy. More... | |
subroutine, private | calc_nuclear_heating (hdf5_mode, write_engen, write_toplist) |
: Calculate the generated energy for each class of reactions separately. More... | |
subroutine, private | calc_av_timescales (ctime, T9, Y, hdf5) |
Calculate average timescales of different classes of reactions. More... | |
subroutine, public | finab (Y) |
Compute final abundances and write final output. More... | |
subroutine, private | finab_sort (nsize, list) |
auxiliary sorting subroutine More... | |
subroutine, public | analysis_finalize () |
Close files at the end of the calculation. More... | |
Variables | |
real(r_kind), dimension(:), allocatable | sn |
array of n-separation energies More... | |
real(r_kind) | sn_ave |
average n-separation energy More... | |
integer | mainout_unit |
file descriptor for the main analysis output file More... | |
integer | nrdiag_unit |
diagnostic output inside the Newton-Rhapson loop More... | |
integer | track_unit |
file id for tracked nuclei More... | |
integer | toplist_unit |
file id for top nuclear energy contributors More... | |
integer | nu_loss_gain_unit |
file id for neutrino loss/gain More... | |
integer | cl_start |
integer | cl_end |
integer | cl_rate |
integer | cl_cmax |
system clock variables More... | |
integer, private | tsfile |
timescale file unit More... | |
integer, private | nuc_heat_file |
nuclear heating file unit More... | |
real(r_kind) | tsnp |
real(r_kind) | t9snp |
real(r_kind) | rosnp |
for snapshot printing triggers More... | |
integer | snapcnt |
snapshot count More... | |
integer | flowcnt |
flow printing counter More... | |
real, dimension(:), allocatable | snapshot_time |
point in time for custom snapshot More... | |
integer | snapshot_amount |
Amount of custom snapshots. More... | |
integer, parameter | toplist_amount =10 |
Amount of reactions in the toplist. More... | |
Contains various routines for analysis and diagnostic output.
subroutine, public analysis::analysis_finalize |
Close files at the end of the calculation.
Edited:
Definition at line 2030 of file analysis.f90.
subroutine, public analysis::analysis_init |
Open files, write headers, allocate space etc.
Definition at line 51 of file analysis.f90.
|
private |
Calculate average timescales of different classes of reactions.
These timescales are calculated as in Arcones et al. 2012 (Eq. 1-6). The (p,gamma) timescale is given by e.g.,
\[ \tau_{p\gamma} = \left[ \frac{\rho Y_p}{Y_h}N_A \sum \langle \sigma \nu \rangle_{p,\gamma}(Z,A)Y(Z,A) \right]^{-1} \]
An example file looks like:
# time[s] Temperature [GK] tau_ng [s] tau_gn [s] tau_pg [s] tau_gp [s] tau_np [s] tau_pn [s] tau_an [s] tau_na [s] tau_beta [s] tau_alpha [s] tau_nfiss [s] tau_sfiss [s] tau_bfiss [s] 1.1130000000000000E+00 9.1821750000000009E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 1.2642767370327558E+01 2.9487624276191804E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 1.1220000000000001E+00 8.2638489999999951E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 1.0557999180036711E+02 2.5923655028366777E+01 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 1.1247618491767180E+00 7.9904974735555152E+00 9.5690472538317728E-13 5.3150487750907188E-11 7.4419112944811684E-10 9.8479480155439862E-08 1.9792689873245490E-12 1.9444248037144314E-12 4.8686627517806918E-10 3.9657685448682009E-12 1.4600540103519526E+01 5.2634156341152767E+01 0.0000000000000000E+00 0.0000000000000000E+00 0.0000000000000000E+00 ...
[in] | ctime | current time [s] |
[in] | t9 | Temperature [GK] |
[in] | hdf5 | Whether the output is written to hdf5 or not |
[in] | y | abundances |
Definition at line 1621 of file analysis.f90.
|
private |
Calculates average neutron separation energy.
This neutron separation energy is printed in the mainout when parameter_class::calc_nsep_energy was set to "yes" and a valid file for parameter_class::nsep_energies_file.
[in] | y | abundances |
Definition at line 914 of file analysis.f90.
|
private |
: Calculate the generated energy for each class of reactions separately.
This subroutine calculates the generated energy of the nuclear reactions with the help of the Q-values. This energy is written to an output only. It is not fed back to the temperature and has therefore no impact on the final result. Also, depending on the input the subroutine can calculate the top contributors to the energy generation. These top contributors can be reactions and isotopes.
Edited:
[in] | hdf5_mode | whether to store as hdf5 or ascii |
[in] | write_engen | whether to write the energy generation |
[in] | write_toplist | whether to write the energy toplist |
Definition at line 974 of file analysis.f90.
subroutine, public analysis::finab | ( | real(r_kind), dimension(net_size), intent(in) | Y | ) |
Compute final abundances and write final output.
There are three files written finabsum.dat containing abundances summed over equal A, finab.dat containing all final abundances, finabelem.dat containing all abundances summed over equal Z.
Definition at line 1893 of file analysis.f90.
|
private |
auxiliary sorting subroutine
Definition at line 1960 of file analysis.f90.
subroutine, public analysis::output_final_stats | ( | integer, intent(in) | cnt, |
real(r_kind), intent(in) | ctime | ||
) |
Print final statistics.
An example looks like:
Final time reached. Final time: 2.000000000000E+17 Total number of iterations: 5334 Elapsed time [s]: 5.41572E+02
Edited:
Definition at line 835 of file analysis.f90.
subroutine, public analysis::output_final_step | ( | integer, intent(in) | cnt, |
real(r_kind), intent(in) | ctime, | ||
real(r_kind), intent(in) | T9, | ||
real(r_kind), intent(in) | rho_b, | ||
real(r_kind), intent(in) | entropy, | ||
real(r_kind), intent(in) | Rkm, | ||
real(r_kind), dimension(net_size), intent(in) | Y, | ||
real(r_kind), dimension(0:net_size), intent(inout) | pf | ||
) |
Output final step.
This routine calls output_iteration at the last step
Edited: OK 26.08.2017
[in] | cnt | current iteration counter |
[in] | ctime | actual time [s] |
[in] | t9 | initial temperature [GK] |
[in] | rho_b | initial density [gcc] |
[in] | entropy | entropy [kB/nucleon] |
[in] | rkm | Radius [km] |
[in] | y | array of abundances (Y_i) |
[in,out] | pf | partition functions |
Definition at line 257 of file analysis.f90.
subroutine analysis::output_flow | ( | real(r_kind), intent(in) | ctime, |
real(r_kind), intent(in) | T9, | ||
real(r_kind), intent(in) | rho_b, | ||
real(r_kind), dimension(net_size), intent(in) | Y | ||
) |
Output flow files.
Edited:
[in] | ctime | current time |
[in] | t9 | temperature [GK] |
[in] | rho_b | density [gcc] |
[in] | y | array of abundances Y_i |
Definition at line 731 of file analysis.f90.
subroutine, public analysis::output_initial_step | ( | real(r_kind), intent(in) | ctime, |
real(r_kind), intent(in) | T9, | ||
real(r_kind), intent(in) | rho_b, | ||
real(r_kind), intent(in) | entropy, | ||
real(r_kind), intent(in) | Rkm, | ||
real(r_kind), dimension(net_size), intent(in) | Y, | ||
real(r_kind), dimension(0:net_size), intent(inout) | pf | ||
) |
Output first step.
This routine calls output_iteration at the first step
[in] | ctime | actual time [s] |
[in] | t9 | initial temperature [GK] |
[in] | rho_b | initial density [gcc] |
[in] | entropy | entropy [kB/nucleon] |
[in] | rkm | Radius [km] |
[in] | y | array of abundances (Y_i) |
[in,out] | pf | partition functions |
Definition at line 232 of file analysis.f90.
subroutine, public analysis::output_iteration | ( | integer, intent(in) | cnt, |
real(r_kind), intent(in) | ctime, | ||
real(r_kind), intent(in) | T9, | ||
real(r_kind), intent(in) | rho_b, | ||
real(r_kind), intent(in) | entropy, | ||
real(r_kind), intent(in) | Rkm, | ||
real(r_kind), dimension(net_size), intent(in) | Y, | ||
real(r_kind), dimension(0:net_size), intent(inout) | pf | ||
) |
Periodic output of analysis data for current iteration.
Prints various outputs depending on the input parameter.
Edited:
[in] | cnt | current iteration counter |
[in] | ctime | actual time [s] |
[in] | t9 | temperature [GK] |
[in] | rho_b | density [gcc] |
[in] | entropy | entropy [kB/nucleon] |
[in] | rkm | length scale [km] |
[in] | y | array of abundances (Y_i) |
[in,out] | pf | partition functions |
Definition at line 324 of file analysis.f90.
|
private |
Output Mainout file.
This file contains all basic quantities such as neutron abundance Yn, time, temperature, density, Abar, and much more. An example file looks like:
# 1:iteration 2:time[s], 3:T[GK], 4:rho[g/cm3], 5:Ye # 6:R[km], 7:Y_n, 8:Y_p, 9:Y_alpha, 10:Y_lights # 11:Y_heavies 12:<Z> 13: 14:entropy [kB/baryon] (15:Sn [MeV]) 0 0.0000000000000000E+00 1.0964999999999998E+01 8.7095999999999795E+12 3.4880000000001680E-02 4.9272999999999975E+01 8.7430471311642388E-01 1.8154340816658842E-15 1.8313910002116333E-13 8.4293473893924100E-09 1.6154109228777289E-03 3.9820982195819934E-02 1.1416565996507526E+00 9.4638587929828290E-03 10 4.0940000000000001E-09 1.0965038071994945E+01 8.7093701186135752E+12 3.4880006806212963E-02 4.9273176232580205E+01 8.7430472419630612E-01 1.8157922458135375E-15 1.8317495847108614E-13 8.4302150496944692E-09 1.6154086944791908E-03 3.9820989563731306E-02 1.1416565881127740E+00 9.4639764072160116E-03 ...
[in] | cnt | current iteration counter |
[in] | ctime | current time |
[in] | t9 | temperature [GK] |
[in] | rho_b | density [gcc] |
[in] | entropy | entropy [kB/nucleon] |
[in] | rkm | length scale [km] |
[in] | y | array of abundances (Y_i) |
Definition at line 641 of file analysis.f90.
subroutine, public analysis::output_nr_diagnostic | ( | integer, intent(in) | cnt, |
integer, intent(in) | k, | ||
integer, intent(in) | nr_c, | ||
real(r_kind), intent(in) | ctime, | ||
real(r_kind), intent(in) | T9, | ||
real(r_kind), intent(in) | stepsize, | ||
real(r_kind), intent(in) | mtot, | ||
real(r_kind), dimension(net_size) | Y_p, | ||
real(r_kind), dimension(net_size) | Y | ||
) |
Output of the Newton-Raphson loop diagnostics.
The diagnostic output contains NR iterations, timesteps, the nucleus that restricts the timestep and more. An example file looks like:
# Newton-Raphson diagnostic output # 1 : global iteration count (cnt) # 2 : global time [s] # 3 : temperature T9 [GK] # 4 : adapt stepsize loop counter (k) # 5 : NR loop counter (nr_count) # 6 : global timestep [s] # 7 : mass conservation error # 8 : maximal abundance change (eps) # 9 : most rapidly evolving isotope (epsl) # 10: abundance of the isotope epsl, y(epsl) 0 5.20740000000E-22 7.42450000000E+00 0 1 5.20740000000E-22 9.32587340685E-15 2.22044604925E-16 cl42 2.43899441583E-08 0 5.20740000000E-22 7.42450000000E+00 0 2 5.20740000000E-22 9.32587340685E-15 2.22044604925E-16 s40 2.73320077046E-08 1 1.56220000000E-21 7.42450000000E+00 0 1 1.04146000000E-21 9.32587340685E-15 2.22044604925E-16 he4 3.13811866442E-03 1 1.56220000000E-21 7.42450000000E+00 0 2 1.04146000000E-21 9.32587340685E-15 2.22044604925E-16 mg30 1.57736344914E-10 ...
[in] | cnt | global iteration counter |
[in] | k | counter in adapt_stepsize loop |
[in] | nr_c | counter in the NR loop |
[in] | ctime | global current time |
[in] | t9 | current temperature [GK] |
[in] | stepsize | current step size |
[in] | mtot | total mass |
y | old/new abundances |
Definition at line 769 of file analysis.f90.
|
private |
Output the energy that enters and leaves the system.
Outputs the energy that enters and leaves the system when nuclear_heating is turned on. This output is controlled by the parameter nu_loss_every . The output is written to the file "nu_loss_gain_file". An example of the file could look like:
# File containing the neutrino loss/gain for the nuclear heating. # Negative values mean that energy is added to the system. # Neutrino energies are given in MeV/baryon/s. # time[s] T[GK] rho[g/cm3] R[km] nu_total ... 1.10385E+00 1.00000E+01 4.89334E+07 3.55626E+02 0.00000E+00 ... 1.10385E+00 1.00000E+01 4.89334E+07 3.55626E+02 -5.05524E+00 ... 1.10385E+00 1.00000E+01 4.89334E+07 3.55626E+02 -5.05524E+00 ... 1.10385E+00 1.00000E+01 4.89334E+07 3.55626E+02 -5.05524E+00 ... ...
[in] | ctime | actual time (s) |
[in] | temp | temperature (GK) |
[in] | rho | density (g/cm3) |
[in] | rkm | radius (km) |
Definition at line 603 of file analysis.f90.
|
private |
Output Snapshot files.
Snapshots store the abundances and mass fractions of all nuclei at certain times. An example file looks like:
time temp dens 9.77198412010000E-02 9.99927332947922E+00 3.88380373937259E+06 nin zin y x 1 0 5.72194135572689E-01 5.72194135572689E-01 0 1 3.92194484636783E-01 3.92194484636783E-01 1 1 7.83033243870819E-05 1.56606648774164E-04 ...
Edited:
[in] | ctime | current time |
[in] | t9 | temperature [GK] |
[in] | rho_b | density [gcc] |
[in] | y | array of abundances Y_i |
Definition at line 711 of file analysis.f90.
|
private |
Output the abundances of specific nuclei.
First column is always the time, followed by the abundances of nuclei given in "track_nuclei_file". An example of the file looks like:
# time[s] Y( n ) Y( o24 ) Y( f24 ) 0.0000000000000000E+00 0.0000000000000000E+00 2.0833333333333332E-02 0.0000000000000000E+00 1.9999999999999999E-20 8.5150206007805894E-19 2.0833333333333332E-02 1.8661570495808601E-21 5.9999999999999994E-20 2.5545061802341771E-18 2.0833333333333332E-02 5.5984711487425806E-21 1.3999999999999998E-19 5.9605144205464133E-18 2.0833333333333332E-02 1.3063099347066021E-20 ...
Edited:
[in] | ctime | Actual time |
[in] | y | array of abundances (Y_i) |
Definition at line 563 of file analysis.f90.
|
private |
Print current snapshot.
Snapshots store the abundances and mass fractions of all nuclei at certain times. An example file looks like:
time temp dens 9.77198412010000E-02 9.99927332947922E+00 3.88380373937259E+06 nin zin y x 1 0 5.72194135572689E-01 5.72194135572689E-01 0 1 3.92194484636783E-01 3.92194484636783E-01 1 1 7.83033243870819E-05 1.56606648774164E-04 ...
Definition at line 874 of file analysis.f90.
integer analysis::cl_cmax |
system clock variables
Definition at line 24 of file analysis.f90.
integer analysis::cl_end |
Definition at line 24 of file analysis.f90.
integer analysis::cl_rate |
Definition at line 24 of file analysis.f90.
integer analysis::cl_start |
Definition at line 24 of file analysis.f90.
integer analysis::flowcnt |
flow printing counter
Definition at line 29 of file analysis.f90.
integer analysis::mainout_unit |
file descriptor for the main analysis output file
Definition at line 19 of file analysis.f90.
integer analysis::nrdiag_unit |
diagnostic output inside the Newton-Rhapson loop
Definition at line 20 of file analysis.f90.
integer analysis::nu_loss_gain_unit |
file id for neutrino loss/gain
Definition at line 23 of file analysis.f90.
|
private |
nuclear heating file unit
Definition at line 26 of file analysis.f90.
real(r_kind) analysis::rosnp |
for snapshot printing triggers
Definition at line 27 of file analysis.f90.
real(r_kind), dimension(:), allocatable analysis::sn |
array of n-separation energies
Definition at line 17 of file analysis.f90.
real(r_kind) analysis::sn_ave |
average n-separation energy
Definition at line 18 of file analysis.f90.
integer analysis::snapcnt |
snapshot count
Definition at line 28 of file analysis.f90.
integer analysis::snapshot_amount |
Amount of custom snapshots.
Definition at line 31 of file analysis.f90.
real, dimension(:), allocatable analysis::snapshot_time |
point in time for custom snapshot
Definition at line 30 of file analysis.f90.
real(r_kind) analysis::t9snp |
Definition at line 27 of file analysis.f90.
integer, parameter analysis::toplist_amount =10 |
Amount of reactions in the toplist.
Definition at line 32 of file analysis.f90.
integer analysis::toplist_unit |
file id for top nuclear energy contributors
Definition at line 22 of file analysis.f90.
integer analysis::track_unit |
file id for tracked nuclei
Definition at line 21 of file analysis.f90.
|
private |
timescale file unit
Definition at line 25 of file analysis.f90.
real(r_kind) analysis::tsnp |
Definition at line 27 of file analysis.f90.