Struct PlasmaSpecies
pub struct PlasmaSpecies {
pub number_density: f64,
pub temperature_kelvin: f64,
pub charge_state: f64,
pub mass: f64,
}Expand description
A simple scalar plasma species description.
Fields§
§number_density: f64Number density in particles per cubic meter.
temperature_kelvin: f64Temperature in kelvin.
charge_state: f64Signed charge state in elementary-charge units.
mass: f64Particle mass in kilograms.
Implementations§
§impl PlasmaSpecies
impl PlasmaSpecies
pub fn new(
number_density: f64,
temperature_kelvin: f64,
charge_state: f64,
mass: f64,
) -> Option<PlasmaSpecies>
pub fn new( number_density: f64, temperature_kelvin: f64, charge_state: f64, mass: f64, ) -> Option<PlasmaSpecies>
Creates a plasma species when the inputs are finite and physically valid.
pub fn pressure(&self) -> Option<f64>
pub fn pressure(&self) -> Option<f64>
Computes scalar species pressure using p = n k_B T.
§Examples
use use_plasma::{PROTON_MASS, PlasmaSpecies};
let species = PlasmaSpecies::new(1.0e18, 10_000.0, 1.0, PROTON_MASS);
assert!(species.and_then(|value| value.pressure()).is_some_and(|value| value > 0.0));pub fn thermal_speed(&self) -> Option<f64>
pub fn thermal_speed(&self) -> Option<f64>
Computes the species thermal speed using v_th = sqrt(k_B T / m).
Trait Implementations§
§impl Clone for PlasmaSpecies
impl Clone for PlasmaSpecies
§fn clone(&self) -> PlasmaSpecies
fn clone(&self) -> PlasmaSpecies
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PlasmaSpecies
impl Debug for PlasmaSpecies
§impl PartialEq for PlasmaSpecies
impl PartialEq for PlasmaSpecies
impl Copy for PlasmaSpecies
impl StructuralPartialEq for PlasmaSpecies
Auto Trait Implementations§
impl Freeze for PlasmaSpecies
impl RefUnwindSafe for PlasmaSpecies
impl Send for PlasmaSpecies
impl Sync for PlasmaSpecies
impl Unpin for PlasmaSpecies
impl UnsafeUnpin for PlasmaSpecies
impl UnwindSafe for PlasmaSpecies
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more