rizer.plasma.townsend_breakdown_discharge#

Classes#

FirstTownsendCoefficient

SecondTownsendCoefficient

TownsendBreakdownDischarge

Class to model the Townsend breakdown discharge process (DC discharge).

Functions#

load_townsend_coefficients_data(→ dict[str, Any])

Load Townsend coefficients data from a YAML file.

load_alpha_townsend_coefficients(→ dict[str, ...)

Return first Townsend coefficients for different gases.

load_gamma_townsend_coefficients(→ dict[tuple[str, ...)

Return second Townsend coefficients for gas-cathode combinations.

get_townsend_coefficients(...)

Get the first and second Townsend coefficients for a given gas and cathode material.

Module Contents#

class rizer.plasma.townsend_breakdown_discharge.FirstTownsendCoefficient#
gas: str#

Gas for which the first Townsend coefficient, alpha, is defined.

A: float#

Coefficient A [1/(cm.Torr)] in the formula for alpha = A*p*exp(-B*p/E).

B: float#

Coefficient B [V/(cm.Torr)] in the formula for alpha = A*p*exp(-B*p/E).

range_E_over_p_V_per_cm_Torr_str: str#

Range of reduced electric field (E/p) for which the alpha coefficients are valid, in V/(cm.Torr).

range_E_over_p_V_per_cm_Torr: tuple[float, float]#
alpha(E: float, p: float) float#

Calculate the first Townsend coefficient, alpha, for given electric field E and pressure p.

Parameters:
  • E (float) – Electric field [V/cm]

  • p (float) – Pressure [Torr]

Returns:

First Townsend coefficient, alpha [1/cm]

Return type:

float

Raises:

ValueError – If E <= 0 or p < 0.

class rizer.plasma.townsend_breakdown_discharge.SecondTownsendCoefficient#
gas: str#

Gas for which the second Townsend coefficient, gamma, is defined.

cathode_material: str#

Cathode material for which the second Townsend coefficient, gamma, is defined.

gamma: float#

Second Townsend coefficient, gamma, for a given gas and cathode material. This is the number of secondary electrons emitted from the cathode per ion impacting it. The value of gamma depends on the gas and cathode material.

class rizer.plasma.townsend_breakdown_discharge.TownsendBreakdownDischarge(alpha: FirstTownsendCoefficient, gamma: SecondTownsendCoefficient | float)#

Class to model the Townsend breakdown discharge process (DC discharge).

A Townsend breakdown discharge occurs when the multiplication of electrons by ionization in a gas (avalanche effect) is sustained by the secondary emission of electrons from the cathode due to ion bombardment. When the number of secondary electrons emitted from the cathode is sufficient to sustain the avalanche, the breakdown condition is satisfied, resulting in a self-sustaining discharge.

Parameters:
alpha#
gamma#
gamma_value: float#
breakdown_condition(E: float, p: float, d: float) bool#

Check if breakdown condition is satisfied for given electric field E, pressure p, gap distance d.

Parameters:
  • E (float) – Electric field [V/cm]

  • p (float) – Pressure [Torr]

  • d (float) – Gap distance [cm]

Returns:

True if the breakdown condition is satisfied, False otherwise.

Return type:

bool

Raises:

ValueError – If E <= 0, p < 0, or d <= 0.

breakdown_voltage(pd: float) float#

Compute the breakdown Townsend voltage.

Parameters:

pd (float) – Product of pressure and gap distance [Torr.cm]

Returns:

Breakdown voltage [V] if the breakdown condition is satisfied, otherwise np.nan.

np.nan is returned for pd <= 0, or when the Townsend formula denominator is not defined/positive.

Return type:

float

get_breakdown_voltage(pd: numpy.ndarray) numpy.ndarray#

Compute the breakdown Townsend voltage for an array of pd values.

Parameters:

pd (numpy.ndarray) – Array of product of pressure and gap distance [Torr.cm]

Returns:

Array of breakdown voltages [V], with np.nan for values where the breakdown condition is not satisfied.

Return type:

numpy.ndarray

get_min_breakdown_voltage(pd_range: numpy.ndarray) float#

Get the minimum breakdown voltage over a range of pd values.

Parameters:

pd_range (numpy.ndarray) – Array of product of pressure and gap distance [Torr.cm]

Returns:

Minimum breakdown voltage [V] over the given range of pd values, or np.nan if no valid breakdown voltages are found.

Return type:

float

plot_breakdown_voltage_vs_pd(pd_range: numpy.ndarray, figax: tuple[matplotlib.figure.Figure, matplotlib.axes.Axes] | None = None, units: str = 'Torr.cm', **kwargs) tuple[matplotlib.figure.Figure, matplotlib.axes.Axes]#

Plot the breakdown voltage as a function of pressure-distance product.

Parameters:
  • pd_range (numpy.ndarray) – Array of pressure-distance products [Torr.cm]. Values must be strictly positive.

  • figax (tuple of matplotlib.figure.Figure and matplotlib.axes.Axes, optional) – Existing figure and axes on which to plot.

  • units ({"Torr.cm", "atm.mm"}, optional) – Units used on the x-axis.

  • **kwargs – Additional keyword arguments forwarded to matplotlib.axes.Axes.plot.

Returns:

The figure and axes containing the plot.

Return type:

tuple of matplotlib.figure.Figure and matplotlib.axes.Axes

Raises:

ValueError – If units is unsupported or if pd_range contains non-positive values.

rizer.plasma.townsend_breakdown_discharge.load_townsend_coefficients_data(data_file: pathlib.Path | None = None) dict[str, Any]#

Load Townsend coefficients data from a YAML file.

Parameters:

data_file (pathlib.Path, optional) – Path to a YAML file. If None, the function searches for data/townsend_discharge/townsend_coefficients.yaml.

Returns:

Parsed YAML data.

Return type:

dict of str to Any

Raises:
rizer.plasma.townsend_breakdown_discharge.load_alpha_townsend_coefficients(data_file: pathlib.Path | None = None, source_priority: tuple[str, Ellipsis] | list[str] | None = None) dict[str, FirstTownsendCoefficient]#

Return first Townsend coefficients for different gases.

Parameters:
  • data_file (pathlib.Path, optional) – Input data file. Supported formats are .yaml/.yml. If None, the loader uses townsend_coefficients.yaml.

  • source_priority (tuple of str or list of str, optional) – Priority order of data sources to use when multiple databases exist for a gas. If None, the default order is (“Boulos2023”, “Raizer1991”, “Korolov2016”).

Returns:

Mapping from gas name to first Townsend coefficient.

Return type:

dict of str to FirstTownsendCoefficient

rizer.plasma.townsend_breakdown_discharge.load_gamma_townsend_coefficients(default_gamma_value_for_missing_data: float | None = None, data_file: pathlib.Path | None = None, source_priority: tuple[str, Ellipsis] | list[str] | None = None, fallback_for_missing_gases: tuple[str, Ellipsis] | list[str] | None = None) dict[tuple[str, str], SecondTownsendCoefficient]#

Return second Townsend coefficients for gas-cathode combinations.

Parameters:
  • default_gamma_value_for_missing_data (float, optional) – Explicit fallback value used for gamma only when fallback_for_missing_gases is provided.

  • data_file (pathlib.Path, optional) – Input data file. Supported formats are .yaml/.yml. If None, the loader uses townsend_coefficients.yaml.

  • source_priority (tuple of str or list of str, optional) – Priority order of data sources to use when multiple databases exist for a cathode-material entry. If None, defaults to (“Boulos2023”,).

  • fallback_for_missing_gases (tuple of str or list of str, optional) – Gas names for which missing/empty gamma entries should be filled with default_gamma_value_for_missing_data.

Returns:

A dictionary mapping (gas, cathode_material) tuples to their corresponding second Townsend coefficients.

Return type:

dict of tuple of str and str to SecondTownsendCoefficient

rizer.plasma.townsend_breakdown_discharge.get_townsend_coefficients(gas: str, cathode_material: str, default_gamma_value_for_missing_data: float | None = None, source_priority: tuple[str, Ellipsis] | list[str] | None = None, use_default_gamma_for_missing_gas: bool = False) tuple[FirstTownsendCoefficient, SecondTownsendCoefficient]#

Get the first and second Townsend coefficients for a given gas and cathode material.

Parameters:
  • gas (str) – The gas for which to get the Townsend coefficients.

  • cathode_material (str) – The cathode material for which to get the second Townsend coefficient.

  • default_gamma_value_for_missing_data (float, optional) – The explicit default value for gamma if data is missing for a particular gas-cathode combination.

  • source_priority (tuple of str or list of str, optional) – Priority order of databases/sources to use when several entries are available in the YAML dataset.

  • use_default_gamma_for_missing_gas (bool, optional) – If True, bypass missing gamma entries for the requested gas by using default_gamma_value_for_missing_data. If False, missing gamma entries raise an error.

Returns:

The first and second Townsend coefficients for the given gas and cathode material.

Return type:

tuple of FirstTownsendCoefficient and SecondTownsendCoefficient