pub struct SphConfig {
pub n_particles: usize,
pub smoothing_h: f64,
pub rest_density: f64,
pub pressure_k: f64,
pub viscosity: f64,
pub gravity: f64,
pub particle_mass: f64,
pub domain_min: [f64; 3],
pub domain_max: [f64; 3],
pub boundary_restitution: f64,
}Expand description
Configuration for an SPH simulation.
Fields§
§n_particles: usizeNumber of particles.
smoothing_h: f64Smoothing length h (m). Kernel support radius = 2h.
rest_density: f64Rest density ρ₀ (kg/m³).
pressure_k: f64Pressure stiffness constant k (Pa).
viscosity: f64Kinematic viscosity ν (m²/s).
gravity: f64Gravitational acceleration (m/s²), applied in −Y direction.
particle_mass: f64Particle mass (kg). If 0.0, computed as ρ₀ × (2h)³.
domain_min: [f64; 3]Simulation domain (AABB) minimum corner.
domain_max: [f64; 3]Simulation domain maximum corner.
boundary_restitution: f64Boundary restitution coefficient [0, 1].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SphConfig
impl RefUnwindSafe for SphConfig
impl Send for SphConfig
impl Sync for SphConfig
impl Unpin for SphConfig
impl UnsafeUnpin for SphConfig
impl UnwindSafe for SphConfig
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