Offline decarbonisation workbench for cement and steel plants.
ThermalForge is a desktop application for plant engineers, energy managers and sustainability teams. It answers two questions before capital is committed or a kiln is touched:
- Which decarbonisation action gives the largest CO2 reduction for the lowest cost? The MACC Simulator builds a marginal abatement cost curve from plant data.
- If part of the coal is replaced with biomass or municipal waste, will the kiln stay hot enough, and what does it save? The Fuel Blend planner runs a combustion mass and energy balance and a 24-hour thermal stability projection.
Everything runs on the local machine. ThermalForge has no accounts, sends no telemetry and makes no network requests, so confidential plant data never leaves the computer.
- Features
- How it works
- Installation
- Quick start
- Importing data
- Reports
- Data storage and privacy
- Architecture
- Technology stack
- Development
- Packaging and releases
- Roadmap
- Contributing
- Support the project
- License
- Disclaimer
- Plant metrics as inputs: clinker production, specific thermal and electrical energy, process CO2, coal cost, electricity rate, grid emission factor, discount rate and carbon price.
- Five eco-strategies, each with an adoption slider and editable assumptions (full potential, CapEx, OpEx change, lifespan):
- kiln insulation and refractory
- waste heat recovery power
- biomass co-firing
- high-efficiency motors and variable-frequency drives
- carbon capture
- Marginal abatement cost curve: bar width is CO2 avoided per year, bar height is cost per tonne, sorted cheapest first, with the carbon price drawn as a reference line.
- An optional strategy interaction model applies strategies in sequence, so savings are not double counted.
- A recommendation names the best-value action, the largest single reduction, the actions that pay for themselves, and the actions that beat the carbon price.
- A sensitivity (tornado) chart shows how net annual cost responds when coal price, electricity rate, biomass price, CapEx, discount rate or carbon price move by a chosen percentage.
- Three-fuel blending of coal, biomass and municipal solid waste (RDF) by mass, using editable as-received lab analyses: LHV, moisture, ash, C, H, O, S, fossil carbon share and price.
- Combustion stoichiometry, flue-gas mass and theoretical flame temperature.
- Steady-state burning-zone temperature, compared against a sintering minimum.
- A 24-hour stability projection that simulates moisture variability. Each blend is classified as Stable, Marginal or Unstable.
- Thermal substitution rate, CO2 avoided and fuel cost change against coal-only operation at equal kiln heat, with and without the carbon price.
- A least-squares fit of the burning-zone baseline and the flame-to-kiln coupling to temperatures measured on the plant.
- An optional measured flame temperature calibrates the combustion air temperature.
- The fit error (RMSE), a measured-versus-model table, and plausibility warnings are shown before anything is applied.
- A local SQLite library of plants and named scenarios. Each scenario stores every input, including calibration measurements.
- Side-by-side comparison of any two plans, or the current inputs, with a difference column, exportable as a report.
- PDF and CSV reports for every tool, generated locally.
- CSV and Excel import (
.csv,.xlsx,.xls,.ods) with a round-trip template. - Light, dark and system themes, an adjustable interface scale, and collapsible menu and input panels.
- Celsius or Kelvin display and a configurable currency code.
- Inputs and settings are saved automatically, and a built-in user manual is included.
All calculations are deterministic and documented in the in-app User Manual and in every report.
| Quantity | Model |
|---|---|
| Abatement cost | (CapEx x CRF + annual OpEx change) / CO2 avoided per year, where CRF = r / (1 - (1 + r)^-n) |
| Stoichiometric air | (2.664 C + 7.937 H + 0.998 S - O) / 0.232 kg air per kg fuel |
| Flue gas | 1 + air x (1 + excess air) - ash kg per kg fuel |
| Flame temperature | T_air + LHV / (flue gas x cp) |
| Burning zone | T_base + coupling x (T_flame,blend - T_flame,coal) |
| Moisture correction | LHV' = (LHV + 2.442 M)(1 - M') / (1 - M) - 2.442 M' |
| Fossil CO2 | 44/12 x C x fossil share t per t fuel |
| Thermal substitution | 1 - x_coal x LHV_coal / LHV_blend |
When strategy interactions are enabled, strategies are applied in a fixed order: efficiency, then power, then fuel switching, then capture. Each strategy is credited only with the energy and emissions left by the strategies before it. Waste heat recovery is capped at the power the plant still buys from the grid.
The pre-filled values describe a typical 1 Mt/yr dry-process clinker line. They are a starting point and must be replaced with plant and laboratory data before decisions are made.
Download the latest release from the Releases page:
| Platform | File | Notes |
|---|---|---|
| Windows 10/11 (x64) | ThermalForge-<version>-windows-x64-setup.exe |
Installs per user; no administrator rights needed. |
| macOS 11+ (Apple Silicon and Intel) | ThermalForge-<version>-macos-universal.dmg |
Drag to Applications. Builds that are not notarised need right-click, then Open, the first time. |
| Linux (x86_64) | thermalforge_<version>_amd64.deb or .tar.gz |
Requires OpenGL, X11 or Wayland, and GTK 3. |
Install the stable Rust toolchain from rustup.rs (Rust 1.82 or newer), then:
git clone https://github.com/TIRK3Y/ThermalForge.git
cd ThermalForge
cargo run --releasePlatform prerequisites:
| Platform | Requirement |
|---|---|
| Windows | Visual Studio Build Tools (MSVC) |
| macOS | Xcode command line tools: xcode-select --install |
| Debian / Ubuntu | sudo apt install libgtk-3-dev libxkbcommon-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev |
| Fedora | sudo dnf install gtk3-devel libxkbcommon-devel |
- Open Settings and choose the temperature unit and currency code. Enter the site name and author shown on reports.
- Open MACC Simulator. Enter the plant metrics, then set each strategy's adoption level and assumptions.
- Read the KPI cards, the recommendation, the cost curve, the ranked actions and the sensitivity chart.
- Open Fuel Blend & Stability. Enter fuel analyses, set the blend, and check the stability verdict and the 24-hour projection.
- Open Kiln Calibration. Enter measured burning-zone temperatures and apply the fit.
- Open Scenarios & Plants. Add a plant, save the current inputs as a scenario, and compare plans side by side.
- Use Download PDF or Download CSV on any tool page to produce a report.
Click Save template on the MACC or Fuel Blend page to get a CSV of the current values. Edit it in a spreadsheet, then import it with Import CSV / Excel.
- Column A holds the parameter name. Case, spaces and punctuation are ignored.
- Fuel rows take three values, in the order coal, biomass, MSW. Other rows take one value.
- Temperatures in the file are in degrees Celsius.
- Semicolon-separated files with decimal commas are supported.
- Unrecognised rows are listed after import, and out-of-range values are clamped to their valid range.
| Report | Contents |
|---|---|
| MACC | Summary, recommendation, cost curve, ranked actions, sensitivity table, plant metrics, strategy assumptions, method |
| Fuel Blend | Summary, stability assessment, 24-hour projection chart, blend composition, fuel properties, kiln settings, method |
| Scenario comparison | Both plans and a metric-by-metric comparison with differences |
PDF reports are A4 documents produced by a built-in writer and open in any PDF reader. CSV reports contain the same data, plus every 15-minute point of the 24-hour projection.
ThermalForge stores two files in the user's application data folder:
| File | Contents |
|---|---|
app.ron |
Current inputs and preferences, saved every 30 seconds and on exit |
thermalforge.db |
SQLite library of plants and scenarios |
| Platform | Folder |
|---|---|
| Windows | %APPDATA%\ThermalForge\data |
| macOS | ~/Library/Application Support/ThermalForge |
| Linux | ~/.local/share/thermalforge |
The application makes no network connections. The only exception is when you click Donate, which opens the sponsorship page in your web browser.
ThermalForge/
├── src/
│ ├── main.rs Window setup and entry point
│ ├── lib.rs
│ ├── core_engine/ Domain layer: pure Rust, no UI code
│ │ ├── calculator.rs Blending, stoichiometry, flame and kiln temperature, 24 h projection, calibration fit
│ │ ├── finance.rs Abatement cost, plant demand, strategies and interaction model
│ │ ├── scenario.rs Complete input set and all derived results (MACC, blend, sensitivity)
│ │ ├── store.rs SQLite library of plants and scenarios
│ │ ├── import.rs CSV / Excel import and template
│ │ └── report_gen.rs Report model, CSV writer and dependency-free PDF writer
│ └── gui/ Presentation layer (egui)
│ ├── mod.rs Application shell, navigation, settings, persistence
│ ├── widgets.rs Theme tokens and shared layout components
│ ├── macc_view.rs MACC Simulator page
│ ├── blend_view.rs Fuel Blend & Stability page
│ ├── calibration_view.rs Kiln Calibration page
│ ├── scenarios_view.rs Scenarios & Plants page
│ ├── settings_view.rs Settings page
│ └── manual_view.rs Built-in user manual
├── tests/ Integration tests for the engine, import, storage and reports
├── packaging/ Windows installer script, signing helper, Linux desktop entry
└── .github/ CI, release workflow, issue and pull request templates
The domain layer has no dependency on the user interface. Every result shown on screen, saved in a scenario or written to a report comes from the same Scenario methods, so the numbers are always consistent.
| Component | Library |
|---|---|
| Language | Rust 2021 |
| User interface | egui / eframe 0.28 (immediate mode, OpenGL) |
| Local database | rusqlite, with SQLite bundled |
| Excel import | calamine |
| Serialisation | serde, serde_json, RON (via eframe persistence) |
| Native file dialogs | rfd |
| Date and time | chrono |
| PDF and CSV output | Built in, with no external dependency |
cargo run # debug build
cargo test # engine, import, storage and report tests
cargo clippy --all-targets -- -D warnings # lints (CI fails on any warning)
cargo build --release # optimised buildSet REPORT_PREVIEW_DIR to an existing folder when running cargo test to write sample PDF and CSV reports there for visual review.
Continuous integration runs clippy, the test suite and a release build on Windows, macOS and Linux for every push and pull request.
Pushing a version tag (for example v1.2.0) runs .github/workflows/release.yml, which builds and attaches to a GitHub release:
- a Windows installer built with Inno Setup from
packaging/windows/thermalforge.iss - a macOS universal disk image
- a Linux
.debpackage and a.tar.gzarchive
Unsigned Windows executables are blocked by Smart App Control and flagged by SmartScreen on other machines. To sign releases, add these repository secrets:
| Secret | Purpose |
|---|---|
WINDOWS_CERT_PFX |
Base64-encoded code-signing certificate (.pfx) from a trusted certificate authority |
WINDOWS_CERT_PASSWORD |
Certificate password |
APPLE_CERT_P12, APPLE_CERT_PASSWORD, APPLE_SIGNING_IDENTITY |
Developer ID Application certificate for macOS signing |
APPLE_ID, APPLE_APP_PASSWORD, APPLE_TEAM_ID |
Apple notarisation credentials |
Without these secrets the workflow still produces installers: unsigned on Windows, and ad-hoc signed on macOS.
- Additional strategies: clinker substitution (SCMs), oxy-fuel combustion and electrified heat.
- A multi-zone kiln model with preheater and calciner balances.
- Steel sector templates: blast furnace, DRI and electric arc furnace.
- Monte Carlo uncertainty analysis for the MACC.
- Localised user interface and units.
Suggestions are welcome in GitHub Issues.
Contributions of code, engineering data, documentation and bug reports are welcome. Please read CONTRIBUTING.md before opening a pull request. All participants are expected to follow the Code of Conduct. Report security issues as described in SECURITY.md.
ThermalForge is free and open source. If it is useful to you or your organisation, please consider sponsoring its development. Sponsorship funds maintenance, new process models and validation against real plant data.
Released under the MIT License.
ThermalForge is a planning and screening tool. Its results are engineering estimates based on simplified steady-state models and user-supplied data. They are not a substitute for detailed engineering, supervised trial burns, or the plant's process control and safety systems. The authors accept no liability for decisions made using this software.