Cluster 9 Exergy Field PINN

A Physics-Informed Neural Network predicting entropy generation, exergy destruction, and cycle efficiency for a heat engine running between any hot and cold reservoir temperature. Trained as part of the 9-cluster Scientific AI Cluster Orchestration Framework β€” the final cluster in the series β€” which pairs this network with exact symbolic ("Symetria") Carnot and Curzon-Ahlborn efficiency limits and two safety checks under LangGraph supervision.

Architecture

Input (x, y, normalized_temp, Th, Tc) β€” 5 features
Output (entropy generation, exergy destruction, efficiency)
Hidden layers 2 Γ— 64 neurons, Tanh activation
Parameters ~4,700
Entropy-generation head Softplus-terminated β€” can only output β‰₯ 0
Exergy destruction Computed exactly from the entropy-generation output, not a separate learned head

Entropy generation must be non-negative by the Second Law of Thermodynamics β€” a hard physical constraint, not an approximation β€” so that output is built using a Softplus function, which can only ever produce zero or positive numbers by construction. Since exergy destruction relates to entropy generation by an exact identity (Gouy-Stodola: exergy destroyed = Tβ‚€ Γ— entropy generated), it's computed directly from the entropy-generation output rather than predicted as an independent, redundant third quantity.

Quickstart

import torch
from huggingface_hub import hf_hub_download
from modeling import ExergyFieldPINN

ckpt_path = hf_hub_download("dave1368/cluster-09-exergy-field-pinn", "exergy_field_pinn.pt")
# weights_only=False: the checkpoint is a dict with metadata (model_state_dict
# plus training info), not a bare tensor, so torch's default-safe loader can't
# be used as-is. Only do this for checkpoints you trust the source of.
checkpoint = torch.load(ckpt_path, map_location="cpu", weights_only=False)

model = ExergyFieldPINN()
model.load_state_dict(checkpoint["model_state_dict"])  # checkpoint also carries training-time loss history, see training_metrics.json
model.eval()

# coords: (x, y, normalized_temp, hot_reservoir_K, cold_reservoir_K)
# normalized_temp ranges over [0, eta_carnot), the "Carnot deficit budget"
coords = torch.tensor([[0.5, 0.5, 0.1, 873.15, 298.15]])
s_gen, exergy_dest, efficiency = model(coords)[0].tolist()
print(f"s_gen={s_gen:.6f}  exergy_dest={exergy_dest:.4f}  efficiency={efficiency:.4f}")

Training data

Exact thermodynamic identities β€” no synthetic correlation needed. Labels come from the Clausius inequality combined with basic energy balance (Ξ· = Ξ·_Carnot βˆ’ TcΒ·s_gen) and the Gouy-Stodola theorem (exergy destroyed = Tβ‚€ Γ— entropy generated), not from measured or correlation-fit data:

  • 60,000 training points, 10,000 validation points
  • Domain: Th ∈ [100, 1500] Β°C, Tc ∈ [βˆ’50, 100] Β°C (with Th > Tc enforced)
  • Final train loss: 7.30e-05 Β· Final val loss: 7.29e-05 (MSE, normalized target scale)

Validated against classical sources (post-deployment finding)

Cross-checked against Carnot (1824), Clausius (1865), Gouy (1889) & Stodola (1905), and Curzon & Ahlborn (1975) β€” the papers cited in this cluster's Master Specification. Full data tables in the Space README.

Check Result
Carnot & Curzon-Ahlborn formulas vs. independent recomputation Exact match at every tested (Th, Tc)
Ξ·_CA ≀ Ξ·_Carnot, checked across 420 (Th, Tc) pairs Zero violations
Efficiency/entropy-generation identity, re-derived from Clausius from scratch Self-consistent to 9 decimal places
Gouy-Stodola exergy-destruction formula vs. independent Tβ‚€ Exact match
Network's predicted efficiency vs. exact identity Errors under ~1% of the efficiency scale
Second Law check β€” can it fail? No β€” Softplus-terminated output makes it structurally guaranteed to pass
Carnot-limit check β€” can it fail? Yes for excessive efficiency, but not for wildly negative efficiency β€” see Limitations

Limitations

  • The Second Law safety check can't distinguish a good model from a bad one β€” it's a structural guarantee (see above), not a training-quality measure.
  • The Carnot-limit check only catches predicted efficiency being too high; a model producing nonsensically negative efficiency would still pass it. In practice, this trained network's efficiency predictions stay well-behaved (see the validation table above), so this hasn't caused an actual wrong result β€” but the check alone isn't a complete sanity test.
  • Models the general thermodynamic identities of a heat engine, not a specific engine cycle (Rankine, Brayton, etc.) β€” the spatial field being sampled represents an abstract operating-point sweep, not a real engine's physical geometry.

Related

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support