PlasmaProperties.jl
Documentation for PlasmaProperties.jl
PlasmaProperties
— ModulePlasmaProperties, a simple plasma calculator module in Julia
The module contains basic functions to compute common plasma properties, such as characteristic frequencies and lengths.
It builds on Unitful, which provides a simple unit system for physical quantities.
Module Index
PlasmaProperties.QuasineutralPlasma
PlasmaProperties.CoulombLog
PlasmaProperties.c_s
PlasmaProperties.c_th
PlasmaProperties.c_the
PlasmaProperties.check_or_assume
PlasmaProperties.f_c
PlasmaProperties.f_ce
PlasmaProperties.f_ci
PlasmaProperties.f_p
PlasmaProperties.f_pe
PlasmaProperties.f_pi
PlasmaProperties.force_energy_units!
PlasmaProperties.r_L
PlasmaProperties.r_Le
PlasmaProperties.r_Lsi
PlasmaProperties.λ_De
PlasmaProperties.ν_ee
PlasmaProperties.ν_ei
PlasmaProperties.ν_ie
PlasmaProperties.χ
Detailed API
PlasmaProperties.QuasineutralPlasma
— TypeP = Plasma()
Mutable type holding plasma properties like density, temperature, etc. The plasma is quasineutral, cold-ion. The show() method prints a table of the properties and derived quantities.
A name can be specified to quickly select the ion mass and charge. If units are not given, the default is mi
in kg, n
in 1/m^3, Te
in eV, B
in Gauss.
PlasmaProperties.CoulombLog
— MethodCoulombLog(ne,Te)
Approximate the Coulomb logarithm.
PlasmaProperties.c_s
— Methodc_s(mi,Zi,Te)
c_s(P::QuasineutralPlasma)
Compute the sound speed of ions in m/s. This ignores numerical factors and gammae.
PlasmaProperties.c_th
— Methodcth(m,Z,T)
Compute the thermal speed of a charged species in m/s. This ignores numerical factors and gammae.
PlasmaProperties.c_the
— Methodc_the(Te)
c_the(P::QuasineutralPlasma)
Compute the thermal speed of electrons in km/s. This ignores numerical factors and gammae.
PlasmaProperties.check_or_assume
— Methodcheckorassume(value,units)
If value
is not a Unitful quantity, assume it is in the given units
.
PlasmaProperties.f_c
— Methodf_c(m,Z,B)
Compute the (unsigned) cyclotron frequency of a charged species in MHz. If m
does not have units, it is assumed to be in kg. If B
does not have Unitful units, it is assumed to be in Tesla.
PlasmaProperties.f_ce
— Methodf_ce(B)
f_ce(P::QuasineutralPlasma)
Compute the (unsigned) cyclotron frequency of electrons in GHz. If B
does not have Unitful units, it is assumed to be in Tesla.
PlasmaProperties.f_ci
— Methodf_ci(mi,Zi,B)
f_ci(P::QuasineutralPlasma)
Compute the (unsigned) cyclotron frequency of ions of mass mi
in kHz. If B
does not have Unitful units, it is assumed to be in Tesla.
PlasmaProperties.f_p
— Methodf_pe(m,Z,n)
Compute the plasma frequency of a charged species in MHz. If m
does not have units, it is assumed to be in kg. If n
does not have Unitful units, it is assumed to be in m^-3.
PlasmaProperties.f_pe
— Methodf_pe(ne)
f_pe(P::QuasineutralPlasma)
Compute the plasma frequency of electrons in GHz. If ne
does not have Unitful units, it is assumed to be in m^-3.
PlasmaProperties.f_pi
— Methodf_pi(mi,Z,ni)
f_pi(P::QuasineutralPlasma)
Compute the plasma frequency of ions of mass mi
in MHz. If ni
does not have Unitful units, it is assumed to be in m^-3.
PlasmaProperties.force_energy_units!
— Methodforce_energy_units!(value)
If value
is in temperature units, convert it to energy units.
PlasmaProperties.r_L
— MethodrL(m,Z,B,vperp)
Compute the gyro radius of a charged species in m. If m
does not have units, it is assumed to be in kg. If B
does not have Unitful units, it is assumed to be in Tesla. If vperp
does not have Unitful units, it is assumed to be in m/s.
PlasmaProperties.r_Le
— Methodr_Le(B,vperpe)
r_Le(P::QuasineutralPlasma)
Compute the electron gyro radius in mm. If B
does not have Unitful units, it is assumed to be in Tesla. If vperpe
does not have Unitful units, it is assumed to be in m/s.
PlasmaProperties.r_Lsi
— Methodr_Lsi(mi,Z,B,Te)
r_Lsi(P::QuasineutralPlasma)
Compute the sonic ion gyro radius based on the sound speed, in cm. If mi
does not have units, it is assumed to be in kg. If B
does not have Unitful units, it is assumed to be in Tesla. If Te
does not have Unitful units, it is assumed to be in eV.
PlasmaProperties.λ_De
— Methodλ_De(ne,Te)
λ_De(P::QuasineutralPlasma)
Compute the Debye length of the plasm in mm. If ne does not have Unitful units, it is assumed to be in m^-3. If Te does not have Unitful units, it is assumed to be in eV.
PlasmaProperties.ν_ee
— Methodν_ee(ne,Te)
ν_ee(P::QuasineutralPlasma)
Electron-electron momentum collision frequency in MHz.
PlasmaProperties.ν_ei
— Methodν_ei(Zi,np,Te)
ν_ei(P::QuasineutralPlasma)
Electron-ion momentum collision frequency in MHz.
PlasmaProperties.ν_ie
— Methodν_ie(mi,Zi,np,Te)
ν_ie(P::QuasineutralPlasma)
Ion-electron momentum collision frequency in MHz.
PlasmaProperties.χ
— Methodχ(Zi,np,Te,B)
χ(P::QuasineutralPlasma)
Hall parameter based on the electron-ion collision frequency only.