Citable v2.0.0-beta.1 source-only research beta on Zenodo, DOI 10.5281/zenodo.23679426.
Modern Fortran · Gas turbine / CCGT · Second-law analysis · Self-initiated portfolio project
ThermoTwin-F — Gas Turbine and Combined-Cycle Digital Twin
Self-initiated educational simulator of a single-shaft gas turbine and combined-cycle (CCGT) extension, implemented in Modern Fortran 2008, with a native Win32/GDI+ operating console, a second-law analysis suite, and 28 passing native tests plus a physics selftest. Its engineering value is the transparent cycle-to-analysis implementation: station calculations, testable diagnostics and uncertainty outputs tied to an explicitly educational model.
10 release CI jobs passed; native Windows GUI and OPC UA are experimental.
Benchmark and software verification are not industrial engine validation.
Reviewed 30 August 2026: fresh Windows CLI and GUI builds, 28 native tests plus the physics selftest, and 15 scenarios passed. Charts and numerical tables below are historical illustrations pending reproduction against the current source. They are not measured plant data or certification. Revamp 7 is an implementation milestone, not a tagged release. See the verification record and remaining work.
What this demonstrates
ThermoTwin-F is intended to evidence, in one artifact, the competencies a thermal-systems engineer or doctoral researcher should hold: thermodynamic rigour (closed mass/energy/exergy balances, named reference formulations, theoretical-limit benchmarking); numerical and software-engineering maturity (a clean modular architecture, an explicit dependency graph, a real test suite, deterministic reproducibility); uncertainty literacy (error bars and variance attribution rather than point estimates); and the ability to make complex systems legible through a designed, accessible operating console.
GridState shared by every tier
Evidence dashboard
A twin that is understood, not just simulated.
Design question
How do you build a gas-turbine digital twin that is understood, not just simulated — with closed mass/energy/exergy balances, quantified uncertainty on every headline number, and an operating console that makes the physics legible?
Four-tier architecture
HMI tier (Win32/GDI+ console, 16 screens) → Orchestration tier (engine_core, scenario_runner) → Analysis & subsystem tier (exergy, dispatch, ML, decarbonisation) → Physics core (cycle solver, thermophysics, degradation, diagnostics). Every tier reads from and writes to one GridState derived type, so modules cannot silently disagree about the plant’s condition.
Physics implementation (Revamp 7)
Station-by-station Brayton cycle solver with fuel-mass-conserving combustor energy balance. Thermophysical fidelity: NASA-9 polynomial gas properties, IAPWS-IF97-style water/steam helpers, ε-NTU multi-pressure HRSG enforcing pinch as a heat-transfer limit. Combustion: adiabatic flame-temperature shift, Zeldovich thermal-NOx, CO slip, H2 co-firing (LHV/Wobbe/flashback margin). Machine: turbine cooling-air demand, tip-clearance loss, polytropic-loss breakdown.
Second-law analysis suite
Six modules shipping with the Revamp 7 implementation, each closing its own balance and including a unit test tied to a textbook expectation: exergy accounting (physical + chemical specific exergy, per-component destruction, governing balance, ηII); Monte-Carlo UQ (Box–Muller sampling, deterministic seed, 95 % CI on ηII and destructions); Saltelli/Jansen Sobol sensitivity (first-order S1 and total-effect ST for five inputs); WLS data reconciliation + χ² gross-error detection (99.9 % level); Carnot/Curzon–Ahlborn/Brayton theoretical limits; and an aggregated scientific report auto-generated into every CSV export.
Verification regime
28 unit-test programs plus an analytic selftest oracle (thermotwin selftest) reproducing an independent hand calculation of the design point — all green at the Revamp 7 implementation. Tests check physics, not syntax: energy-balance closure, degradation monotonicity, transient steady-state limit against an analytic solution, inverse-solver recovery of a known degradation state, exergy-balance closure with combustor dominance, UQ interval bracketing, Sobol driver isolation, reconciliation gross-error detection, and theoretical-limit ordering. Every stochastic study seeds its RNG explicitly for bit-for-bit repeatability.
Design-point performance
Calibrated operating points
| Quantity | Simple cycle | Combined cycle (calibrated) |
|---|---|---|
| Gas-turbine net power | ≈30 MW | 45.5 MW |
| Steam-turbine power | — | 15.2 MW |
| Plant net power | ≈30 MW | ≈60.7 MW |
| Thermal / plant efficiency | ≈31 % | 52.8 % |
| Heat rate | ≈11,800 kJ/kWh | — |
| Exhaust / stack temperature | ≈797 K exhaust | 379 K stack |
| HRSG pinch | — | 15 K |
These values sit squarely within expected bands for an industrial single-shaft simple-cycle GT and a modern CCGT. The simple-cycle point is verified against an independent hand calculation (thermotwin selftest); the combined-cycle point is calibrated.
Second-law analysis
Historical exergy examples (Revamp 7)
Exported from the running console (shift_data_t27.csv, [SCIENTIFIC_ANALYSIS] block). All figures carry a balance-closure residual or a confidence interval; none are asserted without a stated method.
| Metric | Value |
|---|---|
| Rational efficiency ηII | 0.500 |
| ηII with Monte-Carlo UQ | 0.502 ± 0.027 (95 % CI 0.450–0.554) |
| Dominant irreversibility | Combustor — largest exergy destruction component |
| Exergy-balance closure residual | −0.0000 (machine zero) |
| Dominant Sobol driver of ηII | Fuel flow (ST ≈ 1.1, all others ≈ 0) |
The closed balance, combustor dominance, and clean single-driver Sobol decomposition are exactly what second-law theory predicts for this plant class — the analysis reproduces known physics rather than asserting numbers.
Analysis plots
Six simulation studies — design point to uncertainty.
Operating console
Native Win32/GDI+ HMI — 16 analysis screens.
Development history
Seven development phases, not seven formally tagged releases
| Release | Theme | What it added |
|---|---|---|
| 1.x – 4.x | Capability | Cycle solver; degradation, transient, sensor/uncertainty, inverse diagnostics; combined-cycle + fleet dispatch; day-ahead MINLP; DNN surrogate; anomaly/fault ML; P2X/CCS/GFM/tie-line/MPC; H2 co-firing; scenario engine + regression suite — 15 screens, functionally complete. |
| 5.0 | Product polish | Header/shell redesign; design-token + component layer; flagship executive landing screen with health ring and click-through faceplates; density rebalance; model-validation harness; economic-MPC horizon view; physics-fidelity overlays; scenario comparison; branded PDF/CSV reporting. |
| 6.0 | Blueprint Technical UI | Seven-theme engine; monospace numerics; line-art icon set; full P&ID schematic engine; motion (self-drawing boot, alarm pulse); product shell (nav rail + Ctrl-K palette); shared chart crosshair/tooltip + sparklines; accessibility (density, UI-scale, colour-blind-safe, focus rings); demo/auto-tour + one-key PNG export. |
| 7.0 | Pure physics & scientific analysis | Exergy/second-law engine + live Grassmann screen; thermophysical fidelity (NASA-9 gas, IAPWS-IF97 steam, ε-NTU HRSG); combustion chemistry (Zeldovich NOx, CO, H2/Wobbe/flashback, cooling-air, tip-clearance); Monte-Carlo UQ; Saltelli/Jansen Sobol + tornado; WLS data reconciliation + χ² gross-error; Carnot/Curzon–Ahlborn/Brayton limits + T–s envelope; aggregated scientific report embedded in every export. |
Codebase footprint
Scale and component breakdown
| Component | Files | Lines |
|---|---|---|
Fortran — engine (src/) |
54 | 8,263 |
Fortran — native GUI (gui/gui_win32.f90) |
1 | 11,005 |
Fortran — CLI driver (app/main.f90) |
1 | 462 |
Fortran — unit tests (test/) |
28 | ≈1,934 |
| Fortran — total | 84 | ≈21,664 |
| C++ — GDI+ render backend | 1 | 362 |
| C — OPC UA wrapper | 1 | ≈250 |
| Python — post-processing / report / DNN | 12 | 1,760 |
Limitations
What this project does and does not claim
Consistent with the project’s standing honesty note:
- This is a non-proprietary, educational simulator built on textbook thermodynamics with representative property values. It is verified against an independent hand calculation but not validated against any specific commercial engine, and it is not ASME PTC 22 / ISO 2314 compliant — the numbers are physically plausible illustrations, not predictions for a particular machine.
- Bottoming-cycle exergy in the P1 accounting is lumped rather than station-resolved.
- Data reconciliation uses a single constraint rather than a full multi-constraint network.
- Zeldovich NOx and CO correlations are simplified.
- The DNN surrogate is trained against a dispatch-label formula, not measured field data.
Each of these is documented at its point of use in the codebase and the technical report. Because property values are representative, absolute KPIs should be read comparatively (clean vs degraded, scenario A vs B, actual vs limit) rather than as machine-specific truth.
Relevance
How it fits the portfolio
Thermodynamic rigour
Every model closes its governing mass/energy/exergy balance to a stated tolerance. Reference formulations are named and citable: IAPWS-IF97, NASA-9 polynomials, ε-NTU, Sobol’, Jansen, Curzon–Ahlborn.
Software-engineering maturity
A clean modular Fortran architecture with an explicit dependency graph, dual build paths (fpm + Makefile), a disciplined test suite, and deterministic RNG seeding for reproducible stochastic studies.
Uncertainty literacy
Headline numbers carry confidence intervals with explicit provenance — Monte-Carlo propagation and variance-based Sobol attribution rather than asserted point estimates.
Systems legibility
A native, dependency-light Win32/GDI+ HMI with 16 analysis screens, a P&ID schematic engine, seven live themes, and one-key scientific report export makes the physics accessible without a proprietary framework.
Verification vs validation — stated plainly
ThermoTwin-F is verified against an independent hand calculation and a 28-test suite. It is not validated against a specific instrumented asset; validation against field data would require a named engine and measured performance maps. This boundary is documented in the technical report (THERMOTWIN-F_TECHNICAL_REPORT.md, §10.2) and at the project README honesty note.
Project access
Source and report
ThermoTwin-F is an open-source educational simulator. Source code, build instructions, tests and the technical report are available on GitHub. The report and numerical illustrations on this page are historical examples, not newly reproduced results or external asset validation. The source-only v2.0.0-beta.1 research prerelease was archived on 27 October 2026 with DOI 10.5281/zenodo.23679426. Revamp 7 was a development phase, not a seventh tagged release. Release gates and accepted limitations are documented.
Software verification
Hosted CI and parallel execution
Six OS/profile cells passed, including serial and OpenMP builds, existing tests and full-field equivalence. The implementation parallelises independent operating-point cases. Workstation scaling and its limitations are documented in the PR.
The feature has been merged into the default branch. These software checks do not establish independent scientific validation.