Downloads · 30 days
0
dave1368/cluster-09-exergy-field-pinn
cluster-09-exergy-field-pinn is a machine learning model from dave1368. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
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 Scie…
Downloads · 30 days
0
Access
Public
Updated Aug 28, 2026
Repo size
21.9 KB
Likes
0
Public
Click a slice to open those files.
.pt21.9 KB · 58%
From the Hugging Face model README
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.
| 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.
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}")
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:
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 |