pub struct ChargedParticle {
pub x_m: f64,
pub y_m: f64,
pub z_m: f64,
pub vx_m_s: f64,
pub vy_m_s: f64,
pub vz_m_s: f64,
pub charge_c: f64,
pub mass_kg: f64,
pub weight: f64,
}Expand description
Charged macro-particle state.
Fields§
§x_m: f64§y_m: f64§z_m: f64§vx_m_s: f64§vy_m_s: f64§vz_m_s: f64§charge_c: f64§mass_kg: f64§weight: f64Implementations§
Source§impl ChargedParticle
impl ChargedParticle
Sourcepub fn cylindrical_radius_m(&self) -> f64
pub fn cylindrical_radius_m(&self) -> f64
Cylindrical major radius R from Cartesian position.
Sourcepub fn toroidal_velocity_m_s(&self) -> f64
pub fn toroidal_velocity_m_s(&self) -> f64
Toroidal velocity component v_phi in cylindrical basis.
Sourcepub fn kinetic_energy_j(&self) -> f64
pub fn kinetic_energy_j(&self) -> f64
Non-relativistic kinetic energy [J].
Sourcepub fn kinetic_energy_mev(&self) -> f64
pub fn kinetic_energy_mev(&self) -> f64
Non-relativistic kinetic energy [MeV].
Trait Implementations§
Source§impl Clone for ChargedParticle
impl Clone for ChargedParticle
Source§fn clone(&self) -> ChargedParticle
fn clone(&self) -> ChargedParticle
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 moreSource§impl Debug for ChargedParticle
impl Debug for ChargedParticle
Source§impl PartialEq for ChargedParticle
impl PartialEq for ChargedParticle
impl Copy for ChargedParticle
impl StructuralPartialEq for ChargedParticle
Auto Trait Implementations§
impl Freeze for ChargedParticle
impl RefUnwindSafe for ChargedParticle
impl Send for ChargedParticle
impl Sync for ChargedParticle
impl Unpin for ChargedParticle
impl UnwindSafe for ChargedParticle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more