winnse_module.f90 File Reference

Module winnse_module with subroutines needed for calculating nuclear statistical equilibrium. More...

Go to the source code of this file.

Modules

module  winnse_module
 Module to calculate NSE.
 

Functions/Subroutines

subroutine, public winnse_module::nse_init ()
 Allocates and initialises various arrays needed for the nse calculation. More...
 
subroutine, public winnse_module::winnse_guess (t9, rho, ye, yn_guess, yp_guess, ysol)
 Calculate NSE composition with an initial guess. More...
 
subroutine, public winnse_module::winnse_descend (t9strt, t9fnl, rho, ye, yni, ypi, ysol)
 This routine descends from an initially high temperature, at which the NSE abudances can be accurately predicted, to the desired temperature. More...
 
subroutine, private winnse_module::winnse_calc (t9, rho, ye, yn, yp, imax, kit)
 Solves the nse-equations. More...
 
subroutine, private winnse_module::winnse_calc_hybrid_powell (t9, rho, ye, yn, yp, imax, kit)
 Solves the nse-equations using the Powell hybrid method. More...
 
subroutine, private winnse_module::winnse_calc_nr (t9, rho, ye, yn, yp, imax, kit)
 Solves the nse-equations using a 2-dimensional newton-raphson scheme. More...
 
subroutine, private winnse_module::nse_screen (t9, rho, ye)
 Calls screening subroutine and adds subsequent proton capture screening corrections in scrn(1:zmax). More...
 
subroutine, private winnse_module::wincnse_calc (t9, rho)
 Calculates the nse coefficients C, as given in Hix,Thielemann '99, Eq.25. More...
 
subroutine mass_and_charge_conservation (n, x, fvec)
 Determines the mass and charge conservation for the NSE calculation. More...
 

Variables

real(r_kind), dimension(:), allocatable, public winnse_module::ynse
 NSE abundances. More...
 
real(r_kind), dimension(:), allocatable, public winnse_module::pf
 Partition function for a given temperature. More...
 
real(r_kind), dimension(:), allocatable, private winnse_module::gg
 \( G(Z,A)=(2J_0+1) \) where \( J_0 \) is the spin of the ground state More...
 
real(r_kind), dimension(:), allocatable, private winnse_module::be
 Binding energy, calculated using mass excesses. More...
 
real(r_kind), dimension(:), allocatable, private winnse_module::scrn
 Screening correction (details see nse_screen) More...
 
real(r_kind), dimension(:), allocatable, public winnse_module::cnse
 NSE coefficients (details see cnsecalc) More...
 
real(r_kind), public winnse_module::ye_ext
 Electron fraction to pass to external function. More...
 
integer, dimension(:), allocatable, public winnse_module::aa
 Mass number. More...
 
integer, dimension(:), allocatable, public winnse_module::zz
 Proton number. More...
 
integer, dimension(:), allocatable, public winnse_module::nn
 Neutron number. More...
 
integer, private winnse_module::zmax
 Highest proton number occuring in network. More...
 

Detailed Description

Module winnse_module with subroutines needed for calculating nuclear statistical equilibrium.

The error file code for this file is W45.

Author
Christian Winteler
Date
25.03.10

Edited:

  • OK: 07.11.16
  • MR: 11.01.21 - implemented error_msg_class
  • MR: 15.01.21 - Made it a module
  • MR: 14.06.23 - Inplemented Powell's hybrid method

Definition in file winnse_module.f90.

Function/Subroutine Documentation

◆ mass_and_charge_conservation()

subroutine mass_and_charge_conservation ( integer  n,
real (r_kind), dimension(n)  x,
real (r_kind), dimension(n)  fvec 
)

Determines the mass and charge conservation for the NSE calculation.

This subroutine calculates the mass and charge conservation for the NSE calculation. It is used in the Powell hybrid method to solve the system of equations. The first entry of fvec will contain

\[ \sum_i Z_i Y_i - y_e \]

and the second entry will contain

\[ \sum_i A_i Y_i - 1 \]

where \( Z_i \) is the proton number, \( A_i \) the mass number, \( Y_i \) the abundance of the isotope i, and \( y_e \) the electron fraction.

Author
M. Reichert
Date
14.06.23
Parameters
nNumber of equations and variables (2)
fvecVector that contains function evaluations
xVector of variables

Definition at line 692 of file winnse_module.f90.