# SPDX-FileCopyrightText: 2026 Daru András # SPDX-License-Identifier: MIT """Treloar rubber with multiaxial checks and Abaqus UHYPER export.""" from pathlib import Path from rend import ( SearchPhysicsChecks, StrongEllipticityCheck, PostSearchChecks, ConstitutiveChecks, DeformationRange as Range, FEChecks, MaterialProfile, MaterialRegressor, StressUnit, ValidationRanges, ) CSV = "treloar.csv" if __name__ == "__main__": regressor = MaterialRegressor( csv_path=Path(__file__).with_name(CSV), name="Treloar rubber – solver prequalification", profile=MaterialProfile.INCOMPRESSIBLE_ISOTROPIC, stress_unit=StressUnit.MPA, max_generations=5000, # Use 500 for a first exploratory run. live_plot=False, # Set True to watch the search progress. target_mse=1e-3, validation_ranges=ValidationRanges( uniaxial=Range(1.0, 7.63623), biaxial=Range(1.0, 4.45), planar=Range(1.0, 4.92793), shear=None, volumetric=None, ), search_checks=SearchPhysicsChecks( strong_ellipticity=StrongEllipticityCheck(step=0.04), reference_stability=True, ), post_search_checks=PostSearchChecks( constitutive=ConstitutiveChecks( stress=True, tangent=True, objectivity=True, stress_covariance=True, material_symmetry=True, reference=True, domain=True, max_states=80, ), fe=FEChecks(kinematic=True, robustness=True, benchmark=True, convergence=True), ), export_json=True, export_uhyper=True, verbose=True, ) result = regressor.run() if result.error: raise RuntimeError(result.error) if result.cancelled: raise SystemExit(130) print("Report:", result.report_path)