Skip to content

Commit ce463f2

Browse files
Tools00claude
andcommitted
release: v0.5.0 — fluid module, rectangular stacks, zero-fit literature validation
Closes the [Unreleased] block into [0.5.0] — 2026-04-21. README bumped with a "What's new in v0.5" section covering the three phases, Validation block rewritten to reflect Bernt 2020 + Zimmer 2026 results (with explicit xfail honesty), Roadmap updated (v0.3-v0.5 done, v0.6 = flipping the two xfails via catalyst/contact-resistance presets), Project Structure lists the new modules (components, assembly, fluid, visualization), test count 78 -> 161+2-xfail. Test status on this commit: 161 passed, 2 xfailed. Ruff clean. Phase rollup: - Phase 1 (fd8b71e): fluid module + pump coupling - Phase 2 (19af358): rectangular stacks via aspect_ratio - Phase 3 (0e82325, 75e9867): Bernt + Zimmer validation - ADR-007 (f472d67): architecture record for all three Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f472d67 commit ce463f2

2 files changed

Lines changed: 93 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) · SemVer.
55

66
## [Unreleased]
77

8+
## [0.5.0] — 2026-04-21
9+
10+
Phases 1-3 abgeschlossen: Fluid-Modul + Pumpen-Kopplung, rechteckige
11+
Stacks, Literatur-Validation mit Zero-Fit-Property. Test-Suite wächst
12+
von 123 auf 161 Tests + 2 strict-xfail (dokumentierte Kalibrierungs-
13+
Targets für v0.6).
14+
15+
### Added (v0.5 Phase 1 — fluid module + pump coupling)
16+
- **`src/fluid.py`** — neues Modul mit Hagen-Poiseuille-Druckverlust im
17+
laminaren Regime + Darcy-Weisbach-Warnung für turbulente Kanäle
18+
(Re > 2000). Pure functions, Assembly-frei testbar.
19+
- **Stoichiometrische Wasser-Flussberechnung** aus Faraday-Strom × λ,
20+
angekoppelt an die Anoden-Kanal-Geometrie aus `BipolarPlateSpec`.
21+
- **`assembly.assembly_pressure_drop` + `assembly_pump_power_w`** als
22+
dünne Komposition über `fluid.*`.
23+
824
### Added (v0.5 Phase 2 — rectangular stacks + ΔP in UI)
925
- **`aspect_ratio` auf `StackAssembly`** (`src/assembly.py`): dimensionslos,
1026
default 1.0 (quadratisch = v0.4-Verhalten). `active_dimensions_m(a) → (w, h)`
@@ -77,13 +93,14 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) · SemVer.
7793
für die drei orthogonalen v0.5-Erweiterungen (Fluid-Modul, rechteckige
7894
Stacks, Zero-Fit-Validation mit strict-xfail). ADR-Index aktualisiert.
7995

80-
### Planned (next, v0.5 release)
81-
- v0.5.0 Release-Commit + README-Update
82-
8396
### Deferred (v0.6)
84-
- Katalysator-Preset-System: generic vs setup-spezifisch, mit unabhängig
85-
extrahierten kinetischen Parametern (nicht aus Fig.-1-Fit).
86-
- Bernt-Preset + ggf. Stiber 2022 als zweiter Validierungs-Datensatz.
97+
- Katalysator-Preset-System: `IrO2_generic` vs `IrO2_TiO2_Umicore_Elyst_Ir75`,
98+
mit unabhängig extrahierten kinetischen Parametern (nicht aus Fig.-1-Fit).
99+
- Membran-Preset-Tabelle erweitern (`Nafion 115` + Springer-Leitfähigkeit
100+
gegen Zimmer's gefilterten N115-Korpus verifizieren).
101+
- Kontakt-Resistenz-Preset: `generic_commercial` vs `research_grade`.
102+
- Flip beider strict-xfail-Tests zu normalen Asserts, sobald Bernt-RMSE
103+
< 60 mV und Zimmer innerhalb ±1σ an allen 5 j.
87104

88105
## [0.4.1] — 2026-04-20
89106

README.md

Lines changed: 70 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,47 @@ with one click.
1717

1818
---
1919

20+
## What's new in v0.5
21+
22+
### Flow-field pressure drop + pump power (Phase 1)
23+
24+
- **`src/fluid.py`** — Hagen-Poiseuille ΔP in laminaren Kanälen +
25+
explizite Darcy-Weisbach-Warnung bei Re > 2000 (keine stille
26+
Extrapolation).
27+
- **Anoden-Wasser-Fluss aus Faraday + λ** — stoichiometrische
28+
Volumen-Flussrate pro Zelle, N Zellen hydraulisch parallel am Stack-
29+
Manifold.
30+
- **Assembly-Tab: `ΔP [kPa]`, `v [cm/s]`, `Re`, `Pump [W]`, Parasit-Anteil**
31+
der Stack-Leistung als Metrics. Pump-Leistung fließt nicht (noch) in
32+
den η-Wert, wird aber transparent daneben gezeigt.
33+
34+
### Rectangular stacks (Phase 2)
35+
36+
- Neues Feld `aspect_ratio` (dimensionslos, default 1.0) auf
37+
`StackAssembly` — area-preserving: `w·h = active_area_m²`, `w/h = ratio`.
38+
v0.4-JSONs laden weiter als quadratisch.
39+
- BPP-Außenmaße folgen als `(w + 2·frame, h + 2·frame)` — echte
40+
rechteckige Plates. Flow-Field-Rendering (alle drei Pattern) richtet
41+
sich nach den rechteckigen Dimensionen.
42+
- Sidebar-Slider 0.25…4.0, Caption zeigt resultierende w × h.
43+
44+
### Literature validation (Phase 3)
45+
46+
Zero-Fit-Property: nur dokumentierte Betriebsbedingungen (T, p, Membran)
47+
werden als Inputs genutzt — keine kinetischen Parameter auf die
48+
Test-Kurve gefittet.
49+
50+
| Datensatz | Typ | Status |
51+
|---|---|---|
52+
| Bernt 2020 Fig. 1 (2 mg Ir/cm², 80 °C, Nafion 212) | 15 Punkte, ein Setup | Low-j PASS (~35 mV), Full-range strict-xfail @ 510 mV |
53+
| Zimmer 2026 Fig. 1c (N115 + 80 °C, 127 Paper) | Envelope + ±σ, 5 Benchmark j | **Envelope PASS**, ±1σ strict-xfail (+175 mV bias) |
54+
55+
Beide xfails sind dokumentierte v0.6-Kalibrierungsziele
56+
(`docs/validation/bernt2020_v0.5.md`, `docs/validation/zimmer2026_v0.5.md`).
57+
Rationale für die xfail-Strategie: [ADR-007](docs/adr/007-v0.5-architecture.md).
58+
59+
---
60+
2061
## What's in it (v0.4)
2162

2263
### Visual Stack Designer (new in v0.4)
@@ -125,7 +166,7 @@ See [docs/INSTALL.md](docs/INSTALL.md) for detailed setup and troubleshooting.
125166
pytest tests/ -v
126167
```
127168

128-
**78 tests passing** in <0.2 s. Covers:
169+
**161 tests passing + 2 strict-xfail** in ~2 s. Covers:
129170

130171
- **Tafel-slope validation** against analytical `b = 2.303·R·T/(α·F)` (<0.5 % error)
131172
- **Monotonicity** of polarization curve
@@ -144,11 +185,24 @@ pytest tests/ -v
144185
- Tafel slope `b = 2.303·R·T/(α·F)` matched to < 0.5 %
145186
- U_cell at 80 °C, 10 bar, 1 A/cm²: 1.7–2.1 V (Carmo et al. 2013 Fig. 6)
146187

147-
### Planned (v0.5)
148-
149-
- Comparison to published polarization curves (Bernt 2018, García-Valverde 2012)
150-
- Temperature and pressure sweeps vs. experimental data
151-
- Error metrics: RMSE, MAPE, max deviation
188+
### Literature (v0.5, zero-fit)
189+
190+
- **Bernt 2020, Fig. 1** — Low-j-Shape PASS bei ~35 mV RMSE (j ≤ 0.1 A/cm²,
191+
Tafel-Region). Full-range strict-xfail bei 510 mV — R_ohm-Overshoot und
192+
generisches j₀,Anode unterschätzen das Umicore-Elyst-Ir75-Premium-Setup.
193+
Dokumentiert in [`docs/validation/bernt2020_v0.5.md`](docs/validation/bernt2020_v0.5.md).
194+
- **Zimmer 2026, Fig. 1c** — aggregierte Literatur, 127 Paper, gefiltert
195+
auf Nafion N115 + 80 °C. **Envelope-Test PASS** an allen 5 Benchmark-j
196+
(Model bleibt in [E_min, E_max]). ±1σ-Band strict-xfail mit +175 mV
197+
Bias. Dokumentiert in [`docs/validation/zimmer2026_v0.5.md`](docs/validation/zimmer2026_v0.5.md).
198+
- **Warum zwei Papers + xfail statt fit:** Calibrating to Bernt würde die
199+
Zero-Fit-Property der Test-Suite brechen und das Model auf ein
200+
Premium-Setup coupeln. Zimmer's σ > 500 mV bei gleicher j zeigt, dass
201+
kein einzelnes Paper als Wahrheit gilt. Rationale in
202+
[ADR-007](docs/adr/007-v0.5-architecture.md).
203+
- **v0.6-Pfad:** Katalysator-/Kontakt-Resistenz-Preset-System mit
204+
unabhängig extrahierten kinetischen Parametern. Strict-xfail zwingt
205+
explizites Re-Baseline, wenn die Kalibrierung landet.
152206

153207
---
154208

@@ -163,8 +217,12 @@ pem-ec-designer/
163217
│ ├── stack.py N-cell serial aggregation
164218
│ ├── thermal.py 0D energy balance + coolant sizing
165219
│ ├── materials.py Membrane/catalyst/GDL presets with refs
166-
│ └── streamlit_app.py Streamlit UI (5 tabs)
167-
├── tests/ 78 pytest tests
220+
│ ├── components.py Stack-component presets (BPP, end plate, ...)
221+
│ ├── assembly.py StackAssembly dataclass + ΔP/pump composition
222+
│ ├── fluid.py Hagen-Poiseuille / Darcy-Weisbach (v0.5)
223+
│ ├── visualization.py Plotly cross-section + BPP top view
224+
│ └── streamlit_app.py Streamlit UI (6 tabs)
225+
├── tests/ 161 pytest tests + 2 strict-xfail (v0.6 targets)
168226
├── docs/
169227
│ ├── HOW-IT-WORKS.md User-facing guide with screenshots
170228
│ ├── INSTALL.md Detailed setup + troubleshooting
@@ -190,8 +248,10 @@ pem-ec-designer/
190248
|---|---|---|
191249
| **v0.1** | Cell electrochemistry + Streamlit UI + 1 analytical validation | ✅ Done |
192250
| **v0.2** | Stack aggregation, 0D thermal, material presets, tabbed UI | ✅ Done |
193-
| v0.3 | 2D cross-section visualization, Tafel semi-log plot, efficiency map, comparison mode | Planned |
194-
| v0.5 | 1D membrane (Springer water transport), Numba acceleration, experimental validation against 3 papers, cost estimator, CI/CD | Planned |
251+
| **v0.3** | Springer-Membran-σ(λ, T), Arrhenius-j₀(T), Full-Butler-Volmer | ✅ Done |
252+
| **v0.4** | Visual Stack Designer (Assembly-Tab, presets, JSON save/load), r_bpp wired | ✅ Done |
253+
| **v0.5** | Fluid-Modul (ΔP/pump), rechteckige Stacks, zero-fit Literatur-Validation (Bernt 2020 + Zimmer 2026) | ✅ Done |
254+
| v0.6 | Katalysator- + Kontakt-Resistenz-Preset-System, xfail-Tests grünschalten | Planned |
195255
| v1.0 | Pseudo-2D along-channel + through-MEA, surrogate layer from published CFD data, REST API | Planned |
196256
| v2.0 | 3D exploded-view visualization, parametric CAD for bipolar plates (CadQuery), external OpenFOAM runner | Optional |
197257

0 commit comments

Comments
 (0)