Skip to main content

the-exergy-imperative

CI PyPI Python License Guide

Exergy, emissions, health, and economic analysis using the data that you actually have. Give it as little as an equipment name and a country; every default it fills in stays visible, sourced, and is replaceable with your own measurements.

Energy is never created or destroyed — but its capacity to do useful work is. Every joule splits into exergy, the part that can still perform work, and anergy, the part that cannot. Across the entire universe only two things are ever happening: useful work is being performed, and exergy is being destroyed. That one-way flow drives every engine, grid, reactor, and star, yet almost all energy accounting ignores it. This library makes it visible — for any energy carrier, technology, or process, at whatever level of detail you have. The Exergy Imperative, the guide this library grew out of, tells the full story.

Why this library

Most exergy tools (TESPy, ExerPy, Aspen Plus) start from a fully specified plant simulation. Most real decisions start earlier — with a utility bill, a telemetry export, or a one-line description of whatever system you are working on. exergy-imperative works at that end of the funnel:

  • Sparse input, transparent output. Progressive-fidelity assessments (F0 upward) from a bare technology name to measured site data. Every number carries provenance, a range, and warnings — screening defaults are never passed off as measurements.
  • The whole business case, not just thermodynamics. Exergetic efficiency and destruction, AR6 20/100-year climate impact, air-pollutant health screening, and project economics (NPV, IRR, payback, levelized cost, marginal abatement cost) in one result.
  • Data plumbing built in. Auditable ingestion from CSV, Excel, Parquet, JSON, and SQL with unit conversion and mapping inference; native Excel input templates and workbook reports; weather normalization from NASA POWER; connectors for World Bank, ERA5-Land, EDGAR, eGRID, and DOE IAC data.
  • Agent-native. Versioned JSON recipes with validate-only / dry-run / execute modes, stable error codes, capability discovery, and an optional MCP server so AI assistants can drive full assessments safely.
  • Zero required dependencies. The core is pure Python (3.11–3.14); pandas, CoolProp, PDF, and MCP support are opt-in extras.

Install

python -m pip install exergy-imperative

Optional extras, only if you need them:

python -m pip install "exergy-imperative[data]"     # Excel / Parquet readers
python -m pip install "exergy-imperative[reports]"  # PDF reports
python -m pip install "exergy-imperative[mcp]"      # MCP server for agents
python -m pip install "exergy-imperative[all]"      # everything

Start from the physics

The same few questions apply to every energy system, from a kettle to a national grid — and each is one line:

import exergy_imperative as xi

# How much of a heat flow could still become useful work?
xi.thermal_exergy_factor_c(80, 20)     # 0.17 — hot water at 80 °C in a 20 °C world
xi.thermal_exergy_factor_c(1500, 20)   # 0.83 — furnace heat is nearly pure work potential
xi.petela_exergy_factor()              # 0.93 — sunlight is very high-quality energy

# How much quality does a technology preserve? Ask by name.
xi.assess("air-source-heat-pump").exergetic_efficiency.value        # 0.32
xi.assess("natural-gas-boiler").exergetic_efficiency.value          # 0.11
xi.assess("electric-resistance-heater").exergetic_efficiency.value  # 0.10
xi.assess("lithium-ion-battery").exergetic_efficiency.value         # 0.93

Three ways to warm the same room, and the heat pump preserves three times more work potential than the boiler advertising "95 % efficiency" — the kind of difference energy accounting cannot see and exergy accounting can. xi.list_profiles("technology") lists everything assessable by name — electrolyzers, fuel cells, chillers, desalination, data centers, batteries — and every profile value can be replaced with your own temperatures, COPs, and efficiencies.

Sixty seconds to a result

import exergy_imperative as xi

case = xi.assess_process("compressed air", energy=2_500, country="DEU")
print(case.summary())
Compressed-air system
Fidelity: F1
Exergetic efficiency: 0.15 dimensionless (screening range 0.08-0.25)
Climate impact: 8.24e+05 kg CO2e (100-year)
Screening energy opportunity: 500 MWh (screening range 125-875)
Warnings and limitations:
  - The improvement opportunity uses a broad template screening prior; ...

Add whatever data you have — efficiency, temperatures, energy prices, capital cost, lifespan, location, and then analyze the results.

Export deliverables at any time:

case.export_html("compressed-air.html")
case.export_pdf("compressed-air.pdf")              # [reports] extra
case.export_excel_compatible("compressed-air-data")

The same works from the command line, from JSON recipes, and from Excel templates:

exergy report examples/process_report_recipe.json --html output/report.html
exergy capabilities --json     # discovery for scripts and agents
exergy validate                # run the bundled reference checks

See the quickstart for the full tour.

What's inside

  • Twelve ready-made process templates spanning the energy landscape: steam, furnaces, compressed air, refrigeration, drying, desalination, hydrogen electrolysis, data centers, cement, steel reheat, food processing, district energy.
  • Engineering screens for steam systems, heat pumps, furnaces, refrigeration, compressed air, and waste-heat matching.
  • Explicit GHG boundaries (combustion, process, fugitive, purchased energy), methane vent/flare/recovery project analysis, and grid intensities for 213 countries (Ember / Our World in Data, 2020–2025).
  • Monte Carlo uncertainty propagation, sensitivity ranking, and value of perfect information.
  • Dependency-free SVG/HTML reports, optional PDF, and auditable Excel-compatible bundles with complete source payloads.
  • Optional real-fluid physical exergy via CoolProp ([properties] extra).

When to use it — and when not to

Your situation Use
Screening any energy technology, site, or portfolio from bills, telemetry, or one-line descriptions exergy-imperative
Building the emissions + health + economics case around an efficiency project exergy-imperative
Letting an AI assistant run auditable energy assessments (MCP / JSON recipes) exergy-imperative
Component-level exergy analysis of a fully specified thermodynamic cycle TESPy
Exergy analysis on top of an existing Aspen Plus or Ebsilon simulation ExerPy
Detailed process simulation, equipment design, or guarantee calculations Aspen Plus, gPROMS, EBSILON, EES

This library is deliberately a screening tool: its thermodynamics are closed-form (Carnot factors, Gouy–Stodola, Petela, ideal-mixture separation) plus optional CoolProp real-fluid properties. Results based on bundled profiles are screening estimates with declared ranges — a triage and business-case layer that tells you where a detailed simulation or site audit is worth the money, not a substitute for one.

Data, provenance, and validation

Bundled reference data ships with sources, versions, licenses, and confidence labels: Ember/OWID electricity intensities, IPCC AR6 warming potentials, IPCC 2006 fuel factors, EPA and EMEP/EEA pollutant screening profiles. No restricted publisher data (IEA, Energy Institute) is redistributed — local adapters map your licensed copies with SHA-256 fingerprinting. Run exergy validate to execute the bundled reference calculations and see every expected value, tolerance, and citation.

Documentation

Guide What it covers
Quickstart Install to first report
Python library Full API tour
Engineering models Equipment screens and their assumptions
Environment, health, economics Impacts and project finance
Data & fidelity Fidelity tiers, units, boundaries
Ingestion · Excel & local data Getting your data in
External data integrations World Bank, ERA5-Land, EDGAR, eGRID, IAC
Agent integration JSON recipes, discovery, MCP server
Validation Reference checks and their scope
Architecture How the modules fit together
Changelog Release history
The Exergy Imperative The complete guide to exergy and the energy transition

Status

0.3.0 alpha. The public Python API, CLI commands, recipe contract 1.0, packaged JSON Schemas, and MCP tools are stable surfaces within a minor version (see AGENTS.md). Release history lives in the changelog. Contributions are welcome — especially reviewed profiles, validation cases against published literature, and dataset adapters; see CONTRIBUTING.md.

License and citation

Code is Apache-2.0. The guide, explanatory documentation, and bundled profile data are CC BY 4.0; licensing details and third-party data attributions are in NOTICE. To cite this project, reference The Exergy Imperative (Exergy Lab, 2026), https://github.com/cdimurro/the-exergy-imperative.


Published by Exergy Lab — a platform for accelerating scientific discovery and technological innovation, purpose-built for energy and deep-tech industries. Free for anyone to use.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exergy_imperative-0.4.0.tar.gz (217.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exergy_imperative-0.4.0-py3-none-any.whl (192.2 kB view details)

Uploaded Python 3

File details

Details for the file exergy_imperative-0.4.0.tar.gz.

File metadata

  • Download URL: exergy_imperative-0.4.0.tar.gz
  • Upload date:
  • Size: 217.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for exergy_imperative-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ceeeacd2c681fcc685d56e5acd8051c70e632c4dd97d75b027eb56e79e25bf45
MD5 95526712b781745e75dd69d08bce57d8
BLAKE2b-256 53be8ae379b2598a39fcc84b0e4a16b59afc9af1abd295e135a1cd810012b8da

See more details on using hashes here.

Provenance

The following attestation bundles were made for exergy_imperative-0.4.0.tar.gz:

Publisher: release.yml on cdimurro/the-exergy-imperative

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file exergy_imperative-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for exergy_imperative-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb6b72edac87ec5258a6b435d16c9721b63e791e82148ef253859836d3464f80
MD5 1c05cc50021a92ff0834fb005dd59b86
BLAKE2b-256 3e885530deb716ea69f62ce42d004bae9694f3c227a6589aea0e7c842f111de1

See more details on using hashes here.

Provenance

The following attestation bundles were made for exergy_imperative-0.4.0-py3-none-any.whl:

Publisher: release.yml on cdimurro/the-exergy-imperative

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page