refactor: Engine updates and NX hooks improvements
optimization_engine: - Updated nx_solver.py with improvements - Enhanced solve_simulation.py - Updated extractors/__init__.py - Improved NX CAD hooks (expression_manager, feature_manager, geometry_query, model_introspection, part_manager) - Enhanced NX CAE solver_manager hook Documentation: - Updated OP_01_CREATE_STUDY.md protocol - Updated SYS_12_EXTRACTOR_LIBRARY.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,26 +31,44 @@ This protocol guides you through creating a complete Atomizer optimization study
|
||||
|
||||
## Quick Reference
|
||||
|
||||
**Required Outputs**:
|
||||
| File | Purpose | Location |
|
||||
|------|---------|----------|
|
||||
| `optimization_config.json` | Design vars, objectives, constraints | `1_setup/` |
|
||||
| `run_optimization.py` | Execution script | Study root |
|
||||
| `README.md` | Engineering documentation | Study root |
|
||||
| `STUDY_REPORT.md` | Results template | Study root |
|
||||
**Required Outputs** (ALL MANDATORY - study is INCOMPLETE without these):
|
||||
| File | Purpose | Location | Priority |
|
||||
|------|---------|----------|----------|
|
||||
| `optimization_config.json` | Design vars, objectives, constraints | `1_setup/` | 1 |
|
||||
| `run_optimization.py` | Execution script | Study root | 2 |
|
||||
| **`README.md`** | Engineering documentation | Study root | **3 - NEVER SKIP** |
|
||||
| `STUDY_REPORT.md` | Results template | Study root | 4 |
|
||||
|
||||
**CRITICAL**: README.md is MANDATORY for every study. A study without README.md is INCOMPLETE.
|
||||
|
||||
**Study Structure**:
|
||||
```
|
||||
studies/{study_name}/
|
||||
studies/{geometry_type}/{study_name}/
|
||||
├── 1_setup/
|
||||
│ ├── model/ # NX files (.prt, .sim, .fem)
|
||||
│ └── optimization_config.json
|
||||
├── 2_results/ # Created during run
|
||||
├── 2_iterations/ # FEA trial folders (iter1, iter2, ...)
|
||||
├── 3_results/ # Optimization outputs (study.db, logs)
|
||||
├── README.md # MANDATORY
|
||||
├── STUDY_REPORT.md # MANDATORY
|
||||
└── run_optimization.py
|
||||
```
|
||||
|
||||
**IMPORTANT: Studies are organized by geometry type**:
|
||||
| Geometry Type | Folder | Examples |
|
||||
|---------------|--------|----------|
|
||||
| M1 Mirror | `studies/M1_Mirror/` | m1_mirror_adaptive_V14, m1_mirror_cost_reduction_V3 |
|
||||
| Simple Bracket | `studies/Simple_Bracket/` | bracket_stiffness_optimization |
|
||||
| UAV Arm | `studies/UAV_Arm/` | uav_arm_optimization |
|
||||
| Drone Gimbal | `studies/Drone_Gimbal/` | drone_gimbal_arm_optimization |
|
||||
| Simple Beam | `studies/Simple_Beam/` | simple_beam_optimization |
|
||||
| Other/Test | `studies/_Other/` | training_data_export_test |
|
||||
|
||||
When creating a new study:
|
||||
1. Identify the geometry type (mirror, bracket, beam, etc.)
|
||||
2. Place study under the appropriate `studies/{geometry_type}/` folder
|
||||
3. For new geometry types, create a new folder with descriptive name
|
||||
|
||||
---
|
||||
|
||||
## Detailed Steps
|
||||
@@ -357,6 +375,34 @@ _To be filled after run_
|
||||
_To be filled after analysis_
|
||||
```
|
||||
|
||||
### Step 7b: Capture Baseline Geometry Images (Recommended)
|
||||
|
||||
For better documentation, capture images of the starting geometry using the NX journal:
|
||||
|
||||
```bash
|
||||
# Capture baseline images for study documentation
|
||||
"C:\Program Files\Siemens\DesigncenterNX2512\NXBIN\run_journal.exe" ^
|
||||
"C:\Users\antoi\Atomizer\nx_journals\capture_study_images.py" ^
|
||||
-args "path/to/model.prt" "1_setup/" "model_name"
|
||||
```
|
||||
|
||||
This generates:
|
||||
- `1_setup/{model_name}_Top.png` - Top view
|
||||
- `1_setup/{model_name}_iso.png` - Isometric view
|
||||
|
||||
**Include in README.md**:
|
||||
```markdown
|
||||
## Baseline Geometry
|
||||
|
||||

|
||||
*Top view description*
|
||||
|
||||

|
||||
*Isometric view description*
|
||||
```
|
||||
|
||||
**Journal location**: `nx_journals/capture_study_images.py`
|
||||
|
||||
### Step 8: Validate NX Model File Chain
|
||||
|
||||
**CRITICAL**: NX simulation files have parent-child dependencies. ALL linked files must be copied to the study folder.
|
||||
@@ -394,16 +440,26 @@ _To be filled after analysis_
|
||||
|
||||
### Step 9: Final Validation Checklist
|
||||
|
||||
Before running:
|
||||
**CRITICAL**: Study is NOT complete until ALL items are checked:
|
||||
|
||||
- [ ] NX files exist in `1_setup/model/`
|
||||
- [ ] **ALL child parts copied** (especially `*_i.prt`)
|
||||
- [ ] Expression names match model
|
||||
- [ ] Config validates (JSON schema)
|
||||
- [ ] `run_optimization.py` has no syntax errors
|
||||
- [ ] README.md has all 11 sections
|
||||
- [ ] **README.md exists** (MANDATORY - study is incomplete without it!)
|
||||
- [ ] README.md contains: Overview, Objectives, Constraints, Design Variables, Settings, Usage, Structure
|
||||
- [ ] STUDY_REPORT.md template exists
|
||||
|
||||
**README.md Minimum Content**:
|
||||
1. Overview/Purpose
|
||||
2. Objectives with weights
|
||||
3. Constraints (if any)
|
||||
4. Design variables with ranges
|
||||
5. Optimization settings
|
||||
6. Usage commands
|
||||
7. Directory structure
|
||||
|
||||
---
|
||||
|
||||
## Examples
|
||||
|
||||
Reference in New Issue
Block a user