Skip to main content

ParticipatingMedia

Struct ParticipatingMedia 

Source
pub struct ParticipatingMedia {
    pub kappa: f64,
    pub sigma_s: f64,
    pub temperature: f64,
}
Expand description

Participating media (gas radiation) model.

Models radiative transfer through an absorbing/emitting gas via the mean-beam-length approximation.

Reference: Modest, “Radiative Heat Transfer”, 3rd ed.

Fields§

§kappa: f64

Absorption coefficient κ [1/m].

§sigma_s: f64

Scattering coefficient σ_s [1/m].

§temperature: f64

Temperature of the medium [K].

Implementations§

Source§

impl ParticipatingMedia

Source

pub fn new(kappa: f64, sigma_s: f64, temperature: f64) -> Self

Create a new participating media model.

Source

pub fn extinction(&self) -> f64

Extinction coefficient β = κ + σ_s [1/m].

Source

pub fn albedo(&self) -> f64

Single-scattering albedo ω = σ_s / β.

Source

pub fn optical_depth(&self, path_length: f64) -> f64

Optical depth over a path length L: τ = β · L.

Source

pub fn transmittance(&self, path_length: f64) -> f64

Transmittance through a slab of thickness L: T = exp(-τ).

Source

pub fn emission_optically_thin(&self, path_length: f64) -> f64

Emitted radiation from a gas column of thickness L [W/m²].

q_emit = κ · σ · T⁴ · L (optically thin approximation)

Source

pub fn effective_emissivity(&self, path_length: f64) -> f64

Effective emissivity of a gas layer of thickness L.

ε_eff = 1 - exp(-κ·L) (gray gas approximation)

Source

pub fn mean_beam_length_sphere(radius: f64) -> f64

Mean-beam length for a sphere of radius R: L_m = 0.65 * 2R.

Source

pub fn mean_beam_length_cylinder(radius: f64) -> f64

Mean-beam length for a cylinder (infinite, radius R): L_m = 0.95 * 2R.

Trait Implementations§

Source§

impl Clone for ParticipatingMedia

Source§

fn clone(&self) -> ParticipatingMedia

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParticipatingMedia

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.