pub struct DiffusionTensor {
pub d: [[f64; 3]; 3],
}Expand description
Anisotropic diffusion tensor [m²/s] for a material.
Fields§
§d: [[f64; 3]; 3]3×3 diffusion matrix D.
Implementations§
Source§impl DiffusionTensor
impl DiffusionTensor
Sourcepub fn orthotropic(dx: f64, dy: f64, dz: f64) -> Self
pub fn orthotropic(dx: f64, dy: f64, dz: f64) -> Self
Create an orthotropic (diagonal) diffusion tensor.
Sourcepub fn diffusive_flux(&self, grad_c: [f64; 3]) -> [f64; 3]
pub fn diffusive_flux(&self, grad_c: [f64; 3]) -> [f64; 3]
Compute the diffusive flux vector J = -D · ∇c.
Sourcepub fn msd_along(&self, n: [f64; 3], t: f64) -> f64
pub fn msd_along(&self, n: [f64; 3], t: f64) -> f64
Mean-square displacement in direction n after time t.
MSD = 2 * D_eff * t, where D_eff = nᵀ D n.
Sourcepub fn mean_diffusivity(&self) -> f64
pub fn mean_diffusivity(&self) -> f64
Average isotropic diffusivity: (Dxx + Dyy + Dzz) / 3.
Trait Implementations§
Source§impl Clone for DiffusionTensor
impl Clone for DiffusionTensor
Source§fn clone(&self) -> DiffusionTensor
fn clone(&self) -> DiffusionTensor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiffusionTensor
impl Debug for DiffusionTensor
impl Copy for DiffusionTensor
Auto Trait Implementations§
impl Freeze for DiffusionTensor
impl RefUnwindSafe for DiffusionTensor
impl Send for DiffusionTensor
impl Sync for DiffusionTensor
impl Unpin for DiffusionTensor
impl UnsafeUnpin for DiffusionTensor
impl UnwindSafe for DiffusionTensor
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