# SPDX-FileCopyrightText: 2026 Daru AndrĂ¡s # SPDX-License-Identifier: MIT """Synthetic fiber composite with biaxial and directional shear loads.""" from pathlib import Path from rend import ( SearchPhysicsChecks, StrongEllipticityCheck, PostSearchChecks, ConstitutiveChecks, DeformationRange as Range, FEChecks, GroupWeighting, MaterialProfile, MaterialRegressor, Operator, SearchConfig, StressUnit, ValidationRanges, ) CSV = "fiber_composit.csv" if __name__ == "__main__": regressor = MaterialRegressor.advanced( search=SearchConfig(add_operators=(Operator.ACTIVE_I4,)), csv_path=Path(__file__).with_name(CSV), name="Synthetic fiber composite", profile=MaterialProfile.INCOMPRESSIBLE_ANISOTROPIC_DISPERSIVE, material_directions=((1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 1.0)), stress_unit=StressUnit.KPA, max_generations=3000, # Use 500 for a first exploratory run. verbose=True, live_plot=False, # Set True to watch the search progress. target_mse=1e-2, validation_ranges=ValidationRanges( uniaxial=None, biaxial=Range(1.0, 1.12), planar=None, shear=Range(-0.45, 0.45), 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=False, reference=True, domain=True, max_states=40, ), fe=FEChecks(kinematic=True, robustness=True), ), group_weighting=GroupWeighting(balance_tags=True), export_json=True, export_uhyper=False, ) result = regressor.run() if result.error: raise RuntimeError(result.error) if result.cancelled: raise SystemExit(130) print("Report:", result.report_path)