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 more