Commit Graph

254 Commits

Author SHA1 Message Date
7086f9fbdf Add doc 11: HQ improvements plan from Bhanu video analysis 2026-02-16 01:19:27 +00:00
e4651c9a40 Adaptive isogrid: min triangle area filtering and circular hole bosses 2026-02-16 01:11:53 +00:00
9d4c37234a Add standalone brain CLI, test geometries, and robustness sweep outputs 2026-02-16 00:12:12 +00:00
4bec4063a5 feat: add adaptive isogrid tool — project foundations
- Python Brain: density field, constrained Delaunay triangulation,
  pocket profiles, profile assembly, validation modules
- NX Hands: skeleton scripts for geometry extraction, AFEM setup,
  per-iteration solve (require NX environment to develop)
- Atomizer integration: 15-param space definition, objective function
- Technical spec, README, sample test geometry, requirements.txt
- Architecture: Python Brain + NX Hands + Atomizer Manager
2026-02-16 00:01:35 +00:00
cf82de4f06 docs: add HQ multi-agent framework documentation from PKM
- Project plan, agent roster, architecture, roadmap
- Decision log, full system plan, Discord setup/migration guides
- System implementation status (as-built)
- Cluster pivot history
- Orchestration engine plan (Phases 1-4)
- Webster and Auditor reviews
2026-02-15 21:44:07 +00:00
3289a76e19 feat: add Atomizer HQ multi-agent cluster infrastructure
- 8-agent OpenClaw cluster (Manager, Tech-Lead, Secretary, Auditor,
  Optimizer, Study-Builder, NX-Expert, Webster)
- Orchestration engine: orchestrate.py (sync delegation + handoffs)
- Workflow engine: YAML-defined multi-step pipelines
- Agent workspaces: SOUL.md, AGENTS.md, MEMORY.md per agent
- Shared skills: delegate, orchestrate, atomizer-protocols
- Capability registry (AGENTS_REGISTRY.json)
- Cluster management: cluster.sh, systemd template
- All secrets replaced with env var references
2026-02-15 21:18:18 +00:00
d6a1d6eee1 auto: daily sync 2026-02-15 08:00:21 +00:00
6218355dbf auto: daily sync 2026-02-14 08:00:22 +00:00
0795cccc97 auto: daily sync 2026-02-13 08:00:19 +00:00
580ed65a26 fix: generic mass extraction in solve_simulation.py (beam + bracket)
- Extract mass RIGHT AFTER geometry rebuild while part is work part
- Replace unreliable p173 expression lookup with MeasureManager
- Skip re-extraction if mass already captured during rebuild
- Relax displacement constraint to 20mm (DEC-HB-012, CEO approved)

Root cause: journal hardcoded M1_Blank for bracket, failed silently on Beam.prt
Fix by: NX Expert + Manager diagnosis
2026-02-13 02:16:39 +00:00
57130ccfbc docs: add nightly memory digestion methodology 2026-02-12 14:20:57 +00:00
6f3325d86f fix: mass extraction NaN in Hydrotech Beam DOE — two bugs
Bug 1 — Journal (solve_simulation.py simple workflow):
  Expression lookup for p173 fails silently for derived/measurement
  expressions, so _temp_mass.txt was never written. Added MeasureManager
  fallback via extract_part_mass() (already used in assembly workflow).

Bug 2 — Extractor (extract_mass_from_expression.py):
  Journal writes 'p173=<value>' format but extractor tried float() on
  the whole content including 'p173='. Added key=value parsing.

Defense in depth — nx_interface.py:
  Added stdout parsing fallback: if _temp_mass.txt still missing, parse
  mass from journal output captured via solver.py stdout passthrough.

Files changed:
  - optimization_engine/nx/solve_simulation.py — MeasureManager fallback
  - optimization_engine/extractors/extract_mass_from_expression.py — key=value parse
  - optimization_engine/nx/solver.py — include stdout in result dict
  - projects/hydrotech-beam/studies/01_doe_landscape/nx_interface.py — stdout fallback

Tags: hydrotech-beam, mass-extraction
2026-02-11 19:02:43 +00:00
04f06766a0 docs: Atomizer HQ Dashboard — full plan (CEO-requested)
Five-pane architecture:
- Project Blueprint (CONTEXT.md → live view)
- Study Tracker (enhanced real-time monitoring)
- Command Center (remote NX execution from browser)
- Agent Console (interact with HQ agents)
- Reports & Export (PDF/HTML generation)

Phased implementation: D1-D5 (7-12 weeks total, MVP at D3)
Extends existing atomizer-dashboard (no rewrite)
Progressive: file-based bridge → WebSocket → NX MCP
2026-02-11 18:32:54 +00:00
b419510b1a feat: add Hydrotech Beam DOE landscape results (39 iterations)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 13:25:21 -05:00
2fde08daab docs: update KB and project docs with 2026-02-11 progress
- KB Gen 003: NX version (DesigncenterNX 2512), first real results
- sol101-static.md: path resolution lessons, in-place solving, result extraction confirmed
- CONTEXT.md: solver pipeline operational, first results (disp=17.93mm, stress=111.9MPa)
- DECISIONS.md: DEC-HB-008 to DEC-HB-011 (backup/restore, iteration arch, history DB, git workflow)
- optimization_engine/README.md: created (DesigncenterNX support, path resolution, NX file refs)
- studies/01_doe_landscape/README.md: updated architecture, iteration folders, history DB
- _index.md: closed gaps G3,G4,G6,G10-G14, updated generation to 003
2026-02-11 16:39:21 +00:00
93a5508c07 Fix mass extraction + db close order + nan handling
- Journal now extracts p173 mass expression and writes _temp_mass.txt
- history.get_study_summary() called before history.close()
- Optuna nan rejection: fallback to INFEASIBLE_MASS penalty
- pyNastran warning 'nx 2512 not supported' is harmless (reads fine)
2026-02-11 16:29:45 +00:00
0229ce53bb Fix NX version: DesigncenterNX2512 (was looking for NX2412)
- Add DesigncenterNX{version} to install path search
- Update default version to 2512
- Root cause of 'Part file is from a newer version' error
2026-02-11 15:54:32 +00:00
80104d2467 FIX: Resolve all paths to absolute before passing to NX
Root cause: Path.absolute() on Windows does NOT resolve '..' components.
sim_file_path was reaching NX as '...\studies\01_doe_landscape\..\..\models\Beam_sim1.sim'
NX likely can't resolve referenced parts from a path with '..' in it.

Fixes:
- nx_interface.py: glob from self.model_dir (resolved) not model_dir (raw)
- solver.py: sim_file.resolve() instead of sim_file.absolute()
- solve_simulation.py: os.path.abspath(sim_file_path) at entry point
- Diagnostic logging still in place for next run
2026-02-11 15:24:20 +00:00
55f0f917c7 Add NX diagnostic logging: OpenActiveDisplay result, load status, Parts.Open details
Need to see why Parts.Open returns None even from the master model folder.
Logs: basePart1 type/name/path, unloaded parts status, file existence checks.
2026-02-11 15:16:26 +00:00
3718a8d5c8 Fix NX solve: backup/restore master model, archive outputs to iterations
NX .sim files store absolute internal references to .fem/.prt files.
Copying them to iteration folders breaks these references (Parts.Open
returns None). Instead:

1. Backup master model once at study start
2. Restore from backup before each trial (isolation)
3. Solve on master model in-place (NX references intact)
4. Archive solver outputs (OP2/F06) + params.exp to iterations/iterNNN/
5. params.exp in each iteration: import into NX to recreate any trial

iteration_manager.py kept for future use but not wired in.
2026-02-11 15:05:18 +00:00
815db0fb8d Add persistent trial history DB (append-only, survives --clean)
- history.db: SQLite append-only, never deleted by --clean
- history.csv: Auto-exported after each trial (live updates)
- Logs: DVs, results, feasibility, status, solve time, iter path
- Cross-study queries: full lineage across all runs/phases
- --clean only resets Optuna DB, history preserved
2026-02-11 14:59:52 +00:00
04fdae26ab Smart iteration management: full model copies + retention policy
- Each iteration gets full model files in iterations/iterNNN/ (openable in NX)
- Retention: keep last 10 + best 3 with full models, strip the rest
- Stripped iterations keep solver outputs (OP2, F06, params, results)
- All paths resolved to absolute before passing to NX (fixes reference issue)
- iteration_manager.py: reusable for future studies
2026-02-11 14:48:05 +00:00
e8877429f8 Smart isolation: backup/restore master model before each trial
- One-time backup of model files at study start (_model_backup/)
- Restore clean state before each trial (files stay in models/, NX refs intact)
- If a trial corrupts the model, next trial starts clean
- Best of both: NX reference integrity + trial isolation
2026-02-11 14:42:07 +00:00
4243a332a3 Iteration archival: solve on master model, archive outputs to studies/iterations/iterNNN/
- Each iteration gets: params.json, results.json, OP2, F06, mass files
- Model directory stays clean (no solver output buildup)
- Study folder is self-contained with full trial history
2026-02-11 14:39:10 +00:00
60dbf5b172 Disable iteration folders: copied NX files break internal references, solve directly on master model 2026-02-11 14:35:56 +00:00
686ec2ac6c KB: document simple vs assembly FEM workflow, automation notes 2026-02-11 14:26:59 +00:00
0e459028fe Fix: FEM part lookup (exclude _i.prt), hole_count unit (Constant not mm), add file logging
- solve_simulation.py: FEM finder now excludes idealized parts, falls back to loading .fem
- solve_simulation.py: hole_count written as [Constant] not [MilliMeter] in .exp
- run_doe.py: dual logging to console + results/doe_run.log
2026-02-11 14:17:43 +00:00
126f0bb2e0 Refactor: nx_interface uses optimization_engine (NXSolver + pyNastran extractors)
- AtomizerNXSolver wraps existing NXSolver + extractors from SAT3 pipeline
- HEEDS-style iteration folders with fresh model copies per trial
- Expression .exp file generation with correct unit mapping
- pyNastran OP2 extraction: displacement, von Mises (kPa→MPa), mass
- StubSolver improved with beam-theory approximations
- Reuses proven journal pipeline (solve_simulation.py)
2026-02-11 13:33:09 +00:00
135698d96a Fix: SQLite duplicate study (load_if_exists), sampling crash with n<11, add --clean flag 2026-02-11 13:09:30 +00:00
e8b4d37667 auto: daily sync 2026-02-11 08:00:20 +00:00
390ffed450 feat(hydrotech-beam): complete NXOpenSolver.evaluate() implementation
Complete the NXOpenSolver class in nx_interface.py with production-ready
evaluate() and close() methods, following proven patterns from
M1_Mirror/SAT3_Trajectory_V7.

Pipeline per trial:
1. NXSolver.create_iteration_folder() — HEEDS-style isolation with fresh
   model copies + params.exp generation
2. NXSolver.run_simulation() — journal-based solve via run_journal.exe
   (handles expression import, geometry rebuild, FEM update, SOL 101)
3. extract_displacement() — max displacement from OP2
4. extract_solid_stress() — max von Mises with auto-detect element type
   (tries all solid types first, falls back to CQUAD4 shell)
5. extract_mass_from_expression() — reads _temp_mass.txt from journal,
   with _temp_part_properties.json fallback

Key decisions:
- Auto-detect element type for stress (element_type=None) instead of
  hardcoding CQUAD4 — the beam model may use solid or shell elements
- Lazy solver init on first evaluate() call for clean error handling
- OP2 fallback path: tries solver result first, then expected naming
  convention (beam_sim1-solution_1.op2)
- Mass fallback: _temp_mass.txt -> _temp_part_properties.json
- LAC-compliant close(): only uses session_manager.cleanup_stale_locks(),
  never kills NX processes directly

Expression mapping (confirmed from binary introspection):
- beam_half_core_thickness, beam_face_thickness, holes_diameter, hole_count
- Mass output: p173 (body_property147.mass, kg)

Refs: OP_09, OPTIMIZATION_STRATEGY.md §8.2
2026-02-11 01:11:09 +00:00
33180d66c9 Rewrite NXOpenSolver to use existing Atomizer optimization engine
- Use optimization_engine.nx.updater.NXParameterUpdater for expression updates (.exp import method)
- Use optimization_engine.nx.solver.NXSolver for journal-based solving (run_journal.exe)
- Use optimization_engine.extractors for displacement, stress, and mass extraction
- Displacement: extract_displacement() from pyNastran OP2
- Stress: extract_solid_stress() with cquad4 support (shell elements), kPa→MPa conversion
- Mass: extract_mass_from_expression() reads from temp file written by solve journal
- Support for iteration folders (HEEDS-style clean state between trials)
- Proper error handling with TrialResult(success=False, error_message=...)
- 600s timeout per trial (matching existing NXSolver default)
- Keep stub solver and create_solver() factory working
- Maintain run_doe.py interface compatibility
2026-02-10 23:26:51 +00:00
017b90f11e feat(hydrotech-beam): Phase 1 LHS DoE study code
Implements the optimization study code for Phase 1 (LHS DoE) of the
Hydrotech Beam structural optimization.

Files added:
- run_doe.py: Main entry point — Optuna study with SQLite persistence,
  Deb's feasibility rules, CSV/JSON export, Phase 1→2 gate check
- sampling.py: 50-point LHS via scipy.stats.qmc with stratified integer
  sampling ensuring all 11 hole_count levels (5-15) are covered
- geometric_checks.py: Pre-flight feasibility filter — hole overlap
  (corrected formula: span/(n-1) - d ≥ 30mm) and web clearance checks
- nx_interface.py: NX automation module with stub solver for development
  and NXOpen template for Windows/dalidou integration
- requirements.txt: optuna, scipy, numpy, pandas

Key design decisions:
- Baseline enqueued as Trial 0 (LAC lesson)
- All 4 DV expression names from binary introspection (exact spelling)
- Pre-flight geometric filter saves compute and prevents NX crashes
- No surrogates (LAC lesson: direct FEA via TPE beats surrogate+L-BFGS)
- SQLite persistence enables resume after interruption

Tested end-to-end with stub solver: 51 trials, 12 geometric rejects,
39 solved, correct CSV/JSON output.

Ref: OPTIMIZATION_STRATEGY.md, auditor review 2026-02-10
2026-02-10 22:15:06 +00:00
94bff37a67 Fix spacing formula (span/(n-1)), web height constraint, resolve audit blockers 2026-02-10 22:07:39 +00:00
3e5180485c Update optimization strategy with introspection-corrected baselines 2026-02-10 22:02:46 +00:00
15a457d2be KB introspection: corrected mass 1133 kg, DV baselines, full expression map from Beam.prt binary 2026-02-10 21:57:21 +00:00
b88657b00c KB Gen 002: Process KBS sessions, update model parameters
Sources: 3 KBS capture sessions (20260210-132817, 20260210-161401, 20260210-163801)

Key changes:
- Mass corrected: 974 kg (p173) → 11.33 kg (p1) — KBS ground truth
- Beam length confirmed: 5,000 mm cantilever
- BCs confirmed: left fixed, right 10,000 kgf downward
- Material confirmed: AISI Steel 1005, density 7.3 g/cm³
- Mesh confirmed: CQUAD4 thin shell, 33.7 mm elements
- Hole geometry: span 4,000 mm (p6), offsets 500 mm fixed
- 3 gaps closed (G1, G2, G8), 6 new gaps identified (G10-G15)
- New expressions: beam_half_height, beam_half_width, beam_length, p6

Files: CONTEXT.md, kb/_index.md, kb/_history.md, kb/components/sandwich-beam.md,
       kb/materials/steel-aisi.md, kb/fea/models/sol101-static.md, kb/dev/gen-002.md
2026-02-10 21:49:39 +00:00
3ab1cad4e1 auto: daily sync 2026-02-10 08:00:22 +00:00
857c01e7ca chore: major repo cleanup - remove dead code and cruft
Remove ~24K lines of dead code for a lean rebuild foundation:

- Remove atomizer-field/ (neural field predictor experiment, concept archived in docs)
- Remove generated_extractors/, generated_hooks/ (legacy generator outputs)
- Remove optimization_validation/ (empty skeleton)
- Remove reports/ (superseded by optimization_engine/reporting/)
- Remove root-level stale files: DEVELOPMENT.md, INSTALL_INSTRUCTIONS.md,
  config.py, atomizer_paths.py, optimization_config.json, train_neural.bat,
  generate_training_data.py, run_training_fea.py, migrate_imports.py
- Update .gitignore for introspection caches and insight outputs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 14:26:37 -05:00
8d9d55356c docs: Archive stale docs and create Atomizer-HQ agent documentation
Archive Management:
- Moved RALPH_LOOP, CANVAS, and dashboard implementation plans to archive/review/ for CEO review
- Moved completed restructuring plan and protocol v1 to archive/historical/
- Moved old session summaries to archive/review/

New HQ Documentation (docs/hq/):
- README.md: Overview of Atomizer-HQ multi-agent optimization team
- PROJECT_STRUCTURE.md: Standard KB-integrated project layout with Hydrotech reference
- KB_CONVENTIONS.md: Knowledge Base accumulation principles with generation tracking
- AGENT_WORKFLOWS.md: Project lifecycle phases and agent handoffs (OP_09 integration)
- STUDY_CONVENTIONS.md: Technical study execution standards and atomizer_spec.json format

Index Update:
- Reorganized docs/00_INDEX.md with HQ docs prominent
- Updated structure to reflect new agent-focused organization
- Maintained core documentation access for engineers

No files deleted, only moved to appropriate archive locations.
2026-02-09 02:48:35 +00:00
9541958eae Restructure Hydrotech Beam project — KB-integrated layout
New project structure with knowledge base integration:
- kb/ with components, materials, fea, dev generations
- models/ for reference NX files (golden copies)
- studies/ for self-contained optimization campaigns
- deliverables/ for final outputs
- DECISIONS.md decision log (6 decisions tracked)
- BREAKDOWN.md (moved from 1_breakdown/)
- Gen 001 created from intake + technical breakdown

KB extension file: atomizer/shared/skills/knowledge-base-atomizer-ext.md

Refs: DEC-HB-004, DEC-HB-005, DEC-HB-006
2026-02-09 02:18:29 +00:00
ca4101dcb0 feat: improve optical report with embedded Plotly and 4x PNG export
- Embed Plotly.js inline for offline viewing (fixes CDN loading issues)
- Add 4x resolution PNG export for all charts via toImageButtonOptions
- Add SAT3_Trajectory_V7 study (TPE warm-start from V5, 86 trials, WS=277.37)
- Include V7 optimization report and configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 19:29:34 -05:00
65711cdbf1 Add Hydrotech Beam project files - CONTEXT.md and TECHNICAL_BREAKDOWN.md
Project intake and technical breakdown for beam structural optimization.
4 design variables, SOL 101, single-objective (minimize mass).
2026-02-09 00:23:01 +00:00
a5059dd64a Add PSD figure generation script for CDR reports
Generates publication-ready PSD figures from OP2 FEA data:
- psd_multi_angle.png: PSD curves for all elevation angles
- psd_band_decomposition.png: LSF/MSF/HSF bar chart
- psd_40deg_composite.png: WFE surface + PSD side-by-side
- psd_trajectory.png: Band evolution vs elevation

Uses Atomizer's full OPD pipeline for consistency with CDR WFE numbers.
2026-02-06 17:38:48 +00:00
38d0994d29 Add WFE PSD analysis tools (Tony Hull methodology)
- tools/wfe_psd.py: Quick PSD computation for WFE surfaces
- optimization_engine/insights/wfe_psd.py: Full PSD module with band
  decomposition (LSF/MSF/HSF), radial averaging, Hann windowing,
  and visualization support
- knowledge_base/lac/session_insights/stopp_command_20260129.jsonl:
  Session insight from stopp command implementation

PSD analysis decomposes WFE into spatial frequency bands per Tony Hull's
JWST methodology. Used for CDR V7 to validate that MSF (support
print-through) dominates the residual WFE at 85-89% of total RMS.
2026-02-06 17:38:34 +00:00
5f5d55d107 fix(report): trajectory plots full-width instead of side-by-side
- Remove two-col grid wrapper from trajectory section
- Each plot now gets full container width
- Trajectory plot height 450→500, width 1100 for better readability
2026-01-30 00:06:10 +00:00
27d9dbee5b fix(psd): auto-scale x-axis to data range, improve plot layout
- X-axis now auto-ranges from data (was going to 10^21)
- Band annotations clamped to actual data extent
- Legend moved to upper-right (was overlapping data)
- Thicker lines (2.5px), larger axis labels
- dtick=1 for clean log-scale tick marks
2026-01-30 00:03:38 +00:00
12afd0c54f fix(psd): add angle labels to PSD band decomposition cards 2026-01-29 23:58:14 +00:00
a1000052cb fix(psd): correct normalization using Parseval band summation
- Band RMS now uses direct Parseval: sqrt(sum(|FFT|²) / N⁴ / hann_power)
- Previous approach had dimensional mismatch (cycles/apt vs cycles/mm)
- Results now match Zernike filtered RMS within ~10%:
  40° vs 20°: PSD=6.18nm vs Zernike=7.70nm
  60° vs 20°: PSD=15.83nm vs Zernike=17.69nm
  90° Abs: PSD=27.01nm vs Zernike=22.33nm
- PSD plot curve uses separate normalization (shape, not absolute)
- Refactored compute_surface_psd to return dict with freqs, psd, bands
2026-01-29 23:49:03 +00:00
eeacfbe41a feat(report): replace LSF/MSF with Tony Hull PSD analysis
- Remove compute_spatial_freq_metrics() and _spatial_freq_html()
- Add compute_surface_psd(): 2D FFT + Hann window + radial averaging
- Add compute_psd_band_rms(): gravity/support/HF band decomposition
- Add make_psd_plot(): interactive log-log PSD plot with band annotations
- Add _psd_summary_html(): band RMS cards with % breakdown
- New section in report: Power Spectral Density Analysis
- Zernike details now show only coefficient bar charts (cleaner)
- Methodology: Tony Hull JWST approach for WFE spatial frequency analysis
2026-01-29 22:15:42 +00:00