# SPDX-FileCopyrightText: 2026 Daru András # SPDX-License-Identifier: MIT """Exploratory fit of a single soft-elastomer tensile curve.""" from pathlib import Path from rend import ( DeformationRange as Range, MaterialProfile, MaterialRegressor, StressUnit, ValidationRanges, ) CSV = "elastomer.csv" if __name__ == "__main__": regressor = MaterialRegressor( csv_path=Path(__file__).with_name(CSV), name="Soft elastomer – exploratory fit", profile=MaterialProfile.INCOMPRESSIBLE_ISOTROPIC, stress_unit=StressUnit.KPA, max_generations=700, live_plot=False, # Set True to watch the search progress. target_mse=1e-3, validation_ranges=ValidationRanges( uniaxial=Range(1.0, 2.33), biaxial=None, planar=None, shear=None, volumetric=None, ), export_json=False, export_uhyper=False, ) result = regressor.run() if result.error: raise RuntimeError(result.error) if result.cancelled: raise SystemExit(130) print("Report:", result.report_path)