Initial commit: NX OptiMaster project structure
- Set up Python package structure with pyproject.toml - Created MCP server, optimization engine, and NX journals modules - Added configuration templates - Implemented pluggable result extractor architecture - Comprehensive README with architecture overview - Project ready for GitHub push 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
249
README.md
Normal file
249
README.md
Normal file
@@ -0,0 +1,249 @@
|
||||
# NX OptiMaster
|
||||
|
||||
> Advanced optimization platform for Siemens NX Simcenter with LLM-powered configuration
|
||||
|
||||
[](https://www.python.org/downloads/)
|
||||
[](LICENSE)
|
||||
[](https://github.com)
|
||||
|
||||
## Overview
|
||||
|
||||
NX OptiMaster is a next-generation optimization framework for Siemens NX that combines:
|
||||
|
||||
- **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
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────┐
|
||||
│ UI Layer │
|
||||
│ Web Dashboard (React) + LLM Chat Interface (MCP) │
|
||||
└─────────────────────────────────────────────────────────┘
|
||||
↕
|
||||
┌─────────────────────────────────────────────────────────┐
|
||||
│ MCP Server │
|
||||
│ - Model Discovery - Config Builder │
|
||||
│ - Optimizer Control - Result Analyzer │
|
||||
└─────────────────────────────────────────────────────────┘
|
||||
↕
|
||||
┌─────────────────────────────────────────────────────────┐
|
||||
│ Execution Layer │
|
||||
│ NX Core (NXOpen) + Optuna Engine + Custom Scripts │
|
||||
└─────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- **Siemens NX 2306+** with NX Nastran solver
|
||||
- **Python 3.10+** (recommend Anaconda)
|
||||
- **Node.js 18+** (for dashboard frontend)
|
||||
|
||||
### Installation
|
||||
|
||||
1. **Clone the repository**:
|
||||
```bash
|
||||
git clone https://github.com/atomaste/nx-optimaster.git
|
||||
cd nx-optimaster
|
||||
```
|
||||
|
||||
2. **Create Python environment**:
|
||||
```bash
|
||||
conda create -n nx-optimaster python=3.10
|
||||
conda activate nx-optimaster
|
||||
```
|
||||
|
||||
3. **Install dependencies**:
|
||||
```bash
|
||||
pip install -e .
|
||||
# For development tools:
|
||||
pip install -e ".[dev]"
|
||||
# For MCP server:
|
||||
pip install -e ".[mcp]"
|
||||
```
|
||||
|
||||
4. **Configure NX path** (edit `config/nx_config.json`):
|
||||
```json
|
||||
{
|
||||
"nx_executable": "C:/Program Files/Siemens/NX2306/NXBIN/ugraf.exe",
|
||||
"python_env": "C:/Users/YourName/anaconda3/envs/nx-optimaster/python.exe"
|
||||
}
|
||||
```
|
||||
|
||||
### Basic Usage
|
||||
|
||||
#### 1. Conversational Setup (via MCP)
|
||||
|
||||
```
|
||||
You: My FEA is in C:\Projects\Bracket\analysis.sim, please import its features.
|
||||
|
||||
AI: I've analyzed your model:
|
||||
- Solution: Static Analysis (NX Nastran)
|
||||
- Expressions: wall_thickness (5mm), hole_diameter (10mm)
|
||||
- Mesh: 8234 nodes, 4521 elements
|
||||
|
||||
Which parameters would you like to optimize?
|
||||
|
||||
You: Optimize wall_thickness and hole_diameter to minimize max stress while keeping mass low.
|
||||
|
||||
AI: Configuration created! Ready to start optimization with 100 iterations.
|
||||
Would you like to review the config or start now?
|
||||
|
||||
You: Start it!
|
||||
|
||||
AI: Optimization launched! 🚀
|
||||
Dashboard: http://localhost:8080/dashboard
|
||||
```
|
||||
|
||||
#### 2. Manual Configuration (JSON)
|
||||
|
||||
Create `optimization_config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"design_variables": {
|
||||
"wall_thickness": {
|
||||
"low": 3.0,
|
||||
"high": 8.0,
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"objectives": {
|
||||
"metrics": {
|
||||
"max_stress": {
|
||||
"weight": 10,
|
||||
"target": 200,
|
||||
"extractor": "nastran_stress"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nx_settings": {
|
||||
"sim_path": "C:/Projects/Bracket/analysis.sim",
|
||||
"solution_name": "Solution 1"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Run optimization:
|
||||
```bash
|
||||
python -m optimization_engine.run_optimizer --config optimization_config.json
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
### ✨ Core Capabilities
|
||||
|
||||
- **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)
|
||||
|
||||
### 📊 Visualization
|
||||
|
||||
- **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
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
nx-optimaster/
|
||||
├── 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
|
||||
|
||||
```
|
||||
|
||||
## Configuration Schema
|
||||
|
||||
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
|
||||
|
||||
```bash
|
||||
pytest
|
||||
```
|
||||
|
||||
### Code Formatting
|
||||
|
||||
```bash
|
||||
black .
|
||||
ruff check .
|
||||
```
|
||||
|
||||
### Building Documentation
|
||||
|
||||
```bash
|
||||
cd docs
|
||||
mkdocs build
|
||||
```
|
||||
|
||||
## 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
|
||||
|
||||
## Contributing
|
||||
|
||||
This is a private repository. Contact [contact@atomaste.com](mailto:contact@atomaste.com) for access.
|
||||
|
||||
## License
|
||||
|
||||
Proprietary - Atomaste © 2025
|
||||
|
||||
## Support
|
||||
|
||||
- **Documentation**: [docs/](docs/)
|
||||
- **Examples**: [examples/](examples/)
|
||||
- **Issues**: GitHub Issues (private repository)
|
||||
- **Email**: support@atomaste.com
|
||||
|
||||
---
|
||||
|
||||
**Built with ❤️ by Atomaste** | Powered by Optuna, NXOpen, and Claude
|
||||
Reference in New Issue
Block a user