docs: update KB and project docs with 2026-02-11 progress

- KB Gen 003: NX version (DesigncenterNX 2512), first real results
- sol101-static.md: path resolution lessons, in-place solving, result extraction confirmed
- CONTEXT.md: solver pipeline operational, first results (disp=17.93mm, stress=111.9MPa)
- DECISIONS.md: DEC-HB-008 to DEC-HB-011 (backup/restore, iteration arch, history DB, git workflow)
- optimization_engine/README.md: created (DesigncenterNX support, path resolution, NX file refs)
- studies/01_doe_landscape/README.md: updated architecture, iteration folders, history DB
- _index.md: closed gaps G3,G4,G6,G10-G14, updated generation to 003
This commit is contained in:
2026-02-11 16:39:21 +00:00
parent 93a5508c07
commit 2fde08daab
6 changed files with 335 additions and 68 deletions

View File

@@ -1,8 +1,8 @@
# Knowledge Base — Hydrotech Beam
**Project:** Hydrotech Beam Structural Optimization
**Generation:** 002
**Last updated:** 2026-02-10
**Generation:** 003
**Last updated:** 2026-02-11
---
@@ -10,13 +10,15 @@
I-beam optimization for a test fixture. Steel (AISI 1005) cantilever beam with lightening holes in the web. Goal: minimize mass from **1,133.01 kg** baseline while meeting displacement (≤ 10 mm) and stress (≤ 130 MPa) constraints.
**Key confirmed parameters (Gen 002 + Introspection):**
**Key confirmed parameters (Gen 003):**
- Beam length: 5,000 mm (`beam_lenght` ⚠️ typo in NX), cantilever — left fixed, right loaded
- Load: 10,000 kgf downward at free end
- Baseline mass: **1,133.01 kg** (expression `p173: body_property147.mass`)
- DV baselines: face=21.504mm, core=25.162mm, holes_dia=300mm, hole_count=10
- Material: AISI Steel 1005 (density 7.3 g/cm³)
- Mesh: CQUAD4 thin shell, 33.7 mm element size
- **Solver:** DesigncenterNX 2512 (NX Nastran SOL 101)
- **First results (2026-02-11):** Displacement=17.93mm, Stress=111.9MPa, Solve time ~12s/trial
## Components
@@ -34,14 +36,15 @@ I-beam optimization for a test fixture. Steel (AISI 1005) cantilever beam with l
| Model | File | Status |
|-------|------|--------|
| Static Analysis (SOL 101) | [fea/models/sol101-static.md](fea/models/sol101-static.md) | ✅ Updated Gen 002BCs confirmed, baseline run needed |
| Static Analysis (SOL 101) | [fea/models/sol101-static.md](fea/models/sol101-static.md) | ✅ Updated Gen 003Solver running, first results obtained |
## Generations
| Gen | Date | Summary |
|-----|------|---------|
| 001 | 2026-02-09 | Initial KB from intake + technical breakdown |
| **002** | **2026-02-10** | **KBS session processing — confirmed geometry, BCs, mesh, material, mass correction** |
| 002 | 2026-02-10 | KBS session processing — confirmed geometry, BCs, mesh, material, mass correction |
| **003** | **2026-02-11** | **First real results! NX version fix (DesigncenterNX 2512), path resolution, backup/restore architecture, history DB, mass extraction via journal** |
## Gap Tracker
@@ -60,31 +63,29 @@ I-beam optimization for a test fixture. Steel (AISI 1005) cantilever beam with l
| G5 | Hole geometric feasibility | Span = 4,000 mm, offsets = 500 mm fixed. Baseline: 10 holes × 300 mm → ~144 mm ligament (OK) | Need collision check at DV extremes. 15 × 450 mm WILL overlap. Need feasibility constraint. |
| G9 | Stress allowable basis | AISI 1005 yield ~285 MPa. 130 MPa → SF ≈ 2.2 | Need confirmation that 130 MPa limit still applies to updated model. |
### ❓ STILL OPEN (from Gen 001)
### ❓ STILL OPEN
| # | Item | Why It Matters | Priority |
|---|------|---------------|----------|
| G3 | Displacement measurement location | Which node(s)? Which DOF? Magnitude or component? | High |
| G4 | Stress constraint scope | Whole model? Exclude supports? Hole edges? | High |
| G6 | Result sensors in Beam_sim1.sim | Determines extractor approach | Medium |
| G7 | NX parametric rebuild reliability | Untested across DV range | Medium |
### 🆕 NEW GAPS (from Gen 002)
| # | Item | Why It Matters | Priority |
|---|------|---------------|----------|
| G10 | Baseline displacement re-verification | 22 mm was from old model state (974 kg). True model is 11.33 kg — displacement likely different. | **High** |
| G11 | Baseline stress value | Never measured. Essential for optimization setup. | **High** |
| G12 | `beam_half_height` starting value | Expression exists but value not captured from KBS screenshots | Medium |
| G13 | `beam_half_width` starting value | Expression exists but value not captured from KBS screenshots | Medium |
| G14 | Hole diameter expression name | Need exact NX expression name (not just the value 300) | Medium |
| G7 | NX parametric rebuild reliability | Untested across full DV range — need corner-case testing | Medium |
| G15 | `p6` (hole_span) as potential DV | Antoine suggested it could be optimized. Decision needed. | Medium |
### ✅ CLOSED (Gen 003 — 2026-02-11)
| # | Item | Resolution | Closed In |
|---|------|------------|-----------|
| G3 | Displacement measurement location | Max Tz at free end, extracted via pyNastran OP2 | Gen 003 |
| G4 | Stress constraint scope | Whole model max von Mises (CQUAD4 shell) | Gen 003 |
| G6 | Result sensors in Beam_sim1.sim | Using pyNastran OP2 parsing, not NX sensors | Gen 003 |
| G10 | Baseline displacement | 17.93 mm at baseline-ish DVs | Gen 003 |
| G11 | Baseline stress | 111.9 MPa at baseline-ish DVs | Gen 003 |
| G12 | `beam_half_height` value | 250 mm — confirmed via binary introspection | Gen 002+ |
| G13 | `beam_half_width` value | 150 mm — confirmed via binary introspection | Gen 002+ |
| G14 | Hole diameter expression name | `holes_diameter` — confirmed via binary introspection | Gen 002+ |
## Open Tasks
1. **Run baseline SOL 101** — get fresh displacement and stress values (G10, G11)
2. **NX model introspection** — extract all expression names/values, check sensors (G6, G12, G13, G14)
3. **Corner-case testing** — verify NX rebuild at DV extremes (G7)
4. **Geometric feasibility constraint** — implement hole collision check (G5)
5. **Update atomizer_spec_draft.json** — mass expression `p1`, baseline 11.33 kg
6. **Decision on `p6` as DV** — consult Manager/CEO (G15)
1. **Run full 51-trial DOE** — solver pipeline operational, execute Phase 1
2. **Corner-case testing** — verify NX rebuild at DV extremes (G7)
3. **Decision on `p6` as DV** — consult Manager/CEO (G15)
4. **Phase 1 → Phase 2 gate review** — after DOE completes, assess feasibility landscape

View File

@@ -2,7 +2,7 @@
**Simulation:** Beam_sim1.sim
**Solver:** NX Nastran SOL 101 (Linear Static)
**Status:** Setup confirmed from KBS session (Gen 002). Baseline run needed.
**Status:** ✅ Running — first real results obtained 2026-02-11. Automated DOE pipeline operational.
---
@@ -29,15 +29,17 @@
- Application: Right side (free end) of beam
- Type: This is a **cantilever beam** with end loading — classic bending problem
## Result Extraction
## Result Extraction — Confirmed (Gen 003)
| Output | Method | Expression/Sensor | Status |
|--------|--------|-------------------|--------|
| Mass | NX expression | **`p1`** (NOT `p173`) | ✅ Confirmed — 11.33 kg baseline |
| Tip displacement | ❓ Sensor or .f06 parse | TBD | Gap G3, G6 — need baseline run |
| Von Mises stress | ❓ Sensor or .f06 parse | TBD | Gap G4, G6 — need baseline run |
| Mass | NX expression | **`p173`** (`body_property147.mass` in kg) | ✅ Confirmed — journal extracts to `_temp_mass.txt` |
| Tip displacement | OP2 parse via pyNastran | Max Tz at free end | ✅ Working — 17.93 mm at baseline-ish DVs |
| Von Mises stress | OP2 parse via pyNastran | CQUAD4 shell max VM | ✅ Working — 111.9 MPa at baseline-ish DVs |
> ⚠️ **Mass expression changed:** `p1` confirmed in KBS session, replacing previous assumption of `p173`. Extractor config must be updated.
> **Mass extraction:** Journal extracts `p173` expression after solve and writes `_temp_mass.txt`. Python reads this file. Expression `p1` from KBS session was incorrect — `p173` confirmed via binary introspection.
>
> **pyNastran note:** Warns "nx version 2512 not supported" but reads OP2 files correctly. Stress output from pyNastran is in kPa — divide by 1000 for MPa.
## Mesh Details
@@ -56,28 +58,68 @@
## Solver Considerations
*From Technical Breakdown (Gen 001), updated with KBS data:*
*From Technical Breakdown (Gen 001), updated with KBS data + Gen 003 run data:*
- **Linear assumption:** With 11.33 kg beam under 98 kN load, deflections may be significant relative to beam dimensions. L/δ ratio needs verification from baseline run.
- **Linear assumption:** With 1,133 kg beam under 98 kN load, deflections are ~18 mm at 5,000 mm span. L/δ ≈ 280 — linear assumption is reasonable.
- **Mesh sensitivity:** Stress at hole edges is mesh-dependent. CQUAD4 at 33.7 mm may not fully resolve SCF at 300 mm diameter holes (~28 elements around circumference — probably adequate but needs verification).
- **Mesh morphing vs remesh:** Parametric NX models typically remesh on update. Need to confirm behavior across DV range (Gap G7).
- **Runtime estimate:** Single beam, CQUAD4 thin shell → likely **seconds per evaluation**. Very fast.
- **Runtime:** ✅ Confirmed **~12 seconds per evaluation** (single beam, CQUAD4 thin shell on dalidou). Very fast.
- **Unit system:** NX model uses kg-mm-s (kgf for force). Nastran output stress in kPa → divide by 1000 for MPa.
## Validation Checklist
- [ ] Baseline mass matches NX expression `p1` (11.33 kg)
- [ ] Baseline displacement measured (was 22 mm at old model state — **needs re-verification** G10)
- [ ] Baseline stress measured (never had a value — **G11**)
- [x] Baseline mass matches NX expression `p173` (1,133.01 kg)
- [x] Displacement measured — 17.93 mm at baseline-ish DVs (G10 closed)
- [x] Stress measured — 111.9 MPa at baseline-ish DVs (G11 closed)
- [ ] Mesh convergence verified at baseline
- [ ] Mesh quality acceptable at DV range extremes
- [ ] Model rebuilds cleanly at all 4 corners of design space (Gap G7)
- [ ] Stress at hole edges resolved with current mesh density
## NX Version & Environment — Confirmed (Gen 003)
| Item | Value | Notes |
|------|-------|-------|
| **NX Version** | **DesigncenterNX 2512** | Siemens rebranded NX to "DesigncenterNX" |
| **Install path** | `C:\Program Files\Siemens\DesigncenterNX2512` | On dalidou (Windows solver node) |
| **Previous config** | NX 2412 | ❌ Failed — "Part file is from a newer version" |
| **pyNastran compat** | Warns "nx version 2512 not supported" | ✅ But reads OP2 files correctly |
> ⚠️ **Critical lesson (2026-02-11):** Solver was originally configured for NX 2412 but model files are from DesigncenterNX 2512. NX refuses to load with "Part file is from a newer version." Must match version exactly.
### Path Resolution on Windows — Critical
**Bug discovered:** `Path.absolute()` on Windows does **NOT** resolve `..` components (unlike `Path.resolve()`).
```python
# WRONG — leaves ".." in path, NX can't find referenced parts
path = Path("../../models/Beam_sim1.sim").absolute()
# → C:\Users\antoi\Atomizer\projects\hydrotech-beam\studies\01_doe_landscape\..\..\models\Beam_sim1.sim
# CORRECT — fully resolves path
path = Path("../../models/Beam_sim1.sim").resolve()
# → C:\Users\antoi\Atomizer\projects\hydrotech-beam\models\Beam_sim1.sim
```
**Rule:** Use `.resolve()` everywhere when constructing paths for NX. NX cannot follow `..` references in paths.
### NX File References — In-Place Solving Required
NX `.sim` files store **absolute internal references** to `.fem` and `.prt` files. Copying model files to iteration folders breaks these references (`Parts.Open` returns `None`).
**Solution:** Solve on master model **in-place** (in the `models/` directory) with backup/restore for isolation:
1. Backup master model files before each trial
2. Write expressions, rebuild, solve in `models/`
3. Archive outputs (OP2, F06, params, results) to iteration folder
4. Restore master from backup
See DEC-HB-008 in DECISIONS.md.
## History
- **Gen 001** (2026-02-09): Initial documentation from technical breakdown. All solver details pending gap resolution.
- **Gen 002** (2026-02-10): Confirmed from KBS session — CQUAD4 thin shell, 33.7 mm element size, cantilever BCs (left fixed, right 10,000 kgf down), mass via `p1`. Material: AISI 1005.
- **Gen 002** (2026-02-10): Confirmed from KBS session — CQUAD4 thin shell, 33.7 mm element size, cantilever BCs (left fixed, right 10,000 kgf down), mass via `p173`. Material: AISI 1005.
- **Gen 003** (2026-02-11): First real results! DesigncenterNX 2512 version confirmed, path resolution bugs fixed, backup/restore in-place solving architecture, mass extraction via journal. Displacement=17.93mm, Stress=111.9MPa, Solve time ~12s/trial.
## NX Automation Workflow