NEOPAX._species

Attributes

JOULE_PER_EV

JOULE_PER_KEV

EV_PER_JOULE

STATE_DENSITY_TO_PHYSICAL

STATE_TEMPERATURE_TO_EV

COULOMB_LOG_MODEL_DEFAULT

COULOMB_LOG_MODEL_NTSS_LEGACY

COULOMB_LOG_MODEL_FIRST_PRINCIPLES

Classes

Species

JAX-compatible species container for arbitrary number of species.

Functions

get_Thermodynamical_Forces_A1(q, n, T, dndr, dTdr, Er)

get_Thermodynamical_Forces_A2(T, dTdr)

get_Thermodynamical_Forces_A3(Er)

_species_flatten(s)

_species_unflatten(aux_data, children)

collisionality(→ float)

Collisionality of species_a against all species.

collisionality_local(→ float)

Collisionality of species_a against all species using local profiles at one radius.

collisionality_ntss_like(→ float)

NTSSfusion-like thermal-speed effective collision frequency cnue(vth).

collisionality_ntss_like_local(→ float)

Local NTSSfusion-like thermal-speed effective collision frequency cnue(vth).

_electron_index(→ int)

zeff(→ float)

Effective charge Zeff = sum_i n_i Z_i^2 / n_e using ion species only.

zeff_local(→ float)

Local effective charge Zeff = sum_i n_i Z_i^2 / n_e using ion species only.

collisionality_ntss_zeff(→ float)

Legacy NTSSfusion-like simplified electron collisionality using Zeff.

collisionality_ntss_zeff_local(→ float)

Local legacy NTSSfusion-like simplified electron collisionality using Zeff.

nuD_ab(→ float)

Pairwise pitch-angle scattering frequency for species a against species b.

nuD_ab_local(→ float)

Pairwise pitch-angle scattering frequency using local profiles at one radius.

gamma_ab(→ float)

Prefactor for pairwise collisionality.

gamma_ab_local(→ float)

Prefactor for pairwise collisionality using local profiles at one radius.

nupar_ab(→ float)

Parallel collisionality.

coulomb_logarithm(→ float)

Coulomb logarithm for collisions between species a and b.

coulomb_logarithm_local(→ float)

Coulomb logarithm using local profiles at one radius.

_coulomb_logarithm_default(→ float)

_coulomb_logarithm_default_local(→ float)

coulomb_logarithm_ntss_legacy(→ float)

Legacy NTSS/TC_DKES piecewise Coulomb logarithm.

coulomb_logarithm_ntss_legacy_local(→ float)

Local legacy NTSS/TC_DKES piecewise Coulomb logarithm.

coulomb_logarithm_first_principles(→ float)

Coulomb logarithm from impact parameters.

coulomb_logarithm_first_principles_local(→ float)

Local Coulomb logarithm from impact parameters.

tau_ab_ntss_like(→ float)

NTSSfusion-like test-particle collision time tau(a,b).

tau_ab_ntss_like_local(→ float)

Local NTSSfusion-like test-particle collision time tau(a,b).

ntss_collision_kernel(→ float)

Velocity kernel used by NTSSfusion for effective collisionality.

ntss_collision_kernel_thermal(→ float)

NTSSfusion kernel evaluated at vn=1 (thermal speed of test species).

ntss_collision_kernel_thermal_local(→ float)

Local NTSSfusion kernel evaluated at vn=1 (thermal speed of test species).

impact_parameter(→ float)

Impact parameters for classical Coulomb collision.

impact_parameter_local(→ float)

Local impact parameters for classical Coulomb collision.

impact_parameter_perp(→ float)

Distance of the closest approach for a 90° Coulomb collision.

impact_parameter_perp_local(→ float)

Local distance of the closest approach for a 90 degree Coulomb collision.

debroglie_length(→ float)

Thermal DeBroglie wavelength.

debroglie_length_local(→ float)

Local thermal DeBroglie wavelength.

debye_length(→ float)

Scale length for charge screening.

debye_length_local(→ float)

Local scale length for charge screening.

chandrasekhar(→ jax.Array)

Chandrasekhar function.

_dchandrasekhar(x)

get_species_idx(→ int)

Return the index of a species by name from a tuple of species names.

Module Contents

NEOPAX._species.JOULE_PER_EV
NEOPAX._species.JOULE_PER_KEV
NEOPAX._species.EV_PER_JOULE
NEOPAX._species.STATE_DENSITY_TO_PHYSICAL = 1e+20
NEOPAX._species.STATE_TEMPERATURE_TO_EV = 1000.0
NEOPAX._species.COULOMB_LOG_MODEL_DEFAULT = 0
NEOPAX._species.COULOMB_LOG_MODEL_NTSS_LEGACY = 1
NEOPAX._species.COULOMB_LOG_MODEL_FIRST_PRINCIPLES = 2
NEOPAX._species.get_Thermodynamical_Forces_A1(q, n, T, dndr, dTdr, Er)
NEOPAX._species.get_Thermodynamical_Forces_A2(T, dTdr)
NEOPAX._species.get_Thermodynamical_Forces_A3(Er)
class NEOPAX._species.Species

JAX-compatible species container for arbitrary number of species. All fields are JAX arrays for differentiability and vmap support.

number_species: int
species_indices: jaxtyping.Array
mass_mp: jaxtyping.Float[jaxtyping.Array, ...]
charge_qp: jaxtyping.Float[jaxtyping.Array, ...]
names: tuple[str, Ellipsis] = ()
is_frozen: jaxtyping.Array = None
property charge
property mass
property species_idx: dict

Return a mapping from species name to index.

property ion_indices: tuple

Return a tuple of all species indices except the electron (‘e’).

NEOPAX._species._species_flatten(s)
NEOPAX._species._species_unflatten(aux_data, children)
NEOPAX._species.collisionality(species_a: int, species: Species, v: float, r_index: int, density, temperature, v_thermal, coulomb_log_model: int = COULOMB_LOG_MODEL_DEFAULT) float

Collisionality of species_a against all species.

NEOPAX._species.collisionality_local(species_a: int, species: Species, v: float, density_local, temperature_local, v_thermal_local, coulomb_log_model: int = COULOMB_LOG_MODEL_DEFAULT) float

Collisionality of species_a against all species using local profiles at one radius.

NEOPAX._species.collisionality_ntss_like(species_a: int, species: Species, v: float, r_index: int, density, temperature, v_thermal) float

NTSSfusion-like thermal-speed effective collision frequency cnue(vth).

NEOPAX._species.collisionality_ntss_like_local(species_a: int, species: Species, v: float, density_local, temperature_local, v_thermal_local) float

Local NTSSfusion-like thermal-speed effective collision frequency cnue(vth).

NEOPAX._species._electron_index(species: Species) int
NEOPAX._species.zeff(species: Species, density, r_index: int) float

Effective charge Zeff = sum_i n_i Z_i^2 / n_e using ion species only.

NEOPAX._species.zeff_local(species: Species, density_local) float

Local effective charge Zeff = sum_i n_i Z_i^2 / n_e using ion species only.

NEOPAX._species.collisionality_ntss_zeff(species_a: int, species: Species, v: float, r_index: int, density, temperature, v_thermal) float

Legacy NTSSfusion-like simplified electron collisionality using Zeff.

For electrons this follows the compact electron + Zeff form used in the legacy DKES path. For ions we keep the explicit multispecies sum.

NEOPAX._species.collisionality_ntss_zeff_local(species_a: int, species: Species, v: float, density_local, temperature_local, v_thermal_local) float

Local legacy NTSSfusion-like simplified electron collisionality using Zeff.

NEOPAX._species.nuD_ab(species: Species, species_a: int, species_b: int, v: float, r_index: int, density, temperature, v_thermal, coulomb_log_model: int = COULOMB_LOG_MODEL_DEFAULT) float

Pairwise pitch-angle scattering frequency for species a against species b.

NEOPAX._species.nuD_ab_local(species: Species, species_a: int, species_b: int, v: float, density_local, temperature_local, v_thermal_local, coulomb_log_model: int = COULOMB_LOG_MODEL_DEFAULT) float

Pairwise pitch-angle scattering frequency using local profiles at one radius.

NEOPAX._species.gamma_ab(species: Species, species_a: int, species_b: int, v: float, r_index: int, temperature, density, v_thermal, coulomb_log_model: int = COULOMB_LOG_MODEL_DEFAULT) float

Prefactor for pairwise collisionality.

NEOPAX._species.gamma_ab_local(species: Species, species_a: int, species_b: int, temperature_local, density_local, v_thermal_local, coulomb_log_model: int = COULOMB_LOG_MODEL_DEFAULT) float

Prefactor for pairwise collisionality using local profiles at one radius.

NEOPAX._species.nupar_ab(species: Species, species_a: int, species_b: int, v: float, r_index: int, density, temperature, v_thermal) float

Parallel collisionality.

NEOPAX._species.coulomb_logarithm(species: Species, species_a: int, species_b: int, r_index: int, temperature, density, v_thermal, coulomb_log_model: int = COULOMB_LOG_MODEL_DEFAULT) float

Coulomb logarithm for collisions between species a and b.

NEOPAX._species.coulomb_logarithm_local(species: Species, species_a: int, species_b: int, temperature_local, density_local, v_thermal_local, coulomb_log_model: int = COULOMB_LOG_MODEL_DEFAULT) float

Coulomb logarithm using local profiles at one radius.

NEOPAX._species._coulomb_logarithm_default(temperature, density, r_index: int) float
NEOPAX._species._coulomb_logarithm_default_local(temperature_local, density_local) float
NEOPAX._species.coulomb_logarithm_ntss_legacy(temperature, density, r_index: int) float

Legacy NTSS/TC_DKES piecewise Coulomb logarithm.

NEOPAX._species.coulomb_logarithm_ntss_legacy_local(temperature_local, density_local) float

Local legacy NTSS/TC_DKES piecewise Coulomb logarithm.

NEOPAX._species.coulomb_logarithm_first_principles(species: Species, species_a: int, species_b: int, r_index: int, density, temperature, v_thermal) float

Coulomb logarithm from impact parameters.

NEOPAX._species.coulomb_logarithm_first_principles_local(species: Species, species_a: int, species_b: int, density_local, temperature_local, v_thermal_local) float

Local Coulomb logarithm from impact parameters.

NEOPAX._species.tau_ab_ntss_like(species: Species, species_a: int, species_b: int, r_index: int, density, temperature, v_thermal) float

NTSSfusion-like test-particle collision time tau(a,b).

NEOPAX._species.tau_ab_ntss_like_local(species: Species, species_a: int, species_b: int, density_local, temperature_local, v_thermal_local) float

Local NTSSfusion-like test-particle collision time tau(a,b).

NEOPAX._species.ntss_collision_kernel(species: Species, species_a: int, species_b: int, v: float, v_thermal_b) float

Velocity kernel used by NTSSfusion for effective collisionality.

NEOPAX._species.ntss_collision_kernel_thermal(species: Species, species_a: int, species_b: int, r_index: int, temperature) float

NTSSfusion kernel evaluated at vn=1 (thermal speed of test species).

NEOPAX._species.ntss_collision_kernel_thermal_local(species: Species, species_a: int, species_b: int, temperature_local) float

Local NTSSfusion kernel evaluated at vn=1 (thermal speed of test species).

NEOPAX._species.impact_parameter(species: Species, species_a: int, species_b: int, r_index: int, density, temperature, v_thermal) float

Impact parameters for classical Coulomb collision.

NEOPAX._species.impact_parameter_local(species: Species, species_a: int, species_b: int, density_local, temperature_local, v_thermal_local) float

Local impact parameters for classical Coulomb collision.

NEOPAX._species.impact_parameter_perp(species: Species, species_a: int, species_b: int, r_index: int, v_thermal) float

Distance of the closest approach for a 90° Coulomb collision.

NEOPAX._species.impact_parameter_perp_local(species: Species, species_a: int, species_b: int, v_thermal_local) float

Local distance of the closest approach for a 90 degree Coulomb collision.

NEOPAX._species.debroglie_length(species: Species, species_a: int, species_b: int, r_index: int, v_thermal) float

Thermal DeBroglie wavelength.

NEOPAX._species.debroglie_length_local(species: Species, species_a: int, species_b: int, v_thermal_local) float

Local thermal DeBroglie wavelength.

NEOPAX._species.debye_length(species: Species, r_index: int, density, temperature) float

Scale length for charge screening.

NEOPAX._species.debye_length_local(species: Species, density_local, temperature_local) float

Local scale length for charge screening.

NEOPAX._species.chandrasekhar(x: jax.Array) jax.Array

Chandrasekhar function.

NEOPAX._species._dchandrasekhar(x)
NEOPAX._species.get_species_idx(name: str, names: tuple[str, Ellipsis]) int

Return the index of a species by name from a tuple of species names.