Features & Methodology
What each module models, the analysis that contributes to its results, and how it feeds the next stage
Shared engineering engine
Every module draws from one shared library (units, chemistry, transport, mass balance, sizing, scenarios). Inputs normalize to SI once, then flow through the same calculation path: reactions build the generation function, the filter supplies a transport sink, the mass-balance solver couples them over time, and the sizer converts the result into a filter count and a status. This keeps results traceable and unit-consistent across pages.
- •Total & gas (headspace) volume
- •Temperature, inside & outside pressure
- •Initial, external, and maximum allowable H₂ (x_max)
- •Analysis duration
- •All inputs normalize to SI via the units engine (volume→m³, pressure→Pa, temperature→K).
- •Gas-phase total moles from the ideal-gas relation: n_total = P·V_gas / (R·T).
- •Concentration units (mole fraction, mole %, ppm, mol/m³) all convert to a common mole fraction using P and T, so thresholds are comparable across unit systems.
- •x_max is the hard ceiling used by every downstream status check — it is the maximum allowable H₂ mole fraction inside the enclosure.
Provides boundary conditions (n_total, x_initial, x_external, x_max, T, P) to the mass-balance solver used by Sizing, Scenarios, Comparison, and Sensitivity.
- •Chemical equation (e.g. 2Al + 6HCl → 2AlCl₃ + 3H₂)
- •Reaction type (stoichiometric / rate-based / hybrid)
- •Efficiency, rate (+ unit), duration
- •Reactant amounts (mol)
- •A formula parser resolves element counts (incl. nested parentheses) and molecular weights from an IUPAC 2021 periodic table subset.
- •Stoichiometric mode: limiting-reactant yield — for each reactant, possible H₂ = (amount / coef) × H₂-coef × efficiency; the minimum wins.
- •Rate-based mode: total H₂ = rate (converted to mol/s) × duration.
- •Hybrid mode: the rate caps the stoichiometric total — total = min(stoich_yield, rate × duration).
- •Each reaction becomes a constant generation rate (total / duration) that is active only while t ≤ duration.
Builds the generation function ṅ_gen(t) = Σ reaction rates × scale, which is the source term in the mass-balance ODE.
- •All reaction records in the project
- •Container pressure & temperature (for volumetric conversion)
- •Sums per-reaction H₂ output to give cumulative production (mol) and peak generation rate (mol/s).
- •Converts the molar rate into multiple engineering flow units (mol/s, g/s, kg/hr, SLPM, standard m³/hr) using the ideal-gas reference conditions set in Settings.
- •Compares actual gas volume at container P/T against the standard-reference volume so users see the difference between operating and STP flow.
Surfaces the required capacity (ṅ_req = ṅ_gen at t=0) that Sizing uses to compute filter count and capacity margin.
- •Geometry: surface area, effective area, diameter, depth, membrane thickness, pore size
- •Porous structure: porosity, tortuosity, number of layers
- •Transport properties: diffusion coefficient, permeability, permeance, mole-fraction conductance, manufacturer H₂ transmission rate
- •Ratings: pressure rating, temperature range, source, datasheet, test method
- •Each property keeps its own unit and is converted to SI only when consumed by the transport engine.
- •availableModels() reports which transport models a filter can support based on which properties are present.
- •recommendModel() applies a data-richness decision tree (manufacturer → permeability/permeance → diffusion → mole-fraction).
- •A filter is never silently extrapolated beyond its data — missing properties produce an explicit "insufficient data" result, not a guess.
Supplies the filter object (geometry + transport coefficients) to every transport, sizing, and comparison calculation.
- •A filter from the catalog
- •Operating conditions (T, P_inside, P_outside, x_inside, x_outside)
- •Selected transport model
- •mole_fraction: ṅ = Gx · Δx (device-level conductance, not a diffusion coefficient).
- •diffusion (Fickian): J = D·ΔC / L; ṅ = J·A_eff, where ΔC comes from the ideal-gas concentration.
- •porous: D_eff = D·ε/τ, then Fickian with the effective diffusion coefficient.
- •permeability: J = Perm·Δp_H₂ / L; ṅ = J·A_eff (pressure-driven).
- •permeance: J = Permeance·Δp_H₂; thickness is already embedded, so it is not reapplied.
- •manufacturer: uses the rated H₂ transmission at stated test conditions — no temperature or pressure extrapolation.
- •Driving forces, partial pressures, concentrations, effective area, and diffusion path are all reported in the calculation trace. The diffusion path is NOT assumed equal to filter depth or membrane thickness.
Returns ṅ_transport(x) — the per-filter removal rate as a function of current mole fraction — which is the sink term in the mass-balance ODE and the per-filter capacity used for sizing.
- •Container, reactions, one filter
- •Selected transport model
- •Number of filters installed
- •Design margin
- •Per-filter capacity is evaluated at x_max (the maximum driving force), not at zero concentration — this is the conservative sizing point.
- •Theoretical minimum = ⌈ṅ_req / perFilter⌉; design count = ⌈(ṅ_req × (1 + margin)) / perFilter⌉.
- •Capacity margin = (N·perFilter − ṅ_req) / ṅ_req × 100%.
- •A transient mass balance (RK4) integrates dN_H₂/dt = ṅ_gen(t) − (N−failed)·filterScale·ṅ_transport(x(t)) to find the peak mole fraction.
- •Status: MEETS CALCULATION CRITERION if peak ≤ 0.80·x_max, NEAR THRESHOLD if ≤ x_max, EXCEEDS CALCULATION CRITERION if > x_max.
Produces the status badge, peak H₂, capacity margin, and concentration margin shown across Sizing, Scenarios, Comparison, and Reports.
- •Production scale (e.g. 1.5×)
- •Failed filter count
- •Filter degradation (filterScale)
- •Number of filters
- •Transport model
- •Each scenario overrides the base config and re-runs the full evaluateScenario pipeline (transport + RK4 mass balance + sizing).
- •Built-in templates cover normal, high-production (+10% to +100%), one/two filters failed, degradation (10%/25%), and a combined worst case.
- •Peak H₂, time-to-threshold, steady-state flag, and both margins are recomputed per scenario.
- •Each scenario row shows a description block: what it represents, how its result is defined, and the key math.
Provides the saved scenario set that Comparison and Reports aggregate.
- •Any saved scenarios (checkbox selection)
- •Re-evaluates every selected scenario through the same engine so the comparison is apples-to-apples.
- •Charts peak H₂ (with the x_max reference line), concentration margin, capacity margin, transport per filter, filter count, and time-to-threshold.
- •Bars are color-coded by status (green / amber / red) so the comparison communicates pass/fail at a glance.
No downstream feed — it is a decision-support view for choosing between scenarios.
- •All catalog filters
- •Transport model (auto or specific)
- •Filters installed, design margin
- •Sort criterion
- •In Auto mode, each filter is evaluated across all models it supports and the best capacity margin is kept (optimizeFilters).
- •In specific-model mode, every filter is evaluated with that one model so the comparison is strictly on filter geometry/properties.
- •Reports transport/filter, theoretical min, design count, peak H₂, concentration margin, capacity margin, and status per filter, ranked by the chosen sort.
No downstream feed — it is a selection-support view for choosing a filter type.
- •All catalog filters
- •Base scenario config
- •Sort criterion
- •Runs optimizeFilters across all filters and all available models, keeping the best model per filter.
- •Sorts the ranked list by the selected objective and surfaces the best-performing configuration.
- •Exposes the model chosen for each filter so the user can see which physics produced the ranking.
No downstream feed — it is a recommendation view for the best filter/model pairing.
- •A base scenario
- •A parameter to sweep
- •A range of values
- •For each value in the range, the base config is mutated and evaluateScenario is re-run, recording peak H₂ and transport.
- •Results are plotted as value-vs-result curves and ranked by relative influence on peak H₂.
- •Identifies the dominant design variables so engineering effort can focus on the inputs that matter.
No downstream feed — it is a risk-prioritization view.
- •Project, container, reactions, filters, scenarios
- •Re-runs the evaluation and serializes project info, operating conditions, reaction details, transport properties, sizing results, and the disclaimer/assumptions.
- •Exports as TXT, CSV, or JSON for hand-off to a reviewing engineer.
- •Carries the engineering disclaimer forward so the export cannot be mistaken for a safety certification.
No downstream feed — it is the documentation artifact of the analysis.