Files
Atomizer/studies/M1_Mirror/m1_mirror_flatback_lateral
Anto01 5c419e2358 fix(canvas): Multiple fixes for drag-drop, undo/redo, and code generation
Drag-drop fixes:
- Fix Objective default data: use nested 'source' object with extractor_id/output_name
- Fix Constraint default data: use 'type' field (not constraint_type), 'threshold' (not limit)

Undo/Redo fixes:
- Remove dependency on isDirty flag (which is always false due to auto-save)
- Record snapshots based on actual spec changes via deep comparison

Code generation improvements:
- Update system prompt to support multiple extractor types:
  * OP2-based extractors for FEA results (stress, displacement, frequency)
  * Expression-based extractors for NX model values (dimensions, volumes)
  * Computed extractors for derived values (no FEA needed)
- Claude will now choose appropriate signature based on user's description
2026-01-20 15:08:49 -05:00
..

M1 Mirror Flat Back - Lateral Supports Optimization

See ../README.md for project overview and optical specifications.

Study Overview

Field Value
Study Name m1_mirror_flatback_lateral
Algorithm CMA-ES
Status Ready to run
Created 2025-01-13
Trials 100 planned
Focus Lateral support geometry only

Purpose

Optimize lateral support parameters only using the new U-joint parameterization:

  • lateral_inner_u and lateral_outer_u replace the old lateral_inner_pivot and lateral_outer_pivot
  • All other parameters (whiffle, ribs, thickness) are fixed at baseline values
  • Mass is NOT an objective - only WFE and MFG are optimized

Design Variables (5)

Variable Min Max Baseline Units Notes
lateral_inner_u 0.2 0.95 0.4 unitless U-joint ratio for inner lateral (NEW)
lateral_outer_u 0.2 0.95 0.4 unitless U-joint ratio for outer lateral (NEW)
lateral_middle_pivot 15.0 27.0 22.42 mm Middle pivot position
lateral_inner_angle 25.0 35.0 31.96 degrees Inner lateral angle
lateral_outer_angle 8.0 17.0 9.08 degrees Outer lateral angle

Objectives

Objective Weight Target Description
wfe_40_20 6.0 4.0 nm Filtered RMS WFE at 40° relative to 20°
wfe_60_20 5.0 10.0 nm Filtered RMS WFE at 60° relative to 20°
mfg_90 3.0 20.0 nm Manufacturing deformation at 90° polishing

Weighted Sum Formula: 6*wfe_40_20 + 5*wfe_60_20 + 3*mfg_90

Note: Mass is NOT in the objective function. A hard constraint (mass ≤ 120 kg) is still enforced.

Fixed Parameters (Baked in Model)

All non-lateral parameters are fixed at the model's current values (from V10 iter123 best design):

Parameter Value Units
whiffle_min 70.77 mm
whiffle_outer_to_vertical 86.56 degrees
whiffle_triangle_closeness 69.02 mm
lateral_closeness 11.18 mm
rib_thickness 9.36 mm
ribs_circular_thk 7.12 mm
rib_thickness_lateral_truss 12.52 mm
mirror_face_thickness 15.00 mm
center_thickness 67.92 mm
blank_backface_angle 0.0 degrees

These are not pushed during optimization - the model already contains the correct values.

Why CMA-ES?

Factor This Problem Why CMA-ES
Dimensions 5 variables CMA-ES optimal for 5-50D
Variable type All continuous CMA-ES designed for continuous
Landscape Smooth (physics-based) CMA-ES exploits gradient structure
Correlation Lateral params likely correlated CMA-ES learns correlations automatically
Convergence 100 trials budget CMA-ES converges 2-3x faster than TPE

CMA-ES Settings

  • sigma0: 0.3 (30% of range for initial exploration)
  • restart_strategy: IPOP (restarts with larger population if stuck)
  • seed: 42

Model Files

File Purpose
ASSY_M1_assyfem1_sim1.sim Simulation file
ASSY_M1_assyfem1.afm Assembly FEM
M1_Blank.prt Geometry part (102.9 kg)
M1_Blank_fem1.fem FEM mesh
M1_Blank_fem1_i.prt Idealized part (critical for mesh updates)
M1_Vertical_Support_Skeleton.prt Support skeleton
M1_Vertical_Support_Skeleton_fem1.fem Support skeleton FEM

Extraction Method

  • Type: ZernikeOPDExtractor with ANNULAR aperture
  • Inner radius: 135.75 mm (271.5 mm central hole excluded)
  • Zernike modes: 50
  • Filter orders: J1-J4 removed for WFE, J1-J3 for MFG
  • Subcases: 90° (1), 20° (2), 40° (3), 60° (4)
  • Reference: 20° (subcase 2)

Usage

# Single test trial
python run_optimization.py --test

# Full optimization (100 trials)
python run_optimization.py --start

# Custom trial count
python run_optimization.py --start --trials 50

# Resume interrupted run
python run_optimization.py --start --resume

Directory Structure

m1_mirror_flatback_lateral/
├── 1_setup/
│   ├── model/                    # NX model files
│   ├── optimization_config.json  # Study configuration
│   └── model_expressions.json    # Introspected expressions
├── 2_iterations/                 # FEA iteration folders
├── 3_results/                    # Results database & summaries
│   ├── study.db                  # Optuna SQLite database
│   ├── optimization.log          # Run log
│   └── optimization_summary.json # Final results
├── run_optimization.py           # Main optimization script
├── introspect_model.py          # Model introspection utility
└── README.md                     # This file

Results

Study not yet run. Results will be updated after optimization completes.

References