N2
NTECARS.N2Species — Type
N2Species(; molar_fraction, distribution, v_max=4, J_max=50,
chi_non_resonant=4.42e-51, use_collisional_narrowing=true) -> N2SpeciesConstructs an N2Species and generates the transition database.
Constructor Arguments
molar_fraction::Float64: Molar fraction of N₂ in the gas mixture.distribution::N2Distribution: Rovibrational population distribution, such asN2.MultiTemperatureDistribution,N2.FreeVibrationalDistribution,N2.TwoPopulationDistribution.v_max::Int: Maximum vibrational quantum number used to truncate the transition database.J_max::Int: Maximum rotational quantum number in the transition database.chi_non_resonant: Non-resonant susceptibility in m²V²/m³.use_collisional_narrowing::Bool: Whether to apply collisional narrowing.
Fields of returned type
molar_fraction::Float64: Molar fraction of N₂ in the gas mixture.χ_non_resonant::Float64: Non-resonant susceptibility in m²V²/m³.transitions::Dict{String, Vector{N2Transition}}: Transition database.distribution::N2Distribution: Rovibrational population distribution.use_collisional_narrowing::Bool: Whether collisional narrowing is applied.
Notes
- The transition database is computed once at construction.
Examples
n2 = N2Species(
molar_fraction = 0.9,
distribution = N2.MultiTemperatureDistribution(T_vib=300.0, T_rot=300.0),
)NTECARS.N2.MultiTemperatureDistribution — Type
N2.MultiTemperatureDistribution(; T_vib, T_rot, vib_states=N2.vib_states(10)) -> MultiTemperatureDistributionConstructs a MultiTemperatureDistribution for N₂ assuming separate vibrational and rotational temperatures.
Constructor Arguments
T_vib::AbstractFloat: Vibrational temperature in K.T_rot::AbstractFloat: Rotational temperature in K.vib_states: Vibrational states used to compute the partition sum.
Fields of returned type
T_vib::AbstractFloat: Vibrational temperature in K.T_rot::AbstractFloat: Rotational temperature in K.Q::AbstractFloat: Total partition sum (vibrational × rotational), computed at construction. Should not be set manually.Q_rot::AbstractFloat: Rotational partition sum, computed at construction. Should not be set manually.
Notes
- For a system in full thermal equilibrium, set
T_vib = T_rot = T_gas.
Examples
# Thermal equilibrium
dist = N2.MultiTemperatureDistribution(T_vib=1500.0, T_rot=1500.0)
# Non-equilibrium: vibrationally excited N₂
dist = N2.MultiTemperatureDistribution(T_vib=3000.0, T_rot=600.0)NTECARS.N2.FreeVibrationalDistribution — Type
N2.FreeVibrationalDistribution(; f_vib=nothing, delta_f_vib=nothing, T_rot,
closure=:zero) -> FreeVibrationalDistributionConstructs a FreeVibrationalDistribution for N₂ with freely specifiable vibrational level populations. Vibrational opulations can be specified either as absolute values f_vib or as inter-level differences delta_f_vib. Exactly one of f_vib or delta_f_vib must be provided.
Constructor Arguments
f_vib::Vector{<:AbstractFloat}: Absolute vibrational level populations starting from v=0, normalised such thatf_vib[1] = 1.0forv = 0.delta_f_vib::Vector{<:AbstractFloat}: Population differences between successive vibrational levels, i.e.delta_f_vib[i] = f_vib[i+1] - f_vib[i].T_rot::AbstractFloat: Rotational temperature in K.closure::Symbol: Only used when constructing fromdelta_f_vib. Determines how the population of the highest vibrational level is closed.
Fields of returned type
f_vib::Vector{AbstractFloat}: Relative vibrational level populations withf_vib[1] = 1.0forv = 0.T_rot::AbstractFloat: Rotational temperature in K.Q::AbstractFloat: Total partition sum, computed at construction.Q_rot::AbstractFloat: Rotational partition sum, computed at construction.
Notes
- Exactly one of
f_vibordelta_f_vibmust be provided. Providing both or neither will throw an error. - When fitting, it is more stable/robust to fit population differences. When fitting, deltafvib[1] should be fixed at 1 because the distribution gets normalized and this provides a reference to the solver. Then only deltafvib[2] and higher are fit parameters.
Examples
# From absolute populations
dist = N2.FreeVibrationalDistribution(
f_vib = [1.0, 0.3, 0.09, 0.027], # gets normalized correctly by the function
T_rot = 600.0
)
# From inter-level differences
dist = N2.FreeVibrationalDistribution(
delta_f_vib = [1.0, 0.2, 0.01], # gets normalized correctly by the function
T_rot = 600.0,
closure = :zero
)NTECARS.N2.TwoPopulationDistribution — Type
N2.TwoPopulationDistribution(; T_vib_cold, T_vib_hot, Rh, T_rot,
vib_states=N2.vib_states(10)) -> TwoPopulationDistributionConstructs a TwoPopulationDistribution for N₂ representing a bimodal vibrational population consisting of a cold and a hot sub-population. (ref: J Kuhfeld et al 2021 J. Phys. D: Appl. Phys. 54 305205)
Constructor Arguments
T_vib_cold::AbstractFloat: Vibrational temperature of the cold population in K.T_vib_hot::AbstractFloat: Vibrational temperature of the hot population in K.Rh::AbstractFloat: Fraction of molecules in the hot vibrational population ∈ [0, 1]. The cold population fraction is1 - Rh.T_rot::AbstractFloat: Rotational temperature in K, shared by both populations.vib_states: Vibrational states used to compute the partition sums. Defaults toN2.vib_states(10), which includes the 10 lowest vibrational levels.
Fields of returned type
T_vib_cold::AbstractFloat: Vibrational temperature of the cold population in K.T_vib_hot::AbstractFloat: Vibrational temperature of the hot population in K.Rh::AbstractFloat: Fraction of molecules in the hot vibrational population.T_rot::AbstractFloat: Rotational temperature in K.Q_cold::AbstractFloat: Partition sum of the cold population, computed at construction.Q_hot::AbstractFloat: Partition sum of the hot population, computed at construction.Q_rot::AbstractFloat: Rotational partition sum, computed at construction.
Examples
# 10% of molecules in a hot vibrational population
dist = N2.TwoPopulationDistribution(
T_vib_cold = 500.0,
T_vib_hot = 5000.0,
Rh = 0.1,
T_rot = 600.0
)