Skip to main content

Module deck

Module deck 

Source
Expand description

The TOML input deck — a validated, typed document, not free text.

§Shape

schema_version = 1

[case]
name = "smr-base"

[reactor]
kind = "cstr"
volume_m3 = 2.0
temperature_k = 1100.0
pressure_pa = 2.0e6

[feed]
methane_mol_s = 1.0
steam_to_carbon = 3.0

# The only fitted inputs in the whole model (see `crate::smr`).
[kinetics.reforming]
a_forward = 1.0e7
e_forward_j_mol = 2.4e5

[kinetics.water_gas_shift]
a_forward = 1.0e6
e_forward_j_mol = 6.7e4

# Optional: sweep one variable instead of running a single point.
[sweep]
variable = "temperature_k"
from = 800.0
to = 1300.0
steps = 11

§Why validation is separate from deserialisation

serde will happily accept volume_m3 = -2.0 or steam_to_carbon = 0: both are well-formed floats. A deck that parses but describes an impossible reactor is worse than one that fails to parse, because the solver will return a number for it. Deck::validate is therefore run by Deck::from_toml and is not optional — there is no path that hands back an unvalidated deck.

Unknown fields are rejected (deny_unknown_fields). A misspelled key that is silently ignored is how a deck ends up not describing the run someone thought it did.

Structs§

CaseBlock
Case identification. Carries no physics.
Deck
A complete DOVER input deck.
FeedBlock
Inlet specification.
KineticsBlock
The fitted forward Arrhenius pairs — the only calibrated inputs.
RateBlock
One forward Arrhenius pair.
ReactorBlock
Reactor geometry and operating point.
SweepBlock
Sweep one variable across a range instead of running a single point.

Enums§

DeckError
Why a deck was rejected.

Constants§

SCHEMA_VERSION
The deck schema version this crate reads and writes.