Files
Atomizer/tools/adaptive-isogrid/src/nx/iteration_solve.py
Antoine 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

36 lines
1.0 KiB
Python

"""
NXOpen script — Per-iteration Model B rebuild + solve + extract.
LOOP: Called by Atomizer for each trial.
1. Delete old Model B geometry + mesh
2. Import new 2D ribbed profile from rib_profile.json
3. Mesh with hard-point seeds at interface node locations
4. Merge nodes in Assembly FEM
5. Solve (Nastran)
6. Extract results → results.json
NOTE: Skeleton — requires NX environment for development.
See docs/technical-spec.md Section 4.3 for full pseudocode.
"""
def iteration_solve(profile_path, interface_nodes_path, afem_part):
"""
Single optimization iteration.
Returns dict with status, mass, stress/displacement fields.
"""
raise NotImplementedError(
"Develop inside NX Simcenter. See docs/technical-spec.md Section 4.3."
)
def extract_results(afem, solution):
"""
Extract field results from solved assembly FEM.
Only from Model B elements (plate mesh), ignoring spiders.
"""
raise NotImplementedError(
"Develop inside NX Simcenter. See docs/technical-spec.md Section 4.3."
)