Struct salva2d::solver::ArtificialViscosity
source · pub struct ArtificialViscosity {
pub alpha: Real,
pub beta: Real,
pub speed_of_sound: Real,
pub fluid_viscosity_coefficient: Real,
pub boundary_viscosity_coefficient: Real,
}
Expand description
Implements artificial viscosity.
Fields§
§alpha: Real
The coefficient of the linear part of the viscosity.
beta: Real
The coefficient of the quadratic part of the viscosity.
speed_of_sound: Real
The speed of sound.
fluid_viscosity_coefficient: Real
The fluid viscosity coefficient.
boundary_viscosity_coefficient: Real
The viscosity coefficient when interacting with boundaries.
Implementations§
Trait Implementations§
source§impl Clone for ArtificialViscosity
impl Clone for ArtificialViscosity
source§fn clone(&self) -> ArtificialViscosity
fn clone(&self) -> ArtificialViscosity
Returns a copy 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 NonPressureForce for ArtificialViscosity
impl NonPressureForce for ArtificialViscosity
source§fn solve(
&mut self,
_timestep: &TimestepManager,
kernel_radius: Real,
fluid_fluid_contacts: &ParticlesContacts,
fluid_boundaries_contacts: &ParticlesContacts,
fluid: &mut Fluid,
boundaries: &[Boundary],
densities: &[Real]
)
fn solve( &mut self, _timestep: &TimestepManager, kernel_radius: Real, fluid_fluid_contacts: &ParticlesContacts, fluid_boundaries_contacts: &ParticlesContacts, fluid: &mut Fluid, boundaries: &[Boundary], densities: &[Real] )
Compute and applies the non-pressure forces to the given fluid. Read more
source§fn apply_permutation(&mut self, _: &[usize])
fn apply_permutation(&mut self, _: &[usize])
Apply the given permutation to all relevant field of this non-pressure force. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ArtificialViscosity
impl Send for ArtificialViscosity
impl Sync for ArtificialViscosity
impl Unpin for ArtificialViscosity
impl UnwindSafe for ArtificialViscosity
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.