Struct FluidMedium
pub struct FluidMedium {
pub density_kg_m3: f64,
pub bulk_modulus_pa: f64,
pub damping_per_s: f64,
pub material_ref: u32,
}Expand description
Stationary homogeneous fluid medium parameters (Schema 200 subset).
Fields§
§density_kg_m3: f64Mass density $\rho$ in $\text{kg}\cdot\text{m}^{-3}$ ($\rho > 0$).
bulk_modulus_pa: f64Adiabatic bulk modulus $K$ in $\text{Pa}$ ($K > 0$).
damping_per_s: f64Optional linear acoustic damping rate $\gamma \ge 0$ in $\text{s}^{-1}$.
material_ref: u32Material reference ID (Schema 200; 0 = explicitly declared uniform medium in QAC).
Implementations§
§impl FluidMedium
impl FluidMedium
pub fn new(
density_kg_m3: f64,
bulk_modulus_pa: f64,
damping_per_s: f64,
material_ref: u32,
) -> Result<FluidMedium, NumericalError>
pub fn new( density_kg_m3: f64, bulk_modulus_pa: f64, damping_per_s: f64, material_ref: u32, ) -> Result<FluidMedium, NumericalError>
Construct and validate a stationary fluid medium.
pub fn sound_speed_m_s(&self) -> f64
pub fn sound_speed_m_s(&self) -> f64
Phase speed of sound $c = \sqrt{K / \rho}$ in $\text{m}\cdot\text{s}^{-1}$.
pub fn characteristic_impedance_rayl(&self) -> f64
pub fn characteristic_impedance_rayl(&self) -> f64
Characteristic acoustic impedance $Z = \sqrt{\rho K} = \rho c$ in $\text{Pa}\cdot\text{s}\cdot\text{m}^{-1}$ (Rayl).
pub fn energy_density_j_m3(&self, pressure_pa: f64, v: [f64; 3]) -> f64
pub fn energy_density_j_m3(&self, pressure_pa: f64, v: [f64; 3]) -> f64
Instantaneous collocated acoustic energy density $e = \frac{1}{2}\rho |\mathbf{v}|^2 + \frac{p^2}{2K}$ in $\text{J}\cdot\text{m}^{-3}$.
pub fn instantaneous_intensity_w_m2(pressure_pa: f64, v: [f64; 3]) -> [f64; 3]
pub fn instantaneous_intensity_w_m2(pressure_pa: f64, v: [f64; 3]) -> [f64; 3]
Instantaneous collocated acoustic intensity vector $\mathbf{I} = p\mathbf{v}$ in $\text{W}\cdot\text{m}^{-2}$.
pub fn peak_phasor_mean_intensity_w_m2(
pressure_peak_pa: f64,
v_peak: [f64; 3],
phase_diff_rad: f64,
) -> [f64; 3]
pub fn peak_phasor_mean_intensity_w_m2( pressure_peak_pa: f64, v_peak: [f64; 3], phase_diff_rad: f64, ) -> [f64; 3]
Time-averaged harmonic intensity $\langle \mathbf{I} \rangle = \frac{1}{2}\operatorname{Re}(p_{\text{peak}} \mathbf{v}_{\text{peak}}^*)$ for peak-amplitude phasors with relative phase $\Delta\phi$ (in radians).
Trait Implementations§
§impl Clone for FluidMedium
impl Clone for FluidMedium
§fn clone(&self) -> FluidMedium
fn clone(&self) -> FluidMedium
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FluidMedium
§impl Debug for FluidMedium
impl Debug for FluidMedium
§impl PartialEq for FluidMedium
impl PartialEq for FluidMedium
impl StructuralPartialEq for FluidMedium
Auto Trait Implementations§
impl Freeze for FluidMedium
impl RefUnwindSafe for FluidMedium
impl Send for FluidMedium
impl Sync for FluidMedium
impl Unpin for FluidMedium
impl UnsafeUnpin for FluidMedium
impl UnwindSafe for FluidMedium
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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