Synthetic reinforced membrane — the effect of endpoint weighting¶
1. Define the load case¶
This example demonstrates how endpoint weighting affects material model discovery. Using a synthetic fiber-reinforced membrane dataset, compare a uniformly weighted search with a search that gives more weight to the final 10% of each loading curve.
Consider a membrane fixture that operates at stretches up to 1.24. Accurate stress predictions near the maximum stretch are particularly important for estimating the required force.
For this comparison, use an overall \(R^2\) of at least 0.95, a maximum stress error of 0.02 MPa, and a mean absolute secant stiffness error of 0.25 MPa per unit stretch over the final portion of each curve.
2. Prepare directional biaxial data¶
The synthetic CSV contains 305 observations in MPa. The five paths use stretch-increment ratios 0.5:1, 1:0.5, 1:1, 1:0 and 0:1, with 61 points per path and maximum stretch 1.24. Axis 2 is the reinforcement direction. The generator uses a quadratic fiber energy contribution in addition to the isotropic matrix and imposes zero nominal stress on the thickness face.
The two zero-increment paths hold one in-plane direction at unit stretch. Both in-plane stress components are recorded, including the reaction in the held direction. Keep the rows in loading order within each tag so endpoint weighting selects the high-stretch states.
TestType,Tag,Stretch_1,Stretch_2,Stretch_3,Stress_1,Stress_2
biaxial,0.5:1,1.002,1.004,,0.00119106083837,0.00671963100244
3. Configure and run Rend¶
Configure Rend¶
Use INCOMPRESSIBLE_ANISOTROPIC with axis 2 as the single material direction. Both searches use MPa, the standard search, a variance-scaled target of 1e-3 and biaxial probes from 1 to 1.24. Set EdgeWeighting(tail_fraction=0.10, tail_multiplier=5.0) to increase the influence of the last states within each ordered branch. The uniform run uses edge_weighting=None.
Use reference stability and rank-one screening in both searches, followed by the independent constitutive checks. The symmetry check covers rotations justified by the one-fiber profile. Export material JSON for the force calculation and defer FEM until the fixture geometry and restraints are defined.
Run the tutorial¶
Install the Rend wheel, then save reinforced_membran.csv and reinforced_membran.py in the same folder. You can also copy the script below into a file named reinforced_membran.py. Open a terminal in that folder and run:
python reinforced_membran.py
The script uses tail weighting and a maximum of 1,200 generations. For your first run, set max_generations=500 and live_plot=True. To repeat the search without endpoint weighting, set edge_weighting=None. Use the same generation limit when comparing the two configurations.
Complete Python script
"""Synthetic reinforced membrane with weighted biaxial branches."""
from pathlib import Path
from rend import (
SearchPhysicsChecks,
StrongEllipticityCheck,
PostSearchChecks,
ConstitutiveChecks,
DeformationRange as Range,
EdgeWeighting,
MaterialProfile,
MaterialRegressor,
StressUnit,
ValidationRanges,
)
CSV = "reinforced_membran.csv"
if __name__ == "__main__":
regressor = MaterialRegressor(
csv_path=Path(__file__).with_name(CSV),
name="Synthetic reinforced membrane",
profile=MaterialProfile.INCOMPRESSIBLE_ANISOTROPIC,
material_directions=((0.0, 1.0, 0.0),),
stress_unit=StressUnit.MPA,
max_generations=1200, # Use 500 for a first exploratory run.
verbose=True,
live_plot=False, # Set True to watch the search progress.
target_mse=1e-3,
validation_ranges=ValidationRanges(
uniaxial=None,
biaxial=Range(1.0, 1.24),
planar=None,
shear=None,
volumetric=None,
),
edge_weighting=EdgeWeighting(
head_fraction=0.0,
head_multiplier=1.0,
tail_fraction=0.10,
tail_multiplier=5.0,
),
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=24,
),
),
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)
Recorded runs¶
| Run | Generation cap | Recorded stop | Rows | Curves | Elapsed | Returned models |
|---|---|---|---|---|---|---|
| Tail weighted | 1,200 | Target at 120 | 305 | 5 | 14 min 16 s | 6 |
| Uniform | 1,200 | Target at 87 | 305 | 5 | 6 min 49 s | 10 |
Elapsed time includes discovery, report generation and exports. The variance-scaled target can stop a search before its cap.
4. Compare the candidates¶
| Run | Model | Why inspect it | Complexity | Weighted MSE (MPa²) | Overall R² | Configured coverage gaps |
|---|---|---|---|---|---|---|
| Tail weighted | 1 | Lowest weighted MSE | 28 | 8.1467e-12 | 1 | Biaxial |
| Tail weighted | 5 | Simpler candidate with full sampled coverage | 13 | 0.015632 | 0.36951 | — |
| Uniform | 1 | Lowest weighted MSE | 32 | 7.0367e-06 | 0.99954 | Biaxial |
| Uniform | 9 | Simpler candidate with full sampled coverage | 13 | 0.0095722 | 0.37335 | — |
The best tail-weighted model reproduces the supplied stress data almost exactly. Its terminal mean absolute error is 0.00000324 MPa versus 0.00387 MPa for the best uniform candidate. Both models meet the overall fit and endpoint error requirements. The dense applicability scan detects negative rank-one curvature just past stretch 1.031875 for the tail-weighted Model 1 and just past 1.03 for the uniform Model 1. Both intervals end before the fixture's target stretch of 1.24.
The simpler alternatives cover the configured range, but their isotropic laws predict equal terminal stresses for the 1:0 and 0:1 branches, so their scores fall short of the fit gate. Compare the tail metrics on the same observations because the two weighted MSEs use different objectives. This pair of searches illustrates the trade-off. Repeat both settings to estimate how much of the difference is attributable to weighting. The plots use \(P_{11}\) except on 0:1, where they show \(P_{22}\).
Use the final seven states on each branch, rounding 10% of 61 upward. Pool both stress components for the errors and compare secants only where the corresponding stretch changes.
| Candidate | Tail MAE (MPa) | Tail peak error (MPa) | Mean absolute secant error (MPa per unit stretch) |
|---|---|---|---|
| Tail weighted, model 1 | 3.2447e-06 | 6.3283e-06 | 1.9458e-05 |
| Tail weighted, model 5 | 0.15301 | 0.28553 | 1.0802 |
| Uniform, model 1 | 0.003867 | 0.015461 | 0.12408 |
| Uniform, model 9 | 0.15203 | 0.29526 | 1.0802 |
| Candidate | Terminal 1:0 P11 (MPa) |
Terminal 0:1 P22 (MPa) |
|---|---|---|
| Tail weighted, model 1 | 0.053658 (target 0.053663) | 0.48697 (target 0.48697) |
| Tail weighted, model 5 | 0.20144 (target 0.053663) | 0.20144 (target 0.48697) |
| Uniform, model 1 | 0.053184 (target 0.053663) | 0.47829 (target 0.48697) |
| Uniform, model 9 | 0.1917 (target 0.053663) | 0.1917 (target 0.48697) |

Tail weighted, model 1.

Tail weighted, model 5.
Tail weighted: equations, branch scores and checks
| Loading or tag | Model 1 | Model 5 |
|---|---|---|
| Biaxial | 1 | 0.36951 |
| 0.5:1 | 1 | 0.43229 |
| 1:0.5 | 1 | -0.42902 |
| 1:1 | 1 | 0.32255 |
| 1:0 | 1 | -23.504 |
| 0:1 | 1 | 0.46567 |
| Reported check | Model 1 | Model 5 |
|---|---|---|
| Sampled strong ellipticity | Passed | Passed |
| Reference tangent PSD | Passed | Passed |
| Float64 audit | Passed | Passed |
| Stress | Passed | Passed |
| Tangent | Passed | Passed |
| Frame indifference | Passed | Passed |
| Stress covariance | Passed | Passed |
| Material symmetry | Passed | Passed |
| Reference state | Passed | Passed |
| Energy domain | Passed | Passed |
| FEM kinematics | Not run | Not run |
| FEM robustness | Not run | Not run |
| Affine patch benchmark | Not run | Not run |
| Free-DOF convergence | Not run | Not run |
| Sampled common interval | Model 1 | Model 5 |
|---|---|---|
| Uniaxial | λ 0.9413923779–1.135285315 | λ 0.01956016228–33.39719087 |
| Biaxial | λ 0.9413923779–1.031875 | λ 0.1730540702–7.153344068 |
| Planar | λ 0.9413923779–1.063133147 | λ 0.05478840578–18.20730912 |
| Shear | γ -198.8716556–198.8716556 | γ -18.19633871–18.19633871 |
Model 1: model_001.json
Original report equation
Model 5: model_005.json
Original report equation

Uniform, model 1.

Uniform, model 9.
Uniform: equations, branch scores and checks
| Loading or tag | Model 1 | Model 9 |
|---|---|---|
| Biaxial | 0.99954 | 0.37335 |
| 0.5:1 | 0.99955 | 0.41427 |
| 1:0.5 | 0.9992 | -0.27528 |
| 1:1 | 0.99927 | 0.32953 |
| 1:0 | 0.99992 | -19.385 |
| 0:1 | 0.99965 | 0.4206 |
| Reported check | Model 1 | Model 9 |
|---|---|---|
| Sampled strong ellipticity | Passed | Passed |
| Reference tangent PSD | Passed | Passed |
| Float64 audit | Passed | Passed |
| Stress | Passed | Passed |
| Tangent | Passed | Passed |
| Frame indifference | Passed | Passed |
| Stress covariance | Passed | Passed |
| Material symmetry | Passed | Passed |
| Reference state | Passed | Passed |
| Energy domain | Passed | Passed |
| FEM kinematics | Not run | Not run |
| FEM robustness | Not run | Not run |
| Affine patch benchmark | Not run | Not run |
| Free-DOF convergence | Not run | Not run |
| Sampled common interval | Model 1 | Model 9 |
|---|---|---|
| Uniaxial | λ 0.9413923779–1.126266294 | λ 0.005018352119–10000 |
| Biaxial | λ 0.9413923779–1.03 | λ 0.005018352119–14.05855946 |
| Planar | λ 0.9413923779–1.054114126 | λ 0.005018352119–199.2092312 |
| Shear | γ -2.020864761–2.020864761 | γ -198.8716556–198.8716556 |
Model 1: model_001.json
Original report equation
Model 9: model_009.json
Original report equation
5. Apply the result and check its limits¶
The simplified tail-weighted Model 1 recovers the generator's matrix and squared fiber terms, with coefficients close to 0.0375 and 0.1625 MPa. Its stress fit is nearly exact, and the sampled biaxial applicability interval still ends near \(\lambda=1.032\). The simpler models cover the range with isochoric-only terms and miss the directional stress targets. Use the best-fitting models for the prescribed-stretch force comparison.
- Use the tail-weighted
model_001.jsonas a fit comparison with axis 2 aligned with the reinforcement. A uniform strip with a 25 mm² reference cross-section gives terminal force estimates of 1.34 N on1:0and 12.17 N on0:1, by multiplying the relevant predicted nominal stress by the reference area. These are prescribed-stretch strip forces. - Compare the reported rank-one curvature with the analytic tangent of the known generator around the first failing state. Repeat both weighting configurations with a smaller search-time perturbation, for example
StrongEllipticityCheck(step=0.01), and scan the returned candidates up to stretch 1.24. Carry forward a law that covers this range and meets the terminal stress and secant error limits in a biaxial single-element check. - Compare the predicted closure reaction with an independent test and check fixture contact and load distribution. The synthetic paths provide evidence for biaxial calibration.