pynucastro.screening.screen module#

Python implementations of common electron screening routines.

class pynucastro.screening.screen.NseState(*args, **kwargs)[source]#

Bases: NseState

Store precomputed values that are reused in the NSE state screening calculations

Parameters:
  • temp (float) – Temperature in K

  • dens (float) – Density in g/cm^3

  • ye (float) – Electron molar fraction

gamma_e_fac#

Temperature-independent part of Gamma_e.

Type:

float

class_type = jitclass.NseState#7f02c810c790<temp:float64,dens:float64,ye:float64,gamma_e_fac:float64>#
class pynucastro.screening.screen.PlasmaState(*args, **kwargs)[source]#

Bases: PlasmaState

Store precomputed values that are reused for all screening correction factor calculations.

temp#

temperature in K

Type:

float

dens#

density in g/cm^3

Type:

float

qlam0z#

a common factor from Graboske 1973

Type:

float

taufac#

a common factor from Itoh 1979

Type:

float

aa#

a common factor from Itoh 1979

Type:

float

abar#

average atomic mass

Type:

float

zbar#

average ion charge

Type:

float

z2bar#

average (ion charge)^2

Type:

float

n_e#

electron number density

Type:

float

gamma_e_fac#

temperature-independent part of Gamma_e

Type:

float

class_type = jitclass.PlasmaState#7f03098b4c50<temp:float64,dens:float64,qlam0z:float64,taufac:float64,aa:float64,abar:float64,zbar:float64,z2bar:float64,n_e:float64,gamma_e_fac:float64>#
class pynucastro.screening.screen.ScreenFactors(*args, **kwargs)[source]#

Bases: ScreenFactors

Store values that will be used to calculate the screening correction factor for a specific pair of nuclei.

z1#

atomic number of first nucleus

Type:

float

z2#

atomic number of second nucleus

Type:

float

a1#

atomic mass of first nucleus

Type:

float

a2#

atomic mass of second nucleus

Type:

float

zs13#

(z1+z2)**(1/3)

Type:

float

zhat#

combination of z1 and z2 raised to the 5/3 power

Type:

float

zhat2#

combination of z1 and z2 raised to the 5/12 power

Type:

float

lzav#

log of effective charge

Type:

float

aznut#

combination of a1, z1, a2, z2 raised to 1/3 power

Type:

float

ztilde#

effective ion radius factor for a MCP

Type:

float

class_type = jitclass.ScreenFactors#7f02c810d3d0<z1:int64,z2:int64,a1:int64,a2:int64,zs13:float64,zhat:float64,zhat2:float64,lzav:float64,aznut:float64,ztilde:float64>#
pynucastro.screening.screen.chugunov_2007(state, scn_fac)[source]#

Calculate screening factors based on Chugunov et al. [2007].

Follows the approach in Yakovlev et al. [2006] to extend to a multi-component plasma.

Parameters:
  • state (PlasmaState) – the precomputed plasma state factors

  • scn_fac (ScreenFactors) – the precomputed ion pair factors

Return type:

float

pynucastro.screening.screen.chugunov_2009(state, scn_fac)[source]#

Calculate screening factors based on Chugunov and DeWitt [2009].

Parameters:
  • state (PlasmaState) – the precomputed plasma state factors

  • scn_fac (ScreenFactors) – the precomputed ion pair factors

Return type:

float

pynucastro.screening.screen.debye_huckel(state, scn_fac)[source]#

Calculate the Debye-Huckel enhancement factor for weak Coloumb coupling, following the appendix of Chugunov and DeWitt [2009].

Parameters:
  • state (PlasmaState) – the precomputed plasma state factors

  • scn_fac (ScreenFactors) – the precomputed ion pair factors

Return type:

float

pynucastro.screening.screen.f0(gamma)[source]#

Calculate the free energy per ion in a OCP from Chugunov and DeWitt [2009] eq. 24

Parameters:

gamma (float) – Coulomb coupling parameter

Return type:

float

pynucastro.screening.screen.make_plasma_state(temp, dens, molar_fractions)[source]#

Construct a PlasmaState object from simulation data.

Parameters:
Return type:

PlasmaState

pynucastro.screening.screen.make_screen_factors(n1, n2)[source]#

Construct a ScreenFactors object from a pair of nuclei.

Parameters:
Return type:

ScreenFactors

pynucastro.screening.screen.potekhin_1998(state, scn_fac)[source]#

Calculate screening factors based on Chabrier and Potekhin [1998].

Parameters:
  • state (PlasmaState) – the precomputed plasma state factors

  • scn_fac (ScreenFactors) – the precomputed ion pair factors

Return type:

float

pynucastro.screening.screen.screen5(state, scn_fac)[source]#

Calculate screening factors following the appendix of Wallace et al. [1982].

Based on Graboske et al. [1973] for weak screening. Based on Alastuey and Jancovici [1978] with plasma parameters from Itoh et al. [1979], for strong screening.

Parameters:
  • state (PlasmaState) – the precomputed plasma state factors

  • scn_fac (ScreenFactors) – the precomputed ion pair factors

Return type:

float

pynucastro.screening.screen.screening_check(check_func=CPUDispatcher(<function debye_huckel>), threshold=1.01)[source]#

Create a decorator factory that wraps a screening function with a check that determines whether that function can be skipped for a given plasma state and screening pair.

Parameters:
  • func – the function to check against the threshold

  • threshold – the threshold to check against. If screen_check is less than the threshold, skip screen_func

Returns:

a decorator for wrapping screening functions

pynucastro.screening.screen.smooth_clip(x, limit, start)[source]#

Create a smooth transition between y=limit and y=x with a half-cosine.

Clips smaller values if limit < start and larger values if start < limit.

Parameters:
  • x (float) – the value to clip

  • limit (float) – the constant value to clip x to

  • start (float) – the x-value at which to start the transition

Return type:

float