microfield

Ion microfield distributions and quadrature grids. The unscreened Holtsmark field distribution is written in reduced field units \(\beta = F/F_0\) as

\[W_H(\beta) = \frac{2\beta}{\pi} \int_0^\infty y\sin(\beta y)\,e^{-y^{3/2}}\,dy.\]

The default Hooper screened form modifies the exponent with the screening function \(S(y,a)\),

\[W(\beta,a) = \frac{2\beta}{\pi} \int_0^\infty y\sin(\beta y)\, e^{-y^{3/2}S(y,a)}\,dy, \qquad a = r_e/\lambda_D.\]
starkzee.microfield.calculate_normal_field(Ne_m3, Z_bar=1.0)[source]

Return the Holtsmark normal electric field F₀ [V m⁻¹] and mean inter-particle distance r_e [m].

F₀ is the characteristic field strength that scales the microfield distribution. It is defined as the Coulomb field of an ion with average charge Z_bar * e at the mean inter-particle distance (Wigner-Seitz radius) r_e:

r_e = (3 * Z_bar / (4π N_e))^(1/3) F₀ = Z_bar * e / (4π ε₀ r_e²)

Note that the screening parameter a used in screened microfield distributions (like Hooper or Potekhin) is defined as the ratio of the mean inter-particle distance r_e to the Debye length λ_D, i.e., a = r_e / λ_D. The mean inter-particle distance characterizes the average spacing between ions in the plasma, whereas the Debye length characterizes the scale over which electrostatic fields are screened by the plasma.

Parameters:
  • Ne_m3 (float) – Electron number density [m⁻³].

  • Z_bar (float, optional) – Average background ion charge (default is 1.0).

Returns:

  • F0 (float) – Normal (Holtsmark) electric field [V m⁻¹].

  • re (float) – Mean inter-particle distance (Wigner-Seitz radius) [m].

starkzee.microfield.calculate_debye_length(Te_ev, Ne_m3)[source]

Return the electron Debye screening length λ_D [m].

The Debye length characterizes the spatial scale over which the plasma screens individual Coulomb fields:

λ_D = √(ε₀ T_e / (N_e e)) [T_e in eV, so e T_e gives k_B T_e in J]

Parameters:
  • Te_ev (float) – Electron temperature [eV].

  • Ne_m3 (float) – Electron number density [m⁻³].

Returns:

Debye length [m].

Return type:

float

starkzee.microfield.calculate_multispecies_debye_length(Te_ev, Ne_m3, species_charges=None, species_concentrations=None)[source]

Return the multi-species Debye length λ_D [m].

Extends the single-species Debye length to a plasma containing multiple ion species by summing their charge-weighted contributions to the screening:

λ_D = √(ε₀ T_e / (N_e e × (1 + Σ_i X_i Z_i²)))

where X_i = N_i / N_e is the fractional concentration and Z_i the charge of species i. The 1 in the denominator accounts for the electron contribution. If no species information is given the function falls back to the single-species result calculate_debye_length().

Parameters:
  • Te_ev (float) – Electron (and ion) temperature [eV]. The formula assumes T_e = T_i.

  • Ne_m3 (float) – Electron number density [m⁻³].

  • species_charges (list of float, optional) – Charge numbers Z_i for each ion species.

  • species_concentrations (list of float, optional) – Relative concentrations X_i = N_i / N_e for each species. Must have the same length as species_charges.

Returns:

Multi-species Debye length [m].

Return type:

float

starkzee.microfield.calculate_coupling_parameter(Z_bar, Ti_ev, R_ii)[source]

Return the ion-ion coupling parameter Gamma_ii.

Parameters:
  • Z_bar (float) – Average ion charge.

  • Ti_ev (float) – Ion temperature [eV].

  • R_ii (float) – Wigner-Seitz radius [m].

Returns:

Ion-ion coupling parameter.

Return type:

float

starkzee.microfield.holtsmark_distribution(beta, method='vectorized')[source]

Return the Holtsmark microfield probability density W(β) at reduced field β.

Supports both scalar and array-like inputs.

Parameters:
  • beta (float or ndarray) – Reduced electric field β = F / F₀.

  • method ({'vectorized', 'exact', 'potekhin'}, optional) – Computation method (default is ‘vectorized’): - ‘vectorized’: fast Gauss-Legendre quadrature. - ‘exact’: exact adaptive quadrature. - ‘potekhin’: Zest-compatible Potekhin analytical fit at Gamma=0.

starkzee.microfield.hooper_distribution(beta, a, charged=True, method='vectorized')[source]

Return the Hooper screened microfield probability density W(β, a).

Supports both scalar and array-like inputs.

Parameters:
  • beta (float or ndarray) – Reduced electric field β = F / F₀.

  • a (float) – Screening parameter a = r_e / λ_D.

  • charged (bool, optional) – True for a charged point (ion radiator), False for neutral (atom radiator). Default is True.

  • method ({'vectorized', 'exact'}, optional) – Computation method (default is ‘vectorized’): - ‘vectorized’: fast Gauss-Legendre quadrature. - ‘exact’: exact adaptive quadrature.

starkzee.microfield.potekhin_distribution(beta, gamma, s=0.0, charged=True)[source]

Return the Potekhin screened/unscreened microfield probability density.

Parameters:
  • beta (float or ndarray) – Dimensionless field strength beta = F/F_0.

  • gamma (float) – Ion-ion coupling parameter Gamma_ii.

  • s (float, optional) – Screening parameter s = R_ii / lambda_e (default 0.0).

  • charged (bool, optional) – True for a charged point (ion radiator), False for neutral (atom radiator).

Returns:

Potekhin probability density values on the beta grid.

Return type:

float or ndarray

starkzee.microfield.microfield_quadrature(Ne_m3, Te_ev, num_points=50, max_beta=10.0, use_screening=True, species_charges=None, species_concentrations=None, custom_table_path=None, charged=False, Z_bar=1.0)[source]

Build a quadrature grid of plasma electric microfield magnitudes and weights.

Discretises the microfield integral ∫ W(F) dF over a uniform grid of num_points values of the reduced field β = F / F₀ in [0, max_beta]. The returned arrays satisfy:

Σ_i weight_i ≈ 1

so that integrals of the form ∫ f(F) W(F) dF can be approximated by a simple weighted sum Σ_i weight_i × f(fields_i).

The distribution W(β) is one of:

  • Holtsmark (use_screening=False): unscreened, valid when r_e ≪ λ_D.

  • Hooper (use_screening=True, default): screened by the Debye length, appropriate for most laboratory plasmas.

  • Custom table (custom_table_path provided): loads a user-supplied two-column file [β, W(β)] (e.g. from APEX or MD simulations) and interpolates it onto the β grid.

Parameters:
  • Ne_m3 (float) – Electron number density [m⁻³].

  • Te_ev (float) – Electron temperature [eV]. Used to compute the Debye length when use_screening=True.

  • num_points (int, optional) – Number of quadrature points in β (default 50). 20 points is usually sufficient; 50 gives better accuracy in the far wings.

  • max_beta (float, optional) – Upper limit of the β grid (default 10). W(β) is negligible beyond β ≈ 5–8 for typical screening parameters.

  • use_screening (bool, optional) – If True (default) use the Hooper screened distribution; if False use the unscreened Holtsmark distribution.

  • species_charges (list of float, optional) – Ion charge numbers for multi-species Debye screening.

  • species_concentrations (list of float, optional) – Relative ion concentrations N_i / N_e for each species.

  • custom_table_path (str or None, optional) – Path to a plain-text file with columns [β, W(β)]. If loading fails the function falls back to the analytical Hooper distribution with a warning.

  • charged (bool, optional) – True for a charged-point radiator (ion), False for a neutral atom radiator (default False). Ferri et al. (2022) use the Hooper neutral distribution for hydrogen and the APEX distribution for charged emitters; APEX is not yet implemented — pass a custom_table_path or use charged=True as a Hooper approximation for charged emitters.

  • Z_bar (float, optional) – Average background ion charge (default is 1.0).

Returns:

  • fields (ndarray, shape (num_points,)) – Electric field magnitudes F = β × F₀ [V m⁻¹].

  • weights (ndarray, shape (num_points,)) – Quadrature weights W(β) dβ (dimensionless, sum ≈ 1).

Notes

The grid starts at β = 0 (F = 0) where W(0) = 0. Points with weight ≤ 1e-15 are skipped by the profile integrator for efficiency.

The screening parameter a is computed as the ratio of the mean inter-particle distance r_e (which scales with Z_bar) to the Debye length λ_D:

a = r_e / λ_D

The Debye length represents the scale over which electrostatic fields are screened by the plasma, whereas the mean inter-particle distance (Wigner-Seitz radius) represents the typical spacing between particles.

Results are cached internally; repeated calls with identical arguments return the pre-computed arrays without re-evaluating the distribution integrals.