Phase 2 - Structural Analysis: - extract_principal_stress: σ1, σ2, σ3 principal stresses from OP2 - extract_strain_energy: Element and total strain energy - extract_spc_forces: Reaction forces at boundary conditions Phase 3 - Multi-Physics: - extract_temperature: Nodal temperatures from thermal OP2 (SOL 153/159) - extract_temperature_gradient: Thermal gradient approximation - extract_heat_flux: Element heat flux from thermal analysis - extract_modal_mass: Modal effective mass from F06 (SOL 103) - get_first_frequency: Convenience function for first natural frequency Documentation: - Updated SYS_12_EXTRACTOR_LIBRARY.md with E12-E18 specifications - Updated NX_OPEN_AUTOMATION_ROADMAP.md marking Phase 3 complete - Added test_phase3_extractors.py for validation All extractors follow consistent API pattern returning Dict with success, data, and error fields for robust error handling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
121 lines
3.6 KiB
Python
121 lines
3.6 KiB
Python
"""Core extractor library for Atomizer.
|
|
|
|
Available extractors:
|
|
- Displacement: extract_displacement
|
|
- Stress: extract_solid_stress (von Mises), extract_principal_stress
|
|
- Frequency: extract_frequency
|
|
- Mass (BDF): extract_mass_from_bdf
|
|
- Mass (Expression): extract_mass_from_expression
|
|
- Mass (Part): extract_part_mass_material, extract_part_mass, PartMassExtractor
|
|
- Strain Energy: extract_strain_energy, extract_total_strain_energy
|
|
- SPC Forces: extract_spc_forces, extract_total_reaction_force
|
|
- Zernike: extract_zernike_from_op2, ZernikeExtractor (telescope mirrors)
|
|
|
|
Phase 2 Extractors (2025-12-06):
|
|
- Principal stress extraction (sigma1, sigma2, sigma3)
|
|
- Strain energy extraction (element strain energy)
|
|
- SPC forces extraction (reaction forces at boundary conditions)
|
|
|
|
Phase 3 Extractors (2025-12-06):
|
|
- Temperature extraction (thermal analysis: SOL 153/159)
|
|
- Thermal gradient extraction
|
|
- Heat flux extraction
|
|
- Modal mass extraction (modal effective mass from F06)
|
|
"""
|
|
|
|
# Zernike extractor for telescope mirror optimization
|
|
from optimization_engine.extractors.extract_zernike import (
|
|
ZernikeExtractor,
|
|
extract_zernike_from_op2,
|
|
extract_zernike_filtered_rms,
|
|
extract_zernike_relative_rms,
|
|
)
|
|
|
|
# Part mass and material extractor (from NX .prt files)
|
|
from optimization_engine.extractors.extract_part_mass_material import (
|
|
extract_part_mass_material,
|
|
extract_part_mass,
|
|
extract_part_material,
|
|
PartMassExtractor,
|
|
)
|
|
|
|
# Von Mises stress extraction
|
|
from optimization_engine.extractors.extract_von_mises_stress import (
|
|
extract_solid_stress,
|
|
)
|
|
|
|
# Principal stress extraction (Phase 2)
|
|
from optimization_engine.extractors.extract_principal_stress import (
|
|
extract_principal_stress,
|
|
extract_max_principal_stress,
|
|
extract_min_principal_stress,
|
|
)
|
|
|
|
# Strain energy extraction (Phase 2)
|
|
from optimization_engine.extractors.extract_strain_energy import (
|
|
extract_strain_energy,
|
|
extract_total_strain_energy,
|
|
extract_strain_energy_density,
|
|
)
|
|
|
|
# SPC forces / reaction forces extraction (Phase 2)
|
|
from optimization_engine.extractors.extract_spc_forces import (
|
|
extract_spc_forces,
|
|
extract_total_reaction_force,
|
|
extract_reaction_component,
|
|
check_force_equilibrium,
|
|
)
|
|
|
|
# Temperature extraction (Phase 3)
|
|
from optimization_engine.extractors.extract_temperature import (
|
|
extract_temperature,
|
|
extract_temperature_gradient,
|
|
extract_heat_flux,
|
|
get_max_temperature,
|
|
)
|
|
|
|
# Modal mass extraction (Phase 3)
|
|
from optimization_engine.extractors.extract_modal_mass import (
|
|
extract_modal_mass,
|
|
extract_frequencies,
|
|
get_first_frequency,
|
|
get_modal_mass_ratio,
|
|
)
|
|
|
|
__all__ = [
|
|
# Part mass & material (from .prt)
|
|
'extract_part_mass_material',
|
|
'extract_part_mass',
|
|
'extract_part_material',
|
|
'PartMassExtractor',
|
|
# Stress extractors
|
|
'extract_solid_stress',
|
|
'extract_principal_stress',
|
|
'extract_max_principal_stress',
|
|
'extract_min_principal_stress',
|
|
# Strain energy
|
|
'extract_strain_energy',
|
|
'extract_total_strain_energy',
|
|
'extract_strain_energy_density',
|
|
# SPC forces / reactions
|
|
'extract_spc_forces',
|
|
'extract_total_reaction_force',
|
|
'extract_reaction_component',
|
|
'check_force_equilibrium',
|
|
# Zernike (telescope mirrors)
|
|
'ZernikeExtractor',
|
|
'extract_zernike_from_op2',
|
|
'extract_zernike_filtered_rms',
|
|
'extract_zernike_relative_rms',
|
|
# Temperature (Phase 3 - thermal)
|
|
'extract_temperature',
|
|
'extract_temperature_gradient',
|
|
'extract_heat_flux',
|
|
'get_max_temperature',
|
|
# Modal mass (Phase 3 - dynamics)
|
|
'extract_modal_mass',
|
|
'extract_frequencies',
|
|
'get_first_frequency',
|
|
'get_modal_mass_ratio',
|
|
]
|