Skip to main content

Diffusion

Trait Diffusion 

Source
pub trait Diffusion
where Self: Clone + Debug,
{ type Balance: Diffusive; // Required methods fn potential( &self, gradient: &DiffusionGradient<Self>, ) -> Result<Quantity<<Self::Balance as Diffusive>::EnergyDensity>, ConstitutiveError>; fn flux( &self, gradient: &DiffusionGradient<Self>, ) -> Result<DiffusionFlux<Self>, ConstitutiveError>; fn tangent( &self, gradient: &DiffusionGradient<Self>, ) -> Result<DiffusionTangent<Self>, ConstitutiveError>; }
Expand description

Required methods for diffusion constitutive models.

The flux is $-\kappa\nabla\phi$ for a field $\phi$, so that the tangent is negative, and the potential is the energy density whose derivative with respect to the gradient is the negative flux.

Required Associated Types§

Source

type Balance: Diffusive

The balance law the flux enters.

Required Methods§

Source

fn potential( &self, gradient: &DiffusionGradient<Self>, ) -> Result<Quantity<<Self::Balance as Diffusive>::EnergyDensity>, ConstitutiveError>

Calculates and returns the potential.

Source

fn flux( &self, gradient: &DiffusionGradient<Self>, ) -> Result<DiffusionFlux<Self>, ConstitutiveError>

Calculates and returns the flux.

Source

fn tangent( &self, gradient: &DiffusionGradient<Self>, ) -> Result<DiffusionTangent<Self>, ConstitutiveError>

Calculates and returns the tangent to the flux.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§