auto: daily sync

This commit is contained in:
2026-02-15 08:00:21 +00:00
parent 6218355dbf
commit d6a1d6eee1
376 changed files with 12864 additions and 5377 deletions

View File

@@ -0,0 +1,37 @@
# Documentation Boundaries (Atomizer Standard)
## Rule
- **Project-specific content** belongs in `projects/<project-name>/...`
- **Foundational / reusable content** belongs in `docs/...`
This is a hard rule for all agents.
## What is project-specific?
Store in `projects/...`:
- Run logs, experiment outcomes, project decisions
- Project playbooks tied to one geometry/client/study
- Project troubleshooting notes and sync incidents
- Project KPIs, deliverables, and channel-specific context
## What is foundational?
Store in `docs/...`:
- Generic workflows used by multiple projects
- Platform-level operator guides
- Reusable run/checklist templates
- Protocols and standards
- Cross-project troubleshooting procedures
## Ownership
- **Manager owns documentation quality and structure.**
- Drafting can be delegated, but final responsibility remains with Manager.
## Operating procedure
When writing docs:
1. Decide: project-specific or foundational.
2. Write in the correct location first (no temporary drift).
3. If a project doc becomes reusable, promote a generalized version into `docs/...` and keep project examples in the project folder.
4. Cross-link both locations when useful.
## Current Hydrotech application
- Hydrotech run/playbook files remain in `projects/hydrotech-beam/...`.
- Reusable standards from Hydrotech are promoted into `docs/guides/...` as they stabilize.

View File

@@ -0,0 +1,48 @@
# PKM Dashboard Standard (Atomizer)
## Purpose
Standardize how project dashboards and reports are built across Atomizer.
## Core Standard
1. **Contracts-first:** every metric must map to structured source records.
2. **Markdown-first:** default delivery is markdown snapshots.
3. **Role-based views:** Executive, Technical, Operations.
4. **Governance-first:** clear owner, schema validation, gate policy.
## Directory split
- Project-specific: `projects/<project>/...`
- Foundational: `docs/...`
## Minimum required artifacts per project
- `dashboard/MASTER_PLAN.md`
- `dashboard/EXECUTIVE_DASHBOARD.md`
- `dashboard/TECHNICAL_DASHBOARD.md`
- `dashboard/OPERATIONS_DASHBOARD.md`
- `reports/` (daily/weekly/gate)
- `runs/` manifests
- `decisions/` append-only log
- `incidents/` append-only log
## Minimum required contracts
- `run_manifest.v1`
- `study_summary.v1`
- `trial_result.v1`
- `decision_record.v1`
- `risk_record.v1`
- `gate_evaluation.v1`
- `incident_record.v1`
## Gate semantics
- `PASS` / `CONDITIONAL_PASS` / `FAIL`
- `FAIL` blocks progression
- `CONDITIONAL_PASS` requires owner + due date + explicit acceptance
## Quality controls
- Ingestion schema validation
- Nightly integrity checks
- Freshness SLA checks
- Auditor spot checks
## Evolution policy
- Start markdown-native
- Add richer visual layer only over same contracts (no parallel truth)

View File

@@ -0,0 +1,874 @@
# Model Introspection Master Plan — v1.0
**Authors:** Technical Lead 🔧 (plan owner), NX Expert 🖥️ (initial research)
**Date:** 2026-02-15
**Status:** Approved for R&D implementation
**Location:** `docs/plans/MODEL_INTROSPECTION_MASTER_PLAN.md`
---
## 1. Executive Summary
Atomizer currently executes optimization studies that users manually configure. It has **basic introspection** — expression extraction, mass properties, partial solver config — but lacks the deep model knowledge needed to *understand* what it's optimizing.
This plan defines a **four-layer introspection framework** that captures the complete data picture of any NX CAD/FEA model before optimization. The output is a single structured JSON file (`model_introspection.json`) containing everything an engineer or agent needs to design a sound optimization study:
- **What can change** — design variables, expressions, parametric geometry
- **What the FEA model looks like** — mesh quality, element types, materials, properties
- **What physics governs the problem** — boundary conditions, loads, solver config, subcases
- **Where we're starting from** — baseline displacement, stress, frequency, mass
A fifth layer (dependency mapping / expression graphs) is **deferred to v2** due to NXOpen API limitations that make reliable extraction impractical today.
**Timeline:** 1217 working days for production-quality v1.
**Primary tools:** NXOpen Python API (Layer 1), pyNastran BDF (Layers 23), pyNastran OP2 (Layer 4).
---
## 2. Current State
### 2.1 What Exists
| Script | Location | Extracts | Output |
|--------|----------|----------|--------|
| `introspect_part.py` | `nx_journals/` | Expressions (user/internal), mass, materials, bodies, features, datums, units | `_temp_introspection.json` |
| `introspect_sim.py` | `nx_journals/` | Solutions (partial), BCs (partial), subcases (exploratory) | `_introspection_sim.json` |
| `discover_model.py` | `nx_journals/` | Quick scan of expressions + solutions | JSON to stdout |
| `extract_displacement.py` | `optimization_engine/extractors/` | Max displacement from OP2 | Per-trial result |
| `extract_von_mises_stress.py` | `optimization_engine/extractors/` | Max von Mises from OP2 | Per-trial result |
| `extract_part_mass_material.py` | `nx_journals/` | Mass + material from part | JSON |
### 2.2 What's Missing
-**Mesh quality metrics** — no aspect ratio, jacobian, warpage, skew
-**BC/load details** — no magnitudes, DOF specifications, target node/element sets
-**Solver configuration** — no output requests, convergence settings, solution sequence details
-**Property cards** — no PSHELL thickness, PSOLID assignments, property-element mapping
-**Baseline results in one place** — extractors exist but aren't aggregated pre-optimization
-**Unified output** — no single JSON capturing the full model state
-**Validation** — no cross-checking between data sources
---
## 3. Framework Architecture
### 3.1 Four-Layer Model (v1)
```
┌─────────────────────────────────────────────────────────────────┐
│ Layer 1: GEOMETRIC PARAMETERS [NXOpen API] │
│ Expressions, features, mass, materials, units │
│ → What can be optimized? │
├─────────────────────────────────────────────────────────────────┤
│ Layer 2: FEA MODEL STRUCTURE [pyNastran BDF] │
│ Mesh quality, element types, materials, properties │
│ → What's the baseline mesh health? │
├─────────────────────────────────────────────────────────────────┤
│ Layer 3: SOLVER CONFIGURATION [pyNastran BDF] │
│ Solutions, subcases, BCs, loads, output requests │
│ → What physics governs the problem? │
├─────────────────────────────────────────────────────────────────┤
│ Layer 4: BASELINE RESULTS [pyNastran OP2] │
│ Pre-optimization stress, displacement, frequency, mass │
│ → Where are we starting from? │
└─────────────────────────────────────────────────────────────────┘
DEFERRED TO v2:
┌───────────────────────────────────────────────────────────────┐
│ Layer 5: DEPENDENCIES & RELATIONSHIPS │
│ Expression graph, feature tree, parametric sensitivities │
└───────────────────────────────────────────────────────────────┘
```
### 3.2 Design Principles
1. **One source per data type.** Don't mix NXOpen and pyNastran for the same data. NXOpen owns geometry/expressions; pyNastran owns FEA/solver data.
2. **BDF export is a prerequisite.** Layer 23 extraction requires a current BDF file. The orchestrator must trigger a BDF export (or verify freshness) before parsing.
3. **Report, don't recommend.** v1 reports what exists in the model. It does NOT auto-suggest bounds, objectives, or study types. That's the engineer's job.
4. **Fail gracefully.** If one layer fails, the others still produce output. Partial introspection is better than no introspection.
5. **Validate across sources.** Where data overlaps (element count, mass, materials), cross-check and flag discrepancies.
### 3.3 Data Flow
```
┌──────────┐
│ .prt │
│ file │
└────┬─────┘
NXOpen API
┌──────────────┐
│ Layer 1 │
│ Geometric │
│ Parameters │
└──────┬───────┘
┌────────────────────┼────────────────────┐
│ │ │
▼ ▼ ▼
┌────────┐ ┌──────────┐ ┌──────────┐
│ .bdf │ │ .sim │ │ .op2 │
│ file │ │ file │ │ file │
└───┬────┘ └──────────┘ └────┬─────┘
│ (metadata only │
│ via NXOpen) │
pyNastran BDF pyNastran OP2
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ Layer 2+3 │ │ Layer 4 │
│ FEA Model │ │ Baseline │
│ + Solver │ │ Results │
└──────┬───────┘ └──────┬───────┘
│ │
└──────────┬───────────────────────┘
┌────────────────┐
│ Orchestrator │
│ Merge + JSON │
│ + Validate │
└────────┬───────┘
┌──────────────────────────┐
│ model_introspection.json │
│ introspection_summary.md │
└──────────────────────────┘
```
---
## 4. Master JSON Schema
### 4.1 Top-Level Structure
```json
{
"introspection_version": "1.0.0",
"timestamp": "ISO-8601",
"model_id": "string — derived from part filename",
"files": {
"part": "path/to/model.prt",
"sim": "path/to/model_sim1.sim",
"fem": "path/to/model_fem1.fem",
"bdf": "path/to/exported.bdf",
"op2": "path/to/results.op2"
},
"geometric_parameters": { "..." },
"fea_model": { "..." },
"solver_configuration": { "..." },
"baseline_results": { "..." },
"candidate_design_variables": [ "..." ],
"validation": { "..." },
"metadata": {
"extraction_time_seconds": 0.0,
"layers_completed": ["geometric", "fea_model", "solver", "baseline"],
"layers_failed": [],
"warnings": []
}
}
```
### 4.2 Layer 1 — `geometric_parameters`
```json
{
"expressions": {
"user_defined": [
{
"name": "thickness",
"value": 3.0,
"units": "mm",
"formula": "3.0",
"is_constant": false,
"part": "bracket.prt"
}
],
"internal": [
{
"name": "p47",
"value": 6.0,
"units": "mm",
"formula": "thickness * 2"
}
],
"total_user": 3,
"total_internal": 52
},
"mass_properties": {
"mass_kg": 0.234,
"volume_mm3": 85000.0,
"surface_area_mm2": 15000.0,
"center_of_gravity_mm": [12.3, 45.6, 78.9],
"num_solid_bodies": 1
},
"materials": [
{
"name": "Aluminum 6061-T6",
"assigned_to_bodies": ["Body(1)"],
"properties": {
"density_kg_m3": 2700.0,
"youngs_modulus_MPa": 68900.0,
"poisson_ratio": 0.33,
"yield_strength_MPa": 276.0,
"ultimate_strength_MPa": 310.0
},
"source": "NXOpen part material"
}
],
"features": {
"total_count": 12,
"by_type": {
"Extrude": 3,
"Shell": 1,
"Sketch": 2,
"Datum Plane": 2,
"Fillet": 4
},
"suppressed_count": 0
},
"units": {
"length": "Millimeter",
"mass": "Kilogram",
"force": "Newton",
"temperature": "Celsius",
"system": "Metric (mm, kg, N, °C)"
}
}
```
### 4.3 Layer 2 — `fea_model`
```json
{
"mesh": {
"total_nodes": 12450,
"total_elements": 8234,
"element_types": {
"CTETRA": { "count": 7800, "order": "linear" },
"CQUAD4": { "count": 434, "order": "linear" }
},
"quality_metrics": {
"aspect_ratio": {
"min": 1.02,
"max": 8.34,
"mean": 2.45,
"std": 1.23,
"p95": 5.12,
"threshold": 10.0,
"elements_exceeding": 0
},
"jacobian": {
"min": 0.62,
"max": 1.0,
"mean": 0.91,
"threshold": 0.5,
"elements_below": 0
},
"warpage_deg": {
"max": 5.2,
"threshold": 10.0,
"elements_exceeding": 0
},
"skew_deg": {
"max": 45.2,
"threshold": 60.0,
"elements_exceeding": 0
}
},
"quality_verdict": "PASS"
},
"materials": [
{
"mat_id": 1,
"card_type": "MAT1",
"name": "Aluminum 6061-T6",
"E_MPa": 68900.0,
"G_MPa": 25900.0,
"nu": 0.33,
"rho": 2.7e-6,
"alpha": 2.36e-5
}
],
"properties": [
{
"prop_id": 1,
"card_type": "PSHELL",
"thickness_mm": 3.0,
"mat_id": 1,
"element_count": 434
},
{
"prop_id": 2,
"card_type": "PSOLID",
"mat_id": 1,
"element_count": 7800
}
]
}
```
**Mesh quality computation:** All quality metrics are computed from element node coordinates using pyNastran's geometry data. For each element, aspect ratio = longest edge / shortest edge. Jacobian is computed at element integration points. This is more reliable than NXOpen's `QualityAuditBuilder` which has limited documentation.
### 4.4 Layer 3 — `solver_configuration`
```json
{
"solutions": [
{
"name": "Solution 1",
"sol_sequence": 101,
"sol_type": "Static Linear",
"solver": "NX Nastran"
}
],
"subcases": [
{
"id": 1,
"label": "Subcase - Static 1",
"load_set_id": 1,
"spc_set_id": 1,
"output_requests": {
"displacement": { "format": "OP2", "scope": "ALL" },
"stress": { "format": "OP2", "scope": "ALL" },
"strain": null,
"force": null
}
}
],
"constraints": [
{
"spc_id": 1,
"type": "SPC1",
"dofs_constrained": [1, 2, 3, 4, 5, 6],
"dof_labels": ["Tx", "Ty", "Tz", "Rx", "Ry", "Rz"],
"node_count": 145,
"node_ids_sample": [1, 2, 3, 4, 5],
"description": "Fixed support — all 6 DOF"
}
],
"loads": [
{
"load_id": 1,
"type": "FORCE",
"node_id": 456,
"magnitude_N": 1000.0,
"direction": [0.0, -1.0, 0.0],
"components_N": { "Fx": 0.0, "Fy": -1000.0, "Fz": 0.0 }
},
{
"load_id": 2,
"type": "PLOAD4",
"element_count": 25,
"pressure_MPa": 5.0,
"direction": "element normal"
}
],
"bulk_data_stats": {
"total_cards": 15234,
"card_types": {
"GRID": 12450,
"CTETRA": 7800,
"CQUAD4": 434,
"MAT1": 1,
"PSHELL": 1,
"PSOLID": 1,
"SPC1": 1,
"FORCE": 1,
"PLOAD4": 1
}
}
}
```
**BDF export requirement:** The orchestrator must ensure a current BDF file exists before Layer 23 extraction. Options:
1. Export BDF via NXOpen journal (`sim.ExportNastranDeck()`) as the first orchestrator step
2. Accept a user-provided BDF path
3. Find the most recent BDF in the sim output directory and verify its timestamp
Option 1 is preferred — it guarantees freshness.
### 4.5 Layer 4 — `baseline_results`
```json
{
"source_op2": "bracket_sim1-solution_1.op2",
"solution": "Solution 1",
"subcase_id": 1,
"converged": true,
"displacement": {
"max_magnitude_mm": 2.34,
"max_node_id": 4567,
"max_component": "Tz",
"max_component_value_mm": -2.31,
"mean_magnitude_mm": 0.45
},
"stress": {
"von_mises": {
"max_MPa": 145.6,
"max_element_id": 2345,
"mean_MPa": 45.2,
"p95_MPa": 112.0
},
"margin_of_safety": {
"yield": 0.89,
"ultimate": 1.13,
"yield_strength_MPa": 276.0,
"ultimate_strength_MPa": 310.0,
"note": "MoS = (allowable / actual) - 1"
}
},
"modal": null,
"mass_from_solver_kg": 0.234
}
```
**Note:** `modal` is populated only if a SOL 103 result exists. Fields would include `modes: [{number, frequency_hz, effective_mass_fraction}]`.
### 4.6 `candidate_design_variables`
This section **reports** expressions that are likely design variable candidates. It does NOT suggest bounds or objectives — that's the engineer's job.
```json
[
{
"name": "thickness",
"current_value": 3.0,
"units": "mm",
"reason": "User-defined expression, non-constant, drives geometry"
},
{
"name": "width",
"current_value": 50.0,
"units": "mm",
"reason": "User-defined expression, non-constant, drives geometry"
}
]
```
**Selection criteria:** An expression is a candidate DV if:
1. It is user-defined (not internal `p###`)
2. It is not constant (formula is not just a literal used in a single non-geometric context)
3. It has dimensional units (mm, deg, etc.) or is clearly a count
4. Its name is not a known system expression (e.g., `PI`, `TRUE`, unit names)
### 4.7 `validation`
```json
{
"cross_checks": [
{
"metric": "element_count",
"nxopen_value": 8234,
"pynastran_value": 8234,
"match": true
},
{
"metric": "mass_kg",
"nxopen_value": 0.234,
"pynastran_value": 0.2338,
"match": false,
"delta_percent": 0.09,
"tolerance_percent": 1.0,
"within_tolerance": true,
"note": "Small delta due to mesh discretization vs. CAD geometry"
},
{
"metric": "material_E_MPa",
"nxopen_value": 68900.0,
"pynastran_value": 68900.0,
"match": true
}
],
"overall_status": "PASS",
"discrepancies": []
}
```
---
## 5. Extraction Methods
### 5.1 Layer 1 — NXOpen Python API
**Base script:** `nx_journals/introspect_part.py` (enhance, don't rewrite)
| Data | API | Notes |
|------|-----|-------|
| Expressions | `part.Expressions` iterator | Filter user vs internal via name pattern (`p###` = internal) |
| Expression values | `expr.Value`, `expr.RightHandSide`, `expr.Units.Name` | |
| Mass properties | `part.MeasureManager.NewMassProperties()` | Requires solid body list |
| Materials | `body.GetPhysicalMaterial()` | Per-body; extract property values via `GetPropertyValue()` |
| Features | `part.Features` iterator | Type via `type(feature).__name__`; count suppressed |
| Units | `part.UnitCollection`, `part.PartUnits` | System-level unit identification |
**Enhancement needed:**
- Add candidate DV identification logic
- Structure output to match schema §4.2
- Add error handling for each extraction block (fail gracefully)
### 5.2 Layers 23 — pyNastran BDF
**New script:** `nx_journals/introspect_bdf.py` (or `optimization_engine/extractors/introspect_bdf.py`)
| Data | pyNastran API | Notes |
|------|---------------|-------|
| Elements | `bdf.elements` dict | Key = EID, value has `.type` attribute |
| Nodes | `bdf.nodes` dict | Key = NID |
| Materials | `bdf.materials` dict | MAT1: `.E`, `.G`, `.nu`, `.rho` |
| Properties | `bdf.properties` dict | PSHELL: `.t`, `.mid1`; PSOLID: `.mid` |
| SPCs | `bdf.spcs` dict | SPC1: `.components` (DOF string), `.node_ids` |
| Forces | `bdf.loads` dict | FORCE: `.mag`, `.xyz` (direction vector) |
| Pressures | `bdf.loads` dict | PLOAD4: `.pressures`, element IDs |
| Subcases | `bdf.subcases` dict | `.params` for LOAD, SPC, output requests |
| Bulk stats | `bdf.card_count` | Card type → count |
**Mesh quality computation** (pyNastran element geometry):
```python
import numpy as np
from pyNastran.bdf.bdf import BDF
def compute_mesh_quality(bdf_model):
"""Compute mesh quality metrics from element geometry."""
aspect_ratios = []
for eid, elem in bdf_model.elements.items():
if elem.type in ('CQUAD4', 'CTRIA3'):
# Get node positions
nodes = [bdf_model.nodes[nid].get_position() for nid in elem.node_ids]
# Compute edge lengths
edges = []
n = len(nodes)
for i in range(n):
edge = np.linalg.norm(nodes[(i+1) % n] - nodes[i])
edges.append(edge)
ar = max(edges) / max(min(edges), 1e-12)
aspect_ratios.append(ar)
elif elem.type == 'CTETRA':
nodes = [bdf_model.nodes[nid].get_position() for nid in elem.node_ids[:4]]
edges = []
for i in range(4):
for j in range(i+1, 4):
edges.append(np.linalg.norm(nodes[j] - nodes[i]))
ar = max(edges) / max(min(edges), 1e-12)
aspect_ratios.append(ar)
if not aspect_ratios:
return None
ar = np.array(aspect_ratios)
return {
"min": float(ar.min()),
"max": float(ar.max()),
"mean": float(ar.mean()),
"std": float(ar.std()),
"p95": float(np.percentile(ar, 95))
}
```
### 5.3 Layer 4 — pyNastran OP2
**Leverage existing extractors:**
- `optimization_engine/extractors/extract_displacement.py`
- `optimization_engine/extractors/extract_von_mises_stress.py`
**New aggregation script:** `nx_journals/introspect_baseline.py`
| Data | pyNastran API | Notes |
|------|---------------|-------|
| Displacement | `op2.displacements[subcase_id].data` | Magnitude = sqrt(Tx² + Ty² + Tz²) |
| Stress | `op2.ctetra_stress[sc]` or `op2.cquad4_stress[sc]` | Von Mises column varies by element type |
| Eigenvalues | `op2.eigenvalues` | SOL 103 only |
| Grid point weight | `op2.grid_point_weight` | Solver-computed mass |
### 5.4 BDF Export (Prerequisite Step)
```python
# NXOpen journal to export BDF from .sim
def export_bdf(sim_path, output_bdf_path):
"""Export Nastran input deck from simulation."""
theSession = NXOpen.Session.GetSession()
# Open sim, find solution, export deck
# Details depend on NX version — see introspect_sim.py patterns
pass
```
**Alternative:** If a solve has already been run, the BDF exists in the solver output directory. The orchestrator should check for it before triggering a fresh export.
---
## 6. Implementation Phases
### Phase 1: Enhanced Part Introspection (34 days)
**Goal:** Complete Layer 1 extraction with structured JSON output.
**Tasks:**
1. Refactor `introspect_part.py` output to match schema §4.2
2. Add candidate DV identification logic (§4.6 criteria)
3. Add feature type counting and suppression detection
4. Add material property extraction via `GetPropertyValue()`
5. Structured error handling — each block in try/except, log failures
6. Unit tests with known bracket/beam models
**Output:** `layer1_geometric.json`
**Owner:** NX Expert
### Phase 2: BDF-Based FEA Model Introspection (34 days)
**Goal:** Complete Layer 2 extraction — mesh, materials, properties, quality.
**Tasks:**
1. Create `introspect_bdf.py` with pyNastran BDF parsing
2. Implement mesh quality computation (aspect ratio, jacobian, warpage, skew)
3. Extract material cards (MAT1, MAT2 logged but not parsed in v1)
4. Extract property cards (PSHELL, PSOLID) with element assignments
5. Compute quality verdict (PASS/WARN/FAIL based on thresholds)
6. Test on Hydrotech beam BDF and M1 mirror BDF
**Output:** `layer2_fea_model.json`
**Owner:** NX Expert
### Phase 3: BDF-Based Solver Configuration (34 days)
**Goal:** Complete Layer 3 extraction — subcases, BCs, loads, output requests.
**Tasks:**
1. Extend `introspect_bdf.py` with subcase parsing
2. Extract SPC constraints with DOF details and node counts
3. Extract loads (FORCE, PLOAD4, MOMENT, GRAV) with magnitudes and directions
4. Extract output requests from case control
5. Add bulk data card statistics
6. Integrate BDF export step (NXOpen journal or path detection)
**Output:** `layer3_solver.json`
**Owner:** NX Expert
### Phase 4: Baseline Results Aggregation (12 days)
**Goal:** Complete Layer 4 — aggregate existing extractors into baseline JSON.
**Tasks:**
1. Create `introspect_baseline.py` using existing OP2 extractors
2. Compute displacement max/mean with node identification
3. Compute stress max with element identification and MoS
4. Optionally extract modal frequencies if SOL 103 results exist
5. Extract solver-computed mass from grid point weight generator
**Output:** `layer4_baseline.json`
**Owner:** NX Expert or Technical Lead
### Phase 5: Orchestrator + Validation (23 days)
**Goal:** Single-command full introspection with cross-validation and summary.
**Tasks:**
1. Create `run_introspection.py` orchestrator
2. Sequence: BDF export → Layer 1 → Layer 2 → Layer 3 → Layer 4
3. Merge all layer JSONs into master `model_introspection.json`
4. Implement cross-validation checks (§4.7)
5. Generate `introspection_summary.md` — human-readable report
6. Add CLI interface: `python run_introspection.py model.prt model_sim1.sim [--op2 path]`
**Output:** `model_introspection.json` + `introspection_summary.md`
**Owner:** NX Expert + Technical Lead (review)
### Timeline Summary
| Phase | Days | Cumulative | Depends On |
|-------|------|-----------|------------|
| Phase 1 — Part introspection | 34 | 34 | — |
| Phase 2 — FEA model (BDF) | 34 | 68 | — (parallel with Phase 1) |
| Phase 3 — Solver config (BDF) | 34 | 912 | Phase 2 (shared script) |
| Phase 4 — Baseline (OP2) | 12 | 1014 | — (parallel with Phase 3) |
| Phase 5 — Orchestrator | 23 | 1217 | All prior phases |
**Phases 1 and 2 can run in parallel** (different APIs, different scripts). Phase 4 can run in parallel with Phase 3. Critical path: Phase 2 → Phase 3 → Phase 5.
---
## 7. Validation Strategy
### 7.1 Cross-Source Checks
Where data is available from multiple sources, cross-validate:
| Metric | Source A | Source B | Tolerance |
|--------|----------|----------|-----------|
| Element count | pyNastran `len(bdf.elements)` | NXOpen `FeelementLabelMap.Size` | Exact match |
| Node count | pyNastran `len(bdf.nodes)` | NXOpen `FenodeLabelMap.Size` | Exact match |
| Mass | NXOpen `MeasureManager` | OP2 grid point weight | 1% (mesh vs. CAD geometry) |
| Material E | NXOpen `GetPropertyValue('YoungModulus')` | pyNastran `bdf.materials[id].E` | Exact match |
| Material ρ | NXOpen `GetPropertyValue('Density')` | pyNastran `bdf.materials[id].rho` | Unit conversion tolerance |
### 7.2 Self-Consistency Checks
- Total element count = sum of per-type counts
- Every property ID referenced by elements exists in properties list
- Every material ID referenced by properties exists in materials list
- SPC/LOAD set IDs in subcases exist in constraints/loads lists
- OP2 subcase IDs match BDF subcase IDs
### 7.3 Sanity Checks
- Mass > 0
- Max displacement > 0 (model is loaded and responding)
- Max stress > 0
- No element type with 0 elements in the count
- At least 1 constraint and 1 load in every subcase
### 7.4 Validation Verdict
```
PASS — All checks pass
WARN — Non-critical discrepancies (mass within tolerance but not exact)
FAIL — Critical mismatch (element count differs, missing materials)
```
---
## 8. Integration with Atomizer HQ
### 8.1 How Agents Consume Introspection Data
| Agent | Uses | For |
|-------|------|-----|
| **Study Builder** | `candidate_design_variables`, `expressions`, `units` | Study configuration, DV setup |
| **Technical Lead** | `mesh.quality_metrics`, `baseline_results`, `validation` | Technical review, go/no-go |
| **Optimizer** | `fea_model.mesh.total_elements`, `baseline_results` | Runtime estimation, convergence criteria |
| **Manager** | `metadata.layers_completed`, `validation.overall_status` | Status tracking, resource planning |
### 8.2 Usage Workflow
```
1. Antoine opens new study
2. Run introspection: python run_introspection.py model.prt model_sim1.sim
3. Review introspection_summary.md
4. Study Builder reads model_introspection.json → proposes study config
5. Technical Lead reviews → approves or flags issues
6. Optimization proceeds with full model context
```
### 8.3 Knowledge Base Integration
Every introspection JSON is stored in the study directory:
```
studies/<project>/<study>/
1_setup/
model/
model_introspection.json ← NEW
introspection_summary.md ← NEW
model.prt
model_sim1.sim
```
This becomes the canonical reference for all agents working on the study.
---
## 9. Scope Exclusions (v1)
The following are **explicitly NOT handled** in v1. Attempting to introspect models with these features will produce partial results with appropriate warnings.
| Feature | Why Excluded | v2 Priority |
|---------|-------------|-------------|
| **Assemblies** | Multi-part expression scoping, component transforms, assembly-level materials — significant complexity | High |
| **Composite materials** (MAT2, MAT8) | Ply stack introspection, layup sequences, orientation angles — specialized domain | Medium |
| **Nonlinear analysis** (SOL 106) | Contact definitions, convergence settings, load stepping, large deformation flags | Medium |
| **Topology optimization** regions | Design vs. non-design space, manufacturing constraints, density filters | Low |
| **Expression dependency graphs** | NXOpen `RightHandSide` parsing is fragile: breaks on built-in functions (`if()`, `min()`), unit qualifiers, substring expression names. Feature-to-expression links require rebuilding builder objects — massive effort | Medium |
| **Parametric sensitivity estimation** | Labeling `thickness → mass` as "linear" is textbook, not model-specific. Real sensitivity requires perturbation studies (separate effort) | Low |
| **Multi-FEM models** | Multiple FEM files linked to one part — need to handle collector mapping across files | Medium |
| **Thermal-structural coupling** | Multi-physics BC detection, thermal load application | Low |
| **Contact pairs** | Contact detection, friction coefficients, contact algorithms | Medium |
| **Dynamic loads** | PSD, time-history, random vibration, frequency-dependent loads | Low |
---
## 10. v2 Roadmap
### 10.1 Expression Dependency Graph (Layer 5)
**Challenge:** NXOpen's `RightHandSide` returns the formula as a string, but parsing it reliably requires handling:
- NX built-in math functions
- Unit-qualified references
- Expression names that are substrings of other names
- Conditional expressions (`if(expr > val, a, b)`)
**Approach for v2:** Build a proper tokenizer/parser for NX expression syntax. Consider exporting expressions to a file and parsing offline rather than relying on API string manipulation.
### 10.2 Assembly Support
**Challenge:** Expressions live at component scope. Design variables may be in sub-components. Assembly-level mass is different from component mass.
**Approach:** Recursive introspection — introspect each component, then merge with assembly context (transforms, overrides).
### 10.3 Composite Introspection
**Challenge:** MAT2/MAT8 cards, PCOMP/PCOMPG properties, ply orientations, stacking sequences.
**Approach:** Extend pyNastran parsing for composite cards. Map plies to design variables (thickness, angle).
### 10.4 AI-Powered Analysis (Future)
- Sensitivity prediction from geometry/BC features without running FEA
- Design variable clustering (correlated parameters)
- Failure mode prediction from stress distributions
- Automated study type recommendation (with engineer approval)
---
## 11. Appendix: Key Reference Paths
### Existing Scripts
| Script | Path | Status |
|--------|------|--------|
| `introspect_part.py` | `nx_journals/introspect_part.py` | Enhance for v1 |
| `introspect_sim.py` | `nx_journals/introspect_sim.py` | Reference only (BDF replaces most functionality) |
| `discover_model.py` | `nx_journals/discover_model.py` | Reference only |
| `extract_displacement.py` | `optimization_engine/extractors/extract_displacement.py` | Use in Layer 4 |
| `extract_von_mises_stress.py` | `optimization_engine/extractors/extract_von_mises_stress.py` | Use in Layer 4 |
### New Scripts (to create)
| Script | Purpose |
|--------|---------|
| `introspect_bdf.py` | Layers 23: BDF parsing for mesh, materials, properties, solver config |
| `introspect_baseline.py` | Layer 4: OP2 result aggregation |
| `run_introspection.py` | Master orchestrator — runs all layers, merges, validates |
| `export_bdf.py` | NXOpen journal to export Nastran input deck |
### NXOpen API Reference
- Expressions: `NXOpen.Part.Expressions`
- Mass: `NXOpen.Part.MeasureManager.NewMassProperties()`
- Materials: `body.GetPhysicalMaterial()`, `mat.GetPropertyValue()`
- Features: `NXOpen.Part.Features`
- FEM: `NXOpen.CAE.FemPart.BaseFEModel`
- SIM: `NXOpen.CAE.SimPart.Simulation`
### pyNastran API Reference
- BDF: `pyNastran.bdf.bdf.BDF``.elements`, `.nodes`, `.materials`, `.properties`, `.spcs`, `.loads`, `.subcases`
- OP2: `pyNastran.op2.op2.OP2``.displacements`, `.ctetra_stress`, `.cquad4_stress`, `.eigenvalues`
---
## 12. Sign-Off
| Role | Status | Notes |
|------|--------|-------|
| Technical Lead 🔧 | ✅ Approved | Plan owner, technical review complete |
| NX Expert 🖥️ | 🔲 Pending | Initial research author, implementation owner |
| Manager 🎯 | 🔲 Pending | Resource allocation, timeline approval |
| CEO (Antoine) | 🔲 Pending | Strategic direction approval |
---
*The physics is the boss. Introspection just makes sure we understand what the physics is doing before we start changing things.*
— Technical Lead 🔧 | Atomizer Engineering Co.

View File

@@ -1,171 +1,171 @@
# CONTEXT.md — Hydrotech Beam Structural Optimization # CONTEXT.md — Hydrotech Beam Structural Optimization
## Client ## Client
Hydrotech (internal test fixture) Hydrotech (internal test fixture)
## Objective ## Objective
Minimize beam mass while meeting displacement and stress constraints. Single-objective: minimize mass, constrain displacement (≤ 10 mm) and stress (≤ 130 MPa). Minimize beam mass while meeting displacement and stress constraints. Single-objective: minimize mass, constrain displacement (≤ 10 mm) and stress (≤ 130 MPa).
## Key Parameters — Confirmed (Gen 002 + Introspection) ## Key Parameters — Confirmed (Gen 002 + Introspection)
| Parameter | NX Expression | Current | Range | Units | DV? | Notes | | Parameter | NX Expression | Current | Range | Units | DV? | Notes |
|-----------|--------------|---------|-------|-------|-----|-------| |-----------|--------------|---------|-------|-------|-----|-------|
| beam_half_core_thickness | `beam_half_core_thickness` | **25.162** | 1040 | mm | Yes (DV1) | Core half-thickness | | beam_half_core_thickness | `beam_half_core_thickness` | **25.162** | 1040 | mm | Yes (DV1) | Core half-thickness |
| beam_face_thickness | `beam_face_thickness` | **21.504** | 1040 | mm | Yes (DV2) | Face sheet thickness | | beam_face_thickness | `beam_face_thickness` | **21.504** | 1040 | mm | Yes (DV2) | Face sheet thickness |
| holes_diameter | `holes_diameter` | 300 | 150450 | mm | Yes (DV3) | ✅ G14 closed | | holes_diameter | `holes_diameter` | 300 | 150450 | mm | Yes (DV3) | ✅ G14 closed |
| hole_count | `hole_count` (→ `Pattern_p7`) | 10 | 515 | integer | Yes (DV4) | Pattern parameter link | | hole_count | `hole_count` (→ `Pattern_p7`) | 10 | 515 | integer | Yes (DV4) | Pattern parameter link |
| beam_length | `beam_lenght` ⚠️ | 5,000 | Fixed | mm | No | **Typo in NX — no 'h'** | | beam_length | `beam_lenght` ⚠️ | 5,000 | Fixed | mm | No | **Typo in NX — no 'h'** |
| beam_half_height | `beam_half_height` | **250** | — | mm | No | ✅ G12 closed | | beam_half_height | `beam_half_height` | **250** | — | mm | No | ✅ G12 closed |
| beam_half_width | `beam_half_width` | **150** | — | mm | No | ✅ G13 closed | | beam_half_width | `beam_half_width` | **150** | — | mm | No | ✅ G13 closed |
| hole_span | `p6` (→ `Pattern_p9`) | 4,000 | TBD | mm | Potential (G15) | Total span for hole distribution | | hole_span | `p6` (→ `Pattern_p9`) | 4,000 | TBD | mm | Potential (G15) | Total span for hole distribution |
## Constraints ## Constraints
- Max tip displacement: ≤ 20 mm (relaxed from 10mm — CEO approved 2026-02-13, dummy case) - Max tip displacement: ≤ 20 mm (relaxed from 10mm — CEO approved 2026-02-13, dummy case)
- Max von Mises stress: ≤ ~130 MPa (steel, conservative — Gap G9) - Max von Mises stress: ≤ ~130 MPa (steel, conservative — Gap G9)
- Mass tracked via NX expression **`p173`** (`body_property147.mass` [kg]) - Mass tracked via NX expression **`p173`** (`body_property147.mass` [kg])
## Baseline Performance — Confirmed (Introspection) ## Baseline Performance — Confirmed (Introspection)
| Metric | Value | Source | Confidence | | Metric | Value | Source | Confidence |
|--------|-------|--------|------------| |--------|-------|--------|------------|
| Mass | **1,133.01 kg** | NX expression `p173`, CEO correction + binary introspection | ✅ High | | Mass | **1,133.01 kg** | NX expression `p173`, CEO correction + binary introspection | ✅ High |
| Tip displacement | **19.56 mm** (node 5161, Tz = 19.51 mm) | OP2 parse via pyNastran, SOL 101 baseline run 2026-02-10 | ✅ High | | Tip displacement | **19.56 mm** (node 5161, Tz = 19.51 mm) | OP2 parse via pyNastran, SOL 101 baseline run 2026-02-10 | ✅ High |
| Max von Mises stress | **117.48 MPa** | OP2 parse via pyNastran, CQUAD4 shell stress | ✅ High | | Max von Mises stress | **117.48 MPa** | OP2 parse via pyNastran, CQUAD4 shell stress | ✅ High |
| Material | **AISI Steel 1005** | `physicalmateriallibrary.xml` | ✅ High | | Material | **AISI Steel 1005** | `physicalmateriallibrary.xml` | ✅ High |
| Density | **7.3 g/cm³** | KBS session | ✅ High | | Density | **7.3 g/cm³** | KBS session | ✅ High |
> ⚠️ **Mass history:** Intake reported ~974 kg → CEO corrected to 1,133.01 kg (`p173`). Discrepancy with intake likely due to different parameter state. Binary introspection confirms `p173: body_property147.mass` in kg. > ⚠️ **Mass history:** Intake reported ~974 kg → CEO corrected to 1,133.01 kg (`p173`). Discrepancy with intake likely due to different parameter state. Binary introspection confirms `p173: body_property147.mass` in kg.
## NX Expression Map — Full Introspection ## NX Expression Map — Full Introspection
### Design Variables ### Design Variables
| Expression | Value | Unit | Type | | Expression | Value | Unit | Type |
|-----------|-------|------|------| |-----------|-------|------|------|
| `beam_face_thickness` | 21.504404775742785 | mm | Number — continuous | | `beam_face_thickness` | 21.504404775742785 | mm | Number — continuous |
| `beam_half_core_thickness` | 25.162078968746705 | mm | Number — continuous | | `beam_half_core_thickness` | 25.162078968746705 | mm | Number — continuous |
| `holes_diameter` | 300 | mm | Number — continuous | | `holes_diameter` | 300 | mm | Number — continuous |
| `hole_count` | 10 | — | Integer (via `Pattern_p7`) | | `hole_count` | 10 | — | Integer (via `Pattern_p7`) |
### Fixed Geometry Parameters ### Fixed Geometry Parameters
| Expression | Value | Unit | | Expression | Value | Unit |
|-----------|-------|------| |-----------|-------|------|
| `beam_half_height` | 250 | mm | | `beam_half_height` | 250 | mm |
| `beam_half_width` | 150 | mm | | `beam_half_width` | 150 | mm |
| `beam_lenght` | 5,000 | mm | | `beam_lenght` | 5,000 | mm |
### Hole Pattern Expressions ### Hole Pattern Expressions
| Expression | Value/Formula | Notes | | Expression | Value/Formula | Notes |
|-----------|--------------|-------| |-----------|--------------|-------|
| `p6` | 4,000 mm | Hole span — potential DV | | `p6` | 4,000 mm | Hole span — potential DV |
| `Pattern_p7` | → `hole_count` | Count link | | `Pattern_p7` | → `hole_count` | Count link |
| `Pattern_p8` | 444.444 mm | Computed spacing (span / (count-1)) | | `Pattern_p8` | 444.444 mm | Computed spacing (span / (count-1)) |
| `Pattern_p9` | → `p6` | Span link | | `Pattern_p9` | → `p6` | Span link |
| `Pattern_p10` | (linked) | | | `Pattern_p10` | (linked) | |
| `Pattern_p11` | 10 mm | | | `Pattern_p11` | 10 mm | |
| `Pattern_p12` | 0 mm | | | `Pattern_p12` | 0 mm | |
### Mass Properties (Measure Body) ### Mass Properties (Measure Body)
| Expression | Formula | Unit | | Expression | Formula | Unit |
|-----------|---------|------| |-----------|---------|------|
| `p170` | surface_area | mm² | | `p170` | surface_area | mm² |
| `p171` | volume | mm³ | | `p171` | volume | mm³ |
| `p172` | center_of_mass | mm (point) | | `p172` | center_of_mass | mm (point) |
| **`p173`** | **mass** | **kg** | | **`p173`** | **mass** | **kg** |
| `p174` | weight | N | | `p174` | weight | N |
| `p175` | density | kg/mm³ | | `p175` | density | kg/mm³ |
### Other ### Other
| Expression | Value | Notes | | Expression | Value | Notes |
|-----------|-------|-------| |-----------|-------|-------|
| `p4` | → `beam_lenght` | Alias | | `p4` | → `beam_lenght` | Alias |
| `p119` | 4,000 mm | | | `p119` | 4,000 mm | |
| `p132` | 444.444 mm | Computed | | `p132` | 444.444 mm | Computed |
| `p134` | 4,000 mm | | | `p134` | 4,000 mm | |
| `p135` | 4,000 mm | | | `p135` | 4,000 mm | |
| `p139` | 10 mm | | | `p139` | 10 mm | |
| `p141` | 0 mm | | | `p141` | 0 mm | |
## Boundary Conditions — Confirmed (Gen 002) ## Boundary Conditions — Confirmed (Gen 002)
| BC | Location | Value | Source | | BC | Location | Value | Source |
|----|----------|-------|--------| |----|----------|-------|--------|
| Fixed support | Left side (full edge) | All DOF constrained | ✅ KBS session | | Fixed support | Left side (full edge) | All DOF constrained | ✅ KBS session |
| Applied force | Right side (free end) | 10,000 kgf downward (Y) | ✅ KBS session — "project requirement" | | Applied force | Right side (free end) | 10,000 kgf downward (Y) | ✅ KBS session — "project requirement" |
| Configuration | Cantilever | Left fixed, right loaded | ✅ KBS session | | Configuration | Cantilever | Left fixed, right loaded | ✅ KBS session |
## Mesh — Confirmed (Gen 002) ## Mesh — Confirmed (Gen 002)
| Property | Value | Source | | Property | Value | Source |
|----------|-------|--------| |----------|-------|--------|
| Element type | CQUAD4 (thin shell) | ✅ KBS session | | Element type | CQUAD4 (thin shell) | ✅ KBS session |
| Element size | 33.7 mm (67.4/2) | ✅ KBS session | | Element size | 33.7 mm (67.4/2) | ✅ KBS session |
| Idealization | Promote body → mid-surface extraction | ✅ KBS session | | Idealization | Promote body → mid-surface extraction | ✅ KBS session |
## Hole Geometry — Confirmed (Gen 002) ## Hole Geometry — Confirmed (Gen 002)
| Property | Value | Notes | | Property | Value | Notes |
|----------|-------|-------| |----------|-------|-------|
| Span | 4,000 mm (expression `p6`) | Total distribution length | | Span | 4,000 mm (expression `p6`) | Total distribution length |
| Start offset | 500 mm from beam start | Fixed requirement — not parametric | | Start offset | 500 mm from beam start | Fixed requirement — not parametric |
| End offset | 500 mm from beam end | Fixed requirement — not parametric | | End offset | 500 mm from beam end | Fixed requirement — not parametric |
| Computed spacing | 444.444 mm (4000 / 9) | At baseline (10 holes) | | Computed spacing | 444.444 mm (4000 / 9) | At baseline (10 holes) |
| Collision check | Required at DV extremes | 15 × 450 mm in 4,000 mm → overlap | | Collision check | Required at DV extremes | 15 × 450 mm in 4,000 mm → overlap |
## Model Files ## Model Files
- NX Part: `Beam.prt` - NX Part: `Beam.prt`
- FEM: `Beam_fem1.fem` - FEM: `Beam_fem1.fem`
- Idealized part: `Beam_fem1_i.prt` - Idealized part: `Beam_fem1_i.prt`
- Simulation: `Beam_sim1.sim` - Simulation: `Beam_sim1.sim`
- Solver: NX Nastran SOL 101 (static structural) - Solver: NX Nastran SOL 101 (static structural)
- **NX Version:** DesigncenterNX 2512 (Siemens rebranded NX → "DesigncenterNX") - **NX Version:** DesigncenterNX 2512 (Siemens rebranded NX → "DesigncenterNX")
- **Install path:** `C:\Program Files\Siemens\DesigncenterNX2512` (on dalidou) - **Install path:** `C:\Program Files\Siemens\DesigncenterNX2512` (on dalidou)
## First Results (2026-02-11) ## First Results (2026-02-11)
| Metric | Value | Notes | | Metric | Value | Notes |
|--------|-------|-------| |--------|-------|-------|
| Displacement | **17.93 mm** | At baseline-ish DVs | | Displacement | **17.93 mm** | At baseline-ish DVs |
| Von Mises stress | **111.9 MPa** | At baseline-ish DVs | | Von Mises stress | **111.9 MPa** | At baseline-ish DVs |
| Solve time | **~12 s/trial** | On dalidou (Windows) | | Solve time | **~12 s/trial** | On dalidou (Windows) |
| Mass extraction | Via `p173` expression | Journal writes `_temp_mass.txt` | | Mass extraction | Via `p173` expression | Journal writes `_temp_mass.txt` |
> Both constraints violated at baseline (disp > 10mm). Optimization will need to find stiffer/heavier designs or relaxed constraints. > Both constraints violated at baseline (disp > 10mm). Optimization will need to find stiffer/heavier designs or relaxed constraints.
## Future Expansion ## Future Expansion
- Material alternatives: Aluminum 6061, Stainless Steel ANSI 310 (per Antoine, KBS session) - Material alternatives: Aluminum 6061, Stainless Steel ANSI 310 (per Antoine, KBS session)
- `p6` (hole span) as additional design variable (pending decision G15) - `p6` (hole span) as additional design variable (pending decision G15)
- Mesh refinement (Antoine: "Eventually we're going to be able to refine the element size") - Mesh refinement (Antoine: "Eventually we're going to be able to refine the element size")
## Decisions ## Decisions
- 2026-02-08: Project received from Antoine - 2026-02-08: Project received from Antoine
- 2026-02-10: KBS sessions processed → Gen 002 KB update. BCs confirmed. - 2026-02-10: KBS sessions processed → Gen 002 KB update. BCs confirmed.
- 2026-02-10: Binary introspection — all expression names/values confirmed. Mass = 1,133.01 kg. - 2026-02-10: Binary introspection — all expression names/values confirmed. Mass = 1,133.01 kg.
- 2026-02-11: NX version fixed (DesigncenterNX 2512), path resolution bugs fixed, iteration architecture finalized (backup/restore in-place), history DB added. First real solve results. - 2026-02-11: NX version fixed (DesigncenterNX 2512), path resolution bugs fixed, iteration architecture finalized (backup/restore in-place), history DB added. First real solve results.
## Status ## Status
Phase: **DOE re-run** — mass bug fixed, constraint relaxed, ready for clean DOE Phase: **DOE re-run** — mass bug fixed, constraint relaxed, ready for clean DOE
Generation: 004 Generation: 004
Channel: #project-hydrotech-beam Channel: #project-hydrotech-beam
Last update: 2026-02-13 Last update: 2026-02-13
### Solver Pipeline Status ### Solver Pipeline Status
- ✅ NX journal solve working (DesigncenterNX 2512) - ✅ NX journal solve working (DesigncenterNX 2512)
- ✅ Mass extraction fixed — commit `580ed65` (MeasureManager after geometry rebuild, no more stale p173) - ✅ Mass extraction fixed — commit `580ed65` (MeasureManager after geometry rebuild, no more stale p173)
- ✅ Displacement & stress extraction via pyNastran OP2 parsing - ✅ Displacement & stress extraction via pyNastran OP2 parsing
- ✅ Iteration archival (params, results, OP2, F06) - ✅ Iteration archival (params, results, OP2, F06)
- ✅ History DB (SQLite + CSV, append-only, survives --clean) - ✅ History DB (SQLite + CSV, append-only, survives --clean)
- ✅ Geometric pre-checks (hole overlap, web clearance) - ✅ Geometric pre-checks (hole overlap, web clearance)
- ✅ Displacement constraint relaxed: 10mm → 20mm (DEC-HB-012) - ✅ Displacement constraint relaxed: 10mm → 20mm (DEC-HB-012)
- 🔄 Pull fix on dalidou → test single trial → re-run full DOE - 🔄 Pull fix on dalidou → test single trial → re-run full DOE
### DOE Phase 1 Results (pre-fix, 51 trials) ### DOE Phase 1 Results (pre-fix, 51 trials)
- 39/51 solved, 12 geo-infeasible (hole overlap) - 39/51 solved, 12 geo-infeasible (hole overlap)
- **0 fully feasible** at 10mm constraint (min displacement ~19.6mm) - **0 fully feasible** at 10mm constraint (min displacement ~19.6mm)
- **Mass = NaN on all trials** — extraction bug (now fixed) - **Mass = NaN on all trials** — extraction bug (now fixed)
- Stress constraint met by several trials - Stress constraint met by several trials
- With 20mm relaxation, many trials should now be feasible - With 20mm relaxation, many trials should now be feasible
### Development Workflow ### Development Workflow
- **Git only** for development (git push/pull between server and dalidou) - **Git only** for development (git push/pull between server and dalidou)
- **Syncthing paused** to avoid conflicts during active development - **Syncthing paused** to avoid conflicts during active development
- Resume Syncthing for production/delivery phases - Resume Syncthing for production/delivery phases

View File

@@ -0,0 +1,171 @@
# CONTEXT.md — Hydrotech Beam Structural Optimization
## Client
Hydrotech (internal test fixture)
## Objective
Minimize beam mass while meeting displacement and stress constraints. Single-objective: minimize mass, constrain displacement (≤ 10 mm) and stress (≤ 130 MPa).
## Key Parameters — Confirmed (Gen 002 + Introspection)
| Parameter | NX Expression | Current | Range | Units | DV? | Notes |
|-----------|--------------|---------|-------|-------|-----|-------|
| beam_half_core_thickness | `beam_half_core_thickness` | **25.162** | 1040 | mm | Yes (DV1) | Core half-thickness |
| beam_face_thickness | `beam_face_thickness` | **21.504** | 1040 | mm | Yes (DV2) | Face sheet thickness |
| holes_diameter | `holes_diameter` | 300 | 150450 | mm | Yes (DV3) | ✅ G14 closed |
| hole_count | `hole_count` (→ `Pattern_p7`) | 10 | 515 | integer | Yes (DV4) | Pattern parameter link |
| beam_length | `beam_lenght` ⚠️ | 5,000 | Fixed | mm | No | **Typo in NX — no 'h'** |
| beam_half_height | `beam_half_height` | **250** | — | mm | No | ✅ G12 closed |
| beam_half_width | `beam_half_width` | **150** | — | mm | No | ✅ G13 closed |
| hole_span | `p6` (→ `Pattern_p9`) | 4,000 | TBD | mm | Potential (G15) | Total span for hole distribution |
## Constraints
- Max tip displacement: ≤ 20 mm (relaxed from 10mm — CEO approved 2026-02-13, dummy case)
- Max von Mises stress: ≤ ~130 MPa (steel, conservative — Gap G9)
- Mass tracked via NX expression **`p173`** (`body_property147.mass` [kg])
## Baseline Performance — Confirmed (Introspection)
| Metric | Value | Source | Confidence |
|--------|-------|--------|------------|
| Mass | **1,133.01 kg** | NX expression `p173`, CEO correction + binary introspection | ✅ High |
| Tip displacement | **19.56 mm** (node 5161, Tz = 19.51 mm) | OP2 parse via pyNastran, SOL 101 baseline run 2026-02-10 | ✅ High |
| Max von Mises stress | **117.48 MPa** | OP2 parse via pyNastran, CQUAD4 shell stress | ✅ High |
| Material | **AISI Steel 1005** | `physicalmateriallibrary.xml` | ✅ High |
| Density | **7.3 g/cm³** | KBS session | ✅ High |
> ⚠️ **Mass history:** Intake reported ~974 kg → CEO corrected to 1,133.01 kg (`p173`). Discrepancy with intake likely due to different parameter state. Binary introspection confirms `p173: body_property147.mass` in kg.
## NX Expression Map — Full Introspection
### Design Variables
| Expression | Value | Unit | Type |
|-----------|-------|------|------|
| `beam_face_thickness` | 21.504404775742785 | mm | Number — continuous |
| `beam_half_core_thickness` | 25.162078968746705 | mm | Number — continuous |
| `holes_diameter` | 300 | mm | Number — continuous |
| `hole_count` | 10 | — | Integer (via `Pattern_p7`) |
### Fixed Geometry Parameters
| Expression | Value | Unit |
|-----------|-------|------|
| `beam_half_height` | 250 | mm |
| `beam_half_width` | 150 | mm |
| `beam_lenght` | 5,000 | mm |
### Hole Pattern Expressions
| Expression | Value/Formula | Notes |
|-----------|--------------|-------|
| `p6` | 4,000 mm | Hole span — potential DV |
| `Pattern_p7` | → `hole_count` | Count link |
| `Pattern_p8` | 444.444 mm | Computed spacing (span / (count-1)) |
| `Pattern_p9` | → `p6` | Span link |
| `Pattern_p10` | (linked) | |
| `Pattern_p11` | 10 mm | |
| `Pattern_p12` | 0 mm | |
### Mass Properties (Measure Body)
| Expression | Formula | Unit |
|-----------|---------|------|
| `p170` | surface_area | mm² |
| `p171` | volume | mm³ |
| `p172` | center_of_mass | mm (point) |
| **`p173`** | **mass** | **kg** |
| `p174` | weight | N |
| `p175` | density | kg/mm³ |
### Other
| Expression | Value | Notes |
|-----------|-------|-------|
| `p4` | → `beam_lenght` | Alias |
| `p119` | 4,000 mm | |
| `p132` | 444.444 mm | Computed |
| `p134` | 4,000 mm | |
| `p135` | 4,000 mm | |
| `p139` | 10 mm | |
| `p141` | 0 mm | |
## Boundary Conditions — Confirmed (Gen 002)
| BC | Location | Value | Source |
|----|----------|-------|--------|
| Fixed support | Left side (full edge) | All DOF constrained | ✅ KBS session |
| Applied force | Right side (free end) | 10,000 kgf downward (Y) | ✅ KBS session — "project requirement" |
| Configuration | Cantilever | Left fixed, right loaded | ✅ KBS session |
## Mesh — Confirmed (Gen 002)
| Property | Value | Source |
|----------|-------|--------|
| Element type | CQUAD4 (thin shell) | ✅ KBS session |
| Element size | 33.7 mm (67.4/2) | ✅ KBS session |
| Idealization | Promote body → mid-surface extraction | ✅ KBS session |
## Hole Geometry — Confirmed (Gen 002)
| Property | Value | Notes |
|----------|-------|-------|
| Span | 4,000 mm (expression `p6`) | Total distribution length |
| Start offset | 500 mm from beam start | Fixed requirement — not parametric |
| End offset | 500 mm from beam end | Fixed requirement — not parametric |
| Computed spacing | 444.444 mm (4000 / 9) | At baseline (10 holes) |
| Collision check | Required at DV extremes | 15 × 450 mm in 4,000 mm → overlap |
## Model Files
- NX Part: `Beam.prt`
- FEM: `Beam_fem1.fem`
- Idealized part: `Beam_fem1_i.prt`
- Simulation: `Beam_sim1.sim`
- Solver: NX Nastran SOL 101 (static structural)
- **NX Version:** DesigncenterNX 2512 (Siemens rebranded NX → "DesigncenterNX")
- **Install path:** `C:\Program Files\Siemens\DesigncenterNX2512` (on dalidou)
## First Results (2026-02-11)
| Metric | Value | Notes |
|--------|-------|-------|
| Displacement | **17.93 mm** | At baseline-ish DVs |
| Von Mises stress | **111.9 MPa** | At baseline-ish DVs |
| Solve time | **~12 s/trial** | On dalidou (Windows) |
| Mass extraction | Via `p173` expression | Journal writes `_temp_mass.txt` |
> Both constraints violated at baseline (disp > 10mm). Optimization will need to find stiffer/heavier designs or relaxed constraints.
## Future Expansion
- Material alternatives: Aluminum 6061, Stainless Steel ANSI 310 (per Antoine, KBS session)
- `p6` (hole span) as additional design variable (pending decision G15)
- Mesh refinement (Antoine: "Eventually we're going to be able to refine the element size")
## Decisions
- 2026-02-08: Project received from Antoine
- 2026-02-10: KBS sessions processed → Gen 002 KB update. BCs confirmed.
- 2026-02-10: Binary introspection — all expression names/values confirmed. Mass = 1,133.01 kg.
- 2026-02-11: NX version fixed (DesigncenterNX 2512), path resolution bugs fixed, iteration architecture finalized (backup/restore in-place), history DB added. First real solve results.
## Status
Phase: **DOE re-run** — mass bug fixed, constraint relaxed, ready for clean DOE
Generation: 004
Channel: #project-hydrotech-beam
Last update: 2026-02-13
### Solver Pipeline Status
- ✅ NX journal solve working (DesigncenterNX 2512)
- ✅ Mass extraction fixed — commit `580ed65` (MeasureManager after geometry rebuild, no more stale p173)
- ✅ Displacement & stress extraction via pyNastran OP2 parsing
- ✅ Iteration archival (params, results, OP2, F06)
- ✅ History DB (SQLite + CSV, append-only, survives --clean)
- ✅ Geometric pre-checks (hole overlap, web clearance)
- ✅ Displacement constraint relaxed: 10mm → 20mm (DEC-HB-012)
- 🔄 Pull fix on dalidou → test single trial → re-run full DOE
### DOE Phase 1 Results (pre-fix, 51 trials)
- 39/51 solved, 12 geo-infeasible (hole overlap)
- **0 fully feasible** at 10mm constraint (min displacement ~19.6mm)
- **Mass = NaN on all trials** — extraction bug (now fixed)
- Stress constraint met by several trials
- With 20mm relaxation, many trials should now be feasible
### Development Workflow
- **Git only** for development (git push/pull between server and dalidou)
- **Syncthing paused** to avoid conflicts during active development
- Resume Syncthing for production/delivery phases

View File

@@ -61,6 +61,10 @@ hydrotech-beam/
- [CONTEXT.md](CONTEXT.md) — Full intake data - [CONTEXT.md](CONTEXT.md) — Full intake data
- [BREAKDOWN.md](BREAKDOWN.md) — Tech Lead's technical analysis - [BREAKDOWN.md](BREAKDOWN.md) — Tech Lead's technical analysis
- [DECISIONS.md](DECISIONS.md) — All project decisions - [DECISIONS.md](DECISIONS.md) — All project decisions
- [USER_GUIDE.md](USER_GUIDE.md) — Living user guide (operators + bots)
- [playbooks/DOE.md](playbooks/DOE.md) — DOE execution playbook
- [playbooks/NX_REAL_RUN.md](playbooks/NX_REAL_RUN.md) — Real NX run checklist
- [playbooks/SYNCTHING_RECOVERY.md](playbooks/SYNCTHING_RECOVERY.md) — Sync recovery and cleanup
- [kb/_index.md](kb/_index.md) — Knowledge base overview - [kb/_index.md](kb/_index.md) — Knowledge base overview
## Team ## Team

View File

@@ -0,0 +1,65 @@
# Hydrotech Beam — User Guide (Living)
> Audience: Antoine, future users, and Atomizer agents/bots.
> Status: Living document — update after each meaningful run/decision.
## 1) Purpose
This guide explains how to run Hydrotech Beam studies safely and reproducibly, how to interpret outputs, and how to avoid common pitfalls (backend mix-up, sync conflicts, stale results).
## 2) Quick Start
### Study folder
`C:\Users\antoi\Atomizer\Projects\hydrotech-beam\studies\01_doe_landscape`
### Core command (real NX run)
```powershell
python .\run_doe.py --backend nxopen --model-dir "<PATH_TO_NX_MODELS>" --clean --study-name hydrotech_beam_doe_phase1_real
```
### Dev/testing command (fake physics)
```powershell
python .\run_doe.py --backend stub --clean --study-name hydrotech_beam_doe_phase1_stub
```
⚠️ `stub` is synthetic. Do **not** use stub outputs for engineering decisions.
## 3) Critical Rules
1. Always specify `--backend` explicitly (never rely on defaults).
2. Before a decision review, confirm whether results are from `nxopen` or `stub`.
3. Keep result artifacts clean (archive conflicts, avoid mixed appended runs unless intentional).
4. After every run, write a run log entry (template below).
## 4) Run Log Template (required)
Copy this into `DECISIONS.md` or project log after every run:
```md
## Run Record — YYYY-MM-DD HH:MM
- Operator:
- Command:
- Backend: nxopen | stub
- Model dir:
- Study name:
- Constraints: displacement=__ mm, stress=__ MPa
- Result summary: total=__, solved=__, geo_infeasible=__, feasible=__
- Gate check: PASS | FAIL
- Notes/issues:
- Next action:
```
## 5) Playbooks
- `playbooks/NX_REAL_RUN.md` — clean real run checklist + validation
- `playbooks/DOE.md` — DOE execution and gate rules
- `playbooks/SYNCTHING_RECOVERY.md` — sync conflict and stale data recovery
## 6) Current Known Pitfalls
- `run_doe.py` default backend is `stub` unless overridden.
- Mixing old + new runs in same DB/file can produce misleading totals.
- Syncthing conflict files (`*.sync-conflict-*`) can silently fork truth.
- NX expression names must match exactly (e.g., typo-sensitive names in model).
## 7) Ownership
- CEO (Antoine): go/no-go and final technical decisions.
- Manager: orchestration + process + documentation enforcement.
- Study Builder: run scripts and settings correctness.
- Tech Lead: engineering validity of constraints and interpretation.
- Auditor: quality gate before external conclusions.

View File

@@ -0,0 +1,33 @@
# Hydrotech Beam — Executive Dashboard
Last updated (UTC): 2026-02-14T22:24:29
Source: `studies/01_doe_landscape/results/doe_summary.json` + `doe_results.csv`
## CEO 60-second view
- **Phase:** DOE Phase 1 (LHS)
- **Gate status:** ❌ **BLOCKED** (Phase 1 → Phase 2)
- **Total trials:** 51
- **Solved:** 39 (**76.5%**, below 80% gate)
- **Geo-infeasible:** 12
- **Fully feasible designs:** 0 (gate requires ≥5)
## Top signals
- ✅ Mass extraction now looks real (no NaN in solved rows)
- ✅ Syncthing cleanup completed (active conflict files archived)
- ⚠️ Displacement constraint is the blocker (0/39 displacement-feasible at 10 mm)
- ⚠️ DOE→TPE gate cannot pass with current limits/bounds
## Decision hotlist (CEO)
1. **Approve next constraint strategy**:
- Option A (recommended): exploratory rerun at **20 mm** displacement
- Option B: keep 10 mm and tighten design bounds for stiffness
2. **Approve TPE entry rule** (with strict gate or conditional gate)
## Recommendation (current)
Proceed with **Option A** for exploration (20 mm), then tighten toward 10 mm in staged optimization.
## KPI snapshot
- Solve success rate: **76.5%**
- Feasibility rate (full): **0.0%**
- Best solved mass: **686.289 kg** (not fully feasible)
- Best trial ID by mass: **26**

View File

@@ -0,0 +1,194 @@
# Hydrotech Beam — Dashboard & Reporting Master Plan (Multi-LLM Synthesis)
## Purpose
Give Antoine a single, reliable command view of project health while preserving full technical depth and operational traceability.
This plan synthesizes recommendations from:
- Codex 5.3 (execution architecture + contracts + KPI gates)
- Opus 4.6 (PKM-first, markdown-native, low-overhead governance)
- Gemini Pro (clear role-based dashboards + event-stream discipline)
---
## North-Star Architecture (Hybrid, future-proof)
### Phase 1 default (now): **PKM-native dashboards in markdown**
- No new infrastructure required
- Fastest path to value
- Agent-native read/write and auditability
### Phase 2+ extension: **optional web UI over same contracts**
- If/when needed for richer visual analytics
- No rewrite: UI reads the same structured contracts and event logs
**Key principle:** Data contracts first, presentation second.
---
## 1) Information Architecture
## A. Project-specific (lives under `projects/hydrotech-beam/`)
- `dashboard/` — generated dashboard markdown snapshots
- `reports/` — run/phase/executive reports
- `runs/` — run manifests and execution metadata
- `decisions/` — append-only decision records
- `incidents/` — sync/solver/process incident records
- `playbooks/` — project execution procedures
## B. Foundational (lives under `docs/`)
- `docs/guides/` — reusable dashboard/report standards
- `docs/reference/data-contracts/` — versioned schema definitions
- `docs/protocols/` — gates, QA, governance rules
- `docs/templates/` — report and dashboard templates
---
## 2) Dashboard Modules (3-tier)
## A. Executive Dashboard (60-second scan)
- Project status (RAG + phase + blockers)
- Milestone confidence and slip risk
- Decision hotlist (items needing CEO approval)
- Top risks + mitigation owners
- Gate state (Pass / Conditional / Fail)
## B. Technical Dashboard
- DOE/TPE performance (success, feasible points, convergence)
- Constraint panel (disp/stress/geo violations)
- Data quality checks (NaN, stub-vs-nxopen, stale/mixed runs)
- Traceability (requirement → run → result → decision)
## C. Operations Dashboard
- Queue and throughput (WIP, cycle time, backlog)
- Blocker tracker + MTTR
- Review SLA status
- Syncthing/data integrity panel
- Documentation freshness/compliance
---
## 3) Data Contracts (mandatory)
All dashboard/report content must come from structured records with lineage.
Required contracts (v1):
1. `run_manifest.v1.json`
2. `trial_result.v1.json`
3. `study_summary.v1.json`
4. `decision_record.v1.json`
5. `risk_record.v1.json`
6. `gate_evaluation.v1.json`
7. `incident_record.v1.json`
Required fields in every record:
- `schema_version`, `project_id`, `run_id` (if applicable)
- `timestamp_utc`, `owner`, `source_file`, `source_hash`
Ingestion rules:
- Reject invalid schema
- Keep append-only history for decisions/gates/incidents
- Nightly integrity check + drift report
---
## 4) Report System
## A. Daily Ops Brief (auto)
- Blockers, failures, overdue reviews, data integrity warnings
## B. Weekly Executive Brief (auto + curated)
- Milestone confidence, top risks, decision asks, KPI trend deltas
## C. Gate Review Pack (formal)
- Criteria checklist, evidence index, exceptions, sign-offs
## D. Technical Deep Dive (on-demand)
- Methods, assumptions, sensitivity, reproducibility evidence
Render path:
- Markdown source of truth
- Optional HTML/PDF exports from templates
- Immutable snapshot ID per issued report
---
## 5) Governance & Ownership
- **Manager (owner):** documentation architecture, dashboard governance, release quality
- **Tech Lead:** technical KPI definitions, thresholds, validation logic
- **Study Builder:** data pipeline and generators
- **Optimizer:** analytics logic and recommendation layer
- **Auditor:** contract compliance + gate QA
Rule enforced:
- Project-specific content in `projects/...`
- Foundational content in `docs/...`
---
## 6) KPI Set + Gate Rules (starter)
## KPI starter set
- Solve success rate
- Full feasibility rate
- Best feasible mass
- Constraint violation percentiles (disp/stress)
- Data integrity score
- Decision cycle time
- Blocker MTTR
- Documentation freshness lag
## Gate policy
- Gate states: `PASS` | `CONDITIONAL_PASS` | `FAIL`
- Conditional pass requires named owner + due date + risk acceptance
- Hard fail blocks progression
DOE→TPE gate (initial):
- Solve success ≥ 80%
- Feasible points ≥ 5
- Data integrity score ≥ 95%
---
## 7) Rollout Plan
## Phase 0 (48h)
- Contract definitions + KPI dictionary
- Dashboard markdown templates
- Run manifest/logger enabled
## Phase 1 (1 week)
- Live executive + operations dashboards
- Daily ops brief + weekly executive brief
## Phase 2 (23 weeks)
- Technical dashboard depth (DOE/TPE analytics, traceability)
- Gate review packs with evidence linking
## Phase 3 (ongoing)
- Optional web UI layer
- Predictive risk signals and anomaly detection
---
## 8) Risks & Mitigations
1. Backend confusion (stub vs nxopen)
- Mitigation: manifest hard-check + dashboard alert
2. Syncthing conflicts / stale truth
- Mitigation: conflict detector + incident workflow
3. Schema drift
- Mitigation: versioned contracts + validator + auditor checks
4. Dashboard sprawl
- Mitigation: role-based views + KPI change control
5. Documentation decay
- Mitigation: freshness SLA + automated stale flags
---
## Decision
Proceed with **PKM-native dashboard/report system now**, built on strict contracts and governance, with a clean upgrade path to richer UI later.

View File

@@ -0,0 +1,43 @@
# Hydrotech Beam — Operations Dashboard
Last updated (UTC): 2026-02-14T22:24:29
## Pipeline status
- Study folder sync: ✅ healthy (latest artifacts visible)
- Conflict artifacts: ✅ archived under `results/archive_conflicts_*`
- Clean rerun archive: ✅ `results/archive_before_clean_rerun_*`
## Artifact integrity
Active result files present:
- `doe_results.csv`
- `doe_summary.json`
- `doe_run.log`
- `history.csv`
- `history.db`
- `optuna_study.db`
## Process compliance
- Backend clarity rule: must always run with explicit `--backend`
- Documentation boundary rule: enforced
- Project-specific docs → `projects/...`
- Foundational standards → `docs/...`
- New standards created:
- `projects/hydrotech-beam/dashboard/MASTER_PLAN.md`
- `docs/guides/PKM_DASHBOARD_STANDARD.md`
- `docs/guides/DOCUMENTATION_BOUNDARIES.md`
## Current blockers
1. Phase gate blocked (insufficient feasible designs)
2. Need CEO decision on constraint path for next DOE/TPE sequence
## Next operational actions (owner)
1. **Manager:** keep dashboards refreshed after every run
2. **Tech Lead:** finalize recommended constraint staging
3. **Study Builder:** prep reproducible command set for next run
4. **Optimizer:** define TPE launch criteria + seed strategy
5. **Auditor:** enforce gate criteria and data-contract checks
## SLA targets (initial)
- Dashboard freshness: ≤ 1h after major run
- Run log compliance: ≥ 95%
- Decision backlog age: ≤ 48h

View File

@@ -0,0 +1,43 @@
# Hydrotech Beam — Technical Dashboard
Last updated (UTC): 2026-02-14T22:24:29
Source: `studies/01_doe_landscape/results/doe_results.csv`
## Study health
- Trials: 51
- Solved: 39
- Geo-infeasible: 12
- Solve failures: 0
- Full-feasible: 0
## Constraint status
- Displacement limit: **10.0 mm**
- Stress limit: **130.0 MPa**
Observed solved ranges:
- Tip displacement: **11.7788 → 39.4912 mm**
- Max von Mises stress: **75.0116 → 398.4295 MPa**
Feasibility counts:
- Displacement feasible: **0**
- Stress feasible: **23**
- Fully feasible: **0**
## Performance / runtime
- Solve time range (solved): **12.42 s → 59.59 s**
- Pattern indicates real NX execution (non-stub timing)
## Data quality checks
- Mass NaN (solved): **0**
- Penalty mass (99999): **12** (geo infeasible trials) ✅ expected
- Mixed appended run state: **cleared** (current clean 51-trial set)
## Technical interpretation
- Current geometry space + 10 mm displacement limit appears too restrictive.
- Stress limit is partially satisfiable (23/39), so the primary bottleneck is stiffness/displacement.
## Recommended technical next actions
1. Run a controlled DOE with displacement limit = 20 mm (exploration mode)
2. Identify near-feasible stiff regions
3. Launch TPE with penalty + staged tightening toward 10 mm
4. Re-run gate check with updated feasible counts

View File

@@ -1,48 +1,48 @@
# Knowledge Base History — Hydrotech Beam # Knowledge Base History — Hydrotech Beam
All modifications tracked by generation. All modifications tracked by generation.
--- ---
## Gen 002 — 2026-02-10 — KBS Session Processing ## Gen 002 — 2026-02-10 — KBS Session Processing
**Source:** 3 KBS capture sessions recorded by Antoine (20260210-132817, 20260210-161401, 20260210-163801) **Source:** 3 KBS capture sessions recorded by Antoine (20260210-132817, 20260210-161401, 20260210-163801)
**Author:** Technical Lead 🔧 **Author:** Technical Lead 🔧
**Protocol:** OP_09 → OP_10 Step 2 **Protocol:** OP_09 → OP_10 Step 2
**Updated:** **Updated:**
- `components/sandwich-beam.md` — confirmed geometry, all expression names, mass corrected to 11.33 kg (`p1`) - `components/sandwich-beam.md` — confirmed geometry, all expression names, mass corrected to 11.33 kg (`p1`)
- `materials/steel-aisi.md` — confirmed AISI 1005, density 7.3 g/cm³, future material expansion noted - `materials/steel-aisi.md` — confirmed AISI 1005, density 7.3 g/cm³, future material expansion noted
- `fea/models/sol101-static.md` — confirmed CQUAD4, 33.7 mm mesh, cantilever BCs, 10,000 kgf load - `fea/models/sol101-static.md` — confirmed CQUAD4, 33.7 mm mesh, cantilever BCs, 10,000 kgf load
- `_index.md` — generation 002, gap tracker updated (3 closed, 2 partial, 6 new) - `_index.md` — generation 002, gap tracker updated (3 closed, 2 partial, 6 new)
**Created:** **Created:**
- `dev/gen-002.md` — full generation document with KBS transcript analysis and mass discrepancy resolution - `dev/gen-002.md` — full generation document with KBS transcript analysis and mass discrepancy resolution
**Key findings:** **Key findings:**
- **Mass corrected:** 974 kg → 11.33 kg (expression `p1`, not `p173`) - **Mass corrected:** 974 kg → 11.33 kg (expression `p1`, not `p173`)
- **Cantilever confirmed:** Left side fixed, right side loaded (10,000 kgf downward) - **Cantilever confirmed:** Left side fixed, right side loaded (10,000 kgf downward)
- **Beam length confirmed:** 5,000 mm - **Beam length confirmed:** 5,000 mm
- **Mesh confirmed:** CQUAD4 thin shell, 33.7 mm elements - **Mesh confirmed:** CQUAD4 thin shell, 33.7 mm elements
- **Material confirmed:** AISI Steel 1005, density 7.3 g/cm³ - **Material confirmed:** AISI Steel 1005, density 7.3 g/cm³
- **3 gaps closed** (G1, G2, G8), **6 new gaps identified** (G10G15) - **3 gaps closed** (G1, G2, G8), **6 new gaps identified** (G10G15)
- **Antoine's directive:** "Please optimize" — considers model ready - **Antoine's directive:** "Please optimize" — considers model ready
--- ---
## Gen 001 — 2026-02-09 — Initial KB ## Gen 001 — 2026-02-09 — Initial KB
**Source:** Project intake (CONTEXT.md) + Technical Lead breakdown (BREAKDOWN.md) **Source:** Project intake (CONTEXT.md) + Technical Lead breakdown (BREAKDOWN.md)
**Author:** Manager 🎯 **Author:** Manager 🎯
**Created:** **Created:**
- `components/sandwich-beam.md` — initial component file from intake data - `components/sandwich-beam.md` — initial component file from intake data
- `materials/steel-aisi.md` — material placeholder - `materials/steel-aisi.md` — material placeholder
- `fea/models/sol101-static.md` — FEA model placeholder from breakdown - `fea/models/sol101-static.md` — FEA model placeholder from breakdown
- `dev/gen-001.md` — generation document - `dev/gen-001.md` — generation document
**Key findings from breakdown:** **Key findings from breakdown:**
- Baseline FAILS displacement constraint (22 mm vs 10 mm limit) - Baseline FAILS displacement constraint (22 mm vs 10 mm limit)
- Feasible region may be narrow — stiffness and mass compete - Feasible region may be narrow — stiffness and mass compete
- Sandwich effect (core thickness) is the primary stiffness lever - Sandwich effect (core thickness) is the primary stiffness lever
- 9 gaps identified requiring CEO input before proceeding - 9 gaps identified requiring CEO input before proceeding

View File

@@ -1,22 +1,22 @@
# Knowledge Base History — Hydrotech Beam # Knowledge Base History — Hydrotech Beam
All modifications tracked by generation. All modifications tracked by generation.
--- ---
## Gen 001 — 2026-02-09 — Initial KB ## Gen 001 — 2026-02-09 — Initial KB
**Source:** Project intake (CONTEXT.md) + Technical Lead breakdown (BREAKDOWN.md) **Source:** Project intake (CONTEXT.md) + Technical Lead breakdown (BREAKDOWN.md)
**Author:** Manager 🎯 **Author:** Manager 🎯
**Created:** **Created:**
- `components/sandwich-beam.md` — initial component file from intake data - `components/sandwich-beam.md` — initial component file from intake data
- `materials/steel-aisi.md` — material placeholder - `materials/steel-aisi.md` — material placeholder
- `fea/models/sol101-static.md` — FEA model placeholder from breakdown - `fea/models/sol101-static.md` — FEA model placeholder from breakdown
- `dev/gen-001.md` — generation document - `dev/gen-001.md` — generation document
**Key findings from breakdown:** **Key findings from breakdown:**
- Baseline FAILS displacement constraint (22 mm vs 10 mm limit) - Baseline FAILS displacement constraint (22 mm vs 10 mm limit)
- Feasible region may be narrow — stiffness and mass compete - Feasible region may be narrow — stiffness and mass compete
- Sandwich effect (core thickness) is the primary stiffness lever - Sandwich effect (core thickness) is the primary stiffness lever
- 9 gaps identified requiring CEO input before proceeding - 9 gaps identified requiring CEO input before proceeding

View File

@@ -0,0 +1,48 @@
# Knowledge Base History — Hydrotech Beam
All modifications tracked by generation.
---
## Gen 002 — 2026-02-10 — KBS Session Processing
**Source:** 3 KBS capture sessions recorded by Antoine (20260210-132817, 20260210-161401, 20260210-163801)
**Author:** Technical Lead 🔧
**Protocol:** OP_09 → OP_10 Step 2
**Updated:**
- `components/sandwich-beam.md` — confirmed geometry, all expression names, mass corrected to 11.33 kg (`p1`)
- `materials/steel-aisi.md` — confirmed AISI 1005, density 7.3 g/cm³, future material expansion noted
- `fea/models/sol101-static.md` — confirmed CQUAD4, 33.7 mm mesh, cantilever BCs, 10,000 kgf load
- `_index.md` — generation 002, gap tracker updated (3 closed, 2 partial, 6 new)
**Created:**
- `dev/gen-002.md` — full generation document with KBS transcript analysis and mass discrepancy resolution
**Key findings:**
- **Mass corrected:** 974 kg → 11.33 kg (expression `p1`, not `p173`)
- **Cantilever confirmed:** Left side fixed, right side loaded (10,000 kgf downward)
- **Beam length confirmed:** 5,000 mm
- **Mesh confirmed:** CQUAD4 thin shell, 33.7 mm elements
- **Material confirmed:** AISI Steel 1005, density 7.3 g/cm³
- **3 gaps closed** (G1, G2, G8), **6 new gaps identified** (G10G15)
- **Antoine's directive:** "Please optimize" — considers model ready
---
## Gen 001 — 2026-02-09 — Initial KB
**Source:** Project intake (CONTEXT.md) + Technical Lead breakdown (BREAKDOWN.md)
**Author:** Manager 🎯
**Created:**
- `components/sandwich-beam.md` — initial component file from intake data
- `materials/steel-aisi.md` — material placeholder
- `fea/models/sol101-static.md` — FEA model placeholder from breakdown
- `dev/gen-001.md` — generation document
**Key findings from breakdown:**
- Baseline FAILS displacement constraint (22 mm vs 10 mm limit)
- Feasible region may be narrow — stiffness and mass compete
- Sandwich effect (core thickness) is the primary stiffness lever
- 9 gaps identified requiring CEO input before proceeding

View File

@@ -1,91 +1,91 @@
# Knowledge Base — Hydrotech Beam # Knowledge Base — Hydrotech Beam
**Project:** Hydrotech Beam Structural Optimization **Project:** Hydrotech Beam Structural Optimization
**Generation:** 003 **Generation:** 003
**Last updated:** 2026-02-11 **Last updated:** 2026-02-11
--- ---
## Overview ## Overview
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. 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 003):** **Key confirmed parameters (Gen 003):**
- Beam length: 5,000 mm (`beam_lenght` ⚠️ typo in NX), cantilever — left fixed, right loaded - Beam length: 5,000 mm (`beam_lenght` ⚠️ typo in NX), cantilever — left fixed, right loaded
- Load: 10,000 kgf downward at free end - Load: 10,000 kgf downward at free end
- Baseline mass: **1,133.01 kg** (expression `p173: body_property147.mass`) - 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 - DV baselines: face=21.504mm, core=25.162mm, holes_dia=300mm, hole_count=10
- Material: AISI Steel 1005 (density 7.3 g/cm³) - Material: AISI Steel 1005 (density 7.3 g/cm³)
- Mesh: CQUAD4 thin shell, 33.7 mm element size - Mesh: CQUAD4 thin shell, 33.7 mm element size
- **Solver:** DesigncenterNX 2512 (NX Nastran SOL 101) - **Solver:** DesigncenterNX 2512 (NX Nastran SOL 101)
- **First results (2026-02-11):** Displacement=17.93mm, Stress=111.9MPa, Solve time ~12s/trial - **First results (2026-02-11):** Displacement=17.93mm, Stress=111.9MPa, Solve time ~12s/trial
## Components ## Components
| Component | File | Status | | Component | File | Status |
|-----------|------|--------| |-----------|------|--------|
| Sandwich Beam | [sandwich-beam.md](components/sandwich-beam.md) | ✅ Updated Gen 002 | | Sandwich Beam | [sandwich-beam.md](components/sandwich-beam.md) | ✅ Updated Gen 002 |
## Materials ## Materials
| Material | File | Status | | Material | File | Status |
|----------|------|--------| |----------|------|--------|
| Steel AISI 1005 | [steel-aisi.md](materials/steel-aisi.md) | ✅ Updated Gen 002 | | Steel AISI 1005 | [steel-aisi.md](materials/steel-aisi.md) | ✅ Updated Gen 002 |
## FEA ## FEA
| Model | File | Status | | Model | File | Status |
|-------|------|--------| |-------|------|--------|
| Static Analysis (SOL 101) | [fea/models/sol101-static.md](fea/models/sol101-static.md) | ✅ Updated Gen 003 — Solver running, first results obtained | | Static Analysis (SOL 101) | [fea/models/sol101-static.md](fea/models/sol101-static.md) | ✅ Updated Gen 003 — Solver running, first results obtained |
## Generations ## Generations
| Gen | Date | Summary | | Gen | Date | Summary |
|-----|------|---------| |-----|------|---------|
| 001 | 2026-02-09 | Initial KB from intake + technical breakdown | | 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** | | **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 ## Gap Tracker
### ✅ CLOSED ### ✅ CLOSED
| # | Item | Resolution | Closed In | | # | Item | Resolution | Closed In |
|---|------|------------|-----------| |---|------|------------|-----------|
| G1 | Beam length and support conditions | 5,000 mm cantilever (left fixed, right free) | Gen 002 | | G1 | Beam length and support conditions | 5,000 mm cantilever (left fixed, right free) | Gen 002 |
| G2 | Loading definition | 10,000 kgf point load, downward (Y), at free end | Gen 002 | | G2 | Loading definition | 10,000 kgf point load, downward (Y), at free end | Gen 002 |
| G8 | Mesh type and density | CQUAD4 thin shell, 33.7 mm element size (67.4/2) | Gen 002 | | G8 | Mesh type and density | CQUAD4 thin shell, 33.7 mm element size (67.4/2) | Gen 002 |
### 🟡 PARTIALLY RESOLVED ### 🟡 PARTIALLY RESOLVED
| # | Item | Known | Remaining | | # | Item | Known | Remaining |
|---|------|-------|-----------| |---|------|-------|-----------|
| 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. | | 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. | | 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 ### ❓ STILL OPEN
| # | Item | Why It Matters | Priority | | # | Item | Why It Matters | Priority |
|---|------|---------------|----------| |---|------|---------------|----------|
| G7 | NX parametric rebuild reliability | Untested across full DV range — need corner-case testing | 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 | | G15 | `p6` (hole_span) as potential DV | Antoine suggested it could be optimized. Decision needed. | Medium |
### ✅ CLOSED (Gen 003 — 2026-02-11) ### ✅ CLOSED (Gen 003 — 2026-02-11)
| # | Item | Resolution | Closed In | | # | Item | Resolution | Closed In |
|---|------|------------|-----------| |---|------|------------|-----------|
| G3 | Displacement measurement location | Max Tz at free end, extracted via pyNastran OP2 | Gen 003 | | 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 | | 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 | | 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 | | G10 | Baseline displacement | 17.93 mm at baseline-ish DVs | Gen 003 |
| G11 | Baseline stress | 111.9 MPa 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+ | | 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+ | | 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+ | | G14 | Hole diameter expression name | `holes_diameter` — confirmed via binary introspection | Gen 002+ |
## Open Tasks ## Open Tasks
1. **Run full 51-trial DOE** — solver pipeline operational, execute Phase 1 1. **Run full 51-trial DOE** — solver pipeline operational, execute Phase 1
2. **Corner-case testing** — verify NX rebuild at DV extremes (G7) 2. **Corner-case testing** — verify NX rebuild at DV extremes (G7)
3. **Decision on `p6` as DV** — consult Manager/CEO (G15) 3. **Decision on `p6` as DV** — consult Manager/CEO (G15)
4. **Phase 1 → Phase 2 gate review** — after DOE completes, assess feasibility landscape 4. **Phase 1 → Phase 2 gate review** — after DOE completes, assess feasibility landscape

View File

@@ -1,47 +1,47 @@
# Knowledge Base — Hydrotech Beam # Knowledge Base — Hydrotech Beam
**Project:** Hydrotech Beam Structural Optimization **Project:** Hydrotech Beam Structural Optimization
**Generation:** 001 **Generation:** 001
**Last updated:** 2026-02-09 **Last updated:** 2026-02-09
--- ---
## Overview ## Overview
Sandwich I-beam optimization for a test fixture. Steel construction with lightening holes in the web. Goal: reduce mass from ~974 kg while meeting displacement (≤ 10 mm) and stress (≤ 130 MPa) constraints. Sandwich I-beam optimization for a test fixture. Steel construction with lightening holes in the web. Goal: reduce mass from ~974 kg while meeting displacement (≤ 10 mm) and stress (≤ 130 MPa) constraints.
## Components ## Components
| Component | File | Status | | Component | File | Status |
|-----------|------|--------| |-----------|------|--------|
| Sandwich Beam | [sandwich-beam.md](components/sandwich-beam.md) | Initial | | Sandwich Beam | [sandwich-beam.md](components/sandwich-beam.md) | Initial |
## Materials ## Materials
| Material | File | Status | | Material | File | Status |
|----------|------|--------| |----------|------|--------|
| Steel (AISI) | [steel-aisi.md](materials/steel-aisi.md) | Initial | | Steel (AISI) | [steel-aisi.md](materials/steel-aisi.md) | Initial |
## FEA ## FEA
| Model | File | Status | | Model | File | Status |
|-------|------|--------| |-------|------|--------|
| Static Analysis (SOL 101) | [fea/models/sol101-static.md](fea/models/sol101-static.md) | Pending gap resolution | | Static Analysis (SOL 101) | [fea/models/sol101-static.md](fea/models/sol101-static.md) | Pending gap resolution |
## Generations ## Generations
| Gen | Date | Summary | | Gen | Date | Summary |
|-----|------|---------| |-----|------|---------|
| 001 | 2026-02-09 | Initial KB from intake + technical breakdown | | 001 | 2026-02-09 | Initial KB from intake + technical breakdown |
## Open Tasks ## Open Tasks
- ❓ G1: Beam length and support conditions - ❓ G1: Beam length and support conditions
- ❓ G2: Loading definition (point? distributed? self-weight?) - ❓ G2: Loading definition (point? distributed? self-weight?)
- ❓ G3: Displacement measurement location and DOF - ❓ G3: Displacement measurement location and DOF
- ❓ G4: Stress constraint scope (whole model? exclude supports?) - ❓ G4: Stress constraint scope (whole model? exclude supports?)
- ❓ G5: Geometric feasibility of hole patterns at extremes - ❓ G5: Geometric feasibility of hole patterns at extremes
- ❓ G6: Result sensors in Beam_sim1.sim - ❓ G6: Result sensors in Beam_sim1.sim
- ❓ G7: NX parametric rebuild reliability across full range - ❓ G7: NX parametric rebuild reliability across full range
- ❓ G8: Mesh type, density, convergence status - ❓ G8: Mesh type, density, convergence status
- ❓ G9: 130 MPa stress limit basis (yield? safety factor?) - ❓ G9: 130 MPa stress limit basis (yield? safety factor?)

View File

@@ -0,0 +1,91 @@
# Knowledge Base — Hydrotech Beam
**Project:** Hydrotech Beam Structural Optimization
**Generation:** 003
**Last updated:** 2026-02-11
---
## Overview
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 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
| Component | File | Status |
|-----------|------|--------|
| Sandwich Beam | [sandwich-beam.md](components/sandwich-beam.md) | ✅ Updated Gen 002 |
## Materials
| Material | File | Status |
|----------|------|--------|
| Steel AISI 1005 | [steel-aisi.md](materials/steel-aisi.md) | ✅ Updated Gen 002 |
## FEA
| Model | File | Status |
|-------|------|--------|
| Static Analysis (SOL 101) | [fea/models/sol101-static.md](fea/models/sol101-static.md) | ✅ Updated Gen 003 — Solver 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 |
| **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
### ✅ CLOSED
| # | Item | Resolution | Closed In |
|---|------|------------|-----------|
| G1 | Beam length and support conditions | 5,000 mm cantilever (left fixed, right free) | Gen 002 |
| G2 | Loading definition | 10,000 kgf point load, downward (Y), at free end | Gen 002 |
| G8 | Mesh type and density | CQUAD4 thin shell, 33.7 mm element size (67.4/2) | Gen 002 |
### 🟡 PARTIALLY RESOLVED
| # | Item | Known | Remaining |
|---|------|-------|-----------|
| 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
| # | Item | Why It Matters | Priority |
|---|------|---------------|----------|
| 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 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

@@ -1,76 +1,76 @@
# Sandwich Beam # Sandwich Beam
**Type:** Primary structural component **Type:** Primary structural component
**Material:** Steel (AISI 1005) — see [steel-aisi.md](../materials/steel-aisi.md) **Material:** Steel (AISI 1005) — see [steel-aisi.md](../materials/steel-aisi.md)
**Status:** Confirmed from KBS session (Gen 002) **Status:** Confirmed from KBS session (Gen 002)
--- ---
## Description ## Description
Sandwich I-beam serving as primary load-bearing member in a test fixture assembly. Cross-section features a core layer flanked by face sheets on top and bottom flanges. Web contains a pattern of lightening holes (circular cutouts) to reduce mass. Beam is extruded from an I-beam sketch profile. Sandwich I-beam serving as primary load-bearing member in a test fixture assembly. Cross-section features a core layer flanked by face sheets on top and bottom flanges. Web contains a pattern of lightening holes (circular cutouts) to reduce mass. Beam is extruded from an I-beam sketch profile.
## Geometry — NX Expressions ## Geometry — NX Expressions
| Parameter | NX Expression | Baseline Value | Units | DV? | Range | Notes | | Parameter | NX Expression | Baseline Value | Units | DV? | Range | Notes |
|-----------|--------------|----------------|-------|-----|-------|-------| |-----------|--------------|----------------|-------|-----|-------|-------|
| Beam half-height | `beam_half_height` | ❓ TBD (Gap G12) | mm | No (currently) | — | Half total I-beam height | | Beam half-height | `beam_half_height` | ❓ TBD (Gap G12) | mm | No (currently) | — | Half total I-beam height |
| Beam half-width | `beam_half_width` | ❓ TBD (Gap G13) | mm | No (currently) | — | Half flange width | | Beam half-width | `beam_half_width` | ❓ TBD (Gap G13) | mm | No (currently) | — | Half flange width |
| Face thickness | `beam_face_thickness` | 20 | mm | **Yes (DV2)** | 1040 | Flange thickness | | Face thickness | `beam_face_thickness` | 20 | mm | **Yes (DV2)** | 1040 | Flange thickness |
| Core half-thickness | `beam_half_core_thickness` | 20 | mm | **Yes (DV1)** | 1040 | Half web height | | Core half-thickness | `beam_half_core_thickness` | 20 | mm | **Yes (DV1)** | 1040 | Half web height |
| Beam length | `beam_length` | 5,000 | mm | No | Fixed | ✅ Confirmed (KBS) | | Beam length | `beam_length` | 5,000 | mm | No | Fixed | ✅ Confirmed (KBS) |
| Hole count | `hole_count` | 10 | — | **Yes (DV4)** | 515 (integer) | ✅ Confirmed (KBS) | | Hole count | `hole_count` | 10 | — | **Yes (DV4)** | 515 (integer) | ✅ Confirmed (KBS) |
| Hole diameter | ❓ (Gap G14) | 300 | mm | **Yes (DV3)** | 150450 | ✅ Confirmed (KBS) | | Hole diameter | ❓ (Gap G14) | 300 | mm | **Yes (DV3)** | 150450 | ✅ Confirmed (KBS) |
| Hole span | `p6` | 4,000 | mm | Potential (G15) | TBD | ✅ Confirmed (KBS) — total span for hole distribution | | Hole span | `p6` | 4,000 | mm | Potential (G15) | TBD | ✅ Confirmed (KBS) — total span for hole distribution |
| Hole start offset | (fixed) | 500 | mm | No | Fixed | Requirement — not parametric | | Hole start offset | (fixed) | 500 | mm | No | Fixed | Requirement — not parametric |
| Hole end offset | (fixed) | 500 | mm | No | Fixed | Requirement — not parametric | | Hole end offset | (fixed) | 500 | mm | No | Fixed | Requirement — not parametric |
## Mass ## Mass
| Parameter | NX Expression | Value | Units | Source | | Parameter | NX Expression | Value | Units | Source |
|-----------|--------------|-------|-------|--------| |-----------|--------------|-------|-------|--------|
| Mass (baseline) | **`p1`** | **11.33** | kg | ✅ KBS session 20260210-163801 | | Mass (baseline) | **`p1`** | **11.33** | kg | ✅ KBS session 20260210-163801 |
| Density | (material card) | 7.3 | g/cm³ | ✅ KBS session — Antoine stated directly | | Density | (material card) | 7.3 | g/cm³ | ✅ KBS session — Antoine stated directly |
> ⚠️ **Previous value of ~974 kg (expression `p173`) is superseded.** See Gen 002 mass discrepancy resolution. > ⚠️ **Previous value of ~974 kg (expression `p173`) is superseded.** See Gen 002 mass discrepancy resolution.
## Construction Method ## Construction Method
1. **Sketch:** I-beam cross-section profile with 4 key expressions (`beam_half_height`, `beam_half_width`, `beam_face_thickness`, `beam_half_core_thickness`) 1. **Sketch:** I-beam cross-section profile with 4 key expressions (`beam_half_height`, `beam_half_width`, `beam_face_thickness`, `beam_half_core_thickness`)
2. **Extrusion:** Sketch extruded to `beam_length` (5,000 mm) → solid body 2. **Extrusion:** Sketch extruded to `beam_length` (5,000 mm) → solid body
3. **Holes:** `hole_count` circular holes of specified diameter, distributed over `p6` span (4,000 mm), centered in web, starting 500 mm from each end 3. **Holes:** `hole_count` circular holes of specified diameter, distributed over `p6` span (4,000 mm), centered in web, starting 500 mm from each end
4. **Idealization:** Promote body → mid-surface extraction (pair mid-surface function) → thin shell sheet bodies 4. **Idealization:** Promote body → mid-surface extraction (pair mid-surface function) → thin shell sheet bodies
## Hole Geometry Constraints ## Hole Geometry Constraints
- **Span:** Holes are distributed over 4,000 mm (expression `p6`) - **Span:** Holes are distributed over 4,000 mm (expression `p6`)
- **Fixed offsets:** First hole center at ≥500 mm from beam start, last hole center at ≤4,500 mm from beam start - **Fixed offsets:** First hole center at ≥500 mm from beam start, last hole center at ≤4,500 mm from beam start
- **Spacing:** At baseline: 10 holes in 4,000 mm → ~444 mm center-to-center, 300 mm diameter → ~144 mm ligament - **Spacing:** At baseline: 10 holes in 4,000 mm → ~444 mm center-to-center, 300 mm diameter → ~144 mm ligament
- **Collision risk:** At extremes (15 holes × 450 mm dia in 4,000 mm): spacing = 267 mm, ligament = 183 mm → **HOLES OVERLAP** → infeasible - **Collision risk:** At extremes (15 holes × 450 mm dia in 4,000 mm): spacing = 267 mm, ligament = 183 mm → **HOLES OVERLAP** → infeasible
- **Feasibility formula:** `ligament = (hole_span / (hole_count - 1)) - hole_diameter > 0` - **Feasibility formula:** `ligament = (hole_span / (hole_count - 1)) - hole_diameter > 0`
- Must also check: `hole_diameter < web_height` (hole fits in web vertically) - Must also check: `hole_diameter < web_height` (hole fits in web vertically)
## Structural Behavior ## Structural Behavior
*From Technical Breakdown (Gen 001), confirmed by KBS session:* *From Technical Breakdown (Gen 001), confirmed by KBS session:*
The beam is a **cantilever** (left side fixed, right side free with 10,000 kgf downward load). It is **bending-dominated**: The beam is a **cantilever** (left side fixed, right side free with 10,000 kgf downward load). It is **bending-dominated**:
| Behavior | Governing Parameters | Notes | | Behavior | Governing Parameters | Notes |
|----------|---------------------|-------| |----------|---------------------|-------|
| Bending stiffness (EI) | Face thickness, core thickness | Faces carry bending stress, core carries shear. Stiffness scales ~quadratically with distance from neutral axis | | Bending stiffness (EI) | Face thickness, core thickness | Faces carry bending stress, core carries shear. Stiffness scales ~quadratically with distance from neutral axis |
| Mass | All four variables | Core and face add material; holes remove material from web | | Mass | All four variables | Core and face add material; holes remove material from web |
| Stress concentrations | Hole diameter, hole spacing | Larger holes → higher SCF at edges. Closely spaced holes can interact | | Stress concentrations | Hole diameter, hole spacing | Larger holes → higher SCF at edges. Closely spaced holes can interact |
| Shear capacity | Core thickness, hole count, diameter | Holes reduce shear-carrying area | | Shear capacity | Core thickness, hole count, diameter | Holes reduce shear-carrying area |
## Design Variable Interactions ## Design Variable Interactions
1. **Core × Face** — classic sandwich interaction. Optimal stiffness balances core depth (lever arm) vs face material (bending resistance) 1. **Core × Face** — classic sandwich interaction. Optimal stiffness balances core depth (lever arm) vs face material (bending resistance)
2. **Hole diameter × Hole count** — both remove web material. Large + many could leave insufficient ligament width 2. **Hole diameter × Hole count** — both remove web material. Large + many could leave insufficient ligament width
3. **Face × Hole diameter** — thicker faces reduce nominal stress, allowing larger holes 3. **Face × Hole diameter** — thicker faces reduce nominal stress, allowing larger holes
4. **Core × Hole diameter** — core thickness determines web height, constrains max feasible hole diameter 4. **Core × Hole diameter** — core thickness determines web height, constrains max feasible hole diameter
## History ## History
- **Gen 001** (2026-02-09): Initial documentation from intake + technical breakdown - **Gen 001** (2026-02-09): Initial documentation from intake + technical breakdown
- **Gen 002** (2026-02-10): Updated with confirmed values from KBS sessions. Mass corrected from 974 kg → 11.33 kg. Beam length confirmed 5,000 mm. Hole parameters detailed. Expression names confirmed. - **Gen 002** (2026-02-10): Updated with confirmed values from KBS sessions. Mass corrected from 974 kg → 11.33 kg. Beam length confirmed 5,000 mm. Hole parameters detailed. Expression names confirmed.

View File

@@ -1,52 +1,52 @@
# Sandwich Beam # Sandwich Beam
**Type:** Primary structural component **Type:** Primary structural component
**Material:** Steel (AISI) — see [steel-aisi.md](../materials/steel-aisi.md) **Material:** Steel (AISI) — see [steel-aisi.md](../materials/steel-aisi.md)
**Status:** Baseline documented, optimization pending **Status:** Baseline documented, optimization pending
--- ---
## Description ## Description
Sandwich I-beam serving as primary load-bearing member in a test fixture assembly. Cross-section features a core layer flanked by face sheets on top and bottom flanges. Web contains a pattern of lightening holes (circular cutouts) to reduce mass. Sandwich I-beam serving as primary load-bearing member in a test fixture assembly. Cross-section features a core layer flanked by face sheets on top and bottom flanges. Web contains a pattern of lightening holes (circular cutouts) to reduce mass.
## Specifications ## Specifications
| Parameter | Value | Units | Source | | Parameter | Value | Units | Source |
|-----------|-------|-------|--------| |-----------|-------|-------|--------|
| Mass (baseline) | ~974 | kg | NX expression `p173` | | Mass (baseline) | ~974 | kg | NX expression `p173` |
| Tip displacement (baseline) | ~22 | mm | SOL 101 result | | Tip displacement (baseline) | ~22 | mm | SOL 101 result |
| Half-core thickness | 20 (baseline) | mm | DV range: 1040 | | Half-core thickness | 20 (baseline) | mm | DV range: 1040 |
| Face thickness | 20 (baseline) | mm | DV range: 1040 | | Face thickness | 20 (baseline) | mm | DV range: 1040 |
| Hole diameter | 300 (baseline) | mm | DV range: 150450 | | Hole diameter | 300 (baseline) | mm | DV range: 150450 |
| Hole count | 10 (baseline) | — | DV range: 515 (integer) | | Hole count | 10 (baseline) | — | DV range: 515 (integer) |
| Beam length | ❓ TBD | mm | Gap G1 | | Beam length | ❓ TBD | mm | Gap G1 |
| Support conditions | ❓ TBD | — | Gap G1 | | Support conditions | ❓ TBD | — | Gap G1 |
## Structural Behavior ## Structural Behavior
*From Technical Breakdown (Gen 001):* *From Technical Breakdown (Gen 001):*
The beam is **bending-dominated**: The beam is **bending-dominated**:
| Behavior | Governing Parameters | Notes | | Behavior | Governing Parameters | Notes |
|----------|---------------------|-------| |----------|---------------------|-------|
| Bending stiffness (EI) | Face thickness, core thickness | Faces carry bending stress, core carries shear. Stiffness scales ~quadratically with distance from neutral axis | | Bending stiffness (EI) | Face thickness, core thickness | Faces carry bending stress, core carries shear. Stiffness scales ~quadratically with distance from neutral axis |
| Mass | All four variables | Core and face add material; holes remove material from web | | Mass | All four variables | Core and face add material; holes remove material from web |
| Stress concentrations | Hole diameter, hole spacing | Larger holes → higher SCF at edges. Closely spaced holes can interact | | Stress concentrations | Hole diameter, hole spacing | Larger holes → higher SCF at edges. Closely spaced holes can interact |
| Shear capacity | Core thickness, hole count, diameter | Holes reduce shear-carrying area | | Shear capacity | Core thickness, hole count, diameter | Holes reduce shear-carrying area |
## Design Variable Interactions ## Design Variable Interactions
1. **Core × Face** — classic sandwich interaction. Optimal stiffness balances core depth (lever arm) vs face material (bending resistance) 1. **Core × Face** — classic sandwich interaction. Optimal stiffness balances core depth (lever arm) vs face material (bending resistance)
2. **Hole diameter × Hole count** — both remove web material. Large + many could leave insufficient ligament width 2. **Hole diameter × Hole count** — both remove web material. Large + many could leave insufficient ligament width
3. **Face × Hole diameter** — thicker faces reduce nominal stress, allowing larger holes 3. **Face × Hole diameter** — thicker faces reduce nominal stress, allowing larger holes
4. **Core × Hole diameter** — core thickness determines web height, constrains max feasible hole diameter 4. **Core × Hole diameter** — core thickness determines web height, constrains max feasible hole diameter
## Key Risk ## Key Risk
> ⚠️ Baseline FAILS displacement constraint (22 mm vs 10 mm target). Optimizer must increase stiffness by >50% while reducing mass. Feasible region may be tight. > ⚠️ Baseline FAILS displacement constraint (22 mm vs 10 mm target). Optimizer must increase stiffness by >50% while reducing mass. Feasible region may be tight.
## History ## History
- **Gen 001** (2026-02-09): Initial documentation from intake + technical breakdown - **Gen 001** (2026-02-09): Initial documentation from intake + technical breakdown

View File

@@ -0,0 +1,76 @@
# Sandwich Beam
**Type:** Primary structural component
**Material:** Steel (AISI 1005) — see [steel-aisi.md](../materials/steel-aisi.md)
**Status:** Confirmed from KBS session (Gen 002)
---
## Description
Sandwich I-beam serving as primary load-bearing member in a test fixture assembly. Cross-section features a core layer flanked by face sheets on top and bottom flanges. Web contains a pattern of lightening holes (circular cutouts) to reduce mass. Beam is extruded from an I-beam sketch profile.
## Geometry — NX Expressions
| Parameter | NX Expression | Baseline Value | Units | DV? | Range | Notes |
|-----------|--------------|----------------|-------|-----|-------|-------|
| Beam half-height | `beam_half_height` | ❓ TBD (Gap G12) | mm | No (currently) | — | Half total I-beam height |
| Beam half-width | `beam_half_width` | ❓ TBD (Gap G13) | mm | No (currently) | — | Half flange width |
| Face thickness | `beam_face_thickness` | 20 | mm | **Yes (DV2)** | 1040 | Flange thickness |
| Core half-thickness | `beam_half_core_thickness` | 20 | mm | **Yes (DV1)** | 1040 | Half web height |
| Beam length | `beam_length` | 5,000 | mm | No | Fixed | ✅ Confirmed (KBS) |
| Hole count | `hole_count` | 10 | — | **Yes (DV4)** | 515 (integer) | ✅ Confirmed (KBS) |
| Hole diameter | ❓ (Gap G14) | 300 | mm | **Yes (DV3)** | 150450 | ✅ Confirmed (KBS) |
| Hole span | `p6` | 4,000 | mm | Potential (G15) | TBD | ✅ Confirmed (KBS) — total span for hole distribution |
| Hole start offset | (fixed) | 500 | mm | No | Fixed | Requirement — not parametric |
| Hole end offset | (fixed) | 500 | mm | No | Fixed | Requirement — not parametric |
## Mass
| Parameter | NX Expression | Value | Units | Source |
|-----------|--------------|-------|-------|--------|
| Mass (baseline) | **`p1`** | **11.33** | kg | ✅ KBS session 20260210-163801 |
| Density | (material card) | 7.3 | g/cm³ | ✅ KBS session — Antoine stated directly |
> ⚠️ **Previous value of ~974 kg (expression `p173`) is superseded.** See Gen 002 mass discrepancy resolution.
## Construction Method
1. **Sketch:** I-beam cross-section profile with 4 key expressions (`beam_half_height`, `beam_half_width`, `beam_face_thickness`, `beam_half_core_thickness`)
2. **Extrusion:** Sketch extruded to `beam_length` (5,000 mm) → solid body
3. **Holes:** `hole_count` circular holes of specified diameter, distributed over `p6` span (4,000 mm), centered in web, starting 500 mm from each end
4. **Idealization:** Promote body → mid-surface extraction (pair mid-surface function) → thin shell sheet bodies
## Hole Geometry Constraints
- **Span:** Holes are distributed over 4,000 mm (expression `p6`)
- **Fixed offsets:** First hole center at ≥500 mm from beam start, last hole center at ≤4,500 mm from beam start
- **Spacing:** At baseline: 10 holes in 4,000 mm → ~444 mm center-to-center, 300 mm diameter → ~144 mm ligament
- **Collision risk:** At extremes (15 holes × 450 mm dia in 4,000 mm): spacing = 267 mm, ligament = 183 mm → **HOLES OVERLAP** → infeasible
- **Feasibility formula:** `ligament = (hole_span / (hole_count - 1)) - hole_diameter > 0`
- Must also check: `hole_diameter < web_height` (hole fits in web vertically)
## Structural Behavior
*From Technical Breakdown (Gen 001), confirmed by KBS session:*
The beam is a **cantilever** (left side fixed, right side free with 10,000 kgf downward load). It is **bending-dominated**:
| Behavior | Governing Parameters | Notes |
|----------|---------------------|-------|
| Bending stiffness (EI) | Face thickness, core thickness | Faces carry bending stress, core carries shear. Stiffness scales ~quadratically with distance from neutral axis |
| Mass | All four variables | Core and face add material; holes remove material from web |
| Stress concentrations | Hole diameter, hole spacing | Larger holes → higher SCF at edges. Closely spaced holes can interact |
| Shear capacity | Core thickness, hole count, diameter | Holes reduce shear-carrying area |
## Design Variable Interactions
1. **Core × Face** — classic sandwich interaction. Optimal stiffness balances core depth (lever arm) vs face material (bending resistance)
2. **Hole diameter × Hole count** — both remove web material. Large + many could leave insufficient ligament width
3. **Face × Hole diameter** — thicker faces reduce nominal stress, allowing larger holes
4. **Core × Hole diameter** — core thickness determines web height, constrains max feasible hole diameter
## History
- **Gen 001** (2026-02-09): Initial documentation from intake + technical breakdown
- **Gen 002** (2026-02-10): Updated with confirmed values from KBS sessions. Mass corrected from 974 kg → 11.33 kg. Beam length confirmed 5,000 mm. Hole parameters detailed. Expression names confirmed.

View File

@@ -1,58 +1,58 @@
# Gen 001 — Project Intake + Technical Breakdown # Gen 001 — Project Intake + Technical Breakdown
**Date:** 2026-02-09 **Date:** 2026-02-09
**Sources:** CEO intake in #project-hydrotech-beam, Technical Lead analysis **Sources:** CEO intake in #project-hydrotech-beam, Technical Lead analysis
**Author:** Manager 🎯 **Author:** Manager 🎯
--- ---
## What Happened ## What Happened
1. Antoine submitted the Hydrotech beam optimization request via #project-hydrotech-beam 1. Antoine submitted the Hydrotech beam optimization request via #project-hydrotech-beam
2. Manager created project folder and CONTEXT.md from intake data 2. Manager created project folder and CONTEXT.md from intake data
3. Technical Lead produced a full technical breakdown (BREAKDOWN.md) 3. Technical Lead produced a full technical breakdown (BREAKDOWN.md)
4. Manager and CEO agreed on project structure (KB-integrated layout) 4. Manager and CEO agreed on project structure (KB-integrated layout)
## Key Findings ## Key Findings
### From Intake ### From Intake
- Sandwich I-beam, steel, with lightening holes in web - Sandwich I-beam, steel, with lightening holes in web
- 4 design variables (3 continuous + 1 integer) - 4 design variables (3 continuous + 1 integer)
- Current design: ~974 kg, ~22 mm tip displacement - Current design: ~974 kg, ~22 mm tip displacement
- Targets: minimize mass, displacement ≤ 10 mm, stress ≤ 130 MPa - Targets: minimize mass, displacement ≤ 10 mm, stress ≤ 130 MPa
### From Technical Breakdown ### From Technical Breakdown
- **Critical:** Baseline already violates displacement constraint (22 mm vs 10 mm) - **Critical:** Baseline already violates displacement constraint (22 mm vs 10 mm)
- Single-objective formulation recommended (minimize mass, constrain the rest) - Single-objective formulation recommended (minimize mass, constrain the rest)
- Two-phase approach: DoE (4050 trials) then TPE (60100 trials) - Two-phase approach: DoE (4050 trials) then TPE (60100 trials)
- Significant variable interactions expected (sandwich theory, hole interactions) - Significant variable interactions expected (sandwich theory, hole interactions)
- 9 gaps identified needing CEO input - 9 gaps identified needing CEO input
- Overall risk: MEDIUM-HIGH (feasible region may be tight or empty) - Overall risk: MEDIUM-HIGH (feasible region may be tight or empty)
## KB Entries Created ## KB Entries Created
- `components/sandwich-beam.md` — component file with specs, behavior, interactions - `components/sandwich-beam.md` — component file with specs, behavior, interactions
- `materials/steel-aisi.md` — placeholder, needs NX model data - `materials/steel-aisi.md` — placeholder, needs NX model data
- `fea/models/sol101-static.md` — solver setup, pending gap resolution - `fea/models/sol101-static.md` — solver setup, pending gap resolution
## Decisions Made ## Decisions Made
- DEC-HB-004: KB-integrated project structure (Approved) - DEC-HB-004: KB-integrated project structure (Approved)
- DEC-HB-005: No Notion, Gitea + .md only (Approved) - DEC-HB-005: No Notion, Gitea + .md only (Approved)
- DEC-HB-006: KB skill extension pattern, no fork (Approved) - DEC-HB-006: KB skill extension pattern, no fork (Approved)
## Open Items ## Open Items
9 gaps pending CEO input (see [_index.md](../_index.md)): 9 gaps pending CEO input (see [_index.md](../_index.md)):
- G1G2: Geometry and loading (most critical) - G1G2: Geometry and loading (most critical)
- G3G4: Result extraction specifics - G3G4: Result extraction specifics
- G5: Geometric feasibility at extremes - G5: Geometric feasibility at extremes
- G6G8: NX model details - G6G8: NX model details
- G9: Stress allowable basis - G9: Stress allowable basis
## Next Steps ## Next Steps
1. Resolve gaps G1G9 with Antoine 1. Resolve gaps G1G9 with Antoine
2. Upload reference models to `models/` 2. Upload reference models to `models/`
3. Begin NX model introspection 3. Begin NX model introspection
4. Set up first study (DoE) 4. Set up first study (DoE)

View File

@@ -1,206 +1,206 @@
# Gen 002 — KBS Session Processing # Gen 002 — KBS Session Processing
**Date:** 2026-02-10 **Date:** 2026-02-10
**Sources:** 3 KBS capture sessions recorded by Antoine **Sources:** 3 KBS capture sessions recorded by Antoine
**Author:** Technical Lead 🔧 **Author:** Technical Lead 🔧
**Protocol:** OP_09 → OP_10 Step 2 (Technical Breakdown Update) **Protocol:** OP_09 → OP_10 Step 2 (Technical Breakdown Update)
--- ---
## What Happened ## What Happened
Antoine recorded 3 Knowledge Base Capture (KBS) sessions for the Hydrotech Beam project, walking through the complete NX model in detail. This is the first time we have direct, confirmed model parameters from the CEO's live NX walkthrough. Antoine recorded 3 Knowledge Base Capture (KBS) sessions for the Hydrotech Beam project, walking through the complete NX model in detail. This is the first time we have direct, confirmed model parameters from the CEO's live NX walkthrough.
### Sessions Processed ### Sessions Processed
| Session ID | Type | Duration | Content | | Session ID | Type | Duration | Content |
|-----------|------|----------|---------| |-----------|------|----------|---------|
| `20260210-132817` | Analysis | 6s | No transcript — too short (aborted session) | | `20260210-132817` | Analysis | 6s | No transcript — too short (aborted session) |
| `20260210-161401` | Design | 38s | Brief overview: beam with holes, discretized, one side fixed, other side force in Y-direction | | `20260210-161401` | Design | 38s | Brief overview: beam with holes, discretized, one side fixed, other side force in Y-direction |
| `20260210-163801` | Design | 414s (~7 min) | **Full model walkthrough** — geometry, expressions, mesh, BCs, material, mass | | `20260210-163801` | Design | 414s (~7 min) | **Full model walkthrough** — geometry, expressions, mesh, BCs, material, mass |
### Session 2 — Brief Overview (20260210-161401) ### Session 2 — Brief Overview (20260210-161401)
Key quotes: Key quotes:
- "This is the beam that we want to optimize" - "This is the beam that we want to optimize"
- "The beam is discretized into [shell] elements" - "The beam is discretized into [shell] elements"
- "One side, the full edge is fixed and the other side there's the force in the [Y] direction" - "One side, the full edge is fixed and the other side there's the force in the [Y] direction"
- "This is the holes... just so that we can test the KB setup" - "This is the holes... just so that we can test the KB setup"
### Session 3 — Full Walkthrough (20260210-163801) ### Session 3 — Full Walkthrough (20260210-163801)
This is the primary data source. Antoine walked through every aspect of the NX model. This is the primary data source. Antoine walked through every aspect of the NX model.
--- ---
## Confirmed Parameters (from Session 3) ## Confirmed Parameters (from Session 3)
### Geometry — Part File (`Beam.prt`) ### Geometry — Part File (`Beam.prt`)
| Parameter | NX Expression | Value | Units | Notes | | Parameter | NX Expression | Value | Units | Notes |
|-----------|--------------|-------|-------|-------| |-----------|--------------|-------|-------|-------|
| I-beam cross-section sketch | — | I-beam profile | — | Base geometry for extrusion | | I-beam cross-section sketch | — | I-beam profile | — | Base geometry for extrusion |
| Beam half-height | `beam_half_height` | TBD (see screenshot triggers) | mm | Half the total I-beam height | | Beam half-height | `beam_half_height` | TBD (see screenshot triggers) | mm | Half the total I-beam height |
| Beam half-width | `beam_half_width` | TBD (see screenshot triggers) | mm | Half the flange width | | Beam half-width | `beam_half_width` | TBD (see screenshot triggers) | mm | Half the flange width |
| Face thickness | `beam_face_thickness` | 20 (baseline) | mm | Flange thickness | | Face thickness | `beam_face_thickness` | 20 (baseline) | mm | Flange thickness |
| Core half-thickness | `beam_half_core_thickness` | 20 (baseline) | mm | Half the web height | | Core half-thickness | `beam_half_core_thickness` | 20 (baseline) | mm | Half the web height |
| Beam length | `beam_length` | 5,000 | mm | Extrusion distance — **CONFIRMED** | | Beam length | `beam_length` | 5,000 | mm | Extrusion distance — **CONFIRMED** |
| Hole count | `hole_count` | 10 | — | Integer parameter — **CONFIRMED** | | Hole count | `hole_count` | 10 | — | Integer parameter — **CONFIRMED** |
| Hole diameter | (expression name TBD) | 300 | mm | Starting value — **CONFIRMED** | | Hole diameter | (expression name TBD) | 300 | mm | Starting value — **CONFIRMED** |
| Hole span | `p6` | 4,000 | mm | Total span over which holes are distributed | | Hole span | `p6` | 4,000 | mm | Total span over which holes are distributed |
| Hole start offset | (fixed) | 500 | mm | From beam start — **NOT a parameter** (requirement) | | Hole start offset | (fixed) | 500 | mm | From beam start — **NOT a parameter** (requirement) |
| Hole end offset | (fixed) | 500 | mm | From beam end — **NOT a parameter** (requirement) | | Hole end offset | (fixed) | 500 | mm | From beam end — **NOT a parameter** (requirement) |
### Mass ### Mass
| Parameter | NX Expression | Value | Units | Notes | | Parameter | NX Expression | Value | Units | Notes |
|-----------|--------------|-------|-------|-------| |-----------|--------------|-------|-------|-------|
| Mass | `p1` | 11.33 | kg | **NOT `p173` as previously assumed** | | Mass | `p1` | 11.33 | kg | **NOT `p173` as previously assumed** |
| Density | (in material card) | 7.3 | g/cm³ (7300 kg/m³) | Antoine stated "set 7,3" | | Density | (in material card) | 7.3 | g/cm³ (7300 kg/m³) | Antoine stated "set 7,3" |
> ⚠️ **MASS DISCREPANCY RESOLVED:** Intake reported ~974 kg (expression `p173`). Antoine's live session confirms 11.33 kg (expression `p1`). See analysis below. > ⚠️ **MASS DISCREPANCY RESOLVED:** Intake reported ~974 kg (expression `p173`). Antoine's live session confirms 11.33 kg (expression `p1`). See analysis below.
### Idealization (Beam_fem1_i.prt) ### Idealization (Beam_fem1_i.prt)
| Step | Method | Notes | | Step | Method | Notes |
|------|--------|-------| |------|--------|-------|
| 1. Promote body | From `Beam.prt` solid | Brings solid geometry into idealized part | | 1. Promote body | From `Beam.prt` solid | Brings solid geometry into idealized part |
| 2. Mid-surface extraction | Pair mid-surface function | Extracts shell surfaces from solid — "within some center" | | 2. Mid-surface extraction | Pair mid-surface function | Extracts shell surfaces from solid — "within some center" |
| Output | Sheet bodies | Thin shell representation of I-beam | | Output | Sheet bodies | Thin shell representation of I-beam |
### FEM (Beam_fem1.fem) ### FEM (Beam_fem1.fem)
| Parameter | Value | Notes | | Parameter | Value | Notes |
|-----------|-------|-------| |-----------|-------|-------|
| Element type | **CQUAD4** | 4-node quadrilateral shell — **CONFIRMED** | | Element type | **CQUAD4** | 4-node quadrilateral shell — **CONFIRMED** |
| Property type | Thin shell collectors | Inherited material from beam material | | Property type | Thin shell collectors | Inherited material from beam material |
| Element size | 67.4 / 2 = **33.7 mm** | Subdivision-based sizing | | Element size | 67.4 / 2 = **33.7 mm** | Subdivision-based sizing |
| Material assignment | Inherited from beam material | Through thin shell property | | Material assignment | Inherited from beam material | Through thin shell property |
### Material ### Material
| Property | Value | Notes | | Property | Value | Notes |
|----------|-------|-------| |----------|-------|-------|
| Baseline material | **AISI Steel 1005** | (Antoine said "NSE steel 10 or 5" = ANSI Steel 1005) | | Baseline material | **AISI Steel 1005** | (Antoine said "NSE steel 10 or 5" = ANSI Steel 1005) |
| Future expansion | Aluminum 6061, Stainless Steel ANSI 310 | Antoine's explicit instruction: "add as future expansion" | | Future expansion | Aluminum 6061, Stainless Steel ANSI 310 | Antoine's explicit instruction: "add as future expansion" |
| Density | 7.3 g/cm³ | As stated by Antoine | | Density | 7.3 g/cm³ | As stated by Antoine |
### Simulation (Beam_sim1.sim) ### Simulation (Beam_sim1.sim)
| Parameter | Value | Notes | | Parameter | Value | Notes |
|-----------|-------|-------| |-----------|-------|-------|
| Solution type | SOL 101 (Static) | Subcase: "Solution 1" — static subcase | | Solution type | SOL 101 (Static) | Subcase: "Solution 1" — static subcase |
| Fixed constraint | **Left side of beam** | Full edge fixed — **cantilever CONFIRMED** | | Fixed constraint | **Left side of beam** | Full edge fixed — **cantilever CONFIRMED** |
| Applied force | **10,000 kgf downward** | Right side (free end) of beam — **CONFIRMED** | | Applied force | **10,000 kgf downward** | Right side (free end) of beam — **CONFIRMED** |
| Force direction | Downward (Y) | "The vector is going down" — project requirement | | Force direction | Downward (Y) | "The vector is going down" — project requirement |
### Antoine's Directive ### Antoine's Directive
> "And we're all set. Please optimize." > "And we're all set. Please optimize."
--- ---
## Mass Discrepancy Resolution ## Mass Discrepancy Resolution
### The Problem ### The Problem
- **Gen 001 (intake):** Mass ~974 kg, expression `p173` - **Gen 001 (intake):** Mass ~974 kg, expression `p173`
- **Gen 002 (KBS session):** Mass 11.33 kg, expression `p1` - **Gen 002 (KBS session):** Mass 11.33 kg, expression `p1`
### Analysis ### Analysis
The KBS session is the ground truth — Antoine was live in NX, reading the expression value directly. The discrepancy is a factor of ~86×. The KBS session is the ground truth — Antoine was live in NX, reading the expression value directly. The discrepancy is a factor of ~86×.
Possible explanations: Possible explanations:
1. **Different model version:** The intake data may have referenced an earlier, much larger beam geometry that was subsequently scaled down or redesigned before the KBS session 1. **Different model version:** The intake data may have referenced an earlier, much larger beam geometry that was subsequently scaled down or redesigned before the KBS session
2. **Different expression:** `p173` and `p1` are different NX expressions. `p173` may reference a different body, assembly mass, or a now-deleted feature 2. **Different expression:** `p173` and `p1` are different NX expressions. `p173` may reference a different body, assembly mass, or a now-deleted feature
3. **Communication error:** The 974 kg value may have been approximate, from memory, or from a different project entirely 3. **Communication error:** The 974 kg value may have been approximate, from memory, or from a different project entirely
### Resolution ### Resolution
**The confirmed baseline mass is 11.33 kg** (expression `p1`, density 7.3 g/cm³). **The confirmed baseline mass is 11.33 kg** (expression `p1`, density 7.3 g/cm³).
This changes the optimization landscape significantly: This changes the optimization landscape significantly:
- 11.33 kg is a lightweight beam — optimization will still aim to reduce mass but the absolute numbers are very different - 11.33 kg is a lightweight beam — optimization will still aim to reduce mass but the absolute numbers are very different
- The displacement constraint (≤ 10 mm) becomes the dominant challenge at this scale - The displacement constraint (≤ 10 mm) becomes the dominant challenge at this scale
- Stress levels need fresh baseline measurement - Stress levels need fresh baseline measurement
### Action Items ### Action Items
- ✅ Update all references from `p173``p1` for mass expression - ✅ Update all references from `p173``p1` for mass expression
- ✅ Update baseline mass from 974 kg → 11.33 kg - ✅ Update baseline mass from 974 kg → 11.33 kg
- ⚠️ Re-evaluate baseline displacement (22 mm was from the old model state — may need re-verification) - ⚠️ Re-evaluate baseline displacement (22 mm was from the old model state — may need re-verification)
- ⚠️ Get baseline stress value (never had one) - ⚠️ Get baseline stress value (never had one)
--- ---
## New Information Flagged ## New Information Flagged
| Item | Detail | Impact | | Item | Detail | Impact |
|------|--------|--------| |------|--------|--------|
| Expression `p1` for mass | Replaces `p173` — different expression entirely | Extractor config must be updated | | Expression `p1` for mass | Replaces `p173` — different expression entirely | Extractor config must be updated |
| Expression `p6` for hole span | 4,000 mm — potential new design variable | Could be added to optimization | | Expression `p6` for hole span | 4,000 mm — potential new design variable | Could be added to optimization |
| Expression `beam_length` | 5,000 mm — confirmed but not a DV | Fixed parameter | | Expression `beam_length` | 5,000 mm — confirmed but not a DV | Fixed parameter |
| Expression `beam_half_height` | New — not previously known | Need starting value | | Expression `beam_half_height` | New — not previously known | Need starting value |
| Expression `beam_half_width` | New — not previously known | Need starting value | | Expression `beam_half_width` | New — not previously known | Need starting value |
| Hole offsets fixed at 500mm | Start and end positions are requirements, not variables | Constrains hole placement | | Hole offsets fixed at 500mm | Start and end positions are requirements, not variables | Constrains hole placement |
| Material expansion | Al 6061, SS ANSI 310 as future materials | Future optimization scope | | Material expansion | Al 6061, SS ANSI 310 as future materials | Future optimization scope |
| Element size = 33.7 mm | 67.4/2 — Antoine says refinement is future work | Mesh convergence still needed | | Element size = 33.7 mm | 67.4/2 — Antoine says refinement is future work | Mesh convergence still needed |
--- ---
## Gap Resolution Summary ## Gap Resolution Summary
### Gaps CLOSED ### Gaps CLOSED
| Gap | Status | Resolution | | Gap | Status | Resolution |
|-----|--------|------------| |-----|--------|------------|
| **G1:** Beam length and support conditions | ✅ **CLOSED** | Beam length = 5,000 mm. Left side fully fixed (cantilever). Confirmed by Antoine in KBS session. | | **G1:** Beam length and support conditions | ✅ **CLOSED** | Beam length = 5,000 mm. Left side fully fixed (cantilever). Confirmed by Antoine in KBS session. |
| **G2:** Loading definition | ✅ **CLOSED** | 10,000 kgf point load, downward (Y), at right side (free end). Project requirement per Antoine. | | **G2:** Loading definition | ✅ **CLOSED** | 10,000 kgf point load, downward (Y), at right side (free end). Project requirement per Antoine. |
| **G8:** Mesh type, density, convergence | ✅ **CLOSED** (type/density) | CQUAD4 thin shell, element size 33.7 mm (67.4/2). Convergence not yet verified but mesh type confirmed. | | **G8:** Mesh type, density, convergence | ✅ **CLOSED** (type/density) | CQUAD4 thin shell, element size 33.7 mm (67.4/2). Convergence not yet verified but mesh type confirmed. |
### Gaps PARTIALLY RESOLVED ### Gaps PARTIALLY RESOLVED
| Gap | Status | What's Known | What Remains | | Gap | Status | What's Known | What Remains |
|-----|--------|-------------|-------------| |-----|--------|-------------|-------------|
| **G5:** Hole geometric feasibility | 🟡 **PARTIAL** | Hole span = 4,000 mm, start/end at 500 mm from ends, current count = 10, diameter = 300 mm. At baseline: 10 holes in 4,000 mm = 400 mm spacing, 300 mm diameter → 100 mm ligament. | Need collision check formula across full DV range. At extremes (15 holes × 450 mm diameter in 4,000 mm), holes WILL overlap. | | **G5:** Hole geometric feasibility | 🟡 **PARTIAL** | Hole span = 4,000 mm, start/end at 500 mm from ends, current count = 10, diameter = 300 mm. At baseline: 10 holes in 4,000 mm = 400 mm spacing, 300 mm diameter → 100 mm ligament. | Need collision check formula across full DV range. At extremes (15 holes × 450 mm diameter in 4,000 mm), holes WILL overlap. |
| **G9:** Stress allowable basis | 🟡 **PARTIAL** | AISI 1005 yield ~285 MPa. 130 MPa limit → SF ≈ 2.2. | Still need Antoine to confirm if 130 MPa is the correct limit for this new model scale. | | **G9:** Stress allowable basis | 🟡 **PARTIAL** | AISI 1005 yield ~285 MPa. 130 MPa limit → SF ≈ 2.2. | Still need Antoine to confirm if 130 MPa is the correct limit for this new model scale. |
### Gaps STILL OPEN ### Gaps STILL OPEN
| Gap | Status | Notes | | Gap | Status | Notes |
|-----|--------|-------| |-----|--------|-------|
| **G3:** Displacement measurement location | ❓ **OPEN** | Still need to confirm: which node(s)? Which DOF? Total magnitude or single component? | | **G3:** Displacement measurement location | ❓ **OPEN** | Still need to confirm: which node(s)? Which DOF? Total magnitude or single component? |
| **G4:** Stress constraint scope | ❓ **OPEN** | Whole model? Exclude supports? Stress at hole edges? | | **G4:** Stress constraint scope | ❓ **OPEN** | Whole model? Exclude supports? Stress at hole edges? |
| **G6:** Result sensors in Beam_sim1.sim | ❓ **OPEN** | Need NX model introspection to check | | **G6:** Result sensors in Beam_sim1.sim | ❓ **OPEN** | Need NX model introspection to check |
| **G7:** NX parametric rebuild reliability | ❓ **OPEN** | Need corner-case testing across DV range | | **G7:** NX parametric rebuild reliability | ❓ **OPEN** | Need corner-case testing across DV range |
### NEW Gaps Identified ### NEW Gaps Identified
| Gap | Description | Priority | | Gap | Description | Priority |
|-----|-------------|----------| |-----|-------------|----------|
| **G10:** Baseline displacement re-verification | Was 22 mm at 974 kg mass. With true mass of 11.33 kg, displacement may be different. Need fresh baseline run. | **High** | | **G10:** Baseline displacement re-verification | Was 22 mm at 974 kg mass. With true mass of 11.33 kg, displacement may be different. Need fresh baseline run. | **High** |
| **G11:** Baseline stress value | Never measured. Need SOL 101 baseline run to establish. | **High** | | **G11:** Baseline stress value | Never measured. Need SOL 101 baseline run to establish. | **High** |
| **G12:** Expression `beam_half_height` starting value | Known to exist but value not captured from screenshot | Medium | | **G12:** Expression `beam_half_height` starting value | Known to exist but value not captured from screenshot | Medium |
| **G13:** Expression `beam_half_width` starting value | Known to exist but value not captured from screenshot | Medium | | **G13:** Expression `beam_half_width` starting value | Known to exist but value not captured from screenshot | Medium |
| **G14:** Hole diameter expression name | Antoine mentioned "whole diameters" starts at 300 but didn't state the expression name explicitly | Medium | | **G14:** Hole diameter expression name | Antoine mentioned "whole diameters" starts at 300 but didn't state the expression name explicitly | Medium |
| **G15:** `p6` (hole_span) as design variable | Antoine suggested it could be optimized. Need to decide if it enters the DV set. | Medium | | **G15:** `p6` (hole_span) as design variable | Antoine suggested it could be optimized. Need to decide if it enters the DV set. | Medium |
--- ---
## KB Entries Updated ## KB Entries Updated
- `components/sandwich-beam.md` — confirmed geometry, expressions, mass, hole parameters - `components/sandwich-beam.md` — confirmed geometry, expressions, mass, hole parameters
- `materials/steel-aisi.md` — AISI 1005 specifics, density, future materials - `materials/steel-aisi.md` — AISI 1005 specifics, density, future materials
- `fea/models/sol101-static.md` — confirmed BCs, mesh, element type, solver setup - `fea/models/sol101-static.md` — confirmed BCs, mesh, element type, solver setup
- `kb/_index.md` — gap status updates, generation table - `kb/_index.md` — gap status updates, generation table
- `kb/_history.md` — Gen 002 entry - `kb/_history.md` — Gen 002 entry
- `CONTEXT.md` — confirmed parameter values, corrected mass expression - `CONTEXT.md` — confirmed parameter values, corrected mass expression
## Decisions Needed ## Decisions Needed
1. **Re-run baseline?** — Mass discrepancy suggests model has changed since intake. A fresh baseline solve would confirm displacement and stress. 1. **Re-run baseline?** — Mass discrepancy suggests model has changed since intake. A fresh baseline solve would confirm displacement and stress.
2. **Add `p6` (hole_span) as DV?** — Antoine suggested it. Would increase DV count from 4 to 5. 2. **Add `p6` (hole_span) as DV?** — Antoine suggested it. Would increase DV count from 4 to 5.
3. **Update atomizer_spec_draft.json?** — Mass extractor needs `p1` not `p173`. Baseline mass is 11.33 kg not 974 kg. 3. **Update atomizer_spec_draft.json?** — Mass extractor needs `p1` not `p173`. Baseline mass is 11.33 kg not 974 kg.
4. **Proceed with optimization?** — Antoine said "please optimize" — but we still have open gaps (G3, G4, G6, G7, G10, G11). 4. **Proceed with optimization?** — Antoine said "please optimize" — but we still have open gaps (G3, G4, G6, G7, G10, G11).
--- ---
*Technical Lead 🔧 — The physics is the boss.* *Technical Lead 🔧 — The physics is the boss.*

View File

@@ -0,0 +1,206 @@
# Gen 002 — KBS Session Processing
**Date:** 2026-02-10
**Sources:** 3 KBS capture sessions recorded by Antoine
**Author:** Technical Lead 🔧
**Protocol:** OP_09 → OP_10 Step 2 (Technical Breakdown Update)
---
## What Happened
Antoine recorded 3 Knowledge Base Capture (KBS) sessions for the Hydrotech Beam project, walking through the complete NX model in detail. This is the first time we have direct, confirmed model parameters from the CEO's live NX walkthrough.
### Sessions Processed
| Session ID | Type | Duration | Content |
|-----------|------|----------|---------|
| `20260210-132817` | Analysis | 6s | No transcript — too short (aborted session) |
| `20260210-161401` | Design | 38s | Brief overview: beam with holes, discretized, one side fixed, other side force in Y-direction |
| `20260210-163801` | Design | 414s (~7 min) | **Full model walkthrough** — geometry, expressions, mesh, BCs, material, mass |
### Session 2 — Brief Overview (20260210-161401)
Key quotes:
- "This is the beam that we want to optimize"
- "The beam is discretized into [shell] elements"
- "One side, the full edge is fixed and the other side there's the force in the [Y] direction"
- "This is the holes... just so that we can test the KB setup"
### Session 3 — Full Walkthrough (20260210-163801)
This is the primary data source. Antoine walked through every aspect of the NX model.
---
## Confirmed Parameters (from Session 3)
### Geometry — Part File (`Beam.prt`)
| Parameter | NX Expression | Value | Units | Notes |
|-----------|--------------|-------|-------|-------|
| I-beam cross-section sketch | — | I-beam profile | — | Base geometry for extrusion |
| Beam half-height | `beam_half_height` | TBD (see screenshot triggers) | mm | Half the total I-beam height |
| Beam half-width | `beam_half_width` | TBD (see screenshot triggers) | mm | Half the flange width |
| Face thickness | `beam_face_thickness` | 20 (baseline) | mm | Flange thickness |
| Core half-thickness | `beam_half_core_thickness` | 20 (baseline) | mm | Half the web height |
| Beam length | `beam_length` | 5,000 | mm | Extrusion distance — **CONFIRMED** |
| Hole count | `hole_count` | 10 | — | Integer parameter — **CONFIRMED** |
| Hole diameter | (expression name TBD) | 300 | mm | Starting value — **CONFIRMED** |
| Hole span | `p6` | 4,000 | mm | Total span over which holes are distributed |
| Hole start offset | (fixed) | 500 | mm | From beam start — **NOT a parameter** (requirement) |
| Hole end offset | (fixed) | 500 | mm | From beam end — **NOT a parameter** (requirement) |
### Mass
| Parameter | NX Expression | Value | Units | Notes |
|-----------|--------------|-------|-------|-------|
| Mass | `p1` | 11.33 | kg | **NOT `p173` as previously assumed** |
| Density | (in material card) | 7.3 | g/cm³ (7300 kg/m³) | Antoine stated "set 7,3" |
> ⚠️ **MASS DISCREPANCY RESOLVED:** Intake reported ~974 kg (expression `p173`). Antoine's live session confirms 11.33 kg (expression `p1`). See analysis below.
### Idealization (Beam_fem1_i.prt)
| Step | Method | Notes |
|------|--------|-------|
| 1. Promote body | From `Beam.prt` solid | Brings solid geometry into idealized part |
| 2. Mid-surface extraction | Pair mid-surface function | Extracts shell surfaces from solid — "within some center" |
| Output | Sheet bodies | Thin shell representation of I-beam |
### FEM (Beam_fem1.fem)
| Parameter | Value | Notes |
|-----------|-------|-------|
| Element type | **CQUAD4** | 4-node quadrilateral shell — **CONFIRMED** |
| Property type | Thin shell collectors | Inherited material from beam material |
| Element size | 67.4 / 2 = **33.7 mm** | Subdivision-based sizing |
| Material assignment | Inherited from beam material | Through thin shell property |
### Material
| Property | Value | Notes |
|----------|-------|-------|
| Baseline material | **AISI Steel 1005** | (Antoine said "NSE steel 10 or 5" = ANSI Steel 1005) |
| Future expansion | Aluminum 6061, Stainless Steel ANSI 310 | Antoine's explicit instruction: "add as future expansion" |
| Density | 7.3 g/cm³ | As stated by Antoine |
### Simulation (Beam_sim1.sim)
| Parameter | Value | Notes |
|-----------|-------|-------|
| Solution type | SOL 101 (Static) | Subcase: "Solution 1" — static subcase |
| Fixed constraint | **Left side of beam** | Full edge fixed — **cantilever CONFIRMED** |
| Applied force | **10,000 kgf downward** | Right side (free end) of beam — **CONFIRMED** |
| Force direction | Downward (Y) | "The vector is going down" — project requirement |
### Antoine's Directive
> "And we're all set. Please optimize."
---
## Mass Discrepancy Resolution
### The Problem
- **Gen 001 (intake):** Mass ~974 kg, expression `p173`
- **Gen 002 (KBS session):** Mass 11.33 kg, expression `p1`
### Analysis
The KBS session is the ground truth — Antoine was live in NX, reading the expression value directly. The discrepancy is a factor of ~86×.
Possible explanations:
1. **Different model version:** The intake data may have referenced an earlier, much larger beam geometry that was subsequently scaled down or redesigned before the KBS session
2. **Different expression:** `p173` and `p1` are different NX expressions. `p173` may reference a different body, assembly mass, or a now-deleted feature
3. **Communication error:** The 974 kg value may have been approximate, from memory, or from a different project entirely
### Resolution
**The confirmed baseline mass is 11.33 kg** (expression `p1`, density 7.3 g/cm³).
This changes the optimization landscape significantly:
- 11.33 kg is a lightweight beam — optimization will still aim to reduce mass but the absolute numbers are very different
- The displacement constraint (≤ 10 mm) becomes the dominant challenge at this scale
- Stress levels need fresh baseline measurement
### Action Items
- ✅ Update all references from `p173``p1` for mass expression
- ✅ Update baseline mass from 974 kg → 11.33 kg
- ⚠️ Re-evaluate baseline displacement (22 mm was from the old model state — may need re-verification)
- ⚠️ Get baseline stress value (never had one)
---
## New Information Flagged
| Item | Detail | Impact |
|------|--------|--------|
| Expression `p1` for mass | Replaces `p173` — different expression entirely | Extractor config must be updated |
| Expression `p6` for hole span | 4,000 mm — potential new design variable | Could be added to optimization |
| Expression `beam_length` | 5,000 mm — confirmed but not a DV | Fixed parameter |
| Expression `beam_half_height` | New — not previously known | Need starting value |
| Expression `beam_half_width` | New — not previously known | Need starting value |
| Hole offsets fixed at 500mm | Start and end positions are requirements, not variables | Constrains hole placement |
| Material expansion | Al 6061, SS ANSI 310 as future materials | Future optimization scope |
| Element size = 33.7 mm | 67.4/2 — Antoine says refinement is future work | Mesh convergence still needed |
---
## Gap Resolution Summary
### Gaps CLOSED
| Gap | Status | Resolution |
|-----|--------|------------|
| **G1:** Beam length and support conditions | ✅ **CLOSED** | Beam length = 5,000 mm. Left side fully fixed (cantilever). Confirmed by Antoine in KBS session. |
| **G2:** Loading definition | ✅ **CLOSED** | 10,000 kgf point load, downward (Y), at right side (free end). Project requirement per Antoine. |
| **G8:** Mesh type, density, convergence | ✅ **CLOSED** (type/density) | CQUAD4 thin shell, element size 33.7 mm (67.4/2). Convergence not yet verified but mesh type confirmed. |
### Gaps PARTIALLY RESOLVED
| Gap | Status | What's Known | What Remains |
|-----|--------|-------------|-------------|
| **G5:** Hole geometric feasibility | 🟡 **PARTIAL** | Hole span = 4,000 mm, start/end at 500 mm from ends, current count = 10, diameter = 300 mm. At baseline: 10 holes in 4,000 mm = 400 mm spacing, 300 mm diameter → 100 mm ligament. | Need collision check formula across full DV range. At extremes (15 holes × 450 mm diameter in 4,000 mm), holes WILL overlap. |
| **G9:** Stress allowable basis | 🟡 **PARTIAL** | AISI 1005 yield ~285 MPa. 130 MPa limit → SF ≈ 2.2. | Still need Antoine to confirm if 130 MPa is the correct limit for this new model scale. |
### Gaps STILL OPEN
| Gap | Status | Notes |
|-----|--------|-------|
| **G3:** Displacement measurement location | ❓ **OPEN** | Still need to confirm: which node(s)? Which DOF? Total magnitude or single component? |
| **G4:** Stress constraint scope | ❓ **OPEN** | Whole model? Exclude supports? Stress at hole edges? |
| **G6:** Result sensors in Beam_sim1.sim | ❓ **OPEN** | Need NX model introspection to check |
| **G7:** NX parametric rebuild reliability | ❓ **OPEN** | Need corner-case testing across DV range |
### NEW Gaps Identified
| Gap | Description | Priority |
|-----|-------------|----------|
| **G10:** Baseline displacement re-verification | Was 22 mm at 974 kg mass. With true mass of 11.33 kg, displacement may be different. Need fresh baseline run. | **High** |
| **G11:** Baseline stress value | Never measured. Need SOL 101 baseline run to establish. | **High** |
| **G12:** Expression `beam_half_height` starting value | Known to exist but value not captured from screenshot | Medium |
| **G13:** Expression `beam_half_width` starting value | Known to exist but value not captured from screenshot | Medium |
| **G14:** Hole diameter expression name | Antoine mentioned "whole diameters" starts at 300 but didn't state the expression name explicitly | Medium |
| **G15:** `p6` (hole_span) as design variable | Antoine suggested it could be optimized. Need to decide if it enters the DV set. | Medium |
---
## KB Entries Updated
- `components/sandwich-beam.md` — confirmed geometry, expressions, mass, hole parameters
- `materials/steel-aisi.md` — AISI 1005 specifics, density, future materials
- `fea/models/sol101-static.md` — confirmed BCs, mesh, element type, solver setup
- `kb/_index.md` — gap status updates, generation table
- `kb/_history.md` — Gen 002 entry
- `CONTEXT.md` — confirmed parameter values, corrected mass expression
## Decisions Needed
1. **Re-run baseline?** — Mass discrepancy suggests model has changed since intake. A fresh baseline solve would confirm displacement and stress.
2. **Add `p6` (hole_span) as DV?** — Antoine suggested it. Would increase DV count from 4 to 5.
3. **Update atomizer_spec_draft.json?** — Mass extractor needs `p1` not `p173`. Baseline mass is 11.33 kg not 974 kg.
4. **Proceed with optimization?** — Antoine said "please optimize" — but we still have open gaps (G3, G4, G6, G7, G10, G11).
---
*Technical Lead 🔧 — The physics is the boss.*

View File

@@ -1,148 +1,148 @@
# SOL 101 — Static Analysis # SOL 101 — Static Analysis
**Simulation:** Beam_sim1.sim **Simulation:** Beam_sim1.sim
**Solver:** NX Nastran SOL 101 (Linear Static) **Solver:** NX Nastran SOL 101 (Linear Static)
**Status:** ✅ Running — first real results obtained 2026-02-11. Automated DOE pipeline operational. **Status:** ✅ Running — first real results obtained 2026-02-11. Automated DOE pipeline operational.
--- ---
## Setup — Confirmed ## Setup — Confirmed
| Item | Value | Source | Notes | | Item | Value | Source | Notes |
|------|-------|--------|-------| |------|-------|--------|-------|
| Solution type | **SOL 101** (Linear Static) | KBS session | "Solution 1 — static subcase" | | Solution type | **SOL 101** (Linear Static) | KBS session | "Solution 1 — static subcase" |
| Element type | **CQUAD4** (4-node quad shell) | KBS session | ✅ Confirmed — thin shell collectors | | Element type | **CQUAD4** (4-node quad shell) | KBS session | ✅ Confirmed — thin shell collectors |
| Property type | Thin shell | KBS session | Material inherited from "beam material" | | Property type | Thin shell | KBS session | Material inherited from "beam material" |
| Mesh density | Element size = **33.7 mm** (67.4 / 2) | KBS session | Subdivision-based. Future refinement planned. | | Mesh density | Element size = **33.7 mm** (67.4 / 2) | KBS session | Subdivision-based. Future refinement planned. |
| Idealization | Promote body → mid-surface extraction | KBS session | Pair mid-surface function | | Idealization | Promote body → mid-surface extraction | KBS session | Pair mid-surface function |
## Boundary Conditions — Confirmed ## Boundary Conditions — Confirmed
| BC | Location | Type | Value | Source | | BC | Location | Type | Value | Source |
|----|----------|------|-------|--------| |----|----------|------|-------|--------|
| **Fixed constraint** | Left side of beam (full edge) | SPC (all 6 DOF) | Fixed | ✅ KBS session — "left side fixed" | | **Fixed constraint** | Left side of beam (full edge) | SPC (all 6 DOF) | Fixed | ✅ KBS session — "left side fixed" |
| **Applied force** | Right side of beam (free end) | Point/edge force | **10,000 kgf downward** (Y) | ✅ KBS session — "project requirement" | | **Applied force** | Right side of beam (free end) | Point/edge force | **10,000 kgf downward** (Y) | ✅ KBS session — "project requirement" |
### Loading Details ### Loading Details
- Force magnitude: 10,000 kgf = **98,066.5 N** (≈ 98.1 kN) - Force magnitude: 10,000 kgf = **98,066.5 N** (≈ 98.1 kN)
- Direction: Downward (Y in model coordinates) - Direction: Downward (Y in model coordinates)
- Application: Right side (free end) of beam - Application: Right side (free end) of beam
- Type: This is a **cantilever beam** with end loading — classic bending problem - Type: This is a **cantilever beam** with end loading — classic bending problem
## Result Extraction — Confirmed (Gen 003) ## Result Extraction — Confirmed (Gen 003)
| Output | Method | Expression/Sensor | Status | | Output | Method | Expression/Sensor | Status |
|--------|--------|-------------------|--------| |--------|--------|-------------------|--------|
| Mass | NX expression | **`p173`** (`body_property147.mass` in kg) | ✅ Confirmed — journal extracts to `_temp_mass.txt` | | 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 | | 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 | | Von Mises stress | OP2 parse via pyNastran | CQUAD4 shell max VM | ✅ Working — 111.9 MPa at baseline-ish DVs |
> **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. > **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. > **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 ## Mesh Details
| Property | Value | Notes | | Property | Value | Notes |
|----------|-------|-------| |----------|-------|-------|
| Element type | CQUAD4 | 4-node quadrilateral, first-order | | Element type | CQUAD4 | 4-node quadrilateral, first-order |
| Element size | 33.7 mm | 67.4 / 2 — Antoine says refinement is "not for now" | | Element size | 33.7 mm | 67.4 / 2 — Antoine says refinement is "not for now" |
| Mesh method | Subdivision-based | Auto-mesh with size control | | Mesh method | Subdivision-based | Auto-mesh with size control |
| Shell formulation | Thin shell | Mid-surface extracted from solid | | Shell formulation | Thin shell | Mid-surface extracted from solid |
| Convergence | ❓ **NOT VERIFIED** | Gap G8 partially closed (type known), but convergence check still needed | | Convergence | ❓ **NOT VERIFIED** | Gap G8 partially closed (type known), but convergence check still needed |
### Mesh Estimate ### Mesh Estimate
- Beam length 5,000 mm / 33.7 mm ≈ 148 elements along length - Beam length 5,000 mm / 33.7 mm ≈ 148 elements along length
- Perimeter of I-beam cross-section ≈ varies — but total mesh likely 10K50K elements - Perimeter of I-beam cross-section ≈ varies — but total mesh likely 10K50K elements
- Expected DOF: 60K300K → SOL 101 solve time: seconds to low minutes - Expected DOF: 60K300K → SOL 101 solve time: seconds to low minutes
## Solver Considerations ## Solver Considerations
*From Technical Breakdown (Gen 001), updated with KBS data + Gen 003 run data:* *From Technical Breakdown (Gen 001), updated with KBS data + Gen 003 run data:*
- **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. - **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 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). - **Mesh morphing vs remesh:** Parametric NX models typically remesh on update. Need to confirm behavior across DV range (Gap G7).
- **Runtime:** ✅ Confirmed **~12 seconds per evaluation** (single beam, CQUAD4 thin shell on dalidou). 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. - **Unit system:** NX model uses kg-mm-s (kgf for force). Nastran output stress in kPa → divide by 1000 for MPa.
## Validation Checklist ## Validation Checklist
- [x] Baseline mass matches NX expression `p173` (1,133.01 kg) - [x] Baseline mass matches NX expression `p173` (1,133.01 kg)
- [x] Displacement measured — 17.93 mm at baseline-ish DVs (G10 closed) - [x] Displacement measured — 17.93 mm at baseline-ish DVs (G10 closed)
- [x] Stress measured — 111.9 MPa at baseline-ish DVs (G11 closed) - [x] Stress measured — 111.9 MPa at baseline-ish DVs (G11 closed)
- [ ] Mesh convergence verified at baseline - [ ] Mesh convergence verified at baseline
- [ ] Mesh quality acceptable at DV range extremes - [ ] Mesh quality acceptable at DV range extremes
- [ ] Model rebuilds cleanly at all 4 corners of design space (Gap G7) - [ ] Model rebuilds cleanly at all 4 corners of design space (Gap G7)
- [ ] Stress at hole edges resolved with current mesh density - [ ] Stress at hole edges resolved with current mesh density
## NX Version & Environment — Confirmed (Gen 003) ## NX Version & Environment — Confirmed (Gen 003)
| Item | Value | Notes | | Item | Value | Notes |
|------|-------|-------| |------|-------|-------|
| **NX Version** | **DesigncenterNX 2512** | Siemens rebranded NX to "DesigncenterNX" | | **NX Version** | **DesigncenterNX 2512** | Siemens rebranded NX to "DesigncenterNX" |
| **Install path** | `C:\Program Files\Siemens\DesigncenterNX2512` | On dalidou (Windows solver node) | | **Install path** | `C:\Program Files\Siemens\DesigncenterNX2512` | On dalidou (Windows solver node) |
| **Previous config** | NX 2412 | ❌ Failed — "Part file is from a newer version" | | **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 | | **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. > ⚠️ **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 ### Path Resolution on Windows — Critical
**Bug discovered:** `Path.absolute()` on Windows does **NOT** resolve `..` components (unlike `Path.resolve()`). **Bug discovered:** `Path.absolute()` on Windows does **NOT** resolve `..` components (unlike `Path.resolve()`).
```python ```python
# WRONG — leaves ".." in path, NX can't find referenced parts # WRONG — leaves ".." in path, NX can't find referenced parts
path = Path("../../models/Beam_sim1.sim").absolute() path = Path("../../models/Beam_sim1.sim").absolute()
# → C:\Users\antoi\Atomizer\projects\hydrotech-beam\studies\01_doe_landscape\..\..\models\Beam_sim1.sim # → C:\Users\antoi\Atomizer\projects\hydrotech-beam\studies\01_doe_landscape\..\..\models\Beam_sim1.sim
# CORRECT — fully resolves path # CORRECT — fully resolves path
path = Path("../../models/Beam_sim1.sim").resolve() path = Path("../../models/Beam_sim1.sim").resolve()
# → C:\Users\antoi\Atomizer\projects\hydrotech-beam\models\Beam_sim1.sim # → 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. **Rule:** Use `.resolve()` everywhere when constructing paths for NX. NX cannot follow `..` references in paths.
### NX File References — In-Place Solving Required ### 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`). 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: **Solution:** Solve on master model **in-place** (in the `models/` directory) with backup/restore for isolation:
1. Backup master model files before each trial 1. Backup master model files before each trial
2. Write expressions, rebuild, solve in `models/` 2. Write expressions, rebuild, solve in `models/`
3. Archive outputs (OP2, F06, params, results) to iteration folder 3. Archive outputs (OP2, F06, params, results) to iteration folder
4. Restore master from backup 4. Restore master from backup
See DEC-HB-008 in DECISIONS.md. See DEC-HB-008 in DECISIONS.md.
## History ## History
- **Gen 001** (2026-02-09): Initial documentation from technical breakdown. All solver details pending gap resolution. - **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 `p173`. 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. - **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 ## NX Automation Workflow
**This model uses the SIMPLE workflow** (single-part, no assembly FEM). **This model uses the SIMPLE workflow** (single-part, no assembly FEM).
### Simple Workflow Chain ### Simple Workflow Chain
``` ```
Beam.prt (geometry) → Beam_fem1_i.prt (idealized/mid-surface) → Beam_fem1.fem (mesh) → Beam_sim1.sim (solve) Beam.prt (geometry) → Beam_fem1_i.prt (idealized/mid-surface) → Beam_fem1.fem (mesh) → Beam_sim1.sim (solve)
``` ```
Steps: Steps:
1. Open `.sim` file (loads chain) 1. Open `.sim` file (loads chain)
2. Switch to `Beam.prt` — import `.exp` file, update expressions, rebuild geometry 2. Switch to `Beam.prt` — import `.exp` file, update expressions, rebuild geometry
3. Switch to `Beam_fem1.fem` — update FE model (remesh) 3. Switch to `Beam_fem1.fem` — update FE model (remesh)
4. Switch back to `.sim` — solve SOL 101 4. Switch back to `.sim` — solve SOL 101
### Assembly FEM Workflow (NOT used here) ### Assembly FEM Workflow (NOT used here)
For multi-part models with `.afm` files (e.g., SAT3 mirror): For multi-part models with `.afm` files (e.g., SAT3 mirror):
- Additional steps: load all components, update each FEM, merge duplicate nodes, resolve label conflicts - Additional steps: load all components, update each FEM, merge duplicate nodes, resolve label conflicts
- Detected automatically by presence of `.afm` files in working directory - Detected automatically by presence of `.afm` files in working directory
### Key Automation Notes ### Key Automation Notes
- `hole_count` expression unit = `Constant` (not MilliMeter) - `hole_count` expression unit = `Constant` (not MilliMeter)
- All length DVs = `MilliMeter` - All length DVs = `MilliMeter`
- FEM part is `Beam_fem1` — NOT `Beam_fem1_i` (idealized) - FEM part is `Beam_fem1` — NOT `Beam_fem1_i` (idealized)
- Journal: `solve_simulation.py` handles both workflows - Journal: `solve_simulation.py` handles both workflows

View File

@@ -1,46 +1,46 @@
# SOL 101 — Static Analysis # SOL 101 — Static Analysis
**Simulation:** Beam_sim1.sim **Simulation:** Beam_sim1.sim
**Solver:** NX Nastran SOL 101 (Linear Static) **Solver:** NX Nastran SOL 101 (Linear Static)
**Status:** Pending gap resolution **Status:** Pending gap resolution
--- ---
## Setup ## Setup
| Item | Value | Notes | | Item | Value | Notes |
|------|-------|-------| |------|-------|-------|
| Solution type | SOL 101 (Linear Static) | Appropriate for this problem | | Solution type | SOL 101 (Linear Static) | Appropriate for this problem |
| Element type | ❓ TBD | Gap G8: CQUAD4/CQUAD8 (shell) or CTETRA/CHEXA (solid)? | | Element type | ❓ TBD | Gap G8: CQUAD4/CQUAD8 (shell) or CTETRA/CHEXA (solid)? |
| Mesh density | ❓ TBD | Gap G8: convergence checked? | | Mesh density | ❓ TBD | Gap G8: convergence checked? |
| Loading | ❓ TBD | Gap G2: point load? distributed? self-weight? | | Loading | ❓ TBD | Gap G2: point load? distributed? self-weight? |
| BCs | ❓ TBD | Gap G1: cantilever? simply-supported? | | BCs | ❓ TBD | Gap G1: cantilever? simply-supported? |
## Result Extraction ## Result Extraction
| Output | Method | Expression/Sensor | Status | | Output | Method | Expression/Sensor | Status |
|--------|--------|-------------------|--------| |--------|--------|-------------------|--------|
| Mass | NX expression | `p173` | ✅ Known | | Mass | NX expression | `p173` | ✅ Known |
| Tip displacement | ❓ Sensor or .f06 parse | TBD | Gap G3, G6 | | Tip displacement | ❓ Sensor or .f06 parse | TBD | Gap G3, G6 |
| Von Mises stress | ❓ Sensor or .f06 parse | TBD | Gap G4, G6 | | Von Mises stress | ❓ Sensor or .f06 parse | TBD | Gap G4, G6 |
## Solver Considerations ## Solver Considerations
*From Technical Breakdown:* *From Technical Breakdown:*
- **Linear assumption:** 22 mm displacement on likely 2+ m beam → L/δ probably OK. Verify. - **Linear assumption:** 22 mm displacement on likely 2+ m beam → L/δ probably OK. Verify.
- **Mesh sensitivity:** Stress at hole edges is mesh-dependent. Need convergence check (Gap G8). - **Mesh sensitivity:** Stress at hole edges is mesh-dependent. Need convergence check (Gap G8).
- **Mesh morphing vs remesh:** Parametric NX models typically remesh on update. Need to confirm behavior across DV range (Gap G7). - **Mesh morphing vs remesh:** Parametric NX models typically remesh on update. Need to confirm behavior across DV range (Gap G7).
- **Runtime estimate:** Single beam, ~10K100K DOF → probably seconds to low minutes per evaluation. - **Runtime estimate:** Single beam, ~10K100K DOF → probably seconds to low minutes per evaluation.
## Validation Checklist ## Validation Checklist
- [ ] Baseline mass matches NX expression `p173` - [ ] Baseline mass matches NX expression `p173`
- [ ] Baseline displacement matches reported ~22 mm - [ ] Baseline displacement matches reported ~22 mm
- [ ] Mesh convergence verified at baseline - [ ] Mesh convergence verified at baseline
- [ ] Mesh quality acceptable at DV range extremes - [ ] Mesh quality acceptable at DV range extremes
- [ ] Model rebuilds cleanly at all 4 corners of design space - [ ] Model rebuilds cleanly at all 4 corners of design space
## History ## History
- **Gen 001** (2026-02-09): Initial documentation from technical breakdown. All solver details pending gap resolution. - **Gen 001** (2026-02-09): Initial documentation from technical breakdown. All solver details pending gap resolution.

View File

@@ -0,0 +1,148 @@
# SOL 101 — Static Analysis
**Simulation:** Beam_sim1.sim
**Solver:** NX Nastran SOL 101 (Linear Static)
**Status:** ✅ Running — first real results obtained 2026-02-11. Automated DOE pipeline operational.
---
## Setup — Confirmed
| Item | Value | Source | Notes |
|------|-------|--------|-------|
| Solution type | **SOL 101** (Linear Static) | KBS session | "Solution 1 — static subcase" |
| Element type | **CQUAD4** (4-node quad shell) | KBS session | ✅ Confirmed — thin shell collectors |
| Property type | Thin shell | KBS session | Material inherited from "beam material" |
| Mesh density | Element size = **33.7 mm** (67.4 / 2) | KBS session | Subdivision-based. Future refinement planned. |
| Idealization | Promote body → mid-surface extraction | KBS session | Pair mid-surface function |
## Boundary Conditions — Confirmed
| BC | Location | Type | Value | Source |
|----|----------|------|-------|--------|
| **Fixed constraint** | Left side of beam (full edge) | SPC (all 6 DOF) | Fixed | ✅ KBS session — "left side fixed" |
| **Applied force** | Right side of beam (free end) | Point/edge force | **10,000 kgf downward** (Y) | ✅ KBS session — "project requirement" |
### Loading Details
- Force magnitude: 10,000 kgf = **98,066.5 N** (≈ 98.1 kN)
- Direction: Downward (Y in model coordinates)
- Application: Right side (free end) of beam
- Type: This is a **cantilever beam** with end loading — classic bending problem
## Result Extraction — Confirmed (Gen 003)
| Output | Method | Expression/Sensor | Status |
|--------|--------|-------------------|--------|
| 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 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
| Property | Value | Notes |
|----------|-------|-------|
| Element type | CQUAD4 | 4-node quadrilateral, first-order |
| Element size | 33.7 mm | 67.4 / 2 — Antoine says refinement is "not for now" |
| Mesh method | Subdivision-based | Auto-mesh with size control |
| Shell formulation | Thin shell | Mid-surface extracted from solid |
| Convergence | ❓ **NOT VERIFIED** | Gap G8 partially closed (type known), but convergence check still needed |
### Mesh Estimate
- Beam length 5,000 mm / 33.7 mm ≈ 148 elements along length
- Perimeter of I-beam cross-section ≈ varies — but total mesh likely 10K50K elements
- Expected DOF: 60K300K → SOL 101 solve time: seconds to low minutes
## Solver Considerations
*From Technical Breakdown (Gen 001), updated with KBS data + Gen 003 run data:*
- **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:** ✅ 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
- [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 `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
**This model uses the SIMPLE workflow** (single-part, no assembly FEM).
### Simple Workflow Chain
```
Beam.prt (geometry) → Beam_fem1_i.prt (idealized/mid-surface) → Beam_fem1.fem (mesh) → Beam_sim1.sim (solve)
```
Steps:
1. Open `.sim` file (loads chain)
2. Switch to `Beam.prt` — import `.exp` file, update expressions, rebuild geometry
3. Switch to `Beam_fem1.fem` — update FE model (remesh)
4. Switch back to `.sim` — solve SOL 101
### Assembly FEM Workflow (NOT used here)
For multi-part models with `.afm` files (e.g., SAT3 mirror):
- Additional steps: load all components, update each FEM, merge duplicate nodes, resolve label conflicts
- Detected automatically by presence of `.afm` files in working directory
### Key Automation Notes
- `hole_count` expression unit = `Constant` (not MilliMeter)
- All length DVs = `MilliMeter`
- FEM part is `Beam_fem1` — NOT `Beam_fem1_i` (idealized)
- Journal: `solve_simulation.py` handles both workflows

View File

@@ -1,59 +1,59 @@
# Steel — AISI 1005 # Steel — AISI 1005
**Status:** Baseline material confirmed (Gen 002) **Status:** Baseline material confirmed (Gen 002)
**NX Material Name:** "beam material" (inherited by thin shell property) **NX Material Name:** "beam material" (inherited by thin shell property)
--- ---
## Properties ## Properties
| Property | Value | Units | Source | Confidence | | Property | Value | Units | Source | Confidence |
|----------|-------|-------|--------|------------| |----------|-------|-------|--------|------------|
| Standard | AISI / SAE | — | KBS session | ✅ Confirmed | | Standard | AISI / SAE | — | KBS session | ✅ Confirmed |
| Grade | **1005** | — | KBS session ("NSE steel 10 or 5" = ANSI Steel 1005) | ✅ Confirmed | | Grade | **1005** | — | KBS session ("NSE steel 10 or 5" = ANSI Steel 1005) | ✅ Confirmed |
| Density | **7.3** | g/cm³ (7,300 kg/m³) | KBS session — Antoine stated directly | ✅ Confirmed | | Density | **7.3** | g/cm³ (7,300 kg/m³) | KBS session — Antoine stated directly | ✅ Confirmed |
| E (Young's modulus) | ~200 | GPa | Typical for AISI 1005 — **needs NX verification** | 🟡 Estimated | | E (Young's modulus) | ~200 | GPa | Typical for AISI 1005 — **needs NX verification** | 🟡 Estimated |
| Yield strength | ~285 | MPa | Typical for AISI 1005 (cold-drawn) — **needs NX verification** | 🟡 Estimated | | Yield strength | ~285 | MPa | Typical for AISI 1005 (cold-drawn) — **needs NX verification** | 🟡 Estimated |
| UTS | ~330 | MPa | Typical for AISI 1005 — **needs NX verification** | 🟡 Estimated | | UTS | ~330 | MPa | Typical for AISI 1005 — **needs NX verification** | 🟡 Estimated |
| Poisson's ratio | ~0.29 | — | Typical for carbon steel — **needs NX verification** | 🟡 Estimated | | Poisson's ratio | ~0.29 | — | Typical for carbon steel — **needs NX verification** | 🟡 Estimated |
| Elongation | ~20 | % | Typical for AISI 1005 — **needs verification** | 🟡 Estimated | | Elongation | ~20 | % | Typical for AISI 1005 — **needs verification** | 🟡 Estimated |
## Notes on AISI 1005 ## Notes on AISI 1005
- AISI 1005 is a **low-carbon plain steel** (0.06% max C) in the 10xx series - AISI 1005 is a **low-carbon plain steel** (0.06% max C) in the 10xx series
- Commonly used for structural applications — good weldability, moderate strength - Commonly used for structural applications — good weldability, moderate strength
- NX material library designation may vary (Antoine said "NSE steel 10 or 5" which maps to ANSI/AISI Steel 1005) - NX material library designation may vary (Antoine said "NSE steel 10 or 5" which maps to ANSI/AISI Steel 1005)
- **Density note:** Antoine stated 7.3 g/cm³. Standard steel is 7.85 g/cm³. The 7.3 value may be the NX library default or a specific setting. This affects mass calculation directly. - **Density note:** Antoine stated 7.3 g/cm³. Standard steel is 7.85 g/cm³. The 7.3 value may be the NX library default or a specific setting. This affects mass calculation directly.
## Stress Allowable ## Stress Allowable
| Parameter | Value | Basis | Status | | Parameter | Value | Basis | Status |
|-----------|-------|-------|--------| |-----------|-------|-------|--------|
| Stress constraint | 130 MPa | From intake — Gap G9 | 🟡 Not yet confirmed for Gen 002 | | Stress constraint | 130 MPa | From intake — Gap G9 | 🟡 Not yet confirmed for Gen 002 |
| Implied safety factor | ~2.2 | vs. 285 MPa yield (estimated) | Conservative | | Implied safety factor | ~2.2 | vs. 285 MPa yield (estimated) | Conservative |
> ⚠️ Need to confirm whether the 130 MPa stress limit from Gen 001 intake still applies given the mass discrepancy resolution. The 130 MPa may have been set for the ~974 kg model. > ⚠️ Need to confirm whether the 130 MPa stress limit from Gen 001 intake still applies given the mass discrepancy resolution. The 130 MPa may have been set for the ~974 kg model.
## Future Material Expansion ## Future Material Expansion
Antoine explicitly requested future material support (KBS session 20260210-163801): Antoine explicitly requested future material support (KBS session 20260210-163801):
| Material | Standard | Priority | Notes | | Material | Standard | Priority | Notes |
|----------|----------|----------|-------| |----------|----------|----------|-------|
| **Aluminum 6061** | — | Future | Antoine: "change this type of material for aluminum, 6061" | | **Aluminum 6061** | — | Future | Antoine: "change this type of material for aluminum, 6061" |
| **Stainless Steel ANSI 310** | ANSI 310 | Future | Antoine: "stainless steel. ANSI, let's say 310" | | **Stainless Steel ANSI 310** | ANSI 310 | Future | Antoine: "stainless steel. ANSI, let's say 310" |
> Antoine's instruction: "Don't start with [these]. Just add this as a future expansion for the optimization process." > Antoine's instruction: "Don't start with [these]. Just add this as a future expansion for the optimization process."
### Material Expansion Implications ### Material Expansion Implications
- Multi-material optimization would change the problem fundamentally: - Multi-material optimization would change the problem fundamentally:
- Different E, ρ, σ_y for each material → different optimal geometries - Different E, ρ, σ_y for each material → different optimal geometries
- Could be handled as a categorical DV or separate optimization runs per material - Could be handled as a categorical DV or separate optimization runs per material
- Aluminum 6061: E ≈ 69 GPa, ρ ≈ 2.7 g/cm³, σ_y ≈ 276 MPa — lighter but much less stiff - Aluminum 6061: E ≈ 69 GPa, ρ ≈ 2.7 g/cm³, σ_y ≈ 276 MPa — lighter but much less stiff
- SS 310: E ≈ 200 GPa, ρ ≈ 8.0 g/cm³, σ_y ≈ 205 MPa — heavier, similar stiffness, lower yield - SS 310: E ≈ 200 GPa, ρ ≈ 8.0 g/cm³, σ_y ≈ 205 MPa — heavier, similar stiffness, lower yield
## History ## History
- **Gen 001** (2026-02-09): Placeholder — only knew "Steel (AISI)" - **Gen 001** (2026-02-09): Placeholder — only knew "Steel (AISI)"
- **Gen 002** (2026-02-10): Confirmed AISI 1005 from KBS session. Density confirmed 7.3 g/cm³. Future materials flagged (Al 6061, SS 310). Typical mechanical properties added (pending NX verification). - **Gen 002** (2026-02-10): Confirmed AISI 1005 from KBS session. Density confirmed 7.3 g/cm³. Future materials flagged (Al 6061, SS 310). Typical mechanical properties added (pending NX verification).

View File

@@ -1,26 +1,26 @@
# Steel (AISI) # Steel (AISI)
**Status:** Placeholder — needs full material card details **Status:** Placeholder — needs full material card details
--- ---
## Properties ## Properties
| Property | Value | Units | Source | | Property | Value | Units | Source |
|----------|-------|-------|--------| |----------|-------|-------|--------|
| Standard | AISI | — | Intake | | Standard | AISI | — | Intake |
| Grade | ❓ TBD | — | Need from NX model | | Grade | ❓ TBD | — | Need from NX model |
| Yield strength | ❓ TBD | MPa | — | | Yield strength | ❓ TBD | MPa | — |
| E (Young's modulus) | ❓ TBD | GPa | — | | E (Young's modulus) | ❓ TBD | GPa | — |
| Density | ❓ TBD | kg/m³ | — | | Density | ❓ TBD | kg/m³ | — |
| Poisson's ratio | ❓ TBD | — | — | | Poisson's ratio | ❓ TBD | — | — |
## Notes ## Notes
- Stress allowable of 130 MPa was given as constraint — need to confirm basis (Gap G9) - Stress allowable of 130 MPa was given as constraint — need to confirm basis (Gap G9)
- If yield is ~250 MPa, then 130 MPa implies SF ≈ 1.9 — conservative - If yield is ~250 MPa, then 130 MPa implies SF ≈ 1.9 — conservative
- Material card should be extracted from NX model during introspection - Material card should be extracted from NX model during introspection
## History ## History
- **Gen 001** (2026-02-09): Placeholder from intake — "Steel (AISI)" is all we have - **Gen 001** (2026-02-09): Placeholder from intake — "Steel (AISI)" is all we have

View File

@@ -0,0 +1,59 @@
# Steel — AISI 1005
**Status:** Baseline material confirmed (Gen 002)
**NX Material Name:** "beam material" (inherited by thin shell property)
---
## Properties
| Property | Value | Units | Source | Confidence |
|----------|-------|-------|--------|------------|
| Standard | AISI / SAE | — | KBS session | ✅ Confirmed |
| Grade | **1005** | — | KBS session ("NSE steel 10 or 5" = ANSI Steel 1005) | ✅ Confirmed |
| Density | **7.3** | g/cm³ (7,300 kg/m³) | KBS session — Antoine stated directly | ✅ Confirmed |
| E (Young's modulus) | ~200 | GPa | Typical for AISI 1005 — **needs NX verification** | 🟡 Estimated |
| Yield strength | ~285 | MPa | Typical for AISI 1005 (cold-drawn) — **needs NX verification** | 🟡 Estimated |
| UTS | ~330 | MPa | Typical for AISI 1005 — **needs NX verification** | 🟡 Estimated |
| Poisson's ratio | ~0.29 | — | Typical for carbon steel — **needs NX verification** | 🟡 Estimated |
| Elongation | ~20 | % | Typical for AISI 1005 — **needs verification** | 🟡 Estimated |
## Notes on AISI 1005
- AISI 1005 is a **low-carbon plain steel** (0.06% max C) in the 10xx series
- Commonly used for structural applications — good weldability, moderate strength
- NX material library designation may vary (Antoine said "NSE steel 10 or 5" which maps to ANSI/AISI Steel 1005)
- **Density note:** Antoine stated 7.3 g/cm³. Standard steel is 7.85 g/cm³. The 7.3 value may be the NX library default or a specific setting. This affects mass calculation directly.
## Stress Allowable
| Parameter | Value | Basis | Status |
|-----------|-------|-------|--------|
| Stress constraint | 130 MPa | From intake — Gap G9 | 🟡 Not yet confirmed for Gen 002 |
| Implied safety factor | ~2.2 | vs. 285 MPa yield (estimated) | Conservative |
> ⚠️ Need to confirm whether the 130 MPa stress limit from Gen 001 intake still applies given the mass discrepancy resolution. The 130 MPa may have been set for the ~974 kg model.
## Future Material Expansion
Antoine explicitly requested future material support (KBS session 20260210-163801):
| Material | Standard | Priority | Notes |
|----------|----------|----------|-------|
| **Aluminum 6061** | — | Future | Antoine: "change this type of material for aluminum, 6061" |
| **Stainless Steel ANSI 310** | ANSI 310 | Future | Antoine: "stainless steel. ANSI, let's say 310" |
> Antoine's instruction: "Don't start with [these]. Just add this as a future expansion for the optimization process."
### Material Expansion Implications
- Multi-material optimization would change the problem fundamentally:
- Different E, ρ, σ_y for each material → different optimal geometries
- Could be handled as a categorical DV or separate optimization runs per material
- Aluminum 6061: E ≈ 69 GPa, ρ ≈ 2.7 g/cm³, σ_y ≈ 276 MPa — lighter but much less stiff
- SS 310: E ≈ 200 GPa, ρ ≈ 8.0 g/cm³, σ_y ≈ 205 MPa — heavier, similar stiffness, lower yield
## History
- **Gen 001** (2026-02-09): Placeholder — only knew "Steel (AISI)"
- **Gen 002** (2026-02-10): Confirmed AISI 1005 from KBS session. Density confirmed 7.3 g/cm³. Future materials flagged (Al 6061, SS 310). Typical mechanical properties added (pending NX verification).

View File

@@ -1,25 +1,25 @@
# Reference Models — Hydrotech Beam # Reference Models — Hydrotech Beam
Golden copies of the NX model files. **Do not modify these directly.** Golden copies of the NX model files. **Do not modify these directly.**
Studies should copy these to their own `model/` folder and modify there. Studies should copy these to their own `model/` folder and modify there.
## Files ## Files
| File | Description | Status | | File | Description | Status |
|------|-------------|--------| |------|-------------|--------|
| `Beam.prt` | NX CAD part — sandwich I-beam with lightening holes | ⏳ Pending upload | | `Beam.prt` | NX CAD part — sandwich I-beam with lightening holes | ⏳ Pending upload |
| `Beam_fem1.fem` | FEM mesh file | ⏳ Pending upload | | `Beam_fem1.fem` | FEM mesh file | ⏳ Pending upload |
| `Beam_fem1_i.prt` | Idealized part for FEM | ⏳ Pending upload | | `Beam_fem1_i.prt` | Idealized part for FEM | ⏳ Pending upload |
| `Beam_sim1.sim` | Simulation file — SOL 101 static | ⏳ Pending upload | | `Beam_sim1.sim` | Simulation file — SOL 101 static | ⏳ Pending upload |
## Key Expression ## Key Expression
- `p173` — beam mass (kg) - `p173` — beam mass (kg)
## Notes ## Notes
- ⏳ Awaiting Syncthing setup for project folder sync (dalidou ↔ server) - ⏳ Awaiting Syncthing setup for project folder sync (dalidou ↔ server)
- Model files will appear here once sync is live - Model files will appear here once sync is live
- Verify model rebuild across full design variable range before optimization - Verify model rebuild across full design variable range before optimization
- **Do NOT modify these reference copies** — studies copy them to their own `model/` folder - **Do NOT modify these reference copies** — studies copy them to their own `model/` folder

View File

@@ -0,0 +1,25 @@
# Reference Models — Hydrotech Beam
Golden copies of the NX model files. **Do not modify these directly.**
Studies should copy these to their own `model/` folder and modify there.
## Files
| File | Description | Status |
|------|-------------|--------|
| `Beam.prt` | NX CAD part — sandwich I-beam with lightening holes | ⏳ Pending upload |
| `Beam_fem1.fem` | FEM mesh file | ⏳ Pending upload |
| `Beam_fem1_i.prt` | Idealized part for FEM | ⏳ Pending upload |
| `Beam_sim1.sim` | Simulation file — SOL 101 static | ⏳ Pending upload |
## Key Expression
- `p173` — beam mass (kg)
## Notes
- ⏳ Awaiting Syncthing setup for project folder sync (dalidou ↔ server)
- Model files will appear here once sync is live
- Verify model rebuild across full design variable range before optimization
- **Do NOT modify these reference copies** — studies copy them to their own `model/` folder

View File

@@ -0,0 +1,25 @@
# Reference Models — Hydrotech Beam
Golden copies of the NX model files. **Do not modify these directly.**
Studies should copy these to their own `model/` folder and modify there.
## Files
| File | Description | Status |
|------|-------------|--------|
| `Beam.prt` | NX CAD part — sandwich I-beam with lightening holes | ⏳ Pending upload |
| `Beam_fem1.fem` | FEM mesh file | ⏳ Pending upload |
| `Beam_fem1_i.prt` | Idealized part for FEM | ⏳ Pending upload |
| `Beam_sim1.sim` | Simulation file — SOL 101 static | ⏳ Pending upload |
## Key Expression
- `p173` — beam mass (kg)
## Notes
- ⏳ Awaiting Syncthing setup for project folder sync (dalidou ↔ server)
- Model files will appear here once sync is live
- Verify model rebuild across full design variable range before optimization
- **Do NOT modify these reference copies** — studies copy them to their own `model/` folder

View File

@@ -0,0 +1 @@
p173=1343.5034206648418

View File

@@ -1 +1 @@
p173=1343.5034206648418 1343.5034206648418

View File

@@ -0,0 +1,15 @@
{
"part_file": "Beam",
"mass_kg": 1343.5034206648418,
"mass_g": 1343503.4206648418,
"volume_mm3": 170668625.59258664,
"surface_area_mm2": 9376402.579189494,
"center_of_gravity_mm": [
2499.9999999999995,
-3.0683416327531814e-13,
-7.359365939967888e-13
],
"num_bodies": 1,
"success": true,
"error": null
}

View File

@@ -0,0 +1,39 @@
# Playbook — DOE (Phase 1 Landscape)
## Scope
Design of Experiments for Hydrotech Beam: baseline + LHS samples to map design space.
## Standard flow
1. Prepare clean state (archive previous results if needed)
2. Run DOE with explicit backend
3. Validate outputs
4. Evaluate gate criteria
5. Decide next phase (rerun bounds/constraints or move to TPE)
## Commands
### Real engineering DOE
```powershell
python .\run_doe.py --backend nxopen --model-dir "<PATH_TO_NX_MODELS>" --clean --study-name hydrotech_beam_doe_phase1_real
```
### Debug DOE only (synthetic)
```powershell
python .\run_doe.py --backend stub --clean --study-name hydrotech_beam_doe_phase1_stub
```
## Interpretation checklist
- `geo_infeasible` high: geometry bounds/checks may be too broad or too strict
- `fully_feasible = 0`: constraints may be too strict for current design space
- Very low runtime and suspiciously smooth outputs: likely stub execution
## Decision branch
- If gate passed: proceed to TPE seeded by feasible points
- If gate failed:
- adjust constraints and/or DV bounds
- rerun clean DOE
## Documentation requirement
After each DOE run, update:
- run record
- decision and rationale
- next action owner

View File

@@ -0,0 +1,38 @@
# Playbook — NX Real Run (Hydrotech Beam)
## Objective
Run a **real** DOE using NX/Simcenter (not stub), with clean artifacts and traceability.
## Pre-Run Checklist
- [ ] In study folder: `...\studies\01_doe_landscape`
- [ ] Model directory contains expected `.sim`, `.fem`, `.prt`
- [ ] Syncthing healthy on both ends (no major errors)
- [ ] No unintended `*.sync-conflict-*` in active results root
- [ ] Command prepared with explicit `--backend nxopen`
## Recommended command
```powershell
python .\run_doe.py --backend nxopen --model-dir "<PATH_TO_NX_MODELS>" --clean --study-name hydrotech_beam_doe_phase1_real
```
## During run — sanity checks
- Runtime per solved trial should be non-trivial (not near-zero for all trials).
- Log should indicate NX solve flow, not stub messages.
- Iteration outputs should be created.
## Post-run validation
1. Check `results/doe_summary.json`
2. Check `results/doe_results.csv`
3. Verify:
- trial count expected (typically 51 for baseline + 50 LHS)
- solved/failed counts make sense
- mass values are numeric for solved trials
- no obvious synthetic patterns indicating stub run
## Quality gate reminder
Phase 1 gate (current):
- ≥5 feasible points
- ≥80% solve success
## Mandatory logging
Record the run in project docs using the run log template from `USER_GUIDE.md`.

View File

@@ -0,0 +1,38 @@
# Playbook — Syncthing Recovery (Hydrotech Beam)
## Symptoms
- Latest run not visible on other side
- Old timestamps persist remotely
- `*.sync-conflict-*` files appear in `results/`
## Recovery steps
1. Confirm both sides point to the same folder path
2. Rescan folder in Syncthing GUI
3. Pause/resume folder if stale
4. Restart Syncthing if needed
5. Archive conflicts from active results root
## Conflict archive snippet (PowerShell)
```powershell
$ts = Get-Date -Format "yyyyMMdd_HHmmss"
$archive = ".\results\archive_conflicts_$ts"
New-Item -ItemType Directory -Path $archive -Force | Out-Null
Get-ChildItem .\results -File -Filter "*.sync-conflict-*" | Move-Item -Destination $archive
```
## Clean rerun prep snippet (PowerShell)
```powershell
$ts = Get-Date -Format "yyyyMMdd_HHmmss"
$old = ".\results\archive_before_clean_rerun_$ts"
New-Item -ItemType Directory -Path $old -Force | Out-Null
$toArchive = @("doe_results.csv","doe_summary.json","doe_run.log","history.csv","history.db","optuna_study.db")
foreach ($f in $toArchive) {
if (Test-Path ".\results\$f") { Move-Item ".\results\$f" $old }
}
```
## Verification
- Main `results/` has only current active artifacts
- Conflict files moved to archive folder
- Remote side sees same timestamps/files

View File

@@ -0,0 +1,514 @@
# Optimization Strategy — Hydrotech Beam DoE & Landscape Mapping
**Study:** `01_doe_landscape`
**Project:** Hydrotech Beam Structural Optimization
**Author:** ⚡ Optimizer Agent
**Date:** 2025-02-09 (updated 2026-02-10 — introspection corrections)
**Status:** APPROVED WITH CONDITIONS — Auditor review 2026-02-10, blockers resolved inline
**References:** [BREAKDOWN.md](../../BREAKDOWN.md), [DECISIONS.md](../../DECISIONS.md), [CONTEXT.md](../../CONTEXT.md)
---
## 1. Problem Formulation
### 1.1 Objective
$$\min_{x} \quad f(x) = \text{mass}(x) \quad [\text{kg}]$$
Single-objective minimization of total beam mass. This aligns with DEC-HB-001 (approved by Tech Lead, pending CEO confirmation).
### 1.2 Constraints
| ID | Constraint | Operator | Limit | Units | Source |
|----|-----------|----------|-------|-------|--------|
| g₁ | Tip displacement | ≤ | 10.0 | mm | NX Nastran SOL 101 — displacement sensor at beam tip |
| g₂ | Max von Mises stress | ≤ | 130.0 | MPa | NX Nastran SOL 101 — max elemental nodal VM stress |
Both are **hard constraints** — no trade-off or relaxation without CEO approval.
### 1.3 Design Variables
| ID | NX Expression | Type | Lower | Upper | Baseline | Units | Notes |
|----|---------------|------|-------|-------|----------|-------|-------|
| DV1 | `beam_half_core_thickness` | Continuous | 10 | 40 | **25.162** | mm | Core half-thickness; stiffness scales ~quadratically via sandwich effect |
| DV2 | `beam_face_thickness` | Continuous | 10 | 40 | **21.504** | mm | Face sheet thickness; primary bending stiffness contributor |
| DV3 | `holes_diameter` | Continuous | 150 | 450 | 300 | mm | Lightening hole diameter; mass ∝ d² reduction |
| DV4 | `hole_count` (→ `Pattern_p7`) | **Integer** | 5 | 15 | 10 | — | Number of lightening holes; 11 discrete levels |
**Total design space:** 3 continuous × 1 integer (11 levels) = effectively 3D continuous × 11 slices.
### 1.4 Integer Handling
Per DEC-HB-003, `hole_count` is treated as a **true integer** throughout:
- **Phase 1 (LHS):** Generate continuous LHS, round DV4 to nearest integer. Use stratified integer sampling to ensure coverage across all 11 levels.
- **Phase 2 (TPE):** Optuna `IntDistribution(5, 15)` — native integer support, no rounding hacks.
- **NX rebuild:** The model requires integer hole count. Non-integer values will cause geometry failures.
### 1.5 Baseline Assessment
| Metric | Baseline Value | Constraint | Status |
|--------|---------------|------------|--------|
| Mass | **1,133.01 kg** | (minimize) | Overbuilt — room to reduce |
| Tip displacement | ~22 mm (unverified — awaiting baseline re-run) | ≤ 10 mm | ❌ **Likely FAILS** |
| VM stress | (unknown — awaiting baseline re-run) | ≤ 130 MPa | ⚠️ Unconfirmed |
> ⚠️ **Critical:** The baseline design likely **violates** the displacement constraint (~22 mm vs 10 mm limit). Baseline re-run pending — CEO running SOL 101 in parallel. The optimizer must first find the feasible region before it can meaningfully minimize mass. This shapes the entire strategy.
>
> **Introspection note (2026-02-10):** Mass expression is `p173` (body_property147.mass, kg). DV baselines are NOT round numbers (face=21.504mm, core=25.162mm). NX expression `beam_lenght` has a typo (no 'h'). `hole_count` links to `Pattern_p7` in the NX pattern feature.
---
## 2. Algorithm Selection
### 2.1 Tech Lead's Recommendation
DEC-HB-002 proposes a two-phase strategy:
- **Phase 1:** Latin Hypercube Sampling (LHS) — 4050 trials
- **Phase 2:** TPE via Optuna — 60100 trials
### 2.2 My Assessment: **CONFIRMED with refinements**
The two-phase approach is the right call. Here's why, and what I'd adjust:
#### Why LHS → TPE is correct for this problem
| Factor | Implication | Algorithm Fit |
|--------|------------|---------------|
| 4 design variables (low-dim) | All methods work; sample efficiency less critical | Any |
| 1 integer variable | Need native mixed-type support | TPE ✓, CMA-ES ≈ (rounding) |
| Infeasible baseline | Must map feasibility BEFORE optimizing | LHS first ✓ |
| Expected significant interactions (DV1×DV2, DV3×DV4) | Need space-filling to detect interactions | LHS ✓ |
| Potentially narrow feasible region | Risk of missing it with random search | LHS gives systematic coverage ✓ |
| NX-in-the-loop (medium cost) | ~100-200 trials is budget-appropriate | TPE efficient enough ✓ |
#### What I'd modify
1. **Phase 1 budget: 50 trials (not 40).** With 4 variables, we want at least 10× the dimensionality for a reliable DoE. 50 trials also divides cleanly for stratified integer sampling (≈4-5 trials per hole_count level).
2. **Enqueue baseline as Trial 0.** LAC critical lesson: CMA-ES doesn't evaluate x0 first. While we're using LHS (not CMA-ES), the same principle applies — **always evaluate the baseline explicitly** so we have a verified anchor point. This also validates the extractor pipeline before burning 50 trials.
3. **Phase 2 budget: 80 trials (flexible 60-100).** Start with 60, apply convergence criteria (Section 6), extend to 100 if still improving.
4. **Seed Phase 2 from Phase 1 data.** Use Optuna's `enqueue_trial()` to warm-start TPE with the best feasible point(s) from the DoE. This avoids the TPE startup penalty (first `n_startup_trials` are random).
#### Algorithms NOT selected (and why)
| Algorithm | Why Not |
|-----------|---------|
| **CMA-ES** | Good option, but integer rounding is a hack; doesn't evaluate x0 first (LAC lesson); TPE is equally good at 4D |
| **NSGA-II** | Overkill for single-objective; population size wastes budget |
| **Surrogate + L-BFGS** | **LAC CRITICAL: Gradient descent on surrogates finds fake optima.** V5 mirror study: L-BFGS was 22% WORSE than pure TPE (WS=325 vs WS=290). V6 confirmed simple TPE beats complex surrogate methods. Do not use. |
| **SOL 200 (Nastran native)** | No integer support for hole_count; gradient-based so may miss global optimum; more NX setup effort. Keep as backup (Tech Lead's suggestion). |
| **Nelder-Mead** | No integer support; poor exploration; would miss the feasible region |
### 2.3 Final Algorithm Configuration
```
Phase 1: LHS DoE
- Trials: 50 (+ 1 baseline = 51 total)
- Sampling: Maximin LHS, DV4 rounded to nearest integer
- Purpose: Landscape mapping, feasibility identification, sensitivity analysis
Phase 2: TPE Optimization
- Trials: 60-100 (adaptive, see convergence criteria)
- Sampler: Optuna TPEsampler
- n_startup_trials: 0 (warm-started from Phase 1 best)
- Constraint handling: Optuna constraint interface with Deb's rules
- Purpose: Converge to minimum-mass feasible design
Total budget: 111-151 evaluations
```
---
## 3. Constraint Handling
### 3.1 The Challenge
The baseline FAILS the displacement constraint by 120% (22 mm vs 10 mm). This means:
- A significant portion of the design space may be infeasible
- Random sampling may return few or zero feasible points
- The optimizer must navigate toward feasibility AND optimality simultaneously
### 3.2 Approach: Deb's Feasibility Rules (Constraint Domination)
For ranking solutions during optimization, use **Deb's feasibility rules** (Deb 2000):
1. **Feasible vs feasible** → compare by objective (lower mass wins)
2. **Feasible vs infeasible** → feasible always wins
3. **Infeasible vs infeasible** → lower total constraint violation wins
This is implemented via Optuna's constraint interface:
```python
def constraints(trial):
"""Return constraint violations (negative = feasible, positive = infeasible)."""
disp = trial.user_attrs["tip_displacement"]
stress = trial.user_attrs["max_von_mises"]
return [
disp - 10.0, # ≤ 0 means displacement ≤ 10 mm
stress - 130.0, # ≤ 0 means stress ≤ 130 MPa
]
```
### 3.3 Why NOT Penalty Functions
| Method | Pros | Cons | Verdict |
|--------|------|------|---------|
| **Deb's rules** (selected) | No tuning params; feasible always beats infeasible; explores infeasible region for learning | Requires custom Optuna integration | ✅ Best for this case |
| **Quadratic penalty** | Simple to implement | Penalty weight requires tuning; wrong weight → optimizer ignores constraint OR over-penalizes | ❌ Fragile |
| **Adaptive penalty** | Self-tuning | Complex implementation; may oscillate | ❌ Over-engineered for 4 DVs |
| **Death penalty** (reject infeasible) | Simplest | With infeasible baseline, may reject 80%+ of trials → wasted budget | ❌ Dangerous |
### 3.4 Phase 1 (DoE) Constraint Handling
During the DoE phase, **record all results without filtering.** Every trial runs, every result is stored. Infeasible points are valuable for:
- Mapping the feasibility boundary
- Training the TPE model in Phase 2
- Understanding which variables drive constraint violation
### 3.5 Constraint Margin Buffer
Consider a 5% inner margin during optimization to account for numerical noise:
- Displacement target for optimizer: ≤ 9.5 mm (vs hard limit 10.0 mm)
- Stress target for optimizer: ≤ 123.5 MPa (vs hard limit 130.0 MPa)
The hard limits remain 10 mm / 130 MPa for final validation. The buffer prevents the optimizer from converging to designs that are right on the boundary and may flip infeasible under mesh variation.
---
## 4. Search Space Analysis
### 4.1 Bound Reasonableness
| Variable | Range | Span | Concern |
|----------|-------|------|---------|
| DV1: half_core_thickness | 1040 mm | 4× range | Reasonable. Lower bound = thin core, upper = thick. Stiffness-mass trade-off |
| DV2: face_thickness | 1040 mm | 4× range | Reasonable. 10 mm face is already substantial for steel |
| DV3: holes_diameter | 150450 mm | 3× range | ⚠️ **Needs geometric check** — see §4.2 |
| DV4: hole_count | 515 | 3× range | ⚠️ **Needs geometric check** — see §4.2 |
### 4.2 Geometric Feasibility: Hole Overlap Analysis
**Critical concern:** At extreme DV3 × DV4 combinations, holes may overlap or leave insufficient ligament (material between holes).
#### Overlap condition (CORRECTED — Auditor review 2026-02-10)
The NX pattern places `n` holes across a span of `p6` mm using `n-1` intervals (holes at both endpoints of the span). Confirmed by introspection: `Pattern_p8 = 4000/9 = 444.44 mm`.
```
Spacing between hole centers = hole_span / (hole_count - 1)
Ligament between holes = spacing - d = hole_span/(hole_count - 1) - d
```
For **no overlap**, we need: `hole_span/(n-1) - d > 0`, i.e., `d < hole_span/(n-1)`
With `hole_span = 4,000 mm` (fixed, `p6`):
#### Worst case: n=15 holes, d=450 mm
```
Spacing = 4000 / (15-1) = 285.7 mm
Ligament = 285.7 - 450 = -164.3 mm → INFEASIBLE (overlap)
```
#### Minimum ligament width
For structural integrity and mesh quality, a minimum ligament of ~30 mm is advisable:
```
Minimum ligament constraint: hole_span / (hole_count - 1) - holes_diameter ≥ 30 mm
```
#### Pre-flight geometric filter
Before sending any trial to NX, compute:
1. `ligament = 4000 / (hole_count - 1) - holes_diameter` → must be ≥ 30 mm
2. `web_clear = 2 × beam_half_height - 2 × beam_face_thickness - holes_diameter` → must be > 0
If either fails, skip NX evaluation and record as infeasible with max constraint violation. This saves compute and avoids NX geometry crashes.
### 4.3 Hole-to-Web-Height Ratio (CORRECTED — Auditor review 2026-02-10)
The hole diameter must fit within the web clear height. From introspection:
- Total beam height = `2 × beam_half_height = 2 × 250 = 500 mm` (fixed)
- Web clear height = `total_height - 2 × face_thickness = 500 - 2 × beam_face_thickness`
```
At baseline (face=21.504mm): web_clear = 500 - 2×21.504 = 456.99 mm → holes of 450mm barely fit (7mm clearance)
At face=40mm: web_clear = 500 - 2×40 = 420 mm → holes of 450mm DO NOT FIT
At face=10mm: web_clear = 500 - 2×10 = 480 mm → holes of 450mm fit (30mm clearance)
```
This means `beam_face_thickness` and `holes_diameter` interact geometrically — thicker faces reduce the web clear height available for holes. This constraint is captured in the pre-flight filter (§4.2):
```
web_clear = 500 - 2 × beam_face_thickness - holes_diameter > 0
```
### 4.4 Expected Feasible Region
Based on the physics (Tech Lead's analysis §1.2 and §1.3):
| To reduce displacement (currently 22→10 mm) | Effect on mass |
|----------------------------------------------|---------------|
| ↑ DV1 (thicker core) | ↑ mass (but stiffness scales ~d², mass scales ~d) → **efficient** |
| ↑ DV2 (thicker face) | ↑ mass (direct) |
| ↓ DV3 (smaller holes) | ↑ mass (more web material) |
| ↓ DV4 (fewer holes) | ↑ mass (more web material) |
**Prediction:** The feasible region (displacement ≤ 10 mm) likely requires:
- DV1 in upper range (25-40 mm) — the sandwich effect is the most mass-efficient stiffness lever
- DV2 moderate (15-30 mm) — thicker faces help stiffness but cost mass directly
- DV3 and DV4 constrained by stress — large/many holes save mass but increase stress
The optimizer should find a "sweet spot" where core thickness provides stiffness, and holes are sized to save mass without violating stress limits.
### 4.5 Estimated Design Space Volume
- DV1: 30 mm span (continuous)
- DV2: 30 mm span (continuous)
- DV3: 300 mm span (continuous)
- DV4: 11 integer levels
Total configurations: effectively infinite (3 continuous), but the integer dimension creates 11 "slices" of the space. With 50 DoE trials, we get ~4-5 trials per slice — sufficient for trend identification.
---
## 5. Trial Budget & Compute Estimate
### 5.1 Budget Breakdown
| Phase | Trials | Purpose |
|-------|--------|---------|
| **Trial 0** | 1 | Baseline validation (enqueued) |
| **Phase 1: LHS DoE** | 50 | Landscape mapping, feasibility, sensitivity |
| **Phase 2: TPE** | 60100 | Directed optimization |
| **Validation** | 35 | Confirm optimum, check mesh sensitivity |
| **Total** | **114156** | |
### 5.2 Compute Time Estimate
| Parameter | Estimate | Notes |
|-----------|----------|-------|
| DOF count | 10K100K | Steel beam, SOL 101 |
| Single solve time | 30s3min | Depends on mesh density |
| Model rebuild time | 1030s | NX parametric update + remesh |
| Total per trial | 14 min | Rebuild + solve + extraction |
| Phase 1 (51 trials) | 13.5 hrs | |
| Phase 2 (60100 trials) | 17 hrs | |
| **Total compute** | **210 hrs** | Likely ~45 hrs |
### 5.3 Budget Justification
For 4 design variables, rule-of-thumb budgets:
- **Minimum viable:** 10 × n_vars = 40 trials (DoE only)
- **Standard:** 25 × n_vars = 100 trials (DoE + optimization)
- **Thorough:** 50 × n_vars = 200 trials (with validation)
Our budget of 114156 falls in the **standard-to-thorough** range. Appropriate for a first study where we're mapping an unknown landscape with an infeasible baseline.
---
## 6. Convergence Criteria
### 6.1 Phase 1 (DoE) — No Convergence Criteria
The DoE runs all 50 planned trials. It's not iterative — it's a one-shot space-filling design. Stop conditions:
- All 50 trials complete (or fail with documented errors)
- **Early abort:** If >80% of trials fail to solve (NX crashes), stop and investigate
### 6.2 Phase 2 (TPE) — Convergence Criteria
| Criterion | Threshold | Action |
|-----------|-----------|--------|
| **Improvement stall** | Best feasible objective unchanged for 20 consecutive trials | Consider stopping |
| **Relative improvement** | < 1% improvement over last 20 trials | Consider stopping |
| **Budget exhausted** | 100 trials completed in Phase 2 | Hard stop |
| **Perfect convergence** | Multiple trials within 0.5% of each other from different regions | Confident optimum found |
| **Minimum budget** | Always run at least 60 trials in Phase 2 | Ensures adequate exploration |
### 6.3 Decision Logic
```
After 60 Phase 2 trials:
IF best_feasible improved by >2% in last 20 trials → continue to 80
IF no feasible solution found → STOP, escalate (see §7.1)
ELSE → assess convergence, decide 80 or 100
After 80 Phase 2 trials:
IF still improving >1% per 20 trials → continue to 100
ELSE → STOP, declare converged
After 100 Phase 2 trials:
HARD STOP regardless
```
### 6.4 Phase 1 → Phase 2 Gate
Before starting Phase 2, review DoE results:
| Check | Action if FAIL |
|-------|---------------|
| At least 5 feasible points found | If 0 feasible: expand bounds or relax constraints (escalate to CEO) |
| NX solve success rate > 80% | If <80%: investigate failures, fix model, re-run failed trials |
| No systematic NX crashes at bounds | If crashes: tighten bounds away from failure region |
| Sensitivity trends visible | If flat: check extractors, may be reading wrong output |
---
## 7. Risk Mitigation
### 7.1 Risk: Feasible Region is Empty
**Likelihood: Medium** (baseline fails displacement by 120%)
**Detection:** After Phase 1, zero feasible points found.
**Mitigation ladder:**
1. **Check the data** — Are extractors reading correctly? Validate against manual NX check.
2. **Examine near-feasible** — Find the trial closest to feasibility. How far off? If displacement = 10.5 mm, we're close. If displacement = 18 mm, we have a problem.
3. **Targeted exploration** — Run additional trials at extreme stiffness (max DV1, max DV2, min DV3, min DV4). If even the stiffest/heaviest design fails, the constraint is physically impossible with this geometry.
4. **Constraint relaxation** — Propose to CEO: relax displacement to 12 or 15 mm. Document the mass-displacement Pareto front from DoE data to support the discussion.
5. **Geometric redesign** — If the problem is fundamentally infeasible, the beam geometry needs redesign (out of optimization scope).
### 7.2 Risk: NX Crashes at Parameter Extremes
**Likelihood: Medium** (LAC: rib_thickness had undocumented CAD constraint at 9mm, causing 34% failure rate in V13)
**Detection:** Solver returns no results for certain parameter combinations.
**Mitigation:**
1. **Pre-flight corner tests** — Before Phase 1, manually test the 16 corners of the design space (2⁴ combinations of min/max for each variable). This catches geometric rebuild failures early.
2. **Error-handling in run script** — Every trial must catch exceptions and log:
- NX rebuild failure (geometry Boolean crash)
- Meshing failure (degenerate elements)
- Solver failure (singularity, divergence)
- Extraction failure (missing result)
3. **Infeasible-by-default** — If a trial fails for any reason, record it as infeasible with maximum constraint violation (displacement=9999, stress=9999). This lets Deb's rules naturally steer away from crashing regions.
4. **NEVER kill NX processes directly** — LAC CRITICAL RULE. Use NXSessionManager.close_nx_if_allowed() only. If NX hangs, implement a timeout (e.g., 10 min per trial) and let NX time out gracefully.
### 7.3 Risk: Mesh-Dependent Stress Results
**Likelihood: Medium** (stress at hole edges is mesh-sensitive)
**Mitigation:**
1. **Mesh convergence pre-study** — Run baseline at 3 mesh densities. If stress varies >10%, refine mesh or use stress averaging region.
2. **Consistent mesh controls** — Ensure NX applies the same mesh size/refinement strategy regardless of parameter values. The parametric model should have mesh controls tied to hole geometry.
3. **Stress extraction method** — Use elemental nodal stress (conservative) per LAC success pattern. Note: pyNastran returns stress in kPa for NX kg-mm-s unit system — **divide by 1000 for MPa**.
### 7.4 Risk: Surrogate Temptation
**Mitigation: DON'T DO IT (yet).**
LAC lessons from the M1 Mirror project are unequivocal:
- V5 surrogate + L-BFGS was 22% **worse** than V6 pure TPE
- MLP surrogates have smooth gradients everywhere → L-BFGS descends to fake optima outside training distribution
- No uncertainty quantification = no way to detect out-of-distribution predictions
With only 4 variables and affordable FEA (~2 min/trial), direct FEA evaluation via TPE is both simpler and more reliable. Surrogate methods should only be considered if:
- FEA solve time exceeds 30 minutes per trial, AND
- We have 100+ validated training points, AND
- We use ensemble surrogates with uncertainty quantification (SYS_16 protocol)
### 7.5 Risk: Study Corruption
**Mitigation:** LAC CRITICAL — **Always copy working studies, never rewrite from scratch.**
- Phase 2 study will be created by **copying** the Phase 1 study directory and adding optimization logic
- Never modify `run_optimization.py` in-place for a new phase — copy to a new version
- Git-commit the study directory after each phase completion
---
## 8. AtomizerSpec Draft
See [`atomizer_spec_draft.json`](./atomizer_spec_draft.json) for the full JSON config.
### 8.1 Key Configuration Decisions
| Setting | Value | Rationale |
|---------|-------|-----------|
| `algorithm.phase1.type` | `LHS` | Space-filling DoE for landscape mapping |
| `algorithm.phase2.type` | `TPE` | Native mixed-integer, sample-efficient, LAC-proven |
| `hole_count.type` | `integer` | DEC-HB-003: true integer, no rounding |
| `constraint_handling` | `deb_feasibility_rules` | Best for infeasible baseline |
| `baseline_trial` | `enqueued` | LAC lesson: always validate baseline first |
| `penalty_config.method` | `deb_rules` | No penalty weight tuning needed |
### 8.2 Extractor Requirements
| ID | Type | Output | Source | Notes |
|----|------|--------|--------|-------|
| `ext_001` | `expression` | `mass` | NX expression `p173` | Direct read from NX |
| `ext_002` | `displacement` | `tip_displacement` | SOL 101 result sensor or .op2 parse | ⚠️ Need sensor setup or node ID |
| `ext_003` | `stress` | `max_von_mises` | SOL 101 elemental nodal | kPa → MPa conversion needed |
### 8.3 Open Items for Spec Finalization
Before this spec can be promoted from `_draft` to production:
1. **Beam web length** — Required to validate DV3 × DV4 geometric feasibility
2. **Displacement extraction method** — Sensor in .sim, or node ID for .op2 parsing?
3. **Stress extraction scope** — Whole model max, or specific element group?
4. **NX expression names confirmed** — Verify `p173` is mass, confirm displacement/stress expression names
5. **Solver runtime benchmark** — Time one SOL 101 run to refine compute estimates
6. **Corner test results** — Validate model rebuilds at all 16 bound corners
---
## 9. Execution Plan Summary
```
┌─────────────────────────────────────────────────────────────────┐
│ HYDROTECH BEAM OPTIMIZATION │
│ Study: 01_doe_landscape │
├─────────────────────────────────────────────────────────────────┤
│ │
│ PRE-FLIGHT (before any trials) │
│ ├── Validate baseline: run Trial 0, verify mass/disp/stress │
│ ├── Corner tests: 16 extreme combinations, check NX rebuilds │
│ ├── Mesh convergence: 3 density levels at baseline │
│ └── Confirm extractors: mass, displacement, stress pipelines │
│ │
│ PHASE 1: DoE LANDSCAPE (51 trials) │
│ ├── Trial 0: Baseline (enqueued) │
│ ├── Trials 1-50: LHS with integer rounding for hole_count │
│ ├── Analysis: sensitivity, interaction, feasibility mapping │
│ └── GATE: ≥5 feasible? NX success >80%? Proceed/escalate │
│ │
│ PHASE 2: TPE OPTIMIZATION (60-100 trials) │
│ ├── Warm-start from best Phase 1 feasible point(s) │
│ ├── Deb's feasibility rules for constraint handling │
│ ├── Convergence check every 20 trials │
│ └── Hard stop at 100 trials │
│ │
│ VALIDATION (3-5 trials) │
│ ├── Re-run best design to confirm repeatability │
│ ├── Perturb ±5% on each variable to check sensitivity │
│ └── Document final design with full NX results │
│ │
│ TOTAL: 114-156 NX evaluations | ~4-5 hours compute │
│ │
└─────────────────────────────────────────────────────────────────┘
```
---
## 10. LAC Lessons Incorporated
| LAC Lesson | Source | How Applied |
|------------|--------|-------------|
| CMA-ES doesn't evaluate x0 first | Mirror V7 failure | Baseline enqueued as Trial 0 for both phases |
| Surrogate + L-BFGS = fake optima | Mirror V5 failure | No surrogates in this study; direct FEA only |
| Never kill NX processes directly | Dec 2025 incident | Timeout-based error handling; NXSessionManager only |
| Copy working studies, never rewrite | Mirror V5 failure | Phase 2 created by copying Phase 1 |
| pyNastran stress in kPa | Support arm success | Extractor divides by 1000 for MPa |
| CAD constraints can limit bounds | Mirror V13 (rib_thickness) | Pre-flight corner tests before DoE |
| Always include README.md | Repeated failures (Dec 2025, Jan 2026) | README.md created with study |
| Simple beats complex (TPE > surrogate) | Mirror V6 vs V5 | TPE selected over surrogate-based methods |
---
*⚡ Optimizer — The algorithm is the strategy.*

View File

@@ -1,235 +1,235 @@
# Study: 01_doe_landscape — Hydrotech Beam # Study: 01_doe_landscape — Hydrotech Beam
> See [../../README.md](../../README.md) for project overview. > See [../../README.md](../../README.md) for project overview.
## Purpose ## Purpose
Map the design space of the Hydrotech sandwich I-beam to identify feasible regions, characterize variable sensitivities, and prepare data for Phase 2 (TPE optimization). This is Phase 1 of the two-phase strategy (DEC-HB-002). Map the design space of the Hydrotech sandwich I-beam to identify feasible regions, characterize variable sensitivities, and prepare data for Phase 2 (TPE optimization). This is Phase 1 of the two-phase strategy (DEC-HB-002).
## Quick Facts ## Quick Facts
| Item | Value | | Item | Value |
|------|-------| |------|-------|
| **Objective** | Minimize mass (kg) | | **Objective** | Minimize mass (kg) |
| **Constraints** | Tip displacement ≤ 10 mm, Von Mises stress ≤ 130 MPa | | **Constraints** | Tip displacement ≤ 10 mm, Von Mises stress ≤ 130 MPa |
| **Design variables** | 4 (3 continuous + 1 integer) | | **Design variables** | 4 (3 continuous + 1 integer) |
| **Algorithm** | Phase 1: LHS DoE (50 trials + 1 baseline) | | **Algorithm** | Phase 1: LHS DoE (50 trials + 1 baseline) |
| **Total budget** | 51 evaluations | | **Total budget** | 51 evaluations |
| **Constraint handling** | Deb's feasibility rules (Optuna constraint interface) | | **Constraint handling** | Deb's feasibility rules (Optuna constraint interface) |
| **Status** | ✅ Pipeline operational — first results obtained 2026-02-11 | | **Status** | ✅ Pipeline operational — first results obtained 2026-02-11 |
| **Solver** | DesigncenterNX 2512 (NX Nastran SOL 101) | | **Solver** | DesigncenterNX 2512 (NX Nastran SOL 101) |
| **Solve time** | ~12 s/trial (~10 min for full DOE) | | **Solve time** | ~12 s/trial (~10 min for full DOE) |
| **First results** | Displacement=17.93mm, Stress=111.9MPa | | **First results** | Displacement=17.93mm, Stress=111.9MPa |
## Design Variables (confirmed via NX binary introspection) ## Design Variables (confirmed via NX binary introspection)
| ID | NX Expression | Range | Type | Baseline | Unit | | ID | NX Expression | Range | Type | Baseline | Unit |
|----|--------------|-------|------|----------|------| |----|--------------|-------|------|----------|------|
| DV1 | `beam_half_core_thickness` | 1040 | Continuous | 25.162 | mm | | DV1 | `beam_half_core_thickness` | 1040 | Continuous | 25.162 | mm |
| DV2 | `beam_face_thickness` | 1040 | Continuous | 21.504 | mm | | DV2 | `beam_face_thickness` | 1040 | Continuous | 21.504 | mm |
| DV3 | `holes_diameter` | 150450 | Continuous | 300 | mm | | DV3 | `holes_diameter` | 150450 | Continuous | 300 | mm |
| DV4 | `hole_count` | 515 | Integer | 10 | — | | DV4 | `hole_count` | 515 | Integer | 10 | — |
## Usage ## Usage
### Prerequisites ### Prerequisites
```bash ```bash
pip install -r requirements.txt pip install -r requirements.txt
``` ```
Requires: Python 3.10+, optuna, scipy, numpy, pandas. Requires: Python 3.10+, optuna, scipy, numpy, pandas.
### Development Run (stub solver) ### Development Run (stub solver)
```bash ```bash
# From the study directory: # From the study directory:
cd projects/hydrotech-beam/studies/01_doe_landscape/ cd projects/hydrotech-beam/studies/01_doe_landscape/
# Run with synthetic results (for pipeline testing): # Run with synthetic results (for pipeline testing):
python run_doe.py --backend stub python run_doe.py --backend stub
# With verbose logging: # With verbose logging:
python run_doe.py --backend stub -v python run_doe.py --backend stub -v
# Custom study name: # Custom study name:
python run_doe.py --backend stub --study-name my_test_run python run_doe.py --backend stub --study-name my_test_run
``` ```
### Production Run (NXOpen on Windows) ### Production Run (NXOpen on Windows)
```bash ```bash
# On dalidou (Windows node with DesigncenterNX 2512): # On dalidou (Windows node with DesigncenterNX 2512):
cd C:\Users\antoi\Atomizer\projects\hydrotech-beam\studies\01_doe_landscape cd C:\Users\antoi\Atomizer\projects\hydrotech-beam\studies\01_doe_landscape
conda activate atomizer conda activate atomizer
python run_doe.py --backend nxopen --model-dir "../../models" python run_doe.py --backend nxopen --model-dir "../../models"
``` ```
> ⚠️ `--model-dir` can be relative — the code resolves it with `Path.resolve()`. NX requires fully resolved paths (no `..` components). > ⚠️ `--model-dir` can be relative — the code resolves it with `Path.resolve()`. NX requires fully resolved paths (no `..` components).
### Resume Interrupted Study ### Resume Interrupted Study
```bash ```bash
python run_doe.py --backend stub --resume --study-name hydrotech_beam_doe_phase1 python run_doe.py --backend stub --resume --study-name hydrotech_beam_doe_phase1
``` ```
### CLI Options ### CLI Options
| Flag | Default | Description | | Flag | Default | Description |
|------|---------|-------------| |------|---------|-------------|
| `--backend` | `stub` | `stub` (testing) or `nxopen` (real NX) | | `--backend` | `stub` | `stub` (testing) or `nxopen` (real NX) |
| `--model-dir` | — | Path to NX model files (required for `nxopen`) | | `--model-dir` | — | Path to NX model files (required for `nxopen`) |
| `--study-name` | `hydrotech_beam_doe_phase1` | Optuna study name | | `--study-name` | `hydrotech_beam_doe_phase1` | Optuna study name |
| `--n-samples` | 50 | Number of LHS sample points | | `--n-samples` | 50 | Number of LHS sample points |
| `--seed` | 42 | Random seed for reproducibility | | `--seed` | 42 | Random seed for reproducibility |
| `--results-dir` | `results/` | Output directory | | `--results-dir` | `results/` | Output directory |
| `--resume` | false | Resume existing study | | `--resume` | false | Resume existing study |
| `--clean` | false | Delete Optuna DB and start fresh (history DB preserved) | | `--clean` | false | Delete Optuna DB and start fresh (history DB preserved) |
| `-v` | false | Verbose (DEBUG) logging | | `-v` | false | Verbose (DEBUG) logging |
## Files ## Files
| File | Description | | File | Description |
|------|-------------| |------|-------------|
| `run_doe.py` | Main entry point — orchestrates the DoE study | | `run_doe.py` | Main entry point — orchestrates the DoE study |
| `sampling.py` | LHS generation with stratified integer sampling | | `sampling.py` | LHS generation with stratified integer sampling |
| `geometric_checks.py` | Pre-flight geometric feasibility filter | | `geometric_checks.py` | Pre-flight geometric feasibility filter |
| `nx_interface.py` | AtomizerNXSolver wrapping optimization_engine | | `nx_interface.py` | AtomizerNXSolver wrapping optimization_engine |
| `iteration_manager.py` | Smart retention — last 10 + best 3 with full data | | `iteration_manager.py` | Smart retention — last 10 + best 3 with full data |
| `requirements.txt` | Python dependencies | | `requirements.txt` | Python dependencies |
| `OPTIMIZATION_STRATEGY.md` | Full strategy document | | `OPTIMIZATION_STRATEGY.md` | Full strategy document |
| `results/` | Output directory (CSV, JSON, Optuna DB) | | `results/` | Output directory (CSV, JSON, Optuna DB) |
| `iterations/` | Per-trial archived outputs | | `iterations/` | Per-trial archived outputs |
## Output Files ## Output Files
After a study run, `results/` will contain: After a study run, `results/` will contain:
| File | Description | | File | Description |
|------|-------------| |------|-------------|
| `doe_results.csv` | All trials — DVs, objectives, constraints, status | | `doe_results.csv` | All trials — DVs, objectives, constraints, status |
| `doe_summary.json` | Study metadata, statistics, best feasible design | | `doe_summary.json` | Study metadata, statistics, best feasible design |
| `optuna_study.db` | SQLite database (Optuna persistence, resume support) | | `optuna_study.db` | SQLite database (Optuna persistence, resume support) |
| `history.db` | **Persistent** SQLite — all DVs, results, feasibility (survives `--clean`) | | `history.db` | **Persistent** SQLite — all DVs, results, feasibility (survives `--clean`) |
| `history.csv` | CSV mirror of history DB | | `history.csv` | CSV mirror of history DB |
### Iteration Folders ### Iteration Folders
Each trial produces `iterations/iterNNN/` containing: Each trial produces `iterations/iterNNN/` containing:
| File | Description | | File | Description |
|------|-------------| |------|-------------|
| `params.json` | Design variable values for this trial | | `params.json` | Design variable values for this trial |
| `params.exp` | NX expression file used for this trial | | `params.exp` | NX expression file used for this trial |
| `results.json` | Extracted results (mass, displacement, stress, feasibility) | | `results.json` | Extracted results (mass, displacement, stress, feasibility) |
| `*.op2` | Nastran binary results (for post-processing) | | `*.op2` | Nastran binary results (for post-processing) |
| `*.f06` | Nastran text output (for debugging) | | `*.f06` | Nastran text output (for debugging) |
**Smart retention policy** (runs every 5 iterations): **Smart retention policy** (runs every 5 iterations):
- Keep last 10 iterations with full data - Keep last 10 iterations with full data
- Keep best 3 feasible iterations with full data - Keep best 3 feasible iterations with full data
- Strip model files from all others, keep solver outputs - Strip model files from all others, keep solver outputs
## Architecture ## Architecture
``` ```
run_doe.py run_doe.py
├── sampling.py Generate 50 LHS + 1 baseline ├── sampling.py Generate 50 LHS + 1 baseline
│ └── scipy.stats.qmc.LatinHypercube │ └── scipy.stats.qmc.LatinHypercube
├── geometric_checks.py Pre-flight feasibility filter ├── geometric_checks.py Pre-flight feasibility filter
│ ├── Hole overlap: span/(n-1) - d ≥ 30mm │ ├── Hole overlap: span/(n-1) - d ≥ 30mm
│ └── Web clearance: 500 - 2·face - d > 0 │ └── Web clearance: 500 - 2·face - d > 0
├── nx_interface.py AtomizerNXSolver (wraps optimization_engine) ├── nx_interface.py AtomizerNXSolver (wraps optimization_engine)
│ ├── NXStubSolver → synthetic results (development) │ ├── NXStubSolver → synthetic results (development)
│ └── AtomizerNXSolver → real DesigncenterNX 2512 SOL 101 (production) │ └── AtomizerNXSolver → real DesigncenterNX 2512 SOL 101 (production)
├── iteration_manager.py Smart retention (last 10 + best 3) ├── iteration_manager.py Smart retention (last 10 + best 3)
├── Optuna study ├── Optuna study
│ ├── SQLite storage (resume support) │ ├── SQLite storage (resume support)
│ ├── Enqueued trials (deterministic LHS) │ ├── Enqueued trials (deterministic LHS)
│ └── Deb's feasibility rules (constraint interface) │ └── Deb's feasibility rules (constraint interface)
└── history.db Persistent history (append-only, survives --clean) └── history.db Persistent history (append-only, survives --clean)
``` ```
## Pipeline per Trial ## Pipeline per Trial
``` ```
Trial N Trial N
├── 1. Suggest DVs (from enqueued LHS point) ├── 1. Suggest DVs (from enqueued LHS point)
├── 2. Geometric pre-check ├── 2. Geometric pre-check
│ ├── FAIL → record as infeasible, skip NX │ ├── FAIL → record as infeasible, skip NX
│ └── PASS ↓ │ └── PASS ↓
├── 3. Restore master model from backup ├── 3. Restore master model from backup
├── 4. NX evaluation (IN-PLACE in models/ directory) ├── 4. NX evaluation (IN-PLACE in models/ directory)
│ ├── Write .exp file with trial DVs │ ├── Write .exp file with trial DVs
│ ├── Open .sim (loads model chain) │ ├── Open .sim (loads model chain)
│ ├── Import expressions, rebuild geometry │ ├── Import expressions, rebuild geometry
│ ├── Update FEM (remesh) │ ├── Update FEM (remesh)
│ ├── Solve SOL 101 (~12s) │ ├── Solve SOL 101 (~12s)
│ └── Extract: mass (p173 → _temp_mass.txt), displacement, stress (via OP2) │ └── Extract: mass (p173 → _temp_mass.txt), displacement, stress (via OP2)
├── 5. Archive outputs to iterations/iterNNN/ ├── 5. Archive outputs to iterations/iterNNN/
│ └── params.json, params.exp, results.json, OP2, F06 │ └── params.json, params.exp, results.json, OP2, F06
├── 6. Record results + constraint violations ├── 6. Record results + constraint violations
├── 7. Log to Optuna DB + history.db + CSV ├── 7. Log to Optuna DB + history.db + CSV
└── 8. Smart retention check (every 5 iterations) └── 8. Smart retention check (every 5 iterations)
``` ```
## Phase 1 → Phase 2 Gate Criteria ## Phase 1 → Phase 2 Gate Criteria
Before proceeding to Phase 2 (TPE optimization), these checks must pass: Before proceeding to Phase 2 (TPE optimization), these checks must pass:
| Check | Threshold | Action if FAIL | | Check | Threshold | Action if FAIL |
|-------|-----------|----------------| |-------|-----------|----------------|
| Feasible points found | ≥ 5 | Expand bounds or relax constraints (escalate to CEO) | | Feasible points found | ≥ 5 | Expand bounds or relax constraints (escalate to CEO) |
| NX solve success rate | ≥ 80% | Investigate failures, fix model, re-run | | NX solve success rate | ≥ 80% | Investigate failures, fix model, re-run |
| No systematic crashes at bounds | Visual check | Tighten bounds away from failure region | | No systematic crashes at bounds | Visual check | Tighten bounds away from failure region |
## Key Design Decisions ## Key Design Decisions
- **Baseline as Trial 0** — LAC lesson: always validate baseline first - **Baseline as Trial 0** — LAC lesson: always validate baseline first
- **Pre-flight geometric filter** — catches infeasible geometry before NX (saves compute, avoids crashes) - **Pre-flight geometric filter** — catches infeasible geometry before NX (saves compute, avoids crashes)
- **Stratified integer sampling** — ensures all 11 hole_count levels (5-15) are covered - **Stratified integer sampling** — ensures all 11 hole_count levels (5-15) are covered
- **Deb's feasibility rules** — no penalty weight tuning; feasible always beats infeasible - **Deb's feasibility rules** — no penalty weight tuning; feasible always beats infeasible
- **SQLite persistence** — study can be interrupted and resumed - **SQLite persistence** — study can be interrupted and resumed
- **No surrogates** — LAC lesson: direct FEA via TPE beats surrogate + L-BFGS - **No surrogates** — LAC lesson: direct FEA via TPE beats surrogate + L-BFGS
## NX Integration Notes ## NX Integration Notes
**Solver:** DesigncenterNX 2512 (Siemens rebrand of NX). Install: `C:\Program Files\Siemens\DesigncenterNX2512`. **Solver:** DesigncenterNX 2512 (Siemens rebrand of NX). Install: `C:\Program Files\Siemens\DesigncenterNX2512`.
The `nx_interface.py` module provides: The `nx_interface.py` module provides:
- **`NXStubSolver`** — synthetic results from simplified beam mechanics (for pipeline testing) - **`NXStubSolver`** — synthetic results from simplified beam mechanics (for pipeline testing)
- **`AtomizerNXSolver`** — wraps `optimization_engine` NXSolver for real DesigncenterNX 2512 solves - **`AtomizerNXSolver`** — wraps `optimization_engine` NXSolver for real DesigncenterNX 2512 solves
Expression names are exact from binary introspection. Critical: `beam_lenght` has a typo in NX (no 'h') — use exact spelling. Expression names are exact from binary introspection. Critical: `beam_lenght` has a typo in NX (no 'h') — use exact spelling.
### Outputs extracted from NX: ### Outputs extracted from NX:
| Output | Source | Unit | Notes | | Output | Source | Unit | Notes |
|--------|--------|------|-------| |--------|--------|------|-------|
| Mass | Expression `p173``_temp_mass.txt` | kg | Journal extracts after solve | | Mass | Expression `p173``_temp_mass.txt` | kg | Journal extracts after solve |
| Tip displacement | OP2 parse via pyNastran | mm | Max Tz at free end | | Tip displacement | OP2 parse via pyNastran | mm | Max Tz at free end |
| Max VM stress | OP2 parse via pyNastran | MPa | ⚠️ pyNastran returns kPa — divide by 1000 | | Max VM stress | OP2 parse via pyNastran | MPa | ⚠️ pyNastran returns kPa — divide by 1000 |
### Critical Lessons Learned (2026-02-11) ### Critical Lessons Learned (2026-02-11)
1. **Path resolution:** Use `Path.resolve()` NOT `Path.absolute()` on Windows. `.absolute()` doesn't resolve `..` components — NX can't follow them. 1. **Path resolution:** Use `Path.resolve()` NOT `Path.absolute()` on Windows. `.absolute()` doesn't resolve `..` components — NX can't follow them.
2. **File references:** NX `.sim` files have absolute internal refs to `.fem`/`.prt`. Never copy model files to iteration folders — solve in-place with backup/restore. 2. **File references:** NX `.sim` files have absolute internal refs to `.fem`/`.prt`. Never copy model files to iteration folders — solve in-place with backup/restore.
3. **NX version:** Must match exactly. Model files from 2512 won't load in 2412 ("Part file is from a newer version"). 3. **NX version:** Must match exactly. Model files from 2512 won't load in 2412 ("Part file is from a newer version").
4. **pyNastran:** Warns about unsupported NX version 2512 but works fine. Safe to ignore. 4. **pyNastran:** Warns about unsupported NX version 2512 but works fine. Safe to ignore.
## References ## References
- [OPTIMIZATION_STRATEGY.md](./OPTIMIZATION_STRATEGY.md) — Full strategy document - [OPTIMIZATION_STRATEGY.md](./OPTIMIZATION_STRATEGY.md) — Full strategy document
- [../../BREAKDOWN.md](../../BREAKDOWN.md) — Tech Lead's technical analysis - [../../BREAKDOWN.md](../../BREAKDOWN.md) — Tech Lead's technical analysis
- [../../DECISIONS.md](../../DECISIONS.md) — Decision log - [../../DECISIONS.md](../../DECISIONS.md) — Decision log
- [../../CONTEXT.md](../../CONTEXT.md) — Project context & expression map - [../../CONTEXT.md](../../CONTEXT.md) — Project context & expression map
--- ---
*Code: 🏗️ Study Builder (Technical Lead) | Strategy: ⚡ Optimizer Agent | Updated: 2026-02-11* *Code: 🏗️ Study Builder (Technical Lead) | Strategy: ⚡ Optimizer Agent | Updated: 2026-02-11*

View File

@@ -0,0 +1,235 @@
# Study: 01_doe_landscape — Hydrotech Beam
> See [../../README.md](../../README.md) for project overview.
## Purpose
Map the design space of the Hydrotech sandwich I-beam to identify feasible regions, characterize variable sensitivities, and prepare data for Phase 2 (TPE optimization). This is Phase 1 of the two-phase strategy (DEC-HB-002).
## Quick Facts
| Item | Value |
|------|-------|
| **Objective** | Minimize mass (kg) |
| **Constraints** | Tip displacement ≤ 10 mm, Von Mises stress ≤ 130 MPa |
| **Design variables** | 4 (3 continuous + 1 integer) |
| **Algorithm** | Phase 1: LHS DoE (50 trials + 1 baseline) |
| **Total budget** | 51 evaluations |
| **Constraint handling** | Deb's feasibility rules (Optuna constraint interface) |
| **Status** | ✅ Pipeline operational — first results obtained 2026-02-11 |
| **Solver** | DesigncenterNX 2512 (NX Nastran SOL 101) |
| **Solve time** | ~12 s/trial (~10 min for full DOE) |
| **First results** | Displacement=17.93mm, Stress=111.9MPa |
## Design Variables (confirmed via NX binary introspection)
| ID | NX Expression | Range | Type | Baseline | Unit |
|----|--------------|-------|------|----------|------|
| DV1 | `beam_half_core_thickness` | 1040 | Continuous | 25.162 | mm |
| DV2 | `beam_face_thickness` | 1040 | Continuous | 21.504 | mm |
| DV3 | `holes_diameter` | 150450 | Continuous | 300 | mm |
| DV4 | `hole_count` | 515 | Integer | 10 | — |
## Usage
### Prerequisites
```bash
pip install -r requirements.txt
```
Requires: Python 3.10+, optuna, scipy, numpy, pandas.
### Development Run (stub solver)
```bash
# From the study directory:
cd projects/hydrotech-beam/studies/01_doe_landscape/
# Run with synthetic results (for pipeline testing):
python run_doe.py --backend stub
# With verbose logging:
python run_doe.py --backend stub -v
# Custom study name:
python run_doe.py --backend stub --study-name my_test_run
```
### Production Run (NXOpen on Windows)
```bash
# On dalidou (Windows node with DesigncenterNX 2512):
cd C:\Users\antoi\Atomizer\projects\hydrotech-beam\studies\01_doe_landscape
conda activate atomizer
python run_doe.py --backend nxopen --model-dir "../../models"
```
> ⚠️ `--model-dir` can be relative — the code resolves it with `Path.resolve()`. NX requires fully resolved paths (no `..` components).
### Resume Interrupted Study
```bash
python run_doe.py --backend stub --resume --study-name hydrotech_beam_doe_phase1
```
### CLI Options
| Flag | Default | Description |
|------|---------|-------------|
| `--backend` | `stub` | `stub` (testing) or `nxopen` (real NX) |
| `--model-dir` | — | Path to NX model files (required for `nxopen`) |
| `--study-name` | `hydrotech_beam_doe_phase1` | Optuna study name |
| `--n-samples` | 50 | Number of LHS sample points |
| `--seed` | 42 | Random seed for reproducibility |
| `--results-dir` | `results/` | Output directory |
| `--resume` | false | Resume existing study |
| `--clean` | false | Delete Optuna DB and start fresh (history DB preserved) |
| `-v` | false | Verbose (DEBUG) logging |
## Files
| File | Description |
|------|-------------|
| `run_doe.py` | Main entry point — orchestrates the DoE study |
| `sampling.py` | LHS generation with stratified integer sampling |
| `geometric_checks.py` | Pre-flight geometric feasibility filter |
| `nx_interface.py` | AtomizerNXSolver wrapping optimization_engine |
| `iteration_manager.py` | Smart retention — last 10 + best 3 with full data |
| `requirements.txt` | Python dependencies |
| `OPTIMIZATION_STRATEGY.md` | Full strategy document |
| `results/` | Output directory (CSV, JSON, Optuna DB) |
| `iterations/` | Per-trial archived outputs |
## Output Files
After a study run, `results/` will contain:
| File | Description |
|------|-------------|
| `doe_results.csv` | All trials — DVs, objectives, constraints, status |
| `doe_summary.json` | Study metadata, statistics, best feasible design |
| `optuna_study.db` | SQLite database (Optuna persistence, resume support) |
| `history.db` | **Persistent** SQLite — all DVs, results, feasibility (survives `--clean`) |
| `history.csv` | CSV mirror of history DB |
### Iteration Folders
Each trial produces `iterations/iterNNN/` containing:
| File | Description |
|------|-------------|
| `params.json` | Design variable values for this trial |
| `params.exp` | NX expression file used for this trial |
| `results.json` | Extracted results (mass, displacement, stress, feasibility) |
| `*.op2` | Nastran binary results (for post-processing) |
| `*.f06` | Nastran text output (for debugging) |
**Smart retention policy** (runs every 5 iterations):
- Keep last 10 iterations with full data
- Keep best 3 feasible iterations with full data
- Strip model files from all others, keep solver outputs
## Architecture
```
run_doe.py
├── sampling.py Generate 50 LHS + 1 baseline
│ └── scipy.stats.qmc.LatinHypercube
├── geometric_checks.py Pre-flight feasibility filter
│ ├── Hole overlap: span/(n-1) - d ≥ 30mm
│ └── Web clearance: 500 - 2·face - d > 0
├── nx_interface.py AtomizerNXSolver (wraps optimization_engine)
│ ├── NXStubSolver → synthetic results (development)
│ └── AtomizerNXSolver → real DesigncenterNX 2512 SOL 101 (production)
├── iteration_manager.py Smart retention (last 10 + best 3)
├── Optuna study
│ ├── SQLite storage (resume support)
│ ├── Enqueued trials (deterministic LHS)
│ └── Deb's feasibility rules (constraint interface)
└── history.db Persistent history (append-only, survives --clean)
```
## Pipeline per Trial
```
Trial N
├── 1. Suggest DVs (from enqueued LHS point)
├── 2. Geometric pre-check
│ ├── FAIL → record as infeasible, skip NX
│ └── PASS ↓
├── 3. Restore master model from backup
├── 4. NX evaluation (IN-PLACE in models/ directory)
│ ├── Write .exp file with trial DVs
│ ├── Open .sim (loads model chain)
│ ├── Import expressions, rebuild geometry
│ ├── Update FEM (remesh)
│ ├── Solve SOL 101 (~12s)
│ └── Extract: mass (p173 → _temp_mass.txt), displacement, stress (via OP2)
├── 5. Archive outputs to iterations/iterNNN/
│ └── params.json, params.exp, results.json, OP2, F06
├── 6. Record results + constraint violations
├── 7. Log to Optuna DB + history.db + CSV
└── 8. Smart retention check (every 5 iterations)
```
## Phase 1 → Phase 2 Gate Criteria
Before proceeding to Phase 2 (TPE optimization), these checks must pass:
| Check | Threshold | Action if FAIL |
|-------|-----------|----------------|
| Feasible points found | ≥ 5 | Expand bounds or relax constraints (escalate to CEO) |
| NX solve success rate | ≥ 80% | Investigate failures, fix model, re-run |
| No systematic crashes at bounds | Visual check | Tighten bounds away from failure region |
## Key Design Decisions
- **Baseline as Trial 0** — LAC lesson: always validate baseline first
- **Pre-flight geometric filter** — catches infeasible geometry before NX (saves compute, avoids crashes)
- **Stratified integer sampling** — ensures all 11 hole_count levels (5-15) are covered
- **Deb's feasibility rules** — no penalty weight tuning; feasible always beats infeasible
- **SQLite persistence** — study can be interrupted and resumed
- **No surrogates** — LAC lesson: direct FEA via TPE beats surrogate + L-BFGS
## NX Integration Notes
**Solver:** DesigncenterNX 2512 (Siemens rebrand of NX). Install: `C:\Program Files\Siemens\DesigncenterNX2512`.
The `nx_interface.py` module provides:
- **`NXStubSolver`** — synthetic results from simplified beam mechanics (for pipeline testing)
- **`AtomizerNXSolver`** — wraps `optimization_engine` NXSolver for real DesigncenterNX 2512 solves
Expression names are exact from binary introspection. Critical: `beam_lenght` has a typo in NX (no 'h') — use exact spelling.
### Outputs extracted from NX:
| Output | Source | Unit | Notes |
|--------|--------|------|-------|
| Mass | Expression `p173``_temp_mass.txt` | kg | Journal extracts after solve |
| Tip displacement | OP2 parse via pyNastran | mm | Max Tz at free end |
| Max VM stress | OP2 parse via pyNastran | MPa | ⚠️ pyNastran returns kPa — divide by 1000 |
### Critical Lessons Learned (2026-02-11)
1. **Path resolution:** Use `Path.resolve()` NOT `Path.absolute()` on Windows. `.absolute()` doesn't resolve `..` components — NX can't follow them.
2. **File references:** NX `.sim` files have absolute internal refs to `.fem`/`.prt`. Never copy model files to iteration folders — solve in-place with backup/restore.
3. **NX version:** Must match exactly. Model files from 2512 won't load in 2412 ("Part file is from a newer version").
4. **pyNastran:** Warns about unsupported NX version 2512 but works fine. Safe to ignore.
## References
- [OPTIMIZATION_STRATEGY.md](./OPTIMIZATION_STRATEGY.md) — Full strategy document
- [../../BREAKDOWN.md](../../BREAKDOWN.md) — Tech Lead's technical analysis
- [../../DECISIONS.md](../../DECISIONS.md) — Decision log
- [../../CONTEXT.md](../../CONTEXT.md) — Project context & expression map
---
*Code: 🏗️ Study Builder (Technical Lead) | Strategy: ⚡ Optimizer Agent | Updated: 2026-02-11*

View File

@@ -1,25 +1,25 @@
# Reference Models — Hydrotech Beam # Reference Models — Hydrotech Beam
Golden copies of the NX model files. **Do not modify these directly.** Golden copies of the NX model files. **Do not modify these directly.**
Studies should copy these to their own `model/` folder and modify there. Studies should copy these to their own `model/` folder and modify there.
## Files ## Files
| File | Description | Status | | File | Description | Status |
|------|-------------|--------| |------|-------------|--------|
| `Beam.prt` | NX CAD part — sandwich I-beam with lightening holes | ⏳ Pending upload | | `Beam.prt` | NX CAD part — sandwich I-beam with lightening holes | ⏳ Pending upload |
| `Beam_fem1.fem` | FEM mesh file | ⏳ Pending upload | | `Beam_fem1.fem` | FEM mesh file | ⏳ Pending upload |
| `Beam_fem1_i.prt` | Idealized part for FEM | ⏳ Pending upload | | `Beam_fem1_i.prt` | Idealized part for FEM | ⏳ Pending upload |
| `Beam_sim1.sim` | Simulation file — SOL 101 static | ⏳ Pending upload | | `Beam_sim1.sim` | Simulation file — SOL 101 static | ⏳ Pending upload |
## Key Expression ## Key Expression
- `p173` — beam mass (kg) - `p173` — beam mass (kg)
## Notes ## Notes
- ⏳ Awaiting Syncthing setup for project folder sync (dalidou ↔ server) - ⏳ Awaiting Syncthing setup for project folder sync (dalidou ↔ server)
- Model files will appear here once sync is live - Model files will appear here once sync is live
- Verify model rebuild across full design variable range before optimization - Verify model rebuild across full design variable range before optimization
- **Do NOT modify these reference copies** — studies copy them to their own `model/` folder - **Do NOT modify these reference copies** — studies copy them to their own `model/` folder

View File

@@ -0,0 +1,25 @@
# Reference Models — Hydrotech Beam
Golden copies of the NX model files. **Do not modify these directly.**
Studies should copy these to their own `model/` folder and modify there.
## Files
| File | Description | Status |
|------|-------------|--------|
| `Beam.prt` | NX CAD part — sandwich I-beam with lightening holes | ⏳ Pending upload |
| `Beam_fem1.fem` | FEM mesh file | ⏳ Pending upload |
| `Beam_fem1_i.prt` | Idealized part for FEM | ⏳ Pending upload |
| `Beam_sim1.sim` | Simulation file — SOL 101 static | ⏳ Pending upload |
## Key Expression
- `p173` — beam mass (kg)
## Notes
- ⏳ Awaiting Syncthing setup for project folder sync (dalidou ↔ server)
- Model files will appear here once sync is live
- Verify model rebuild across full design variable range before optimization
- **Do NOT modify these reference copies** — studies copy them to their own `model/` folder

View File

@@ -1,302 +1,302 @@
{ {
"meta": { "meta": {
"version": "2.0", "version": "2.0",
"created": "2026-02-09T12:00:00Z", "created": "2026-02-09T12:00:00Z",
"modified": "2026-02-09T12:00:00Z", "modified": "2026-02-09T12:00:00Z",
"created_by": "optimizer-agent", "created_by": "optimizer-agent",
"modified_by": "optimizer-agent", "modified_by": "optimizer-agent",
"study_name": "01_doe_landscape", "study_name": "01_doe_landscape",
"description": "Hydrotech Beam — DoE landscape mapping + TPE optimization. Minimize mass subject to displacement and stress constraints.", "description": "Hydrotech Beam — DoE landscape mapping + TPE optimization. Minimize mass subject to displacement and stress constraints.",
"tags": ["hydrotech-beam", "doe", "landscape", "tpe", "single-objective"] "tags": ["hydrotech-beam", "doe", "landscape", "tpe", "single-objective"]
}, },
"model": { "model": {
"sim": { "sim": {
"path": "models/Beam_sim1.sim", "path": "models/Beam_sim1.sim",
"solver": "nastran" "solver": "nastran"
}, },
"part": "models/Beam.prt", "part": "models/Beam.prt",
"fem": "models/Beam_fem1.fem", "fem": "models/Beam_fem1.fem",
"idealized": "models/Beam_fem1_i.prt" "idealized": "models/Beam_fem1_i.prt"
}, },
"design_variables": [ "design_variables": [
{ {
"id": "dv_001", "id": "dv_001",
"name": "beam_half_core_thickness", "name": "beam_half_core_thickness",
"expression_name": "beam_half_core_thickness", "expression_name": "beam_half_core_thickness",
"type": "continuous", "type": "continuous",
"bounds": { "bounds": {
"min": 10, "min": 10,
"max": 40 "max": 40
}, },
"baseline": 20, "baseline": 20,
"units": "mm", "units": "mm",
"enabled": true, "enabled": true,
"description": "Core half-thickness. Stiffness scales ~quadratically via sandwich effect (lever arm). Also adds core mass linearly." "description": "Core half-thickness. Stiffness scales ~quadratically via sandwich effect (lever arm). Also adds core mass linearly."
}, },
{ {
"id": "dv_002", "id": "dv_002",
"name": "beam_face_thickness", "name": "beam_face_thickness",
"expression_name": "beam_face_thickness", "expression_name": "beam_face_thickness",
"type": "continuous", "type": "continuous",
"bounds": { "bounds": {
"min": 10, "min": 10,
"max": 40 "max": 40
}, },
"baseline": 20, "baseline": 20,
"units": "mm", "units": "mm",
"enabled": true, "enabled": true,
"description": "Face sheet thickness. Primary bending stiffness contributor AND primary mass contributor. Key trade-off variable." "description": "Face sheet thickness. Primary bending stiffness contributor AND primary mass contributor. Key trade-off variable."
}, },
{ {
"id": "dv_003", "id": "dv_003",
"name": "holes_diameter", "name": "holes_diameter",
"expression_name": "holes_diameter", "expression_name": "holes_diameter",
"type": "continuous", "type": "continuous",
"bounds": { "bounds": {
"min": 150, "min": 150,
"max": 450 "max": 450
}, },
"baseline": 300, "baseline": 300,
"units": "mm", "units": "mm",
"enabled": true, "enabled": true,
"description": "Lightening hole diameter. Mass reduction scales with d². Stress concentration scales with hole size. Geometric feasibility depends on beam web length." "description": "Lightening hole diameter. Mass reduction scales with d². Stress concentration scales with hole size. Geometric feasibility depends on beam web length."
}, },
{ {
"id": "dv_004", "id": "dv_004",
"name": "hole_count", "name": "hole_count",
"expression_name": "hole_count", "expression_name": "hole_count",
"type": "integer", "type": "integer",
"bounds": { "bounds": {
"min": 5, "min": 5,
"max": 15 "max": 15
}, },
"baseline": 10, "baseline": 10,
"units": "", "units": "",
"enabled": true, "enabled": true,
"description": "Number of lightening holes in the web. Integer variable (11 levels). Interacts strongly with holes_diameter for geometric feasibility." "description": "Number of lightening holes in the web. Integer variable (11 levels). Interacts strongly with holes_diameter for geometric feasibility."
} }
], ],
"extractors": [ "extractors": [
{ {
"id": "ext_001", "id": "ext_001",
"name": "Mass Extractor", "name": "Mass Extractor",
"type": "expression", "type": "expression",
"config": { "config": {
"expression_name": "p173", "expression_name": "p173",
"description": "Total beam mass from NX expression" "description": "Total beam mass from NX expression"
}, },
"outputs": [ "outputs": [
{ {
"name": "mass", "name": "mass",
"metric": "total", "metric": "total",
"units": "kg" "units": "kg"
} }
] ]
}, },
{ {
"id": "ext_002", "id": "ext_002",
"name": "Displacement Extractor", "name": "Displacement Extractor",
"type": "displacement", "type": "displacement",
"config": { "config": {
"method": "result_sensor_or_op2", "method": "result_sensor_or_op2",
"component": "magnitude", "component": "magnitude",
"location": "beam_tip", "location": "beam_tip",
"description": "Tip displacement magnitude from SOL 101. Preferred: NX result sensor. Fallback: parse .op2 at tip node ID.", "description": "Tip displacement magnitude from SOL 101. Preferred: NX result sensor. Fallback: parse .op2 at tip node ID.",
"TODO": "Confirm displacement sensor exists in Beam_sim1.sim OR identify tip node ID" "TODO": "Confirm displacement sensor exists in Beam_sim1.sim OR identify tip node ID"
}, },
"outputs": [ "outputs": [
{ {
"name": "tip_displacement", "name": "tip_displacement",
"metric": "max_magnitude", "metric": "max_magnitude",
"units": "mm" "units": "mm"
} }
] ]
}, },
{ {
"id": "ext_003", "id": "ext_003",
"name": "Stress Extractor", "name": "Stress Extractor",
"type": "stress", "type": "stress",
"config": { "config": {
"method": "op2_elemental_nodal", "method": "op2_elemental_nodal",
"stress_type": "von_mises", "stress_type": "von_mises",
"scope": "all_elements", "scope": "all_elements",
"unit_conversion": "kPa_to_MPa", "unit_conversion": "kPa_to_MPa",
"description": "Max von Mises stress (elemental nodal) from SOL 101. pyNastran returns kPa for NX kg-mm-s units — divide by 1000 for MPa.", "description": "Max von Mises stress (elemental nodal) from SOL 101. pyNastran returns kPa for NX kg-mm-s units — divide by 1000 for MPa.",
"TODO": "Verify element types in model (CQUAD4? CTETRA? CHEXA?) and confirm stress scope" "TODO": "Verify element types in model (CQUAD4? CTETRA? CHEXA?) and confirm stress scope"
}, },
"outputs": [ "outputs": [
{ {
"name": "max_von_mises", "name": "max_von_mises",
"metric": "max", "metric": "max",
"units": "MPa" "units": "MPa"
} }
] ]
} }
], ],
"objectives": [ "objectives": [
{ {
"id": "obj_001", "id": "obj_001",
"name": "Minimize beam mass", "name": "Minimize beam mass",
"direction": "minimize", "direction": "minimize",
"weight": 1.0, "weight": 1.0,
"source": { "source": {
"extractor_id": "ext_001", "extractor_id": "ext_001",
"output_name": "mass" "output_name": "mass"
}, },
"units": "kg" "units": "kg"
} }
], ],
"constraints": [ "constraints": [
{ {
"id": "con_001", "id": "con_001",
"name": "Tip displacement limit", "name": "Tip displacement limit",
"type": "hard", "type": "hard",
"operator": "<=", "operator": "<=",
"threshold": 10.0, "threshold": 10.0,
"source": { "source": {
"extractor_id": "ext_002", "extractor_id": "ext_002",
"output_name": "tip_displacement" "output_name": "tip_displacement"
}, },
"penalty_config": { "penalty_config": {
"method": "deb_rules", "method": "deb_rules",
"description": "Deb's feasibility rules: feasible always beats infeasible; among infeasible, lower violation wins" "description": "Deb's feasibility rules: feasible always beats infeasible; among infeasible, lower violation wins"
}, },
"margin_buffer": { "margin_buffer": {
"optimizer_target": 9.5, "optimizer_target": 9.5,
"hard_limit": 10.0, "hard_limit": 10.0,
"description": "5% inner margin during optimization to account for numerical noise" "description": "5% inner margin during optimization to account for numerical noise"
} }
}, },
{ {
"id": "con_002", "id": "con_002",
"name": "Von Mises stress limit", "name": "Von Mises stress limit",
"type": "hard", "type": "hard",
"operator": "<=", "operator": "<=",
"threshold": 130.0, "threshold": 130.0,
"source": { "source": {
"extractor_id": "ext_003", "extractor_id": "ext_003",
"output_name": "max_von_mises" "output_name": "max_von_mises"
}, },
"penalty_config": { "penalty_config": {
"method": "deb_rules", "method": "deb_rules",
"description": "Deb's feasibility rules: feasible always beats infeasible; among infeasible, lower violation wins" "description": "Deb's feasibility rules: feasible always beats infeasible; among infeasible, lower violation wins"
}, },
"margin_buffer": { "margin_buffer": {
"optimizer_target": 123.5, "optimizer_target": 123.5,
"hard_limit": 130.0, "hard_limit": 130.0,
"description": "5% inner margin during optimization to account for mesh sensitivity" "description": "5% inner margin during optimization to account for mesh sensitivity"
} }
} }
], ],
"optimization": { "optimization": {
"phases": [ "phases": [
{ {
"id": "phase_1", "id": "phase_1",
"name": "DoE Landscape Mapping", "name": "DoE Landscape Mapping",
"algorithm": { "algorithm": {
"type": "LHS", "type": "LHS",
"config": { "config": {
"criterion": "maximin", "criterion": "maximin",
"integer_handling": "round_nearest_stratified", "integer_handling": "round_nearest_stratified",
"seed": 42 "seed": 42
} }
}, },
"budget": { "budget": {
"max_trials": 50, "max_trials": 50,
"baseline_enqueued": true, "baseline_enqueued": true,
"total_with_baseline": 51 "total_with_baseline": 51
}, },
"purpose": "Map design space, identify feasible region, assess sensitivities and interactions" "purpose": "Map design space, identify feasible region, assess sensitivities and interactions"
}, },
{ {
"id": "phase_2", "id": "phase_2",
"name": "TPE Optimization", "name": "TPE Optimization",
"algorithm": { "algorithm": {
"type": "TPE", "type": "TPE",
"config": { "config": {
"sampler": "TPESampler", "sampler": "TPESampler",
"n_startup_trials": 0, "n_startup_trials": 0,
"warm_start_from": "phase_1_best_feasible", "warm_start_from": "phase_1_best_feasible",
"seed": 42, "seed": 42,
"constraint_handling": "deb_feasibility_rules" "constraint_handling": "deb_feasibility_rules"
} }
}, },
"budget": { "budget": {
"min_trials": 60, "min_trials": 60,
"max_trials": 100, "max_trials": 100,
"adaptive": true "adaptive": true
}, },
"convergence": { "convergence": {
"stall_window": 20, "stall_window": 20,
"stall_threshold_pct": 1.0, "stall_threshold_pct": 1.0,
"min_trials_before_check": 60 "min_trials_before_check": 60
}, },
"purpose": "Directed optimization to converge on minimum-mass feasible design" "purpose": "Directed optimization to converge on minimum-mass feasible design"
} }
], ],
"total_budget": { "total_budget": {
"min": 114, "min": 114,
"max": 156, "max": 156,
"estimated_hours": "4-5" "estimated_hours": "4-5"
}, },
"baseline_trial": { "baseline_trial": {
"enqueue": true, "enqueue": true,
"values": { "values": {
"beam_half_core_thickness": 20, "beam_half_core_thickness": 20,
"beam_face_thickness": 20, "beam_face_thickness": 20,
"holes_diameter": 300, "holes_diameter": 300,
"hole_count": 10 "hole_count": 10
}, },
"expected_results": { "expected_results": {
"mass_kg": 974, "mass_kg": 974,
"tip_displacement_mm": 22, "tip_displacement_mm": 22,
"max_von_mises_mpa": "UNKNOWN — must measure" "max_von_mises_mpa": "UNKNOWN — must measure"
} }
} }
}, },
"error_handling": { "error_handling": {
"trial_timeout_seconds": 600, "trial_timeout_seconds": 600,
"on_nx_rebuild_failure": "record_infeasible_max_violation", "on_nx_rebuild_failure": "record_infeasible_max_violation",
"on_solver_failure": "record_infeasible_max_violation", "on_solver_failure": "record_infeasible_max_violation",
"on_extraction_failure": "record_infeasible_max_violation", "on_extraction_failure": "record_infeasible_max_violation",
"max_consecutive_failures": 5, "max_consecutive_failures": 5,
"max_failure_rate_pct": 30, "max_failure_rate_pct": 30,
"nx_process_management": "NEVER kill NX directly. Use NXSessionManager.close_nx_if_allowed() only." "nx_process_management": "NEVER kill NX directly. Use NXSessionManager.close_nx_if_allowed() only."
}, },
"pre_flight_checks": [ "pre_flight_checks": [
{ {
"id": "pf_001", "id": "pf_001",
"name": "Baseline validation", "name": "Baseline validation",
"description": "Run Trial 0 with baseline parameters, verify mass ≈ 974 kg and displacement ≈ 22 mm" "description": "Run Trial 0 with baseline parameters, verify mass ≈ 974 kg and displacement ≈ 22 mm"
}, },
{ {
"id": "pf_002", "id": "pf_002",
"name": "Corner tests", "name": "Corner tests",
"description": "Test 16 corner combinations (min/max for each DV). Verify NX rebuilds and solves at all corners." "description": "Test 16 corner combinations (min/max for each DV). Verify NX rebuilds and solves at all corners."
}, },
{ {
"id": "pf_003", "id": "pf_003",
"name": "Mesh convergence", "name": "Mesh convergence",
"description": "Run baseline at 3 mesh densities. Verify stress convergence within 10%." "description": "Run baseline at 3 mesh densities. Verify stress convergence within 10%."
}, },
{ {
"id": "pf_004", "id": "pf_004",
"name": "Extractor validation", "name": "Extractor validation",
"description": "Confirm mass, displacement, and stress extractors return correct values at baseline." "description": "Confirm mass, displacement, and stress extractors return correct values at baseline."
}, },
{ {
"id": "pf_005", "id": "pf_005",
"name": "Geometric feasibility", "name": "Geometric feasibility",
"description": "Determine beam web length. Verify max(hole_count) × max(holes_diameter) fits. Add ligament constraint if needed." "description": "Determine beam web length. Verify max(hole_count) × max(holes_diameter) fits. Add ligament constraint if needed."
} }
], ],
"open_items": [ "open_items": [
"Beam web length needed for geometric feasibility validation (holes_diameter × hole_count vs available length)", "Beam web length needed for geometric feasibility validation (holes_diameter × hole_count vs available length)",
"Displacement extraction method: result sensor in .sim or .op2 node ID parsing?", "Displacement extraction method: result sensor in .sim or .op2 node ID parsing?",
"Stress extraction scope: whole model or specific element group?", "Stress extraction scope: whole model or specific element group?",
"Verify NX expression name 'p173' maps to mass", "Verify NX expression name 'p173' maps to mass",
"Benchmark single SOL 101 runtime to refine compute estimates", "Benchmark single SOL 101 runtime to refine compute estimates",
"Confirm baseline stress value (currently unknown)", "Confirm baseline stress value (currently unknown)",
"Clarify relationship between core/face thickness DVs and web height where holes are placed" "Clarify relationship between core/face thickness DVs and web height where holes are placed"
] ]
} }

View File

@@ -0,0 +1,302 @@
{
"meta": {
"version": "2.0",
"created": "2026-02-09T12:00:00Z",
"modified": "2026-02-09T12:00:00Z",
"created_by": "optimizer-agent",
"modified_by": "optimizer-agent",
"study_name": "01_doe_landscape",
"description": "Hydrotech Beam — DoE landscape mapping + TPE optimization. Minimize mass subject to displacement and stress constraints.",
"tags": ["hydrotech-beam", "doe", "landscape", "tpe", "single-objective"]
},
"model": {
"sim": {
"path": "models/Beam_sim1.sim",
"solver": "nastran"
},
"part": "models/Beam.prt",
"fem": "models/Beam_fem1.fem",
"idealized": "models/Beam_fem1_i.prt"
},
"design_variables": [
{
"id": "dv_001",
"name": "beam_half_core_thickness",
"expression_name": "beam_half_core_thickness",
"type": "continuous",
"bounds": {
"min": 10,
"max": 40
},
"baseline": 20,
"units": "mm",
"enabled": true,
"description": "Core half-thickness. Stiffness scales ~quadratically via sandwich effect (lever arm). Also adds core mass linearly."
},
{
"id": "dv_002",
"name": "beam_face_thickness",
"expression_name": "beam_face_thickness",
"type": "continuous",
"bounds": {
"min": 10,
"max": 40
},
"baseline": 20,
"units": "mm",
"enabled": true,
"description": "Face sheet thickness. Primary bending stiffness contributor AND primary mass contributor. Key trade-off variable."
},
{
"id": "dv_003",
"name": "holes_diameter",
"expression_name": "holes_diameter",
"type": "continuous",
"bounds": {
"min": 150,
"max": 450
},
"baseline": 300,
"units": "mm",
"enabled": true,
"description": "Lightening hole diameter. Mass reduction scales with d². Stress concentration scales with hole size. Geometric feasibility depends on beam web length."
},
{
"id": "dv_004",
"name": "hole_count",
"expression_name": "hole_count",
"type": "integer",
"bounds": {
"min": 5,
"max": 15
},
"baseline": 10,
"units": "",
"enabled": true,
"description": "Number of lightening holes in the web. Integer variable (11 levels). Interacts strongly with holes_diameter for geometric feasibility."
}
],
"extractors": [
{
"id": "ext_001",
"name": "Mass Extractor",
"type": "expression",
"config": {
"expression_name": "p173",
"description": "Total beam mass from NX expression"
},
"outputs": [
{
"name": "mass",
"metric": "total",
"units": "kg"
}
]
},
{
"id": "ext_002",
"name": "Displacement Extractor",
"type": "displacement",
"config": {
"method": "result_sensor_or_op2",
"component": "magnitude",
"location": "beam_tip",
"description": "Tip displacement magnitude from SOL 101. Preferred: NX result sensor. Fallback: parse .op2 at tip node ID.",
"TODO": "Confirm displacement sensor exists in Beam_sim1.sim OR identify tip node ID"
},
"outputs": [
{
"name": "tip_displacement",
"metric": "max_magnitude",
"units": "mm"
}
]
},
{
"id": "ext_003",
"name": "Stress Extractor",
"type": "stress",
"config": {
"method": "op2_elemental_nodal",
"stress_type": "von_mises",
"scope": "all_elements",
"unit_conversion": "kPa_to_MPa",
"description": "Max von Mises stress (elemental nodal) from SOL 101. pyNastran returns kPa for NX kg-mm-s units — divide by 1000 for MPa.",
"TODO": "Verify element types in model (CQUAD4? CTETRA? CHEXA?) and confirm stress scope"
},
"outputs": [
{
"name": "max_von_mises",
"metric": "max",
"units": "MPa"
}
]
}
],
"objectives": [
{
"id": "obj_001",
"name": "Minimize beam mass",
"direction": "minimize",
"weight": 1.0,
"source": {
"extractor_id": "ext_001",
"output_name": "mass"
},
"units": "kg"
}
],
"constraints": [
{
"id": "con_001",
"name": "Tip displacement limit",
"type": "hard",
"operator": "<=",
"threshold": 10.0,
"source": {
"extractor_id": "ext_002",
"output_name": "tip_displacement"
},
"penalty_config": {
"method": "deb_rules",
"description": "Deb's feasibility rules: feasible always beats infeasible; among infeasible, lower violation wins"
},
"margin_buffer": {
"optimizer_target": 9.5,
"hard_limit": 10.0,
"description": "5% inner margin during optimization to account for numerical noise"
}
},
{
"id": "con_002",
"name": "Von Mises stress limit",
"type": "hard",
"operator": "<=",
"threshold": 130.0,
"source": {
"extractor_id": "ext_003",
"output_name": "max_von_mises"
},
"penalty_config": {
"method": "deb_rules",
"description": "Deb's feasibility rules: feasible always beats infeasible; among infeasible, lower violation wins"
},
"margin_buffer": {
"optimizer_target": 123.5,
"hard_limit": 130.0,
"description": "5% inner margin during optimization to account for mesh sensitivity"
}
}
],
"optimization": {
"phases": [
{
"id": "phase_1",
"name": "DoE Landscape Mapping",
"algorithm": {
"type": "LHS",
"config": {
"criterion": "maximin",
"integer_handling": "round_nearest_stratified",
"seed": 42
}
},
"budget": {
"max_trials": 50,
"baseline_enqueued": true,
"total_with_baseline": 51
},
"purpose": "Map design space, identify feasible region, assess sensitivities and interactions"
},
{
"id": "phase_2",
"name": "TPE Optimization",
"algorithm": {
"type": "TPE",
"config": {
"sampler": "TPESampler",
"n_startup_trials": 0,
"warm_start_from": "phase_1_best_feasible",
"seed": 42,
"constraint_handling": "deb_feasibility_rules"
}
},
"budget": {
"min_trials": 60,
"max_trials": 100,
"adaptive": true
},
"convergence": {
"stall_window": 20,
"stall_threshold_pct": 1.0,
"min_trials_before_check": 60
},
"purpose": "Directed optimization to converge on minimum-mass feasible design"
}
],
"total_budget": {
"min": 114,
"max": 156,
"estimated_hours": "4-5"
},
"baseline_trial": {
"enqueue": true,
"values": {
"beam_half_core_thickness": 20,
"beam_face_thickness": 20,
"holes_diameter": 300,
"hole_count": 10
},
"expected_results": {
"mass_kg": 974,
"tip_displacement_mm": 22,
"max_von_mises_mpa": "UNKNOWN — must measure"
}
}
},
"error_handling": {
"trial_timeout_seconds": 600,
"on_nx_rebuild_failure": "record_infeasible_max_violation",
"on_solver_failure": "record_infeasible_max_violation",
"on_extraction_failure": "record_infeasible_max_violation",
"max_consecutive_failures": 5,
"max_failure_rate_pct": 30,
"nx_process_management": "NEVER kill NX directly. Use NXSessionManager.close_nx_if_allowed() only."
},
"pre_flight_checks": [
{
"id": "pf_001",
"name": "Baseline validation",
"description": "Run Trial 0 with baseline parameters, verify mass ≈ 974 kg and displacement ≈ 22 mm"
},
{
"id": "pf_002",
"name": "Corner tests",
"description": "Test 16 corner combinations (min/max for each DV). Verify NX rebuilds and solves at all corners."
},
{
"id": "pf_003",
"name": "Mesh convergence",
"description": "Run baseline at 3 mesh densities. Verify stress convergence within 10%."
},
{
"id": "pf_004",
"name": "Extractor validation",
"description": "Confirm mass, displacement, and stress extractors return correct values at baseline."
},
{
"id": "pf_005",
"name": "Geometric feasibility",
"description": "Determine beam web length. Verify max(hole_count) × max(holes_diameter) fits. Add ligament constraint if needed."
}
],
"open_items": [
"Beam web length needed for geometric feasibility validation (holes_diameter × hole_count vs available length)",
"Displacement extraction method: result sensor in .sim or .op2 node ID parsing?",
"Stress extraction scope: whole model or specific element group?",
"Verify NX expression name 'p173' maps to mass",
"Benchmark single SOL 101 runtime to refine compute estimates",
"Confirm baseline stress value (currently unknown)",
"Clarify relationship between core/face thickness DVs and web height where holes are placed"
]
}

View File

@@ -1,205 +1,205 @@
"""Geometric feasibility pre-flight checks for Hydrotech Beam. """Geometric feasibility pre-flight checks for Hydrotech Beam.
Validates trial design variable combinations against physical geometry Validates trial design variable combinations against physical geometry
constraints BEFORE sending to NX. Catches infeasible combos that would constraints BEFORE sending to NX. Catches infeasible combos that would
cause NX rebuild failures or physically impossible geometries. cause NX rebuild failures or physically impossible geometries.
References: References:
OPTIMIZATION_STRATEGY.md §4.2 — Hole overlap analysis OPTIMIZATION_STRATEGY.md §4.2 — Hole overlap analysis
Auditor review 2026-02-10 — Corrected spacing formula Auditor review 2026-02-10 — Corrected spacing formula
""" """
from __future__ import annotations from __future__ import annotations
from dataclasses import dataclass from dataclasses import dataclass
from typing import NamedTuple from typing import NamedTuple
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Fixed geometry constants (from NX introspection — CONTEXT.md) # Fixed geometry constants (from NX introspection — CONTEXT.md)
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
BEAM_HALF_HEIGHT: float = 250.0 # mm — fixed, expression `beam_half_height` BEAM_HALF_HEIGHT: float = 250.0 # mm — fixed, expression `beam_half_height`
HOLE_SPAN: float = 4000.0 # mm — expression `p6`, total distribution length HOLE_SPAN: float = 4000.0 # mm — expression `p6`, total distribution length
MIN_LIGAMENT: float = 30.0 # mm — minimum material between holes (mesh + structural) MIN_LIGAMENT: float = 30.0 # mm — minimum material between holes (mesh + structural)
class FeasibilityResult(NamedTuple): class FeasibilityResult(NamedTuple):
"""Result of a geometric feasibility check.""" """Result of a geometric feasibility check."""
feasible: bool feasible: bool
reason: str reason: str
ligament: float # mm — material between adjacent holes ligament: float # mm — material between adjacent holes
web_clearance: float # mm — clearance between hole edge and faces web_clearance: float # mm — clearance between hole edge and faces
@dataclass(frozen=True) @dataclass(frozen=True)
class DesignPoint: class DesignPoint:
"""A single design variable combination.""" """A single design variable combination."""
beam_half_core_thickness: float # mm — DV1 beam_half_core_thickness: float # mm — DV1
beam_face_thickness: float # mm — DV2 beam_face_thickness: float # mm — DV2
holes_diameter: float # mm — DV3 holes_diameter: float # mm — DV3
hole_count: int # — DV4 hole_count: int # — DV4
def compute_ligament(holes_diameter: float, hole_count: int) -> float: def compute_ligament(holes_diameter: float, hole_count: int) -> float:
"""Compute ligament width (material between adjacent holes). """Compute ligament width (material between adjacent holes).
The NX pattern places `n` holes across `hole_span` mm using `n-1` The NX pattern places `n` holes across `hole_span` mm using `n-1`
intervals (holes at both endpoints of the span). intervals (holes at both endpoints of the span).
Formula (corrected per auditor review): Formula (corrected per auditor review):
spacing = hole_span / (hole_count - 1) spacing = hole_span / (hole_count - 1)
ligament = spacing - holes_diameter ligament = spacing - holes_diameter
Args: Args:
holes_diameter: Hole diameter in mm. holes_diameter: Hole diameter in mm.
hole_count: Number of holes (integer ≥ 2). hole_count: Number of holes (integer ≥ 2).
Returns: Returns:
Ligament width in mm. Negative means overlap. Ligament width in mm. Negative means overlap.
""" """
if hole_count < 2: if hole_count < 2:
# Single hole — no overlap possible, return large ligament # Single hole — no overlap possible, return large ligament
return HOLE_SPAN return HOLE_SPAN
spacing = HOLE_SPAN / (hole_count - 1) spacing = HOLE_SPAN / (hole_count - 1)
return spacing - holes_diameter return spacing - holes_diameter
def compute_web_clearance( def compute_web_clearance(
beam_face_thickness: float, holes_diameter: float beam_face_thickness: float, holes_diameter: float
) -> float: ) -> float:
"""Compute clearance between hole edge and face sheets. """Compute clearance between hole edge and face sheets.
Total beam height = 2 × beam_half_height = 500 mm (fixed). Total beam height = 2 × beam_half_height = 500 mm (fixed).
Web clear height = total_height - 2 × face_thickness. Web clear height = total_height - 2 × face_thickness.
Clearance = web_clear_height - holes_diameter. Clearance = web_clear_height - holes_diameter.
Args: Args:
beam_face_thickness: Face sheet thickness in mm. beam_face_thickness: Face sheet thickness in mm.
holes_diameter: Hole diameter in mm. holes_diameter: Hole diameter in mm.
Returns: Returns:
Web clearance in mm. ≤ 0 means hole doesn't fit. Web clearance in mm. ≤ 0 means hole doesn't fit.
""" """
total_height = 2.0 * BEAM_HALF_HEIGHT # 500 mm total_height = 2.0 * BEAM_HALF_HEIGHT # 500 mm
web_clear_height = total_height - 2.0 * beam_face_thickness web_clear_height = total_height - 2.0 * beam_face_thickness
return web_clear_height - holes_diameter return web_clear_height - holes_diameter
def check_feasibility(point: DesignPoint) -> FeasibilityResult: def check_feasibility(point: DesignPoint) -> FeasibilityResult:
"""Run all geometric feasibility checks on a design point. """Run all geometric feasibility checks on a design point.
Checks (in order): Checks (in order):
1. Hole overlap — ligament between adjacent holes ≥ MIN_LIGAMENT 1. Hole overlap — ligament between adjacent holes ≥ MIN_LIGAMENT
2. Web clearance — hole fits within the web (between face sheets) 2. Web clearance — hole fits within the web (between face sheets)
Args: Args:
point: Design variable combination to check. point: Design variable combination to check.
Returns: Returns:
FeasibilityResult with feasibility status and diagnostic info. FeasibilityResult with feasibility status and diagnostic info.
""" """
ligament = compute_ligament(point.holes_diameter, point.hole_count) ligament = compute_ligament(point.holes_diameter, point.hole_count)
web_clearance = compute_web_clearance( web_clearance = compute_web_clearance(
point.beam_face_thickness, point.holes_diameter point.beam_face_thickness, point.holes_diameter
) )
# Check 1: Hole overlap # Check 1: Hole overlap
if ligament < MIN_LIGAMENT: if ligament < MIN_LIGAMENT:
return FeasibilityResult( return FeasibilityResult(
feasible=False, feasible=False,
reason=( reason=(
f"Hole overlap: ligament={ligament:.1f}mm < " f"Hole overlap: ligament={ligament:.1f}mm < "
f"{MIN_LIGAMENT}mm minimum " f"{MIN_LIGAMENT}mm minimum "
f"(d={point.holes_diameter}mm, n={point.hole_count})" f"(d={point.holes_diameter}mm, n={point.hole_count})"
), ),
ligament=ligament, ligament=ligament,
web_clearance=web_clearance, web_clearance=web_clearance,
) )
# Check 2: Web clearance # Check 2: Web clearance
if web_clearance <= 0: if web_clearance <= 0:
return FeasibilityResult( return FeasibilityResult(
feasible=False, feasible=False,
reason=( reason=(
f"Hole exceeds web: clearance={web_clearance:.1f}mm ≤ 0 " f"Hole exceeds web: clearance={web_clearance:.1f}mm ≤ 0 "
f"(face={point.beam_face_thickness}mm, " f"(face={point.beam_face_thickness}mm, "
f"d={point.holes_diameter}mm)" f"d={point.holes_diameter}mm)"
), ),
ligament=ligament, ligament=ligament,
web_clearance=web_clearance, web_clearance=web_clearance,
) )
return FeasibilityResult( return FeasibilityResult(
feasible=True, feasible=True,
reason="OK", reason="OK",
ligament=ligament, ligament=ligament,
web_clearance=web_clearance, web_clearance=web_clearance,
) )
def check_feasibility_from_values( def check_feasibility_from_values(
beam_half_core_thickness: float, beam_half_core_thickness: float,
beam_face_thickness: float, beam_face_thickness: float,
holes_diameter: float, holes_diameter: float,
hole_count: int, hole_count: int,
) -> FeasibilityResult: ) -> FeasibilityResult:
"""Convenience wrapper — check feasibility from raw DV values. """Convenience wrapper — check feasibility from raw DV values.
Args: Args:
beam_half_core_thickness: Core half-thickness in mm (DV1). beam_half_core_thickness: Core half-thickness in mm (DV1).
beam_face_thickness: Face sheet thickness in mm (DV2). beam_face_thickness: Face sheet thickness in mm (DV2).
holes_diameter: Hole diameter in mm (DV3). holes_diameter: Hole diameter in mm (DV3).
hole_count: Number of holes (DV4). hole_count: Number of holes (DV4).
Returns: Returns:
FeasibilityResult with feasibility status and diagnostic info. FeasibilityResult with feasibility status and diagnostic info.
""" """
point = DesignPoint( point = DesignPoint(
beam_half_core_thickness=beam_half_core_thickness, beam_half_core_thickness=beam_half_core_thickness,
beam_face_thickness=beam_face_thickness, beam_face_thickness=beam_face_thickness,
holes_diameter=holes_diameter, holes_diameter=holes_diameter,
hole_count=hole_count, hole_count=hole_count,
) )
return check_feasibility(point) return check_feasibility(point)
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Quick self-test # Quick self-test
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
if __name__ == "__main__": if __name__ == "__main__":
# Baseline: should be feasible # Baseline: should be feasible
baseline = DesignPoint( baseline = DesignPoint(
beam_half_core_thickness=25.162, beam_half_core_thickness=25.162,
beam_face_thickness=21.504, beam_face_thickness=21.504,
holes_diameter=300.0, holes_diameter=300.0,
hole_count=10, hole_count=10,
) )
result = check_feasibility(baseline) result = check_feasibility(baseline)
print(f"Baseline: {result}") print(f"Baseline: {result}")
assert result.feasible, f"Baseline should be feasible! Got: {result}" assert result.feasible, f"Baseline should be feasible! Got: {result}"
# Worst case: n=15, d=450 — should be infeasible (overlap) # Worst case: n=15, d=450 — should be infeasible (overlap)
worst_overlap = DesignPoint( worst_overlap = DesignPoint(
beam_half_core_thickness=25.0, beam_half_core_thickness=25.0,
beam_face_thickness=20.0, beam_face_thickness=20.0,
holes_diameter=450.0, holes_diameter=450.0,
hole_count=15, hole_count=15,
) )
result = check_feasibility(worst_overlap) result = check_feasibility(worst_overlap)
print(f"Worst overlap: {result}") print(f"Worst overlap: {result}")
assert not result.feasible, "n=15, d=450 should be infeasible" assert not result.feasible, "n=15, d=450 should be infeasible"
# Web clearance fail: face=40, d=450 # Web clearance fail: face=40, d=450
web_fail = DesignPoint( web_fail = DesignPoint(
beam_half_core_thickness=25.0, beam_half_core_thickness=25.0,
beam_face_thickness=40.0, beam_face_thickness=40.0,
holes_diameter=450.0, holes_diameter=450.0,
hole_count=5, hole_count=5,
) )
result = check_feasibility(web_fail) result = check_feasibility(web_fail)
print(f"Web clearance fail: {result}") print(f"Web clearance fail: {result}")
assert not result.feasible, "face=40, d=450 should fail web clearance" assert not result.feasible, "face=40, d=450 should fail web clearance"
print("\nAll self-tests passed ✓") print("\nAll self-tests passed ✓")

View File

@@ -0,0 +1,205 @@
"""Geometric feasibility pre-flight checks for Hydrotech Beam.
Validates trial design variable combinations against physical geometry
constraints BEFORE sending to NX. Catches infeasible combos that would
cause NX rebuild failures or physically impossible geometries.
References:
OPTIMIZATION_STRATEGY.md §4.2 — Hole overlap analysis
Auditor review 2026-02-10 — Corrected spacing formula
"""
from __future__ import annotations
from dataclasses import dataclass
from typing import NamedTuple
# ---------------------------------------------------------------------------
# Fixed geometry constants (from NX introspection — CONTEXT.md)
# ---------------------------------------------------------------------------
BEAM_HALF_HEIGHT: float = 250.0 # mm — fixed, expression `beam_half_height`
HOLE_SPAN: float = 4000.0 # mm — expression `p6`, total distribution length
MIN_LIGAMENT: float = 30.0 # mm — minimum material between holes (mesh + structural)
class FeasibilityResult(NamedTuple):
"""Result of a geometric feasibility check."""
feasible: bool
reason: str
ligament: float # mm — material between adjacent holes
web_clearance: float # mm — clearance between hole edge and faces
@dataclass(frozen=True)
class DesignPoint:
"""A single design variable combination."""
beam_half_core_thickness: float # mm — DV1
beam_face_thickness: float # mm — DV2
holes_diameter: float # mm — DV3
hole_count: int # — DV4
def compute_ligament(holes_diameter: float, hole_count: int) -> float:
"""Compute ligament width (material between adjacent holes).
The NX pattern places `n` holes across `hole_span` mm using `n-1`
intervals (holes at both endpoints of the span).
Formula (corrected per auditor review):
spacing = hole_span / (hole_count - 1)
ligament = spacing - holes_diameter
Args:
holes_diameter: Hole diameter in mm.
hole_count: Number of holes (integer ≥ 2).
Returns:
Ligament width in mm. Negative means overlap.
"""
if hole_count < 2:
# Single hole — no overlap possible, return large ligament
return HOLE_SPAN
spacing = HOLE_SPAN / (hole_count - 1)
return spacing - holes_diameter
def compute_web_clearance(
beam_face_thickness: float, holes_diameter: float
) -> float:
"""Compute clearance between hole edge and face sheets.
Total beam height = 2 × beam_half_height = 500 mm (fixed).
Web clear height = total_height - 2 × face_thickness.
Clearance = web_clear_height - holes_diameter.
Args:
beam_face_thickness: Face sheet thickness in mm.
holes_diameter: Hole diameter in mm.
Returns:
Web clearance in mm. ≤ 0 means hole doesn't fit.
"""
total_height = 2.0 * BEAM_HALF_HEIGHT # 500 mm
web_clear_height = total_height - 2.0 * beam_face_thickness
return web_clear_height - holes_diameter
def check_feasibility(point: DesignPoint) -> FeasibilityResult:
"""Run all geometric feasibility checks on a design point.
Checks (in order):
1. Hole overlap — ligament between adjacent holes ≥ MIN_LIGAMENT
2. Web clearance — hole fits within the web (between face sheets)
Args:
point: Design variable combination to check.
Returns:
FeasibilityResult with feasibility status and diagnostic info.
"""
ligament = compute_ligament(point.holes_diameter, point.hole_count)
web_clearance = compute_web_clearance(
point.beam_face_thickness, point.holes_diameter
)
# Check 1: Hole overlap
if ligament < MIN_LIGAMENT:
return FeasibilityResult(
feasible=False,
reason=(
f"Hole overlap: ligament={ligament:.1f}mm < "
f"{MIN_LIGAMENT}mm minimum "
f"(d={point.holes_diameter}mm, n={point.hole_count})"
),
ligament=ligament,
web_clearance=web_clearance,
)
# Check 2: Web clearance
if web_clearance <= 0:
return FeasibilityResult(
feasible=False,
reason=(
f"Hole exceeds web: clearance={web_clearance:.1f}mm ≤ 0 "
f"(face={point.beam_face_thickness}mm, "
f"d={point.holes_diameter}mm)"
),
ligament=ligament,
web_clearance=web_clearance,
)
return FeasibilityResult(
feasible=True,
reason="OK",
ligament=ligament,
web_clearance=web_clearance,
)
def check_feasibility_from_values(
beam_half_core_thickness: float,
beam_face_thickness: float,
holes_diameter: float,
hole_count: int,
) -> FeasibilityResult:
"""Convenience wrapper — check feasibility from raw DV values.
Args:
beam_half_core_thickness: Core half-thickness in mm (DV1).
beam_face_thickness: Face sheet thickness in mm (DV2).
holes_diameter: Hole diameter in mm (DV3).
hole_count: Number of holes (DV4).
Returns:
FeasibilityResult with feasibility status and diagnostic info.
"""
point = DesignPoint(
beam_half_core_thickness=beam_half_core_thickness,
beam_face_thickness=beam_face_thickness,
holes_diameter=holes_diameter,
hole_count=hole_count,
)
return check_feasibility(point)
# ---------------------------------------------------------------------------
# Quick self-test
# ---------------------------------------------------------------------------
if __name__ == "__main__":
# Baseline: should be feasible
baseline = DesignPoint(
beam_half_core_thickness=25.162,
beam_face_thickness=21.504,
holes_diameter=300.0,
hole_count=10,
)
result = check_feasibility(baseline)
print(f"Baseline: {result}")
assert result.feasible, f"Baseline should be feasible! Got: {result}"
# Worst case: n=15, d=450 — should be infeasible (overlap)
worst_overlap = DesignPoint(
beam_half_core_thickness=25.0,
beam_face_thickness=20.0,
holes_diameter=450.0,
hole_count=15,
)
result = check_feasibility(worst_overlap)
print(f"Worst overlap: {result}")
assert not result.feasible, "n=15, d=450 should be infeasible"
# Web clearance fail: face=40, d=450
web_fail = DesignPoint(
beam_half_core_thickness=25.0,
beam_face_thickness=40.0,
holes_diameter=450.0,
hole_count=5,
)
result = check_feasibility(web_fail)
print(f"Web clearance fail: {result}")
assert not result.feasible, "face=40, d=450 should fail web clearance"
print("\nAll self-tests passed ✓")

View File

@@ -1,235 +1,235 @@
"""Persistent trial history — append-only, survives Optuna resets. """Persistent trial history — append-only, survives Optuna resets.
Every trial is logged to `history.db` (SQLite) and exported to `history.csv`. Every trial is logged to `history.db` (SQLite) and exported to `history.csv`.
Never deleted by --clean. Full lineage across all studies and phases. Never deleted by --clean. Full lineage across all studies and phases.
Usage: Usage:
history = TrialHistory(results_dir) history = TrialHistory(results_dir)
history.log_trial(study_name, trial_id, params, results, ...) history.log_trial(study_name, trial_id, params, results, ...)
history.export_csv() history.export_csv()
df = history.query("SELECT * FROM trials WHERE mass_kg < 100") df = history.query("SELECT * FROM trials WHERE mass_kg < 100")
""" """
from __future__ import annotations from __future__ import annotations
import csv import csv
import json import json
import logging import logging
import sqlite3 import sqlite3
from datetime import datetime, timezone from datetime import datetime, timezone
from pathlib import Path from pathlib import Path
from typing import Any, Optional from typing import Any, Optional
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# Schema version — bump if columns change # Schema version — bump if columns change
SCHEMA_VERSION = 1 SCHEMA_VERSION = 1
CREATE_TABLE = """ CREATE_TABLE = """
CREATE TABLE IF NOT EXISTS trials ( CREATE TABLE IF NOT EXISTS trials (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
study_name TEXT NOT NULL, study_name TEXT NOT NULL,
trial_id INTEGER NOT NULL, trial_id INTEGER NOT NULL,
iteration TEXT, iteration TEXT,
timestamp TEXT NOT NULL, timestamp TEXT NOT NULL,
-- Design variables -- Design variables
beam_half_core_thickness REAL, beam_half_core_thickness REAL,
beam_face_thickness REAL, beam_face_thickness REAL,
holes_diameter REAL, holes_diameter REAL,
hole_count INTEGER, hole_count INTEGER,
-- Results -- Results
mass_kg REAL, mass_kg REAL,
tip_displacement_mm REAL, tip_displacement_mm REAL,
max_von_mises_mpa REAL, max_von_mises_mpa REAL,
-- Constraint checks -- Constraint checks
disp_feasible INTEGER, -- 0/1 disp_feasible INTEGER, -- 0/1
stress_feasible INTEGER, -- 0/1 stress_feasible INTEGER, -- 0/1
geo_feasible INTEGER, -- 0/1 geo_feasible INTEGER, -- 0/1
fully_feasible INTEGER, -- 0/1 fully_feasible INTEGER, -- 0/1
-- Meta -- Meta
status TEXT DEFAULT 'COMPLETE', -- COMPLETE, FAILED, PRUNED status TEXT DEFAULT 'COMPLETE', -- COMPLETE, FAILED, PRUNED
error_message TEXT, error_message TEXT,
solve_time_s REAL, solve_time_s REAL,
iter_path TEXT, iter_path TEXT,
notes TEXT, notes TEXT,
-- Unique constraint: no duplicate (study, trial) pairs -- Unique constraint: no duplicate (study, trial) pairs
UNIQUE(study_name, trial_id) UNIQUE(study_name, trial_id)
); );
CREATE TABLE IF NOT EXISTS schema_version ( CREATE TABLE IF NOT EXISTS schema_version (
version INTEGER PRIMARY KEY version INTEGER PRIMARY KEY
); );
""" """
# Constraint thresholds (from OPTIMIZATION_STRATEGY.md) # Constraint thresholds (from OPTIMIZATION_STRATEGY.md)
DISP_LIMIT_MM = 10.0 DISP_LIMIT_MM = 10.0
STRESS_LIMIT_MPA = 130.0 STRESS_LIMIT_MPA = 130.0
# CSV column order # CSV column order
CSV_COLUMNS = [ CSV_COLUMNS = [
"study_name", "trial_id", "iteration", "timestamp", "study_name", "trial_id", "iteration", "timestamp",
"beam_half_core_thickness", "beam_face_thickness", "beam_half_core_thickness", "beam_face_thickness",
"holes_diameter", "hole_count", "holes_diameter", "hole_count",
"mass_kg", "tip_displacement_mm", "max_von_mises_mpa", "mass_kg", "tip_displacement_mm", "max_von_mises_mpa",
"disp_feasible", "stress_feasible", "geo_feasible", "fully_feasible", "disp_feasible", "stress_feasible", "geo_feasible", "fully_feasible",
"status", "error_message", "solve_time_s", "iter_path", "status", "error_message", "solve_time_s", "iter_path",
] ]
class TrialHistory: class TrialHistory:
"""Append-only trial history database.""" """Append-only trial history database."""
def __init__(self, results_dir: Path | str): def __init__(self, results_dir: Path | str):
self.results_dir = Path(results_dir) self.results_dir = Path(results_dir)
self.results_dir.mkdir(parents=True, exist_ok=True) self.results_dir.mkdir(parents=True, exist_ok=True)
self.db_path = self.results_dir / "history.db" self.db_path = self.results_dir / "history.db"
self.csv_path = self.results_dir / "history.csv" self.csv_path = self.results_dir / "history.csv"
self._conn = sqlite3.connect(str(self.db_path)) self._conn = sqlite3.connect(str(self.db_path))
self._conn.row_factory = sqlite3.Row self._conn.row_factory = sqlite3.Row
self._conn.execute("PRAGMA journal_mode=WAL") # safe concurrent reads self._conn.execute("PRAGMA journal_mode=WAL") # safe concurrent reads
self._init_schema() self._init_schema()
count = self._conn.execute("SELECT COUNT(*) FROM trials").fetchone()[0] count = self._conn.execute("SELECT COUNT(*) FROM trials").fetchone()[0]
logger.info("Trial history: %s (%d records)", self.db_path.name, count) logger.info("Trial history: %s (%d records)", self.db_path.name, count)
def _init_schema(self) -> None: def _init_schema(self) -> None:
"""Create tables if they don't exist.""" """Create tables if they don't exist."""
self._conn.executescript(CREATE_TABLE) self._conn.executescript(CREATE_TABLE)
# Check/set schema version # Check/set schema version
row = self._conn.execute( row = self._conn.execute(
"SELECT version FROM schema_version ORDER BY version DESC LIMIT 1" "SELECT version FROM schema_version ORDER BY version DESC LIMIT 1"
).fetchone() ).fetchone()
if row is None: if row is None:
self._conn.execute( self._conn.execute(
"INSERT INTO schema_version (version) VALUES (?)", "INSERT INTO schema_version (version) VALUES (?)",
(SCHEMA_VERSION,), (SCHEMA_VERSION,),
) )
self._conn.commit() self._conn.commit()
def log_trial( def log_trial(
self, self,
study_name: str, study_name: str,
trial_id: int, trial_id: int,
params: dict[str, float], params: dict[str, float],
mass_kg: float = float("nan"), mass_kg: float = float("nan"),
tip_displacement_mm: float = float("nan"), tip_displacement_mm: float = float("nan"),
max_von_mises_mpa: float = float("nan"), max_von_mises_mpa: float = float("nan"),
geo_feasible: bool = True, geo_feasible: bool = True,
status: str = "COMPLETE", status: str = "COMPLETE",
error_message: str | None = None, error_message: str | None = None,
solve_time_s: float = 0.0, solve_time_s: float = 0.0,
iter_path: str | None = None, iter_path: str | None = None,
notes: str | None = None, notes: str | None = None,
iteration_number: int | None = None, iteration_number: int | None = None,
) -> None: ) -> None:
"""Log a single trial result. """Log a single trial result.
Uses INSERT OR REPLACE so re-runs of the same trial update cleanly. Uses INSERT OR REPLACE so re-runs of the same trial update cleanly.
""" """
import math import math
disp_ok = ( disp_ok = (
not math.isnan(tip_displacement_mm) not math.isnan(tip_displacement_mm)
and tip_displacement_mm <= DISP_LIMIT_MM and tip_displacement_mm <= DISP_LIMIT_MM
) )
stress_ok = ( stress_ok = (
not math.isnan(max_von_mises_mpa) not math.isnan(max_von_mises_mpa)
and max_von_mises_mpa <= STRESS_LIMIT_MPA and max_von_mises_mpa <= STRESS_LIMIT_MPA
) )
iteration = f"iter{iteration_number:03d}" if iteration_number else None iteration = f"iter{iteration_number:03d}" if iteration_number else None
try: try:
self._conn.execute( self._conn.execute(
""" """
INSERT OR REPLACE INTO trials ( INSERT OR REPLACE INTO trials (
study_name, trial_id, iteration, timestamp, study_name, trial_id, iteration, timestamp,
beam_half_core_thickness, beam_face_thickness, beam_half_core_thickness, beam_face_thickness,
holes_diameter, hole_count, holes_diameter, hole_count,
mass_kg, tip_displacement_mm, max_von_mises_mpa, mass_kg, tip_displacement_mm, max_von_mises_mpa,
disp_feasible, stress_feasible, geo_feasible, fully_feasible, disp_feasible, stress_feasible, geo_feasible, fully_feasible,
status, error_message, solve_time_s, iter_path, notes status, error_message, solve_time_s, iter_path, notes
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
""", """,
( (
study_name, study_name,
trial_id, trial_id,
iteration, iteration,
datetime.now(timezone.utc).isoformat(), datetime.now(timezone.utc).isoformat(),
params.get("beam_half_core_thickness"), params.get("beam_half_core_thickness"),
params.get("beam_face_thickness"), params.get("beam_face_thickness"),
params.get("holes_diameter"), params.get("holes_diameter"),
params.get("hole_count"), params.get("hole_count"),
mass_kg, mass_kg,
tip_displacement_mm, tip_displacement_mm,
max_von_mises_mpa, max_von_mises_mpa,
int(disp_ok), int(disp_ok),
int(stress_ok), int(stress_ok),
int(geo_feasible), int(geo_feasible),
int(disp_ok and stress_ok and geo_feasible), int(disp_ok and stress_ok and geo_feasible),
status, status,
error_message, error_message,
solve_time_s, solve_time_s,
iter_path, iter_path,
notes, notes,
), ),
) )
self._conn.commit() self._conn.commit()
except sqlite3.Error as e: except sqlite3.Error as e:
logger.error("Failed to log trial %d: %s", trial_id, e) logger.error("Failed to log trial %d: %s", trial_id, e)
def export_csv(self) -> Path: def export_csv(self) -> Path:
"""Export all trials to CSV (overwrite). Returns path.""" """Export all trials to CSV (overwrite). Returns path."""
rows = self._conn.execute( rows = self._conn.execute(
f"SELECT {', '.join(CSV_COLUMNS)} FROM trials ORDER BY study_name, trial_id" f"SELECT {', '.join(CSV_COLUMNS)} FROM trials ORDER BY study_name, trial_id"
).fetchall() ).fetchall()
with open(self.csv_path, "w", newline="") as f: with open(self.csv_path, "w", newline="") as f:
writer = csv.writer(f) writer = csv.writer(f)
writer.writerow(CSV_COLUMNS) writer.writerow(CSV_COLUMNS)
for row in rows: for row in rows:
writer.writerow([row[col] for col in CSV_COLUMNS]) writer.writerow([row[col] for col in CSV_COLUMNS])
logger.info("Exported %d trials to %s", len(rows), self.csv_path.name) logger.info("Exported %d trials to %s", len(rows), self.csv_path.name)
return self.csv_path return self.csv_path
def query(self, sql: str, params: tuple = ()) -> list[dict]: def query(self, sql: str, params: tuple = ()) -> list[dict]:
"""Run an arbitrary SELECT query. Returns list of dicts.""" """Run an arbitrary SELECT query. Returns list of dicts."""
rows = self._conn.execute(sql, params).fetchall() rows = self._conn.execute(sql, params).fetchall()
return [dict(row) for row in rows] return [dict(row) for row in rows]
def get_study_summary(self, study_name: str) -> dict[str, Any]: def get_study_summary(self, study_name: str) -> dict[str, Any]:
"""Get summary stats for a study.""" """Get summary stats for a study."""
rows = self.query( rows = self.query(
"SELECT * FROM trials WHERE study_name = ?", (study_name,) "SELECT * FROM trials WHERE study_name = ?", (study_name,)
) )
if not rows: if not rows:
return {"study_name": study_name, "total": 0} return {"study_name": study_name, "total": 0}
complete = [r for r in rows if r["status"] == "COMPLETE"] complete = [r for r in rows if r["status"] == "COMPLETE"]
feasible = [r for r in complete if r["fully_feasible"]] feasible = [r for r in complete if r["fully_feasible"]]
masses = [r["mass_kg"] for r in feasible if r["mass_kg"] is not None] masses = [r["mass_kg"] for r in feasible if r["mass_kg"] is not None]
return { return {
"study_name": study_name, "study_name": study_name,
"total": len(rows), "total": len(rows),
"complete": len(complete), "complete": len(complete),
"failed": len(rows) - len(complete), "failed": len(rows) - len(complete),
"feasible": len(feasible), "feasible": len(feasible),
"best_mass_kg": min(masses) if masses else None, "best_mass_kg": min(masses) if masses else None,
"solve_rate": len(complete) / len(rows) * 100 if rows else 0, "solve_rate": len(complete) / len(rows) * 100 if rows else 0,
"feasibility_rate": len(feasible) / len(complete) * 100 if complete else 0, "feasibility_rate": len(feasible) / len(complete) * 100 if complete else 0,
} }
def close(self) -> None: def close(self) -> None:
"""Export CSV and close connection.""" """Export CSV and close connection."""
self.export_csv() self.export_csv()
self._conn.close() self._conn.close()

View File

@@ -0,0 +1,235 @@
"""Persistent trial history — append-only, survives Optuna resets.
Every trial is logged to `history.db` (SQLite) and exported to `history.csv`.
Never deleted by --clean. Full lineage across all studies and phases.
Usage:
history = TrialHistory(results_dir)
history.log_trial(study_name, trial_id, params, results, ...)
history.export_csv()
df = history.query("SELECT * FROM trials WHERE mass_kg < 100")
"""
from __future__ import annotations
import csv
import json
import logging
import sqlite3
from datetime import datetime, timezone
from pathlib import Path
from typing import Any, Optional
logger = logging.getLogger(__name__)
# Schema version — bump if columns change
SCHEMA_VERSION = 1
CREATE_TABLE = """
CREATE TABLE IF NOT EXISTS trials (
id INTEGER PRIMARY KEY AUTOINCREMENT,
study_name TEXT NOT NULL,
trial_id INTEGER NOT NULL,
iteration TEXT,
timestamp TEXT NOT NULL,
-- Design variables
beam_half_core_thickness REAL,
beam_face_thickness REAL,
holes_diameter REAL,
hole_count INTEGER,
-- Results
mass_kg REAL,
tip_displacement_mm REAL,
max_von_mises_mpa REAL,
-- Constraint checks
disp_feasible INTEGER, -- 0/1
stress_feasible INTEGER, -- 0/1
geo_feasible INTEGER, -- 0/1
fully_feasible INTEGER, -- 0/1
-- Meta
status TEXT DEFAULT 'COMPLETE', -- COMPLETE, FAILED, PRUNED
error_message TEXT,
solve_time_s REAL,
iter_path TEXT,
notes TEXT,
-- Unique constraint: no duplicate (study, trial) pairs
UNIQUE(study_name, trial_id)
);
CREATE TABLE IF NOT EXISTS schema_version (
version INTEGER PRIMARY KEY
);
"""
# Constraint thresholds (from OPTIMIZATION_STRATEGY.md)
DISP_LIMIT_MM = 10.0
STRESS_LIMIT_MPA = 130.0
# CSV column order
CSV_COLUMNS = [
"study_name", "trial_id", "iteration", "timestamp",
"beam_half_core_thickness", "beam_face_thickness",
"holes_diameter", "hole_count",
"mass_kg", "tip_displacement_mm", "max_von_mises_mpa",
"disp_feasible", "stress_feasible", "geo_feasible", "fully_feasible",
"status", "error_message", "solve_time_s", "iter_path",
]
class TrialHistory:
"""Append-only trial history database."""
def __init__(self, results_dir: Path | str):
self.results_dir = Path(results_dir)
self.results_dir.mkdir(parents=True, exist_ok=True)
self.db_path = self.results_dir / "history.db"
self.csv_path = self.results_dir / "history.csv"
self._conn = sqlite3.connect(str(self.db_path))
self._conn.row_factory = sqlite3.Row
self._conn.execute("PRAGMA journal_mode=WAL") # safe concurrent reads
self._init_schema()
count = self._conn.execute("SELECT COUNT(*) FROM trials").fetchone()[0]
logger.info("Trial history: %s (%d records)", self.db_path.name, count)
def _init_schema(self) -> None:
"""Create tables if they don't exist."""
self._conn.executescript(CREATE_TABLE)
# Check/set schema version
row = self._conn.execute(
"SELECT version FROM schema_version ORDER BY version DESC LIMIT 1"
).fetchone()
if row is None:
self._conn.execute(
"INSERT INTO schema_version (version) VALUES (?)",
(SCHEMA_VERSION,),
)
self._conn.commit()
def log_trial(
self,
study_name: str,
trial_id: int,
params: dict[str, float],
mass_kg: float = float("nan"),
tip_displacement_mm: float = float("nan"),
max_von_mises_mpa: float = float("nan"),
geo_feasible: bool = True,
status: str = "COMPLETE",
error_message: str | None = None,
solve_time_s: float = 0.0,
iter_path: str | None = None,
notes: str | None = None,
iteration_number: int | None = None,
) -> None:
"""Log a single trial result.
Uses INSERT OR REPLACE so re-runs of the same trial update cleanly.
"""
import math
disp_ok = (
not math.isnan(tip_displacement_mm)
and tip_displacement_mm <= DISP_LIMIT_MM
)
stress_ok = (
not math.isnan(max_von_mises_mpa)
and max_von_mises_mpa <= STRESS_LIMIT_MPA
)
iteration = f"iter{iteration_number:03d}" if iteration_number else None
try:
self._conn.execute(
"""
INSERT OR REPLACE INTO trials (
study_name, trial_id, iteration, timestamp,
beam_half_core_thickness, beam_face_thickness,
holes_diameter, hole_count,
mass_kg, tip_displacement_mm, max_von_mises_mpa,
disp_feasible, stress_feasible, geo_feasible, fully_feasible,
status, error_message, solve_time_s, iter_path, notes
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
""",
(
study_name,
trial_id,
iteration,
datetime.now(timezone.utc).isoformat(),
params.get("beam_half_core_thickness"),
params.get("beam_face_thickness"),
params.get("holes_diameter"),
params.get("hole_count"),
mass_kg,
tip_displacement_mm,
max_von_mises_mpa,
int(disp_ok),
int(stress_ok),
int(geo_feasible),
int(disp_ok and stress_ok and geo_feasible),
status,
error_message,
solve_time_s,
iter_path,
notes,
),
)
self._conn.commit()
except sqlite3.Error as e:
logger.error("Failed to log trial %d: %s", trial_id, e)
def export_csv(self) -> Path:
"""Export all trials to CSV (overwrite). Returns path."""
rows = self._conn.execute(
f"SELECT {', '.join(CSV_COLUMNS)} FROM trials ORDER BY study_name, trial_id"
).fetchall()
with open(self.csv_path, "w", newline="") as f:
writer = csv.writer(f)
writer.writerow(CSV_COLUMNS)
for row in rows:
writer.writerow([row[col] for col in CSV_COLUMNS])
logger.info("Exported %d trials to %s", len(rows), self.csv_path.name)
return self.csv_path
def query(self, sql: str, params: tuple = ()) -> list[dict]:
"""Run an arbitrary SELECT query. Returns list of dicts."""
rows = self._conn.execute(sql, params).fetchall()
return [dict(row) for row in rows]
def get_study_summary(self, study_name: str) -> dict[str, Any]:
"""Get summary stats for a study."""
rows = self.query(
"SELECT * FROM trials WHERE study_name = ?", (study_name,)
)
if not rows:
return {"study_name": study_name, "total": 0}
complete = [r for r in rows if r["status"] == "COMPLETE"]
feasible = [r for r in complete if r["fully_feasible"]]
masses = [r["mass_kg"] for r in feasible if r["mass_kg"] is not None]
return {
"study_name": study_name,
"total": len(rows),
"complete": len(complete),
"failed": len(rows) - len(complete),
"feasible": len(feasible),
"best_mass_kg": min(masses) if masses else None,
"solve_rate": len(complete) / len(rows) * 100 if rows else 0,
"feasibility_rate": len(feasible) / len(complete) * 100 if complete else 0,
}
def close(self) -> None:
"""Export CSV and close connection."""
self.export_csv()
self._conn.close()

View File

@@ -1,249 +1,249 @@
"""Smart iteration folder management for Hydrotech Beam optimization. """Smart iteration folder management for Hydrotech Beam optimization.
Manages iteration folders with intelligent retention: Manages iteration folders with intelligent retention:
- Each iteration gets a full copy of model files (openable in NX for debug) - Each iteration gets a full copy of model files (openable in NX for debug)
- Last N iterations: keep full model files (rolling window) - Last N iterations: keep full model files (rolling window)
- Best K iterations: keep full model files (by objective value) - Best K iterations: keep full model files (by objective value)
- All others: strip model files, keep only solver outputs + params - All others: strip model files, keep only solver outputs + params
This gives debuggability (open any recent/best iteration in NX) while This gives debuggability (open any recent/best iteration in NX) while
keeping disk usage bounded. keeping disk usage bounded.
References: References:
CEO design brief (2026-02-11): "all models properly saved in their CEO design brief (2026-02-11): "all models properly saved in their
iteration folder, keep last 10, keep best 3, delete stacking models" iteration folder, keep last 10, keep best 3, delete stacking models"
""" """
from __future__ import annotations from __future__ import annotations
import json import json
import logging import logging
import shutil import shutil
from dataclasses import dataclass, field from dataclasses import dataclass, field
from pathlib import Path from pathlib import Path
from typing import Optional from typing import Optional
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# NX model file extensions (copied to each iteration) # NX model file extensions (copied to each iteration)
MODEL_EXTENSIONS = {".prt", ".fem", ".sim"} MODEL_EXTENSIONS = {".prt", ".fem", ".sim"}
# Solver output extensions (always kept, even after stripping) # Solver output extensions (always kept, even after stripping)
KEEP_EXTENSIONS = {".op2", ".f06", ".dat", ".log", ".json", ".txt", ".csv"} KEEP_EXTENSIONS = {".op2", ".f06", ".dat", ".log", ".json", ".txt", ".csv"}
# Default retention policy # Default retention policy
DEFAULT_KEEP_RECENT = 10 # keep last N iterations with full models DEFAULT_KEEP_RECENT = 10 # keep last N iterations with full models
DEFAULT_KEEP_BEST = 3 # keep best K iterations with full models DEFAULT_KEEP_BEST = 3 # keep best K iterations with full models
@dataclass @dataclass
class IterationInfo: class IterationInfo:
"""Metadata for a single iteration.""" """Metadata for a single iteration."""
number: int number: int
path: Path path: Path
mass: float = float("inf") mass: float = float("inf")
displacement: float = float("inf") displacement: float = float("inf")
stress: float = float("inf") stress: float = float("inf")
feasible: bool = False feasible: bool = False
has_models: bool = True # False after stripping has_models: bool = True # False after stripping
@dataclass @dataclass
class IterationManager: class IterationManager:
"""Manages iteration folders with smart retention. """Manages iteration folders with smart retention.
Usage: Usage:
mgr = IterationManager(study_dir, master_model_dir) mgr = IterationManager(study_dir, master_model_dir)
# Before each trial: # Before each trial:
iter_dir = mgr.prepare_iteration(iteration_number) iter_dir = mgr.prepare_iteration(iteration_number)
# After trial completes: # After trial completes:
mgr.record_result(iteration_number, mass=..., displacement=..., stress=...) mgr.record_result(iteration_number, mass=..., displacement=..., stress=...)
# Periodically or at study end: # Periodically or at study end:
mgr.apply_retention() mgr.apply_retention()
""" """
study_dir: Path study_dir: Path
master_model_dir: Path master_model_dir: Path
keep_recent: int = DEFAULT_KEEP_RECENT keep_recent: int = DEFAULT_KEEP_RECENT
keep_best: int = DEFAULT_KEEP_BEST keep_best: int = DEFAULT_KEEP_BEST
_iterations: dict[int, IterationInfo] = field(default_factory=dict, repr=False) _iterations: dict[int, IterationInfo] = field(default_factory=dict, repr=False)
def __post_init__(self) -> None: def __post_init__(self) -> None:
self.iterations_dir = self.study_dir / "iterations" self.iterations_dir = self.study_dir / "iterations"
self.iterations_dir.mkdir(parents=True, exist_ok=True) self.iterations_dir.mkdir(parents=True, exist_ok=True)
# Scan existing iterations (for resume support) # Scan existing iterations (for resume support)
for d in sorted(self.iterations_dir.iterdir()): for d in sorted(self.iterations_dir.iterdir()):
if d.is_dir() and d.name.startswith("iter"): if d.is_dir() and d.name.startswith("iter"):
try: try:
num = int(d.name.replace("iter", "")) num = int(d.name.replace("iter", ""))
info = IterationInfo(number=num, path=d) info = IterationInfo(number=num, path=d)
# Load results if available # Load results if available
results_file = d / "results.json" results_file = d / "results.json"
if results_file.exists(): if results_file.exists():
data = json.loads(results_file.read_text()) data = json.loads(results_file.read_text())
info.mass = data.get("mass_kg", float("inf")) info.mass = data.get("mass_kg", float("inf"))
info.displacement = data.get("tip_displacement_mm", float("inf")) info.displacement = data.get("tip_displacement_mm", float("inf"))
info.stress = data.get("max_von_mises_mpa", float("inf")) info.stress = data.get("max_von_mises_mpa", float("inf"))
info.feasible = ( info.feasible = (
info.displacement <= 10.0 and info.stress <= 130.0 info.displacement <= 10.0 and info.stress <= 130.0
) )
# Check if model files are present # Check if model files are present
info.has_models = any( info.has_models = any(
f.suffix in MODEL_EXTENSIONS for f in d.iterdir() f.suffix in MODEL_EXTENSIONS for f in d.iterdir()
) )
self._iterations[num] = info self._iterations[num] = info
except (ValueError, json.JSONDecodeError): except (ValueError, json.JSONDecodeError):
continue continue
if self._iterations: if self._iterations:
logger.info( logger.info(
"Loaded %d existing iterations (resume support)", "Loaded %d existing iterations (resume support)",
len(self._iterations), len(self._iterations),
) )
def prepare_iteration(self, iteration_number: int) -> Path: def prepare_iteration(self, iteration_number: int) -> Path:
"""Set up an iteration folder with fresh model copies. """Set up an iteration folder with fresh model copies.
Copies all model files from master_model_dir to the iteration folder. Copies all model files from master_model_dir to the iteration folder.
All paths are resolved to absolute to avoid NX reference issues. All paths are resolved to absolute to avoid NX reference issues.
Args: Args:
iteration_number: Trial number (1-indexed). iteration_number: Trial number (1-indexed).
Returns: Returns:
Absolute path to the iteration folder. Absolute path to the iteration folder.
""" """
iter_dir = (self.iterations_dir / f"iter{iteration_number:03d}").resolve() iter_dir = (self.iterations_dir / f"iter{iteration_number:03d}").resolve()
# Clean up if exists (failed previous run) # Clean up if exists (failed previous run)
if iter_dir.exists(): if iter_dir.exists():
shutil.rmtree(iter_dir) shutil.rmtree(iter_dir)
iter_dir.mkdir(parents=True) iter_dir.mkdir(parents=True)
# Copy ALL model files (so NX can resolve references within the folder) # Copy ALL model files (so NX can resolve references within the folder)
master = self.master_model_dir.resolve() master = self.master_model_dir.resolve()
copied = 0 copied = 0
for ext in MODEL_EXTENSIONS: for ext in MODEL_EXTENSIONS:
for src in master.glob(f"*{ext}"): for src in master.glob(f"*{ext}"):
shutil.copy2(src, iter_dir / src.name) shutil.copy2(src, iter_dir / src.name)
copied += 1 copied += 1
logger.info( logger.info(
"Prepared iter%03d: copied %d model files to %s", "Prepared iter%03d: copied %d model files to %s",
iteration_number, copied, iter_dir, iteration_number, copied, iter_dir,
) )
# Track iteration # Track iteration
self._iterations[iteration_number] = IterationInfo( self._iterations[iteration_number] = IterationInfo(
number=iteration_number, number=iteration_number,
path=iter_dir, path=iter_dir,
has_models=True, has_models=True,
) )
return iter_dir return iter_dir
def record_result( def record_result(
self, self,
iteration_number: int, iteration_number: int,
mass: float, mass: float,
displacement: float, displacement: float,
stress: float, stress: float,
) -> None: ) -> None:
"""Record results for an iteration and run retention check. """Record results for an iteration and run retention check.
Args: Args:
iteration_number: Trial number. iteration_number: Trial number.
mass: Extracted mass in kg. mass: Extracted mass in kg.
displacement: Tip displacement in mm. displacement: Tip displacement in mm.
stress: Max von Mises stress in MPa. stress: Max von Mises stress in MPa.
""" """
if iteration_number in self._iterations: if iteration_number in self._iterations:
info = self._iterations[iteration_number] info = self._iterations[iteration_number]
info.mass = mass info.mass = mass
info.displacement = displacement info.displacement = displacement
info.stress = stress info.stress = stress
info.feasible = displacement <= 10.0 and stress <= 130.0 info.feasible = displacement <= 10.0 and stress <= 130.0
# Apply retention every 5 iterations to keep disk in check # Apply retention every 5 iterations to keep disk in check
if iteration_number % 5 == 0: if iteration_number % 5 == 0:
self.apply_retention() self.apply_retention()
def apply_retention(self) -> None: def apply_retention(self) -> None:
"""Apply the smart retention policy. """Apply the smart retention policy.
Keep full model files for: Keep full model files for:
1. Last `keep_recent` iterations (rolling window) 1. Last `keep_recent` iterations (rolling window)
2. Best `keep_best` iterations (by mass, feasible first) 2. Best `keep_best` iterations (by mass, feasible first)
Strip model files from everything else (keep solver outputs only). Strip model files from everything else (keep solver outputs only).
""" """
if not self._iterations: if not self._iterations:
return return
all_nums = sorted(self._iterations.keys()) all_nums = sorted(self._iterations.keys())
# Set 1: Last N iterations # Set 1: Last N iterations
recent_set = set(all_nums[-self.keep_recent:]) recent_set = set(all_nums[-self.keep_recent:])
# Set 2: Best K by objective (feasible first, then lowest mass) # Set 2: Best K by objective (feasible first, then lowest mass)
sorted_by_quality = sorted( sorted_by_quality = sorted(
self._iterations.values(), self._iterations.values(),
key=lambda info: ( key=lambda info: (
0 if info.feasible else 1, # feasible first 0 if info.feasible else 1, # feasible first
info.mass, # then lowest mass info.mass, # then lowest mass
), ),
) )
best_set = {info.number for info in sorted_by_quality[:self.keep_best]} best_set = {info.number for info in sorted_by_quality[:self.keep_best]}
# Keep set = recent best # Keep set = recent best
keep_set = recent_set | best_set keep_set = recent_set | best_set
# Strip model files from everything NOT in keep set # Strip model files from everything NOT in keep set
stripped = 0 stripped = 0
for num, info in self._iterations.items(): for num, info in self._iterations.items():
if num not in keep_set and info.has_models: if num not in keep_set and info.has_models:
self._strip_models(info) self._strip_models(info)
stripped += 1 stripped += 1
if stripped > 0: if stripped > 0:
logger.info( logger.info(
"Retention: kept %d recent + %d best, stripped %d iterations", "Retention: kept %d recent + %d best, stripped %d iterations",
len(recent_set), len(best_set), stripped, len(recent_set), len(best_set), stripped,
) )
def _strip_models(self, info: IterationInfo) -> None: def _strip_models(self, info: IterationInfo) -> None:
"""Remove model files from an iteration folder, keep solver outputs.""" """Remove model files from an iteration folder, keep solver outputs."""
if not info.path.exists(): if not info.path.exists():
return return
removed = 0 removed = 0
for f in info.path.iterdir(): for f in info.path.iterdir():
if f.is_file() and f.suffix in MODEL_EXTENSIONS: if f.is_file() and f.suffix in MODEL_EXTENSIONS:
f.unlink() f.unlink()
removed += 1 removed += 1
info.has_models = False info.has_models = False
if removed > 0: if removed > 0:
logger.debug( logger.debug(
"Stripped %d model files from iter%03d", "Stripped %d model files from iter%03d",
removed, info.number, removed, info.number,
) )
def get_best_iterations(self, n: int = 3) -> list[IterationInfo]: def get_best_iterations(self, n: int = 3) -> list[IterationInfo]:
"""Return the N best iterations (feasible first, then lowest mass).""" """Return the N best iterations (feasible first, then lowest mass)."""
return sorted( return sorted(
self._iterations.values(), self._iterations.values(),
key=lambda info: ( key=lambda info: (
0 if info.feasible else 1, 0 if info.feasible else 1,
info.mass, info.mass,
), ),
)[:n] )[:n]

View File

@@ -0,0 +1,249 @@
"""Smart iteration folder management for Hydrotech Beam optimization.
Manages iteration folders with intelligent retention:
- Each iteration gets a full copy of model files (openable in NX for debug)
- Last N iterations: keep full model files (rolling window)
- Best K iterations: keep full model files (by objective value)
- All others: strip model files, keep only solver outputs + params
This gives debuggability (open any recent/best iteration in NX) while
keeping disk usage bounded.
References:
CEO design brief (2026-02-11): "all models properly saved in their
iteration folder, keep last 10, keep best 3, delete stacking models"
"""
from __future__ import annotations
import json
import logging
import shutil
from dataclasses import dataclass, field
from pathlib import Path
from typing import Optional
logger = logging.getLogger(__name__)
# NX model file extensions (copied to each iteration)
MODEL_EXTENSIONS = {".prt", ".fem", ".sim"}
# Solver output extensions (always kept, even after stripping)
KEEP_EXTENSIONS = {".op2", ".f06", ".dat", ".log", ".json", ".txt", ".csv"}
# Default retention policy
DEFAULT_KEEP_RECENT = 10 # keep last N iterations with full models
DEFAULT_KEEP_BEST = 3 # keep best K iterations with full models
@dataclass
class IterationInfo:
"""Metadata for a single iteration."""
number: int
path: Path
mass: float = float("inf")
displacement: float = float("inf")
stress: float = float("inf")
feasible: bool = False
has_models: bool = True # False after stripping
@dataclass
class IterationManager:
"""Manages iteration folders with smart retention.
Usage:
mgr = IterationManager(study_dir, master_model_dir)
# Before each trial:
iter_dir = mgr.prepare_iteration(iteration_number)
# After trial completes:
mgr.record_result(iteration_number, mass=..., displacement=..., stress=...)
# Periodically or at study end:
mgr.apply_retention()
"""
study_dir: Path
master_model_dir: Path
keep_recent: int = DEFAULT_KEEP_RECENT
keep_best: int = DEFAULT_KEEP_BEST
_iterations: dict[int, IterationInfo] = field(default_factory=dict, repr=False)
def __post_init__(self) -> None:
self.iterations_dir = self.study_dir / "iterations"
self.iterations_dir.mkdir(parents=True, exist_ok=True)
# Scan existing iterations (for resume support)
for d in sorted(self.iterations_dir.iterdir()):
if d.is_dir() and d.name.startswith("iter"):
try:
num = int(d.name.replace("iter", ""))
info = IterationInfo(number=num, path=d)
# Load results if available
results_file = d / "results.json"
if results_file.exists():
data = json.loads(results_file.read_text())
info.mass = data.get("mass_kg", float("inf"))
info.displacement = data.get("tip_displacement_mm", float("inf"))
info.stress = data.get("max_von_mises_mpa", float("inf"))
info.feasible = (
info.displacement <= 10.0 and info.stress <= 130.0
)
# Check if model files are present
info.has_models = any(
f.suffix in MODEL_EXTENSIONS for f in d.iterdir()
)
self._iterations[num] = info
except (ValueError, json.JSONDecodeError):
continue
if self._iterations:
logger.info(
"Loaded %d existing iterations (resume support)",
len(self._iterations),
)
def prepare_iteration(self, iteration_number: int) -> Path:
"""Set up an iteration folder with fresh model copies.
Copies all model files from master_model_dir to the iteration folder.
All paths are resolved to absolute to avoid NX reference issues.
Args:
iteration_number: Trial number (1-indexed).
Returns:
Absolute path to the iteration folder.
"""
iter_dir = (self.iterations_dir / f"iter{iteration_number:03d}").resolve()
# Clean up if exists (failed previous run)
if iter_dir.exists():
shutil.rmtree(iter_dir)
iter_dir.mkdir(parents=True)
# Copy ALL model files (so NX can resolve references within the folder)
master = self.master_model_dir.resolve()
copied = 0
for ext in MODEL_EXTENSIONS:
for src in master.glob(f"*{ext}"):
shutil.copy2(src, iter_dir / src.name)
copied += 1
logger.info(
"Prepared iter%03d: copied %d model files to %s",
iteration_number, copied, iter_dir,
)
# Track iteration
self._iterations[iteration_number] = IterationInfo(
number=iteration_number,
path=iter_dir,
has_models=True,
)
return iter_dir
def record_result(
self,
iteration_number: int,
mass: float,
displacement: float,
stress: float,
) -> None:
"""Record results for an iteration and run retention check.
Args:
iteration_number: Trial number.
mass: Extracted mass in kg.
displacement: Tip displacement in mm.
stress: Max von Mises stress in MPa.
"""
if iteration_number in self._iterations:
info = self._iterations[iteration_number]
info.mass = mass
info.displacement = displacement
info.stress = stress
info.feasible = displacement <= 10.0 and stress <= 130.0
# Apply retention every 5 iterations to keep disk in check
if iteration_number % 5 == 0:
self.apply_retention()
def apply_retention(self) -> None:
"""Apply the smart retention policy.
Keep full model files for:
1. Last `keep_recent` iterations (rolling window)
2. Best `keep_best` iterations (by mass, feasible first)
Strip model files from everything else (keep solver outputs only).
"""
if not self._iterations:
return
all_nums = sorted(self._iterations.keys())
# Set 1: Last N iterations
recent_set = set(all_nums[-self.keep_recent:])
# Set 2: Best K by objective (feasible first, then lowest mass)
sorted_by_quality = sorted(
self._iterations.values(),
key=lambda info: (
0 if info.feasible else 1, # feasible first
info.mass, # then lowest mass
),
)
best_set = {info.number for info in sorted_by_quality[:self.keep_best]}
# Keep set = recent best
keep_set = recent_set | best_set
# Strip model files from everything NOT in keep set
stripped = 0
for num, info in self._iterations.items():
if num not in keep_set and info.has_models:
self._strip_models(info)
stripped += 1
if stripped > 0:
logger.info(
"Retention: kept %d recent + %d best, stripped %d iterations",
len(recent_set), len(best_set), stripped,
)
def _strip_models(self, info: IterationInfo) -> None:
"""Remove model files from an iteration folder, keep solver outputs."""
if not info.path.exists():
return
removed = 0
for f in info.path.iterdir():
if f.is_file() and f.suffix in MODEL_EXTENSIONS:
f.unlink()
removed += 1
info.has_models = False
if removed > 0:
logger.debug(
"Stripped %d model files from iter%03d",
removed, info.number,
)
def get_best_iterations(self, n: int = 3) -> list[IterationInfo]:
"""Return the N best iterations (feasible first, then lowest mass)."""
return sorted(
self._iterations.values(),
key=lambda info: (
0 if info.feasible else 1,
info.mass,
),
)[:n]

View File

@@ -1 +1 @@
p173=1133.0042670507723 1133.0042670507721

View File

@@ -0,0 +1,15 @@
{
"part_file": "Beam",
"mass_kg": 1133.0042670507721,
"mass_g": 1133004.2670507722,
"volume_mm3": 143928387.58266923,
"surface_area_mm2": 9629135.962798359,
"center_of_gravity_mm": [
2500.0,
-3.9849188813805173e-13,
-9.732850072582063e-13
],
"num_bodies": 1,
"success": true,
"error": null
}

View File

@@ -1,8 +1,8 @@
{ {
"iteration": 1, "iteration": 1,
"mass_kg": NaN, "mass_kg": 1133.0042670507721,
"tip_displacement_mm": 19.556875228881836, "tip_displacement_mm": 19.556875228881836,
"max_von_mises_mpa": 117.484125, "max_von_mises_mpa": 117.484125,
"feasible": false, "feasible": false,
"op2_file": "beam_sim1-solution_1.op2" "op2_file": "beam_sim1-solution_1.op2"
} }

View File

@@ -0,0 +1,8 @@
{
"iteration": 1,
"mass_kg": NaN,
"tip_displacement_mm": 19.556875228881836,
"max_von_mises_mpa": 117.484125,
"feasible": false,
"op2_file": "beam_sim1-solution_1.op2"
}

View File

@@ -1 +1 @@
p173=1266.203458914867 1266.2034589148668

View File

@@ -0,0 +1,15 @@
{
"part_file": "Beam",
"mass_kg": 1266.2034589148668,
"mass_g": 1266203.458914867,
"volume_mm3": 160849016.63044548,
"surface_area_mm2": 10302410.46378126,
"center_of_gravity_mm": [
2499.9999999999995,
-4.5228728964456235e-13,
-1.0297952705302583e-12
],
"num_bodies": 1,
"success": true,
"error": null
}

View File

@@ -0,0 +1,4 @@
beam_half_core_thickness=16.7813185433211 [MilliMeter]
beam_face_thickness=26.83364680743843 [MilliMeter]
holes_diameter=192.42062402658527 [MilliMeter]
hole_count=8.0 [Constant]

View File

@@ -1,8 +1,8 @@
{ {
"iteration": 2, "iteration": 2,
"mass_kg": NaN, "mass_kg": 1266.2034589148668,
"tip_displacement_mm": 24.064523696899414, "tip_displacement_mm": 24.064523696899414,
"max_von_mises_mpa": 398.4295, "max_von_mises_mpa": 398.4295,
"feasible": false, "feasible": false,
"op2_file": "beam_sim1-solution_1.op2" "op2_file": "beam_sim1-solution_1.op2"
} }

View File

@@ -0,0 +1,8 @@
{
"iteration": 2,
"mass_kg": NaN,
"tip_displacement_mm": 24.064523696899414,
"max_von_mises_mpa": 398.4295,
"feasible": false,
"op2_file": "beam_sim1-solution_1.op2"
}

View File

@@ -1 +1 @@
p173=1109.9630535376045 1109.963053537604

View File

@@ -0,0 +1,15 @@
{
"part_file": "Beam",
"mass_kg": 1109.963053537604,
"mass_g": 1109963.0535376042,
"volume_mm3": 141001404.15874043,
"surface_area_mm2": 10224850.427177388,
"center_of_gravity_mm": [
2500.0,
-4.038805106202274e-13,
-8.979130674139967e-13
],
"num_bodies": 1,
"success": true,
"error": null
}

View File

@@ -1,15 +1,15 @@
{ {
"iteration": 3, "iteration": 3,
"expressions": { "expressions": {
"beam_half_core_thickness": 16.654851585575436, "beam_half_core_thickness": 16.654851585575436,
"beam_face_thickness": 25.92976843726266, "beam_face_thickness": 25.92976843726266,
"holes_diameter": 249.7752118546045, "holes_diameter": 249.7752118546045,
"hole_count": 7.0 "hole_count": 7.0
}, },
"trial_input": { "trial_input": {
"beam_half_core_thickness": 16.654851585575436, "beam_half_core_thickness": 16.654851585575436,
"beam_face_thickness": 25.92976843726266, "beam_face_thickness": 25.92976843726266,
"holes_diameter": 249.7752118546045, "holes_diameter": 249.7752118546045,
"hole_count": 7 "hole_count": 7
} }
} }

View File

@@ -0,0 +1,15 @@
{
"iteration": 3,
"expressions": {
"beam_half_core_thickness": 16.654851585575436,
"beam_face_thickness": 25.92976843726266,
"holes_diameter": 249.7752118546045,
"hole_count": 7.0
},
"trial_input": {
"beam_half_core_thickness": 16.654851585575436,
"beam_face_thickness": 25.92976843726266,
"holes_diameter": 249.7752118546045,
"hole_count": 7
}
}

View File

@@ -1,8 +1,8 @@
{ {
"iteration": 3, "iteration": 3,
"mass_kg": NaN, "mass_kg": 1109.963053537604,
"tip_displacement_mm": 18.68077850341797, "tip_displacement_mm": 18.68077850341797,
"max_von_mises_mpa": 114.6584609375, "max_von_mises_mpa": 114.6584609375,
"feasible": false, "feasible": false,
"op2_file": "beam_sim1-solution_1.op2" "op2_file": "beam_sim1-solution_1.op2"
} }

View File

@@ -0,0 +1,8 @@
{
"iteration": 3,
"mass_kg": NaN,
"tip_displacement_mm": 18.68077850341797,
"max_von_mises_mpa": 114.6584609375,
"feasible": false,
"op2_file": "beam_sim1-solution_1.op2"
}

View File

@@ -1 +1 @@
p173=1718.1024059936985 1718.102405993698

View File

@@ -0,0 +1,15 @@
{
"part_file": "Beam",
"mass_kg": 1718.102405993698,
"mass_g": 1718102.4059936982,
"volume_mm3": 218254878.8101751,
"surface_area_mm2": 9526891.624035092,
"center_of_gravity_mm": [
2499.9999999999995,
-2.513603829927714e-13,
-5.326334731363442e-13
],
"num_bodies": 1,
"success": true,
"error": null
}

View File

@@ -1,15 +1,15 @@
{ {
"iteration": 4, "iteration": 4,
"expressions": { "expressions": {
"beam_half_core_thickness": 39.4879581560391, "beam_half_core_thickness": 39.4879581560391,
"beam_face_thickness": 37.70634303203751, "beam_face_thickness": 37.70634303203751,
"holes_diameter": 317.49333407316067, "holes_diameter": 317.49333407316067,
"hole_count": 10.0 "hole_count": 10.0
}, },
"trial_input": { "trial_input": {
"beam_half_core_thickness": 39.4879581560391, "beam_half_core_thickness": 39.4879581560391,
"beam_face_thickness": 37.70634303203751, "beam_face_thickness": 37.70634303203751,
"holes_diameter": 317.49333407316067, "holes_diameter": 317.49333407316067,
"hole_count": 10 "hole_count": 10
} }
} }

View File

@@ -0,0 +1,15 @@
{
"iteration": 4,
"expressions": {
"beam_half_core_thickness": 39.4879581560391,
"beam_face_thickness": 37.70634303203751,
"holes_diameter": 317.49333407316067,
"hole_count": 10.0
},
"trial_input": {
"beam_half_core_thickness": 39.4879581560391,
"beam_face_thickness": 37.70634303203751,
"holes_diameter": 317.49333407316067,
"hole_count": 10
}
}

View File

@@ -1,8 +1,8 @@
{ {
"iteration": 4, "iteration": 4,
"mass_kg": NaN, "mass_kg": 1718.102405993698,
"tip_displacement_mm": 12.852874755859375, "tip_displacement_mm": 12.852874755859375,
"max_von_mises_mpa": 81.574234375, "max_von_mises_mpa": 81.574234375,
"feasible": false, "feasible": false,
"op2_file": "beam_sim1-solution_1.op2" "op2_file": "beam_sim1-solution_1.op2"
} }

View File

@@ -0,0 +1,8 @@
{
"iteration": 4,
"mass_kg": NaN,
"tip_displacement_mm": 12.852874755859375,
"max_von_mises_mpa": 81.574234375,
"feasible": false,
"op2_file": "beam_sim1-solution_1.op2"
}

View File

@@ -1 +1 @@
p173=1205.9185440163983 1205.918544016398

View File

@@ -0,0 +1,15 @@
{
"part_file": "Beam",
"mass_kg": 1205.918544016398,
"mass_g": 1205918.544016398,
"volume_mm3": 153190871.95330262,
"surface_area_mm2": 10217809.311285218,
"center_of_gravity_mm": [
2532.261923730059,
-3.772285845536082e-13,
-8.015628081698969e-13
],
"num_bodies": 1,
"success": true,
"error": null
}

View File

@@ -1,15 +1,15 @@
{ {
"iteration": 5, "iteration": 5,
"expressions": { "expressions": {
"beam_half_core_thickness": 18.667249127790498, "beam_half_core_thickness": 18.667249127790498,
"beam_face_thickness": 27.961709646337493, "beam_face_thickness": 27.961709646337493,
"holes_diameter": 215.2919645872769, "holes_diameter": 215.2919645872769,
"hole_count": 12.0 "hole_count": 12.0
}, },
"trial_input": { "trial_input": {
"beam_half_core_thickness": 18.667249127790498, "beam_half_core_thickness": 18.667249127790498,
"beam_face_thickness": 27.961709646337493, "beam_face_thickness": 27.961709646337493,
"holes_diameter": 215.2919645872769, "holes_diameter": 215.2919645872769,
"hole_count": 12 "hole_count": 12
} }
} }

View File

@@ -0,0 +1,15 @@
{
"iteration": 5,
"expressions": {
"beam_half_core_thickness": 18.667249127790498,
"beam_face_thickness": 27.961709646337493,
"holes_diameter": 215.2919645872769,
"hole_count": 12.0
},
"trial_input": {
"beam_half_core_thickness": 18.667249127790498,
"beam_face_thickness": 27.961709646337493,
"holes_diameter": 215.2919645872769,
"hole_count": 12
}
}

View File

@@ -1,8 +1,8 @@
{ {
"iteration": 5, "iteration": 5,
"mass_kg": NaN, "mass_kg": 1205.918544016398,
"tip_displacement_mm": 17.29557228088379, "tip_displacement_mm": 17.29557228088379,
"max_von_mises_mpa": 106.283703125, "max_von_mises_mpa": 106.283703125,
"feasible": false, "feasible": false,
"op2_file": "beam_sim1-solution_1.op2" "op2_file": "beam_sim1-solution_1.op2"
} }

View File

@@ -0,0 +1,8 @@
{
"iteration": 5,
"mass_kg": NaN,
"tip_displacement_mm": 17.29557228088379,
"max_von_mises_mpa": 106.283703125,
"feasible": false,
"op2_file": "beam_sim1-solution_1.op2"
}

View File

@@ -1 +1 @@
p173=1085.4467002717115 1085.4467002717115

View File

@@ -0,0 +1,15 @@
{
"part_file": "Beam",
"mass_kg": 1085.4467002717115,
"mass_g": 1085446.7002717115,
"volume_mm3": 137887030.0141911,
"surface_area_mm2": 10367090.942113385,
"center_of_gravity_mm": [
2509.0298234434026,
-3.739827148611049e-13,
-8.302431198574242e-13
],
"num_bodies": 1,
"success": true,
"error": null
}

View File

@@ -1,15 +1,15 @@
{ {
"iteration": 6, "iteration": 6,
"expressions": { "expressions": {
"beam_half_core_thickness": 10.145147355948776, "beam_half_core_thickness": 10.145147355948776,
"beam_face_thickness": 33.3870327520718, "beam_face_thickness": 33.3870327520718,
"holes_diameter": 197.6501835498656, "holes_diameter": 197.6501835498656,
"hole_count": 11.0 "hole_count": 11.0
}, },
"trial_input": { "trial_input": {
"beam_half_core_thickness": 10.145147355948776, "beam_half_core_thickness": 10.145147355948776,
"beam_face_thickness": 33.3870327520718, "beam_face_thickness": 33.3870327520718,
"holes_diameter": 197.6501835498656, "holes_diameter": 197.6501835498656,
"hole_count": 11 "hole_count": 11
} }
} }

View File

@@ -0,0 +1,15 @@
{
"iteration": 6,
"expressions": {
"beam_half_core_thickness": 10.145147355948776,
"beam_face_thickness": 33.3870327520718,
"holes_diameter": 197.6501835498656,
"hole_count": 11.0
},
"trial_input": {
"beam_half_core_thickness": 10.145147355948776,
"beam_face_thickness": 33.3870327520718,
"holes_diameter": 197.6501835498656,
"hole_count": 11
}
}

View File

@@ -1,8 +1,8 @@
{ {
"iteration": 6, "iteration": 6,
"mass_kg": NaN, "mass_kg": 1085.4467002717115,
"tip_displacement_mm": 17.468721389770508, "tip_displacement_mm": 17.468721389770508,
"max_von_mises_mpa": 108.2625078125, "max_von_mises_mpa": 108.2625078125,
"feasible": false, "feasible": false,
"op2_file": "beam_sim1-solution_1.op2" "op2_file": "beam_sim1-solution_1.op2"
} }

Some files were not shown because too many files have changed in this diff Show More