Skip to main content

PittingModel

Struct PittingModel 

Source
pub struct PittingModel {
    pub e_pit: f64,
    pub e_rp: f64,
    pub critical_chloride: f64,
    pub pit_growth_k: f64,
}
Expand description

Pitting corrosion model.

Characterised by the pitting potential Epit (onset of stable pitting) and the repassivation potential Erp (below which pits repassivate).

Fields§

§e_pit: f64

Pitting potential [V vs SHE]: above this potential, stable pits nucleate.

§e_rp: f64

Repassivation potential [V vs SHE]: below this, active pits repassivate.

§critical_chloride: f64

Critical chloride concentration for pitting [mol/L].

§pit_growth_k: f64

Pit growth rate constant k [m·s⁻¹·(A/m²)⁻¹].

Implementations§

Source§

impl PittingModel

Source

pub fn new( e_pit: f64, e_rp: f64, critical_chloride: f64, pit_growth_k: f64, ) -> Self

Create a new pitting model.

Source

pub fn hysteresis_width(&self) -> f64

Hysteresis width: Epit − Erp [V].

A larger value indicates greater susceptibility to stable pitting.

Source

pub fn is_pitting_active(&self, e: f64) -> bool

Returns true if stable pit growth is expected at the given potential.

Source

pub fn will_repassivate(&self, e: f64) -> bool

Returns true if an active pit will repassivate at potential e.

Source

pub fn pit_radius( &self, i_pit: f64, t: f64, molar_mass: f64, n: f64, density: f64, ) -> f64

Hemispherical pit radius [m] after time t [s] at pit current i_pit [A/m²].

Uses Faraday’s law: V = M·Q/(n·F·ρ) with hemispherical geometry. r = (3·M·i_pit·t / (2·π·n·F·ρ))^(1/3)

§Arguments
  • i_pit – pit current density [A/m²]
  • t – time [s]
  • molar_mass – [g/mol]
  • n – electrons per atom
  • density – [g/cm³]
Source

pub fn induction_time( &self, chloride_conc: f64, material_constant_s: f64, ) -> Option<f64>

Pitting initiation time [s] according to a simplified induction model.

t_i = A / (c_Cl / c_crit − 1) where A is a material constant [s].

Trait Implementations§

Source§

impl Clone for PittingModel

Source§

fn clone(&self) -> PittingModel

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 PittingModel

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.