nuclear_heating Module Reference

Takes care of the temperature and entropy updates due to the nuclear energy release. More...

Functions/Subroutines

subroutine, public nuclear_heating_init (T9, rho, Ye, Y, entropy)
 Nuclear heating initialization routine. More...
 
subroutine, private start_heating (T9, rho, Ye, Y, entropy)
 Initialize the entrop and temperature for the heating. More...
 
subroutine reset_qdot (time)
 Reset the qdot variable. More...
 
subroutine calculate_qdot (rrate, Y, h)
 
subroutine output_debug_nufrac (rrate_array, length)
 Output the heating fractions to a debug file. More...
 
subroutine, public nuclear_heating_update (nr_count, rho, Ye, pf, Y_p, Y, entropy_p, entropy, T9_p, T9, T9_tr_p, T9_tr, timestep, T9conv)
 Modifies the temperature and entropy to account for nuclear heating. More...
 
subroutine, private nuclear_heating_energy (rho, Ye, pf, Y_p, Y, entropy_p, entropy, T9_p, T9, T9_tr_p, T9_tr, eos_status)
 Modifies the temperature to account for nuclear heating. More...
 
subroutine, private nuclear_heating_entropy (rho, Ye, pf, Y_p, Y, entropy_p, entropy, T9, eos_status)
 Modifies the temperature and ent_p to account for nuclear heating. More...
 
subroutine, public output_nuclear_heating (cnt, ctime)
 Output data related to nuclear heating. More...
 

Variables

real(r_kind), private engen_nuc
 Total energy, generated by nuclear reactions. More...
 
integer, private engen_unit
 Engen output file. More...
 
integer, private debug_temp
 Debug file for temperature integration. More...
 
integer, private debug_heatfrac
 Debug file for the heating fraction. More...
 
real(r_kind), save, public qdot_bet = 0
 Total energy radiated away by. More...
 
real(r_kind), save, public qdot_nu = 0
 Total energy added to the system by neutrino. More...
 
real(r_kind), save, public qdot_th = 0
 Total energy lost by thermal neutrinos. More...
 
real(r_kind), private debug_ffn_qd =0
 debug variable for the qdot caused by ffn rates More...
 
real(r_kind), private debug_nu_qd =0
 debug variable for the qdot caused by nu rates More...
 
real(r_kind), private debug_bet_qd =0
 debug variable for the qdot caused by beta decay rates More...
 

Detailed Description

Takes care of the temperature and entropy updates due to the nuclear energy release.

Function/Subroutine Documentation

◆ calculate_qdot()

subroutine nuclear_heating::calculate_qdot ( type(reactionrate_type), intent(in)  rrate,
real(r_kind), dimension(net_size), intent(in)  Y,
real(r_kind), intent(in)  h 
)
Parameters
[in]rrateReaction rate
[in]yAbundances
[in]htimestep

Definition at line 200 of file nuclear_heating.f90.

◆ nuclear_heating_energy()

subroutine, private nuclear_heating::nuclear_heating_energy ( real(r_kind), intent(in)  rho,
real(r_kind), intent(in)  Ye,
real(r_kind), dimension(0:net_size), intent(out)  pf,
real(r_kind), dimension(net_size), intent(in)  Y_p,
real(r_kind), dimension(net_size), intent(in)  Y,
real(r_kind), intent(in)  entropy_p,
real(r_kind), intent(out)  entropy,
real(r_kind), intent(in)  T9_p,
real(r_kind), intent(inout)  T9,
real(r_kind), intent(in)  T9_tr_p,
real(r_kind), intent(in)  T9_tr,
integer, intent(out)  eos_status 
)
private

Modifies the temperature to account for nuclear heating.

Here, an additional equation is calculated for the temperature. The temperature is calculated by:

\[ \dot{T}_\mathrm{nuc} = \frac{1}{c_v} \sum_i M_i dY_i \]

with the symbols defined as:

  • M_i : mass excess [MeV] (see global_class::isotope%mass_exc)
  • cv : Specific heat capacity at constant volume
 

For heating_mode 2, the temperature is calculated by:

\[ \dot{T}_\mathrm{nuc} = \dot{T}_\mathrm{nuc} + \dot{T}_\mathrm{tr} \]

where \(\dot{T}_\mathrm{tr}\) is the temperature change of the external conditions, i.e., the trajectory or the analytic equation. For heating_mode 3, the temperature is calculated by:

\[ \dot{T}_\mathrm{nuc} = \dot{T}_\mathrm{nuc} + \dot{T}_\mathrm{ad} \]

where \(\dot{T}_\mathrm{ad}\) is the temperature change assuming adiabatic conditions.

Author
M. Reichert
Date
10.02.23
See also
Lippuner & Roberts 2017, XNet
Parameters
[in]rhodensity
[in]yeelectron fraction
[out]pfpartition functions
[in]y_pabundances
[in]yabundances at the next step
[in]entropy_pentropy
[out]entropyentropy for the next step
[in,out]t9temperature at the next step
[in]t9_ptemperature at the previous step
[in]t9_tr_ptemperature of the trajectory/analytic (prev.)
[in]t9_trtemperature of the trajectory/analytic
[out]eos_statusstatus of the EOS call

Definition at line 460 of file nuclear_heating.f90.

Here is the call graph for this function:

◆ nuclear_heating_entropy()

subroutine, private nuclear_heating::nuclear_heating_entropy ( real(r_kind), intent(in)  rho,
real(r_kind), intent(in)  Ye,
real(r_kind), dimension(0:net_size), intent(out)  pf,
real(r_kind), dimension(net_size), intent(in)  Y_p,
real(r_kind), dimension(net_size), intent(in)  Y,
real(r_kind), intent(in)  entropy_p,
real(r_kind), intent(out)  entropy,
real(r_kind), intent(inout)  T9,
integer, intent(out)  eos_status 
)
private

Modifies the temperature and ent_p to account for nuclear heating.

Here, an additional equation is calculated for the entropy. The entropy is calculated by:

\[ E_\mathrm{gen} = \sum_i (m_i c^2 + \mu_i + Z_i \mu_e) dY_i -\Delta q \]

, where \( \mu_i \) is given by

\[ \mu_i = -k_B T \log \left( \frac{g_i G_i}{\rho N_A Y_i} \left(\frac{2 \pi m_ic^2 k_B T}{h^2 c^2}\right)^{1.5} \right) \]

and the nuclear mass defined by the atomic mass excess:

\[ m_ic^2 = M_i +Am_uc^2 - Z_i m_e c^2 .\]

The symbols are defined as:


 

The entropy is converted to a temperature via the equation of state at the end of this subroutine. Furthermore, \( \Delta q \) is the energy loss due neutrinos that won't thermalize (parameter_class::heating_frac , beta_decay_file , neutrino_loss_file).

See also
Freiburghaus et al. 1999, Eq. 2 Mueller 1986
Author
O. Korobkin

Edited:

  • MR: 20.01.21 - Separated top contributor to independent subroutine
Parameters
[in]rhodensity
[in]yeelectron fraction
[out]pfpartition functions
[in]y_pabundances
[in]yabundances at the next step
[in]entropy_pentropy
[out]entropyentropy for the next step
[in,out]t9temperature at the next step
[out]eos_statusStatus of the EOS call

Definition at line 601 of file nuclear_heating.f90.

Here is the call graph for this function:

◆ nuclear_heating_init()

subroutine, public nuclear_heating::nuclear_heating_init ( real(r_kind), intent(in)  T9,
real(r_kind), intent(in)  rho,
real(r_kind), intent(in)  Ye,
real(r_kind), dimension(net_size), intent(in)  Y,
real(r_kind), intent(out)  entropy 
)

Nuclear heating initialization routine.

This subroutine creates some files (e.g., debug_engen.dat_) and prepares the header for the engen.dat file

Edited:

  • MR: 20.01.21 - Gave toplist file a header
  • MR: 07.05.24 - Removed toplist and moved it to analysis module
Parameters
[in]t9temperature [GK]
[in]rhodensity [g/cm^3]
[in]yeelectron fraction
[in]yabundances
[out]entropy[kB/baryon]

Definition at line 50 of file nuclear_heating.f90.

Here is the call graph for this function:

◆ nuclear_heating_update()

subroutine, public nuclear_heating::nuclear_heating_update ( integer, intent(in)  nr_count,
real(r_kind), intent(in)  rho,
real(r_kind), intent(in)  Ye,
real(r_kind), dimension(0:net_size), intent(out)  pf,
real(r_kind), dimension(net_size), intent(in)  Y_p,
real(r_kind), dimension(net_size), intent(in)  Y,
real(r_kind), intent(in)  entropy_p,
real(r_kind), intent(out)  entropy,
real(r_kind), intent(in)  T9_p,
real(r_kind), intent(inout)  T9,
real(r_kind), intent(in)  T9_tr_p,
real(r_kind), intent(in)  T9_tr,
real(r_kind), intent(in)  timestep,
real(r_kind), intent(out)  T9conv 
)

Modifies the temperature and entropy to account for nuclear heating.

The temperature/entropy is solved (explicitely) in the same Newton-Raphson scheme as used for the abundances in e.g., timestep_module::advance_implicit_euler and timestep_module::advance_gear.

There are 3 different heating modes:

Heating modes
Value Evolved variable Additional source term
0 No heating -
1 Entropy adiabatic
2 Temperature trajectory
3 Temperature adiabatic
Author
M. Reichert
Date
10.02.23
Parameters
[in]nr_countNR-iteration count
[in]rhodensity
[in]yeelectron fraction
[out]pfpartition functions
[in]y_pabundances
[in]yabundances at the next step
[in]entropy_pentropy
[out]entropyentropy for the next step
[in]t9_tr_ptemperature of the trajectory/analytic (prev.)
[in]t9_trtemperature of the trajectory/analytic
[in]t9_ptemperature at the previous step
[in,out]t9temperature at the next step
[in]timesteptimestep (s)
[out]t9convConvergence of the temperature

Definition at line 319 of file nuclear_heating.f90.

Here is the call graph for this function:

◆ output_debug_nufrac()

subroutine nuclear_heating::output_debug_nufrac ( type(reactionrate_type), dimension(length), intent(in)  rrate_array,
integer, intent(in)  length 
)

Output the heating fractions to a debug file.

This subroutine outputs the heating fractions to a debug file. This is useful for debugging purposes. The file is called debug_heating_nufrac.dat and is located in the output directory. An example could look like

 Group     Isotope      Source     Nu_frac     Q_value
     1           n        wc12     0.40000     0.78230
     1           t        wc12     0.40000     0.01860
     1         he3          ec     0.40000    -0.01900
     1         he6        wc12     0.55394     3.50510
     1         li9        wc12     0.45403    13.60600
...
Author
M. Reichert
Date
30.03.2023
Parameters
[in]lengthAmount of reactions
[in]rrate_arrayReaction rate array

Definition at line 266 of file nuclear_heating.f90.

Here is the call graph for this function:

◆ output_nuclear_heating()

subroutine, public nuclear_heating::output_nuclear_heating ( integer, intent(in)  cnt,
real(r_kind), intent(in)  ctime 
)

Output data related to nuclear heating.

For example the energy generation in the file engen.dat

 # 1:iteration 2:time[s] 3:timestep[s] 4:E_gen(tot) [erg/g] 5:E_gen(t) [erg/(g*s )] 6:E_gen(t) [MeV/(baryon*s)]
         0  0.000000000000000E+00  0.000000000000000E+00  0.000000000000000E+00  0.000000000000000E+00  0.000000000000000E+00
         0  2.000000000000000E-12  2.000000000000000E-12  2.100942703338183E+08  5.252356611052194E+19  5.443684205322992E+01
         1  6.000000000000000E-12  4.000000000000000E-12  6.302695988823750E+08  5.252191701420075E+19  5.443513288527704E+01
 ...

Edited:

  • MR: 20.1.21 - Modified format of toplist.dat
  • MR: 07.5.24 - Removed toplist.dat from here
Parameters
[in]cntcurrent iteration
[in]ctimecurrent global time [s]

Definition at line 756 of file nuclear_heating.f90.

◆ reset_qdot()

subroutine nuclear_heating::reset_qdot ( real(r_kind), intent(in)  time)

Reset the qdot variable.

This is called by the Jacobian init whenever recalculating the jacobian.

Author
M. Reichert
Parameters
[in]timeCurrent time

Definition at line 154 of file nuclear_heating.f90.

◆ start_heating()

subroutine, private nuclear_heating::start_heating ( real(r_kind), intent(in)  T9,
real(r_kind), intent(in)  rho,
real(r_kind), intent(in)  Ye,
real(r_kind), dimension(net_size), intent(in)  Y,
real(r_kind), intent(out)  entropy 
)
private

Initialize the entrop and temperature for the heating.

Parameters
[in]t9temperature [GK]
[in]rhodensity [g/cm^3]
[in]yeelectron fraction
[in]yabundances
[out]entropy[kB/baryon]

Definition at line 118 of file nuclear_heating.f90.

Here is the call graph for this function:

Variable Documentation

◆ debug_bet_qd

real(r_kind), private nuclear_heating::debug_bet_qd =0
private

debug variable for the qdot caused by beta decay rates

Definition at line 28 of file nuclear_heating.f90.

◆ debug_ffn_qd

real(r_kind), private nuclear_heating::debug_ffn_qd =0
private

debug variable for the qdot caused by ffn rates

Definition at line 26 of file nuclear_heating.f90.

◆ debug_heatfrac

integer, private nuclear_heating::debug_heatfrac
private

Debug file for the heating fraction.

Definition at line 19 of file nuclear_heating.f90.

◆ debug_nu_qd

real(r_kind), private nuclear_heating::debug_nu_qd =0
private

debug variable for the qdot caused by nu rates

Definition at line 27 of file nuclear_heating.f90.

◆ debug_temp

integer, private nuclear_heating::debug_temp
private

Debug file for temperature integration.

Definition at line 18 of file nuclear_heating.f90.

◆ engen_nuc

real(r_kind), private nuclear_heating::engen_nuc
private

Total energy, generated by nuclear reactions.

Definition at line 16 of file nuclear_heating.f90.

◆ engen_unit

integer, private nuclear_heating::engen_unit
private

Engen output file.

Definition at line 17 of file nuclear_heating.f90.

◆ qdot_bet

real(r_kind), save, public nuclear_heating::qdot_bet = 0

Total energy radiated away by.

Definition at line 21 of file nuclear_heating.f90.

◆ qdot_nu

real(r_kind), save, public nuclear_heating::qdot_nu = 0

Total energy added to the system by neutrino.

Definition at line 22 of file nuclear_heating.f90.

◆ qdot_th

real(r_kind), save, public nuclear_heating::qdot_th = 0

Total energy lost by thermal neutrinos.

Definition at line 23 of file nuclear_heating.f90.