Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
KiThe
KiThe is a Rust toolkit and desktop application for chemical thermodynamics, kinetics, and combustion. It turns a physical problem into a numerical solve, then exposes the accepted result and the evidence behind it. Use the crate from another Rust project for programmatic or repeated calculations, or run the standalone application and work through its graphical interface.
Start here
| Your question | KiThe workflow |
|---|---|
| What is the equilibrium composition at fixed pressure and temperature? | Chemical equilibrium: P,T |
| What temperature and composition satisfy a target enthalpy? | Chemical equilibrium: P,H |
| How does a combustion profile evolve from initial conditions? | Condensed-phase combustion IVP |
| What steady gas-phase profile satisfies two boundary conditions? | Gas-phase combustion BVP |
| How do concentrations evolve in a prescribed temperature program? | Kinetic IVPs |
| How can experimental kinetic data be analyzed? | Experimental kinetics |
To launch the standalone program, run cargo run and select GUI from the
interactive menu. The same executable also offers selected terminal workflows.
For library use, add KiThe as a dependency to your Rust project; the
compilable examples below are the starting point for the public API.
Chemical equilibrium
The equilibrium calculator answers fixed-pressure P,T and P,H questions.
At P,T, it finds the equilibrium composition for a specified temperature.
At P,H, it solves for both temperature and composition at a specified total
enthalpy. Either can be calculated at one point or across a temperature or
enthalpy range. Inputs can describe a molecular feed, an elemental inventory,
or an explicitly declared phase system. Gas, liquid, and solid records retain
their phase identity, including when a formula occurs in more than one phase.
The calculator resolves thermochemical records, checks their applicability to the requested conditions, and reports provenance. Fixed-formulation and prepared-session workflows reuse work across related points; range execution can continue from an accepted state. A failed trial is not silently published as a physical solution.
The nonlinear backend is selectable: KiThe-native LM, Newton-Raphson, and
trust-region methods use the calculator's analytical system; RustedSciThe
(RST) methods use a prepared symbolic residual and Jacobian, with an
ExprLegacy or AtomView frontend. A policy can request one method or a bounded
cascade of attempts. Solver convergence alone is not the acceptance contract:
the calculator also checks residuals, element balances, phase consistency,
and, for P,H, the enthalpy target. Opt-in timing and backend telemetry show
preparation, attempts, rejection reasons, and the route that produced the
published result.
Start with the equilibrium guide, the
P,T point, and the
P,H point. The guide links
range, elemental-inventory, and phase-resolved examples as well.
A minimal P,T call has this shape:
use ;
let spec = new
.with_library_priorities
.build?;
let result = new
.solve?;
println!;
This is the body of a fallible Rust function; the linked example includes
main, solver policy, and provenance inspection. For P,H, replace the
temperature constraint with a total-enthalpy target and temperature bounds;
the dedicated example shows
the corresponding typed request.
Experimental kinetics
KiThe's Experimental Kinetics workspace is a desktop application for turning thermogravimetric measurements into inspectable, reproducible kinetic analyses. It supports both isothermal experiments (including a temperature entered as experiment metadata when no temperature channel was recorded) and non-isothermal temperature programs. Work with one experiment or a series, keep the measured source distinct from processed results, and inspect the data and analysis in the same GUI.
From instrument file to analyzed series
Import raw TXT/CSV files with column headers, bind time, mass or instrument signal, and temperature where available, then inspect the resulting curves. Typed KiThe CSV files can also be opened with their experiment metadata, bindings, units, processing history, and analysis results. The GUI supports common preparation steps such as trimming, shifting time to zero, converting time and temperature units, calibration from voltage to mass, and deriving conversion and rates. A measured temperature column is not mandatory for an isothermal run when its setpoint is recorded in experiment metadata.
The Column Manager is the inspection and data-management workspace for an experiment. It shows samples, units, active bindings, transformation history, column lineage, and filter-quality comparisons. It can compare samples from multiple experiments without pretending that different adaptive or resampled grids are the same measurement. Formula columns can be built from one or more source columns; inputs and output lengths are checked, and invalid or non-finite results are reported rather than silently written.
Filtering, smoothing, and resampling
The Math tools provide complementary methods for reducing noise and preparing signals for differentiation:
- Rolling mean, including synchronized rolling means for several signals when aligned output lengths are required.
- Hampel filtering, with replace and explicit row-drop behavior for outliers.
- Savitzky-Golay smoothing and derivatives, with configurable window, polynomial order, derivative, spacing, and edge mode.
- LOWESS local regression smoothing.
- Spline smoothing/resampling and least-squares spline resampling for one or multiple columns on a common generated grid.
- Exponentially weighted mean (EWM) for signals where a weighted moving estimate is appropriate.
Results can be written as new columns so alternative processing branches remain available for comparison. Null gaps and short valid segments are handled by method-specific rules; methods do not join data across gaps as though the missing measurements existed. Resampling records its grid and source columns, and the GUI exposes processing provenance and quantitative signal-change statistics. These statistics help compare a processed signal with its input; they do not replace scientific judgment about whether a particular smoothing choice preserves the experiment's behavior.
The Golden Pipeline is a convenient, curated sequence of preparation and filtering operations. It works on an isolated candidate and publishes the new processed experiment only after the configured sequence succeeds. By default it keeps the source experiment; replacing or deleting source data is an explicit choice. Each generated column carries its transformation history so the result can be inspected in the Column Manager.
Fitting and reconstruction
Fit Model fits a selected experiment, X/Y pair, and optionally a selected training interval. Built-in models include linear and polynomial functions, single and multiple exponential decays, and common conversion-rate models. For user-defined equations, enter a symbolic formula and choose LM or GAVIN; separable models can use an explicitly specified VarPro basis. The fit report includes coefficients, goodness-of-fit information, the fitting interval, and solver settings. A successful fit can be shown beside the measured curve.
Evaluation is a separate, explicit step. It can generate a curve beyond the measured range or reconstruct a gap between measured intervals. The preview does not insert synthetic rows into the source experiment. After inspection, the user may create a separate reconstructed experiment containing the generated grid and evaluated columns, or discard the preview while retaining the fit. This makes extrapolation and missing-data reconstruction visible and reversible rather than silently changing the original measurements.
Kinetic methods and coefficient analysis
The Kinetic Methods workspace includes multi-experiment isoconversional analysis with Ozawa-Flynn-Wall (OFW), Kissinger-Akahira-Sunose (KAS), Starink, Friedman differential, Friedman integral, and Vyazovkin methods. Isothermal and non-isothermal requirements are handled explicitly; for example, the isothermal Friedman workflow uses the experiment's setpoint metadata.
Additional workflows include Kissinger peak analysis, Combined Kinetics
Analysis, and the single-experiment Is this a sublimation? diagnostic.
Methods that produce kinetic parameters can save typed results to the series
document. The coefficient archive keeps the method, model, stage, source
experiments, fit interval, conditions, units, solver details, and individual
coefficient identities together. Eligible rate constants can be compared
against temperature with an optional Arrhenius fit; the resulting regression
can be inspected as a plot and saved as a typed analysis result. Isoconversional
Ea(α) results remain series analyses rather than being misrepresented as
single-experiment coefficients.
Direct kinetic problems
Experimental Kinetics also provides direct simulation tools. Simple
One-Step Kinetics solves a solid-state kinetic IVP. Complex Direct
Problem solves a user-defined reaction network for a list of isothermal
temperatures or heating rates and adds the runs as experiments that can be
plotted and analyzed like imported measurements. Both use the RustedSciThe
StiffAPI solver families exposed by the GUI: BDF, Radau, LSODE2,
and Backward Euler. Solver settings and run conditions are reported with
the result; a reaction-network batch rebinds the requested conditions for
each run instead of continuing from the previous trajectory's final state.
Plots, files, and publication output
The main plot workspace supports interactive curve selection, cursor readout,
zooming, panning, and region selection for operations that accept a selected
interval. Plot Editor opens the separate KiThePlot editor for publication-
quality figures and editable .kplot projects; it is not the live plot canvas.
The File Manager can save the complete typed series, export selected
experiments and columns as plain TXT or Excel workbooks, and export selected
data as CSV. Plot images and .kplot files can be attached to a catalog
publication alongside the data files they document.
Local catalog: a lightweight electronic lab notebook
The local catalog is backed by SQLite and organizes work as Studies, Series, and Experiments. A study can group related substances and series; each kinetic series remains a distinct analysis dataset. Search and browse by experiment, series, study, substance/sample, method, origin, tags, conditions, publication, and attached-file type.
Catalog publications are immutable snapshots of the chosen card and its
metadata. They can link raw instrument files, typed datasets or series,
processed results, plot images, and editable .kplot projects. The database
stores catalog metadata, file references, and checksums; it does not put
large measurement files inside SQLite or silently copy them. Explicit checksum
verification detects changed or missing files, while versioned publications
preserve the earlier record instead of overwriting it. Typed series documents
can retain series-level results such as Ea(α) alongside their experiments.
Together, the catalog, typed documents, processing history, and coefficient
archive provide a practical electronic lab notebook for finding a run,
understanding how it was processed, and tracing the results back to their
sources.
The GUI currently includes an explicitly labeled in-memory transfer prototype for exercising publication and file-transfer workflows. It is not a network connection or a substitute for the local SQLite catalog; a real server and durable synchronization are separate future work.
For the in-application walkthroughs, see the
Experimental Kinetics help. The domain model and
processing APIs are in experimental_kinetics,
including the filtering and resampling API,
fitting API, and
catalog data model.
GUI-level workflow tests are documented in
story_tests.md.
Combustion reactors
The reactor workflows construct symbolic systems from physical inputs and delegate integration or boundary-value solving to RST. Solver selection, symbolic frontend, matrix layout, execution route, and supported route-specific settings are typed choices rather than one interchangeable set of switches. Telemetry and logging are opt-in and separate: use telemetry to inspect work and outcomes, and logging when an iteration trace is needed.
Condensed-phase combustion IVP
The initial-value workflow follows a condensed-phase combustion model from specified initial conditions. It integrates the coupled physical state and returns profiles along the reactor coordinate; temperature is presented in physical units after the model's nondimensional solve. Use it when the initial state is known and the downstream evolution is sought.
The reactor facade offers LSODE2 (with its internal automatic/Adams/BDF
controller), standalone BDF, and Radau through RST StiffAPI. Supported
symbolic, matrix, and execution options include ExprLegacy or AtomView,
Dense/Sparse/Banded layouts, and Lambdify or AOT where the selected solver
supports them. Callback scheduling and native solver controls are also
configurable; unsupported combinations are rejected rather than silently
substituted. The physical model and nondimensionalization are documented in
the IVP model. The
GUI preview example shows how a typed
physical task becomes an inspectable request; the solver-family API is in
solver_backend.rs.
The programmatic lifecycle is deliberately short; the physical setup omitted below is essential and is shown in the model and task examples:
use SimpleReactorTask;
let mut task = new;
// Set species, reactions, heat and transport data, initial conditions, scales.
// Optionally select an RST family and its supported solver settings.
let solution = task.solve?;
// Inspect the validated, dimensionally reconstructed solution.
Gas-phase combustion BVP
The boundary-value workflow solves a steady one-dimensional gas-phase combustion or plug-flow profile subject to conditions at the two ends of the domain. It handles coupled temperature and composition profiles and publishes physical temperatures, not only the solver's dimensionless state. The model and coordinate conventions are in the BVP model.
RST BVP_api offers several genuinely different routes. Damped has an
adaptive grid-refinement workflow, useful when a sharp layer must be resolved.
CorrectionNewton is a fixed-mesh correction-based Newton method.
Frozen/Naive are additional fixed-mesh routes with their own convergence
behavior. BVP_sci is available as an independent numerical cross-check;
it is not assumed to use the same discretization or grid as Damped. Choose a
route and its supported grid, Jacobian, linear-algebra, bounds, and execution
settings for the problem at hand. A successful nonlinear iteration is not by
itself proof that the grid resolves the physical profile: analytical and
literature cases exercise boundary conditions and independent profile error.
See the reactor BVP guide.
The BVP lifecycle also begins with the physical task, but additionally needs a mesh and a node-aligned initial profile. This is a schematic call sequence, not a ready-to-run reactor fixture:
use SimpleReactorTask;
let mut task = new;
// Set species, reactions, transport data, scaling, and boundary conditions.
// Build mesh and an initial_guess with one column per mesh node.
// Choose BvpSolverSettings for Damped, CorrectionNewton, Frozen, or Sci.
task.solve_with_bvp_api_on_mesh?;
// Read the published physical profiles and route-specific diagnostics.
Kinetic IVPs
Kinetic IVPs prescribe temperature instead of solving a reactor energy balance. This distinction matters: a concentration curve responds to the user's temperature program, not to heat released by the modeled reactions.
For a single solid-state conversion, the specialized
solid_state_kinetics_IVP
workflow provides typed kinetic models and constant or linearly increasing
temperature. For an arbitrary reaction network,
reaction_network_ivp assembles a
multi-species system from user-defined stoichiometry and rate laws. It accepts
mass-action rates, empirical concentration orders, custom symbolic rates, and
typed solid-state conversion laws. Temperature can be constant, linear, or a
symbolic function of time. The result is a time series of concentrations and
temperature, with the run's bindings recorded for reproducibility.
Both workflows use RST StiffAPI: BDF, Radau, Backward Euler, and LSODE2 are
available solver families. The network workflow can prepare a system once and
rebind initial concentrations, supported temperature parameters, or rate
coefficients for repeated experiments without rebuilding the symbolic model.
It also supports cancellation and opt-in solver telemetry and logging. On a
failed solve, attempt diagnostics and any partial trajectory are diagnostic
evidence, not a published solution. See the
network example and its
model and API contract.
For a single mass-action step, the network's core setup is:
use ;
let problem = new?;
let solution = solve_network?;
println!;
As above, place the snippet inside a fallible function; the linked example adds a temperature ramp, a second reaction, and labeled output.
Property and reaction data
Properties of substances
Local handlers and the shared substance-search facade provide thermochemical and transport properties from the supported libraries. The workflow retains record identity and phase where relevant, and checks whether coefficients cover the temperature interval actually requested. NIST-backed lookup is an explicit data-source option, not a promise that every property or phase is available for every substance. See the thermodynamics guide and catalog audit example.
Reactions and mechanisms
Kinetic-library tools find and inspect reaction records, parse equations, and construct stoichiometric data and mechanisms. Audit a selected library or reaction range to locate damaged records with their source context before using the transactional production path. See the kinetics guide and mechanism example.
Desktop workflow
The GUI is a working interface to the calculators, not just a demonstration.
Build or open a task, inspect its physical inputs, configure the numerical
solver separately, preview the problem, and run it. Results can be inspected
as plots and tables, which makes it practical to compare profiles, individual
points, and failed attempts without writing a Rust harness. Reactor and
equilibrium interfaces expose the relevant controls while keeping
route-specific settings with their solver. The executable starts at an
interactive menu; choose GUI after cargo run.
Verification and further reading
The repository includes analytical, literature, and physical correctness tests alongside diagnostic stories and release benchmarks. Solver families do not all pass every problem or support every setting; use the tested capability of the chosen route and the published acceptance diagnostics, not method names alone. For project-wide engineering conventions, see the architectural guideline. For full runnable usage, follow the linked examples rather than copying an out-of-date snippet from this README.