Skip to main content

SmrCase

Struct SmrCase 

Source
pub struct SmrCase {
    pub methane_feed: f64,
    pub steam_to_carbon: f64,
    pub temperature: f64,
    pub pressure: f64,
    pub volume: f64,
    pub forward: [ForwardRate; 2],
}
Expand description

A fully-specified steady-state SMR CSTR case.

Fields§

§methane_feed: f64

Inlet methane molar flow [mol/s].

§steam_to_carbon: f64

Steam-to-carbon ratio S/C [-] — inlet steam per inlet methane. Industrial reforming runs 2.5–3.5 to suppress carbon laydown; this model has no carbon chemistry, so a low S/C here is merely optimistic rather than visibly wrong.

§temperature: f64

Reactor temperature [K], held constant (see the module’s scope note).

§pressure: f64

Reactor pressure [Pa]. Enters only through the ideal-gas volumetric flow.

§volume: f64

Tank volume V [m³].

§forward: [ForwardRate; 2]

Forward Arrhenius pairs, in SmrReaction::BOTH order.

Implementations§

Source§

impl SmrCase

Source

pub fn inlet_flows(&self) -> Vec<f64>

Inlet molar flows, by Species::index. Only methane and steam are fed; the rest start at zero.

Source

pub fn volumetric_flow(&self) -> f64

Inlet volumetric flow Q [m³/s] from the ideal gas law, Q = Σ F · R T / P.

Held constant through the reactor, which is the inherited assumption this model does not fix — see the module scope note.

Source

pub fn feed(&self) -> ReactorFeed

Assemble the reactor feed.

Source

pub fn residence_time(&self) -> f64

Nominal residence time τ = V/Q [s].

Source

pub fn solve(&self) -> Result<SmrOutcome, ReactorError>

Solve the steady-state CSTR.

§Errors

Propagates ReactorError from the underlying Newton solve — a non-positive volumetric flow, or failure to converge.

Trait Implementations§

Source§

impl Clone for SmrCase

Source§

fn clone(&self) -> Self

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 SmrCase

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SmrCase

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SmrCase

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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.