feat: Add AtomizerField training data export and intelligent model discovery
Major additions: - Training data export system for AtomizerField neural network training - Bracket stiffness optimization study with 50+ training samples - Intelligent NX model discovery (auto-detect solutions, expressions, mesh) - Result extractors module for displacement, stress, frequency, mass - User-generated NX journals for advanced workflows - Archive structure for legacy scripts and test outputs - Protocol documentation and dashboard launcher 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
Nastran BUFFSIZE=32769 $(c:/program files/siemens/nx2412/nxnastran/conf/nastran.rcf[1])
|
||||
Nastran BUFFPOOL=20.0X $(c:/program files/siemens/nx2412/nxnastran/conf/nastran.rcf[4])
|
||||
Nastran DIAGA=128 DIAGB=0 $(c:/program files/siemens/nx2412/nxnastran/conf/nastran.rcf[7])
|
||||
Nastran REAL=8545370112 $(Memory limit for MPI and other specialized modules)
|
||||
JID='C:\Users\antoi\Documents\Atomaste\Atomizer\studies\bracket_stiffness_optimization_atomizerfield\1_setup\model\bracket_sim1-solution_1.dat'
|
||||
OUT='./bracket_sim1-solution_1'
|
||||
MEM=3846123520
|
||||
MACH='Intel64 Family 6 Model 183 Stepping 1'
|
||||
OPER='Windows 10'
|
||||
OSV=' '
|
||||
MODEL='Intel(R) Core(TM) i7-14700HX (AntoineThinkpad)'
|
||||
CONFIG=8666
|
||||
NPROC=28
|
||||
symbol=DELDIR='c:/program files/siemens/nx2412/nxnastran/scnas/nast/del' $(program default)
|
||||
symbol=DEMODIR='c:/program files/siemens/nx2412/nxnastran/scnas/nast/demo' $(program default)
|
||||
symbol=SSSALTERDIR='c:/program files/siemens/nx2412/nxnastran/scnas/nast/misc/sssalter' $(program default)
|
||||
symbol=TPLDIR='c:/program files/siemens/nx2412/nxnastran/scnas/nast/tpl' $(program default)
|
||||
SDIR='c:/users/antoi/appdata/local/temp/bracket_sim1-solution_1.T199472_25'
|
||||
DBS='c:/users/antoi/appdata/local/temp/bracket_sim1-solution_1.T199472_25'
|
||||
SCR=yes
|
||||
SMEM=20.0X
|
||||
NEWDEL='c:/program files/siemens/nx2412/nxnastran/scnas/em64tntl/SSS'
|
||||
DEL='NXNDEF'
|
||||
AUTH='29000@AntoineThinkpad'
|
||||
AUTHQUE=0
|
||||
MSGCAT='c:/program files/siemens/nx2412/nxnastran/scnas/em64tntl/analysis.msg'
|
||||
MSGDEST='f06'
|
||||
PROG=bundle
|
||||
NEWS='c:/program files/siemens/nx2412/nxnastran/scnas/nast/news.txt'
|
||||
UMATLIB='libnxumat.dll'
|
||||
UCRPLIB='libucreep.dll'
|
||||
USOLLIB='libusol.dll'
|
||||
@@ -0,0 +1,91 @@
|
||||
"""
|
||||
NX Journal - Export Displacement Field for Bracket Stiffness Analysis
|
||||
=====================================================================
|
||||
|
||||
This journal exports the z-displacement field from a ResultProbe to a .fld file.
|
||||
|
||||
Usage:
|
||||
run_journal.exe export_displacement_field.py [sim_file_path]
|
||||
|
||||
If sim_file_path is not provided, uses Bracket_sim1.sim in the same directory.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import math
|
||||
from pathlib import Path
|
||||
import NXOpen
|
||||
import NXOpen.CAE
|
||||
import NXOpen.Fields
|
||||
|
||||
|
||||
def main(args):
|
||||
"""
|
||||
Export displacement field from NX simulation results.
|
||||
|
||||
Args:
|
||||
args: Command line arguments, optionally including sim file path
|
||||
|
||||
The ResultProbe should already be defined in the simulation file
|
||||
with z-displacement as the measured quantity.
|
||||
"""
|
||||
theSession = NXOpen.Session.GetSession()
|
||||
|
||||
# Determine sim file to open
|
||||
if len(args) > 0:
|
||||
sim_file = Path(args[0])
|
||||
else:
|
||||
# Default: Bracket_sim1.sim in same directory as this journal
|
||||
journal_dir = Path(__file__).parent
|
||||
sim_file = journal_dir / "Bracket_sim1.sim"
|
||||
|
||||
if not sim_file.exists():
|
||||
print(f"ERROR: Simulation file not found: {sim_file}")
|
||||
return 1
|
||||
|
||||
# Open the simulation file
|
||||
print(f"Opening simulation: {sim_file}")
|
||||
try:
|
||||
basePart1, partLoadStatus1 = theSession.Parts.OpenBaseDisplay(str(sim_file))
|
||||
partLoadStatus1.Dispose()
|
||||
except Exception as e:
|
||||
print(f"ERROR: Failed to open simulation: {e}")
|
||||
return 1
|
||||
|
||||
workSimPart = theSession.Parts.BaseWork
|
||||
if workSimPart is None:
|
||||
print("ERROR: No work part loaded after opening simulation.")
|
||||
return 1
|
||||
|
||||
# Get the FieldManager
|
||||
fieldManager = workSimPart.FindObject("FieldManager")
|
||||
if fieldManager is None:
|
||||
print("ERROR: FieldManager not found. Make sure simulation results are loaded.")
|
||||
return 1
|
||||
|
||||
# Find the ResultProbe (should be pre-configured for z-displacement)
|
||||
resultProbe = fieldManager.FindObject("ResultProbe")
|
||||
if resultProbe is None:
|
||||
print("ERROR: ResultProbe not found. Please create a ResultProbe for z-displacement.")
|
||||
return 1
|
||||
|
||||
# Prepare probe array for export
|
||||
probes = [NXOpen.CAE.ResultProbe.Null] * 1
|
||||
probes[0] = resultProbe
|
||||
|
||||
# Determine output file path (same directory as this journal)
|
||||
journal_dir = Path(__file__).parent
|
||||
output_file = journal_dir / "export_field_dz.fld"
|
||||
|
||||
# Export to field file
|
||||
print(f"Exporting displacement field to: {output_file}")
|
||||
theSession.ResultManager.ExportProbesToFieldFile(probes, str(output_file))
|
||||
|
||||
print(f"[OK] Successfully exported displacement field")
|
||||
print(f" Output: {output_file}")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
exit_code = main(sys.argv[1:])
|
||||
sys.exit(exit_code)
|
||||
@@ -0,0 +1,48 @@
|
||||
FIELD: [ResultProbe] : [TABLE]
|
||||
FIELD LOCK STATE: [NO]
|
||||
DUPLICATE_VALUE_OPTION: [0]
|
||||
PARAMETERIZE INDEPENDENT DOMAIN: [NO]
|
||||
PERSIST INTERPOL: [NO]
|
||||
CREATE INTERPOLATOR: [NO]
|
||||
FALLBACK DEFAULT INTERPOLATOR: [YES]
|
||||
INTERPOL: [4]
|
||||
VALUES OUTSIDE: [2]
|
||||
REMOVE DELAUNAY SLIVERS: [NO]
|
||||
INDEP VAR: [step] : [] : [] : [0]
|
||||
BOUNDS: [0] : [YES] : [0] : [YES] : [27] : [0]
|
||||
INDEP VAR: [node_id] : [] : [] : [5]
|
||||
BOUNDS: [3] : [YES] : [413] : [YES] : [27] : [407]
|
||||
DEP VAR: [x] : [Length] : [mm] : [0]
|
||||
DESCRIPTION: ResultProbe
|
||||
DESCRIPTION: dz
|
||||
DESCRIPTION: 21-Nov-25
|
||||
DESCRIPTION: 19:25:36
|
||||
START DATA
|
||||
0, 407, -0.0941346362233162
|
||||
0, 408, -0.0937454551458359
|
||||
0, 409, -0.0935764610767365
|
||||
0, 410, -0.0935385450720787
|
||||
0, 411, -0.0980110093951225
|
||||
0, 412, -0.0959530174732208
|
||||
0, 413, -0.094814196228981
|
||||
0, 3, -0.10150358080864
|
||||
0, 6, -0.101503469049931
|
||||
0, 14, -0.0935568511486053
|
||||
0, 11, -0.0935568138957024
|
||||
0, 113, -0.0937929674983025
|
||||
0, 114, -0.0942020565271378
|
||||
0, 115, -0.0935586988925934
|
||||
0, 116, -0.0936075374484062
|
||||
0, 117, -0.0979839861392975
|
||||
0, 118, -0.0960513949394226
|
||||
0, 119, -0.0949068069458008
|
||||
0, 52, -0.101693071424961
|
||||
0, 145, -0.0942021608352661
|
||||
0, 146, -0.093793049454689
|
||||
0, 147, -0.0935587361454964
|
||||
0, 148, -0.093607597053051
|
||||
0, 149, -0.0979839861392975
|
||||
0, 150, -0.0960515514016151
|
||||
0, 151, -0.0949069485068321
|
||||
0, 122, -0.0935398191213608
|
||||
END DATA
|
||||
Reference in New Issue
Block a user