feat: Add LLM-native development roadmap and reorganize documentation

- Add DEVELOPMENT_ROADMAP.md with 7-phase plan for LLM-driven optimization
  - Phase 1: Plugin system with lifecycle hooks
  - Phase 2: Natural language configuration interface
  - Phase 3: Dynamic code generation for custom objectives
  - Phase 4: Intelligent analysis and decision support
  - Phase 5: Automated HTML/PDF reporting
  - Phase 6: NX MCP server integration
  - Phase 7: Self-improving feature registry

- Update README.md to reflect LLM-native philosophy
  - Emphasize natural language workflows
  - Link to development roadmap
  - Update architecture diagrams
  - Add future capability examples

- Reorganize documentation structure
  - Move old dev docs to docs/archive/
  - Clean up root directory
  - Preserve all working optimization engine code

This sets the foundation for transforming Atomizer into an AI-powered
engineering assistant that can autonomously configure optimizations,
generate custom analysis code, and provide intelligent recommendations.
This commit is contained in:
2025-11-15 14:34:16 -05:00
parent 9ddc065d31
commit 0ce9ddf3e2
23 changed files with 7815 additions and 5849 deletions

319
README.md
View File

@@ -1,6 +1,6 @@
# Atomizer
> Advanced optimization platform for Siemens NX Simcenter with LLM-powered configuration
> Advanced LLM-native optimization platform for Siemens NX Simcenter
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-Proprietary-red.svg)](LICENSE)
@@ -8,31 +8,50 @@
## Overview
Atomizer is a next-generation optimization framework for Siemens NX that combines:
Atomizer is an **LLM-native optimization framework** for Siemens NX Simcenter that transforms how engineers interact with optimization workflows. Instead of manual JSON configuration and scripting, Atomizer uses AI as a collaborative engineering assistant.
- **LLM-Driven Configuration**: Use natural language to set up complex optimizations
- **Advanced Algorithms**: Optuna-powered TPE, Gaussian Process surrogates, multi-fidelity optimization
- **Real-Time Monitoring**: Interactive dashboards with live updates
- **Flexible Architecture**: Pluggable result extractors for any FEA analysis type
- **MCP Integration**: Extensible via Model Context Protocol
### Core Philosophy
Atomizer enables engineers to:
- **Describe optimizations in natural language** instead of writing configuration files
- **Generate custom analysis functions on-the-fly** (RSS metrics, weighted objectives, constraints)
- **Get intelligent recommendations** based on optimization results and surrogate models
- **Generate comprehensive reports** with AI-written insights and visualizations
- **Extend the framework autonomously** through LLM-driven code generation
### Key Features
- **LLM-Driven Workflow**: Natural language study creation, configuration, and analysis
- **Advanced Optimization**: Optuna-powered TPE, Gaussian Process surrogates, multi-objective Pareto fronts
- **Dynamic Code Generation**: AI writes custom Python functions and NX journal scripts during optimization
- **Intelligent Decision Support**: Surrogate quality assessment, sensitivity analysis, engineering recommendations
- **Real-Time Monitoring**: Interactive web dashboard with live progress tracking
- **Extensible Architecture**: Plugin system with hooks for pre/post mesh, solve, and extraction phases
- **Self-Improving**: Feature registry that learns from user workflows and expands capabilities
📘 See [DEVELOPMENT_ROADMAP.md](DEVELOPMENT_ROADMAP.md) for the complete vision and implementation plan.
## Architecture
```
┌─────────────────────────────────────────────────────────┐
UI Layer
Web Dashboard (React) + LLM Chat Interface (MCP)
LLM Interface Layer
Claude Skill + Natural Language Parser + Workflow Mgr
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
MCP Server
- Model Discovery - Config Builder
│ - Optimizer Control - Result Analyzer │
Optimization Engine Core
Plugin System + Feature Registry + Code Generator
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
│ Execution Layer │
│ NX Core (NXOpen) + Optuna Engine + Custom Scripts
│ NX Solver (via Journals) + Optuna + Result Extractors
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
│ Analysis & Reporting │
│ Surrogate Quality + Sensitivity + Report Generator │
└─────────────────────────────────────────────────────────┘
```
@@ -42,13 +61,13 @@ Atomizer is a next-generation optimization framework for Siemens NX that combine
- **Siemens NX 2412** with NX Nastran solver
- **Python 3.10+** (recommend Anaconda)
- **Node.js 18+** (for dashboard frontend)
- **Git** for version control
### Installation
1. **Clone the repository**:
```bash
git clone https://github.com/Anto01/Atomizer.git
git clone https://github.com/yourusername/Atomizer.git
cd Atomizer
```
@@ -60,178 +79,206 @@ Atomizer is a next-generation optimization framework for Siemens NX that combine
3. **Install dependencies**:
```bash
pip install -e .
# For development tools:
pip install -e ".[dev]"
# For MCP server:
pip install -e ".[mcp]"
pip install -r requirements.txt
```
4. **Configure NX path** (edit `config/nx_config.json`):
```json
{
"nx_executable": "C:/Program Files/Siemens/NX2412/NXBIN/ugraf.exe",
"python_env": "C:/Users/YourName/anaconda3/envs/atomizer/python.exe"
}
```
4. **Configure NX path** (edit if needed):
- Default NX path: `C:\Program Files\Siemens\Simcenter3D_2412\NXBIN\run_journal.exe`
- Update in `optimization_engine/nx_solver.py` if different
### Basic Usage
#### 1. Conversational Setup (via MCP)
#### Example 1: Natural Language Optimization (Future - Phase 2)
```
You: My FEA is in C:\Projects\Bracket\analysis.sim, please import its features.
User: "Let's create a new study to minimize stress on my bracket"
AI: I've analyzed your model:
- Solution: Static Analysis (NX Nastran)
- Expressions: wall_thickness (5mm), hole_diameter (10mm)
- Mesh: 8234 nodes, 4521 elements
LLM: "Study created! Please drop your .sim file into the study folder,
then I'll explore it to find available design parameters."
Which parameters would you like to optimize?
User: "Done. I want to vary wall_thickness between 3-8mm"
You: Optimize wall_thickness and hole_diameter to minimize max stress while keeping mass low.
LLM: "Perfect! I've configured:
- Objective: Minimize max von Mises stress
- Design variable: wall_thickness (3.0 - 8.0 mm)
- Sampler: TPE with 50 trials
AI: Configuration created! Ready to start optimization with 100 iterations.
Would you like to review the config or start now?
Ready to start?"
You: Start it!
User: "Yes, go!"
AI: Optimization launched! 🚀
Dashboard: http://localhost:8080/dashboard
LLM: "Optimization running! View progress at http://localhost:8080"
```
#### 2. Manual Configuration (JSON)
#### Example 2: Current JSON Configuration
Create `optimization_config.json`:
Create `examples/my_study/config.json`:
```json
{
"design_variables": {
"wall_thickness": {
"low": 3.0,
"high": 8.0,
"enabled": true
"sim_file": "examples/bracket/Bracket_sim1.sim",
"design_variables": [
{
"name": "wall_thickness",
"expression_name": "wall_thickness",
"min": 3.0,
"max": 8.0,
"units": "mm"
}
},
"objectives": {
"metrics": {
"max_stress": {
"weight": 10,
"target": 200,
"extractor": "nastran_stress"
}
],
"objectives": [
{
"name": "max_stress",
"extractor": "stress_extractor",
"metric": "max_von_mises",
"direction": "minimize",
"weight": 1.0,
"units": "MPa"
}
},
"nx_settings": {
"sim_path": "C:/Projects/Bracket/analysis.sim",
"solution_name": "Solution 1"
],
"optimization_settings": {
"n_trials": 50,
"sampler": "TPE",
"n_startup_trials": 20
}
}
```
Run optimization:
```bash
python -m optimization_engine.run_optimizer --config optimization_config.json
python examples/run_optimization.py --config examples/my_study/config.json
```
## Features
## Current Features
### ✨ Core Capabilities
### ✅ Implemented
- **Multi-Objective Optimization**: Weighted sum, Pareto front analysis
- **Smart Sampling**: TPE, Latin Hypercube, Gaussian Process surrogates
- **Result Extraction**: Nastran (OP2/F06), NX Mass Properties, custom parsers
- **Crash Recovery**: Automatic resume from interruptions
- **Parallel Evaluation**: Multi-core FEA solving (coming soon)
- **Core Optimization Engine**: Optuna integration with TPE sampler
- **NX Journal Integration**: Update expressions and run simulations via NXOpen
- **Result Extraction**: Stress (OP2), displacement (OP2), mass properties
- **Study Management**: Folder-based isolation, metadata tracking
- **Web Dashboard**: Real-time monitoring, study configuration UI
- **Precision Control**: 4-decimal rounding for mm/degrees/MPa
- **Crash Recovery**: Resume interrupted optimizations
### 📊 Visualization
### 🚧 In Progress (see [DEVELOPMENT_ROADMAP.md](DEVELOPMENT_ROADMAP.md))
- **Real-time progress monitoring**
- **3D Pareto front plots** (Plotly)
- **Parameter importance charts**
- **Convergence history**
- **FEA result overlays**
### 🔧 Extensibility
- **Pluggable result extractors**: Add custom metrics easily
- **Custom post-processing scripts**: Python integration
- **MCP tools**: Extend via protocol
- **NXOpen API access**: Full NX automation
- **Phase 1**: Plugin system with optimization lifecycle hooks (2 weeks)
- **Phase 2**: LLM interface with natural language configuration (2 weeks)
- **Phase 3**: Dynamic code generation for custom objectives (3 weeks)
- **Phase 4**: Intelligent analysis and surrogate quality assessment (3 weeks)
- **Phase 5**: Automated HTML/PDF report generation (2 weeks)
- **Phase 6**: NX MCP server with full API documentation (4 weeks)
- **Phase 7**: Self-improving feature registry (4 weeks)
## Project Structure
```
Atomizer/
├── mcp_server/ # MCP server implementation
│ ├── tools/ # MCP tool definitions
│ ├── schemas/ # JSON schemas for validation
── prompts/ # LLM system prompts
├── optimization_engine/ # Core optimization logic
│ ├── result_extractors/ # Pluggable metric extractors
│ ├── multi_optimizer.py # Optuna integration
│ ├── config_loader.py # Configuration parser
│ └── history_manager.py # CSV/SQLite persistence
├── nx_journals/ # NXOpen Python scripts
── update_and_solve.py # CAD update + solver
│ ├── post_process.py # Result extraction
│ └── utils/ # Helper functions
├── dashboard/ # Web UI
│ ├── frontend/ # React app
│ └── backend/ # FastAPI server
├── tests/ # Unit tests
├── examples/ # Example projects
└── docs/ # Documentation
├── optimization_engine/ # Core optimization logic
│ ├── nx_solver.py # NX journal execution
│ ├── multi_optimizer.py # Optuna integration
── result_extractors/ # OP2/F06 parsers
│ └── expression_updater.py # CAD parameter modification
├── dashboard/ # Web UI
│ ├── api/ # Flask backend
│ ├── frontend/ # HTML/CSS/JS
│ └── scripts/ # NX expression extraction
├── examples/ # Example optimizations
── bracket/ # Bracket stress minimization
├── tests/ # Unit and integration tests
├── docs/ # Documentation
├── DEVELOPMENT_ROADMAP.md # Future vision and phases
└── README.md # This file
```
## Configuration Schema
## Example: Bracket Stress Minimization
See [docs/configuration.md](docs/configuration.md) for full schema documentation.
**Key sections**:
- `design_variables`: Parameters to optimize
- `objectives`: Metrics to minimize/maximize
- `nx_settings`: NX/FEA solver configuration
- `optimization`: Optuna sampler settings
- `post_processing`: Result extraction pipelines
## Development
### Running Tests
A complete working example is in `examples/bracket/`:
```bash
pytest
# Run the bracket optimization (50 trials, TPE sampler)
python examples/test_journal_optimization.py
# View results
python dashboard/start_dashboard.py
# Open http://localhost:8080 in browser
```
### Code Formatting
**What it does**:
1. Loads `Bracket_sim1.sim` with wall thickness = 5mm
2. Varies thickness from 3-8mm over 50 trials
3. Runs FEA solve for each trial
4. Extracts max stress and displacement from OP2
5. Finds optimal thickness that minimizes stress
**Results** (typical):
- Best thickness: ~4.2mm
- Stress reduction: 15-20% vs. baseline
- Convergence: ~30 trials to plateau
## Dashboard Usage
Start the dashboard:
```bash
black .
ruff check .
python dashboard/start_dashboard.py
```
### Building Documentation
Features:
- **Create studies** with folder structure (sim/, results/, config.json)
- **Drop .sim/.prt files** into study folders
- **Explore .sim files** to extract expressions via NX
- **Configure optimization** with 5-step wizard:
1. Simulation files
2. Design variables
3. Objectives
4. Constraints
5. Optimization settings
- **Monitor progress** with real-time charts
- **View results** with trial history and best parameters
```bash
cd docs
mkdocs build
## Vision: LLM-Native Engineering Assistant
Atomizer is evolving into a comprehensive AI-powered engineering platform. See [DEVELOPMENT_ROADMAP.md](DEVELOPMENT_ROADMAP.md) for details on:
- **Phase 1-7 development plan** with timelines and deliverables
- **Example use cases** demonstrating natural language workflows
- **Architecture diagrams** showing plugin system and LLM integration
- **Success metrics** for each phase
### Future Capabilities
```
User: "Add RSS function combining stress and displacement"
→ LLM: Writes Python function, validates, registers as custom objective
User: "Use surrogate to predict these 10 parameter sets"
→ LLM: Checks surrogate R² > 0.9, runs predictions with confidence intervals
User: "Make an optimization report"
→ LLM: Generates HTML with plots, insights, recommendations (30 seconds)
User: "Why did trial #34 perform best?"
→ LLM: "Trial #34 had optimal stress distribution due to thickness 4.2mm
creating uniform load paths. Fillet radius 3.1mm reduced stress
concentration by 18%. This combination is Pareto-optimal."
```
## Roadmap
- [x] MCP server foundation
- [x] Basic optimization engine
- [ ] NXOpen integration
- [ ] Web dashboard
- [ ] Multi-fidelity optimization
- [ ] Parallel evaluations
- [ ] Sensitivity analysis tools
- [ ] Export to engineering reports
- [x] Core optimization engine with Optuna
- [x] NX journal integration
- [x] Web dashboard with study management
- [x] OP2 result extraction
- [ ] **Phase 1**: Plugin system (2 weeks)
- [ ] **Phase 2**: LLM interface (2 weeks)
- [ ] **Phase 3**: Code generation (3 weeks)
- [ ] **Phase 4**: Analysis & decision support (3 weeks)
- [ ] **Phase 5**: Automated reporting (2 weeks)
- [ ] **Phase 6**: NX MCP enhancement (4 weeks)
- [ ] **Phase 7**: Self-improving system (4 weeks)
## Contributing
This is a private repository. Contact [contact@atomaste.com](mailto:contact@atomaste.com) for access.
See [DEVELOPMENT_ROADMAP.md](DEVELOPMENT_ROADMAP.md) for complete timeline.
## License
@@ -241,14 +288,14 @@ Proprietary - Atomaste © 2025
- **Documentation**: [docs/](docs/)
- **Examples**: [examples/](examples/)
- **Issues**: GitHub Issues (private repository)
- **Email**: support@atomaste.com
- **Development Roadmap**: [DEVELOPMENT_ROADMAP.md](DEVELOPMENT_ROADMAP.md)
- **Email**: antoine@atomaste.com
## Resources
### NXOpen References
- **Official API Docs**: [Siemens NXOpen .NET Documentation](https://docs.sw.siemens.com/en-US/doc/209349590/)
- **NXOpenTSE**: [The Scripting Engineer's Documentation](https://nxopentsedocumentation.thescriptingengineer.com/) (reference for patterns and best practices)
- **Official API Docs**: [Siemens NXOpen Documentation](https://docs.sw.siemens.com/en-US/doc/209349590/)
- **NXOpenTSE**: [The Scripting Engineer's Guide](https://nxopentsedocumentation.thescriptingengineer.com/)
- **Our Guide**: [NXOpen Resources](docs/NXOPEN_RESOURCES.md)
### Optimization