rizer.plasma.townsend_breakdown_discharge#
Classes#
Class to model the Townsend breakdown discharge process (DC discharge). |
Functions#
|
Load Townsend coefficients data from a YAML file. |
|
Return first Townsend coefficients for different gases. |
|
Return second Townsend coefficients for gas-cathode combinations. |
Get the first and second Townsend coefficients for a given gas and cathode material. |
Module Contents#
- class rizer.plasma.townsend_breakdown_discharge.FirstTownsendCoefficient#
-
- 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).
- alpha(E: float, p: float) float#
Calculate the first Townsend coefficient, alpha, for given electric field E and pressure p.
- Parameters:
- Returns:
First Townsend coefficient, alpha [1/cm]
- Return type:
- Raises:
ValueError – If E <= 0 or p < 0.
- class rizer.plasma.townsend_breakdown_discharge.SecondTownsendCoefficient#
- 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 (
rizer.plasma.townsend_breakdown_discharge.FirstTownsendCoefficient) – The first Townsend coefficient for the gas.gamma (
rizer.plasma.townsend_breakdown_discharge.SecondTownsendCoefficientorfloat) – The second Townsend coefficient for the gas and cathode material.
- alpha#
- gamma#
- 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:
- Returns:
True if the breakdown condition is satisfied, False otherwise.
- Return type:
- Raises:
ValueError – If E <= 0, p < 0, or d <= 0.
- 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:
- 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:
- 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 (
tupleofmatplotlib.figure.Figureandmatplotlib.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:
- 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:
- Raises:
FileNotFoundError – If no data file is found.
ValueError – If YAML content is invalid or required sections are missing.
- 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 (
tupleofstrorlistofstr, 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:
dictofstrtoFirstTownsendCoefficient
- 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 (
tupleofstrorlistofstr, 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 (
tupleofstrorlistofstr, 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:
dictoftupleofstrandstrtoSecondTownsendCoefficient
- 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 (
tupleofstrorlistofstr, 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:
tupleofFirstTownsendCoefficientandSecondTownsendCoefficient