microfield
Ion microfield distributions and quadrature grids. The unscreened Holtsmark field distribution is written in reduced field units \(\beta = F/F_0\) as
The default Hooper screened form modifies the exponent with the screening function \(S(y,a)\),
- 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.
- 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]
- 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
1in the denominator accounts for the electron contribution. If no species information is given the function falls back to the single-species resultcalculate_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 (
listoffloat, optional) – Charge numbers Z_i for each ion species.species_concentrations (
listoffloat, optional) – Relative concentrations X_i = N_i / N_e for each species. Must have the same length asspecies_charges.
- Returns:
Multi-species Debye length [m].
- Return type:
- starkzee.microfield.calculate_coupling_parameter(Z_bar, Ti_ev, R_ii)[source]
Return the ion-ion coupling parameter Gamma_ii.
- 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 (
floatorndarray) – 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 a Hooper-like screened microfield probability density W(β, a).
Provenance note. This is not an interpolation of Hooper’s tabulated numerical results (C. F. Hooper Jr., Phys. Rev. 165, 215 (1968); Phys. Rev. 169, 193 (1968)). It evaluates the analytic screened characteristic-function ansatz
W(β) = (2β/π) ∫₀^∞ y sin(βy) exp[−y^{3/2} (1 + c a²/y²)^{−3/4}] dy
with c = 1.5 for a charged radiator and c = 1.0 for a neutral one, which reduces to Holtsmark at a = 0 and mimics the Debye suppression of large fields at a > 0. It approximates Hooper’s low-frequency-component distributions; for quantitative work at strong screening (a ≳ 1) prefer a tabulated distribution via
custom_table_pathinmicrofield_quadrature(), orpotekhin_distribution().Supports both scalar and array-like inputs.
- Parameters:
beta (
floatorndarray) – 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 (
floatorndarray) – 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:
floatorndarray
- 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_pointsvalues 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-like (
use_screening=True, default): Debye-screened analytic approximation (see the provenance note inhooper_distribution()), appropriate for most laboratory plasmas.Custom table (
custom_table_pathprovided): 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 whenuse_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). The core of W(β) sits below β ≈ 5–8, but the Holtsmark tail decays only as β^{−5/2}: ~3 % of the probability lies beyond β = 10, and truncating it (the weights are renormalized to 1) removes exactly the strong-field configurations that build the quasi-static far wings of the line. Increase max_beta (together withnum_points) for far-wing studies.use_screening (
bool, optional) – If True (default) use the Hooper screened distribution; if False use the unscreened Holtsmark distribution.species_charges (
listoffloat, optional) – Ion charge numbers for multi-species Debye screening.species_concentrations (
listoffloat, optional) – Relative ion concentrations N_i / N_e for each species.custom_table_path (
strorNone, 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 acustom_table_pathor usecharged=Trueas 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.