Soft elastomer — from stress measurements to force prediction¶
1. Define the sizing calculation¶
This example demonstrates how to use the basic Rend API to fit a single tensile curve and estimate the force acting on a compliant elastomer strip.
Consider quasi-static loading at stretches between 1.2 and 2.0. Compare candidate models using an overall \(R^2\) of at least 0.99 and a maximum force prediction error of 0.005 N within this interval.
2. Prepare the loading branch¶
Use the uncut specimen record Xi0.5, first repeat, tested at a nominal rate of \(0.001\,s^{-1}\). The source has 66,672 force/displacement samples. Retain through the first maximum force and omit the 22 subsequent records and the 38 retained records with negative displacement or force. Bin the remaining 66,612 pairs into 512 equally spaced stretch bins, and take the median stretch and stress in each bin. This reduces dense sampling while preserving the overall curve. Original dataset, Experimental procedure.
Use \(L_0=30\) mm and a nominal \(A_0=12\times2=24\,\mathrm{mm}^2\) per the repository's specimen preparation. Compute \(\lambda=1+u/L_0\) and \(P_{11}[\mathrm{kPa}]=1000F/A_0\). The 512 prepared stretches span about 1.0014–2.3316.
TestType,Tag,Stretch_1,Stretch_2,Stretch_3,Stress_1,Stress_2
uniaxial,uncut_0.001s-1_Xi0.5_R1,1.0014333333333334,,,0.012499999999999999,
3. Configure and run Rend¶
Configure Rend¶
Use the basic MaterialRegressor API with the incompressible isotropic profile as an assumption for this one-dimensional fit. Keep uniform weights, a cap of 700 generations and a variance-scaled target of 1e-3. Set uniaxial probes from 1 to 2.33. The HTML equation suffices for the force calculation, so leave optional checks and exports off. Rend still applies the mandatory screening and reports sampled applicability.
Run the tutorial¶
Install the Rend wheel, then save elastomer.csv and soft_elastometer.py in the same folder. You can also copy the script below into a file named soft_elastometer.py. Open a terminal in that folder and run:
python soft_elastometer.py
For your first run, set live_plot=True to observe the search. Open the generated result.html to compare the fitted equations.
Complete Python script
"""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)
Recorded runs¶
| Run | Rows | Curves | Elapsed | Returned models |
|---|---|---|---|---|
| Standard run | 512 | 1 | 21 s | 6 |
Elapsed time is wall time from the batch runner, including report generation. The run record identifies the builds and input snapshots.
4. Compare the candidates¶
| Run | Model | Why inspect it | Complexity | Weighted MSE (kPa²) | Overall \(R^2\) | Configured probe coverage gaps |
|---|---|---|---|---|---|---|
| Standard run | 1 | Lowest MSE | 19 | 0.010576 | 0.99919 | — |
| Standard run | 2 | Smaller comparison | 17 | 0.026517 | 0.99796 | — |
Model numbers match the HTML report. Complexity is the search tree score. A coverage gap means the common sampled interval does not cover the configured probe interval.
Both models achieve an overall \(R^2\) above 0.99. However, their force prediction errors differ.
Across the 307 measured points within the selected stretch interval, the maximum force error is approximately 0.00367 N for Model 1 and 0.00582 N for Model 2.
Model 1 therefore meets the specified force error limit of 0.005 N, while Model 2 does not.

Standard run, model 1.
The predicted curve nearly overlaps the tensile data in the worked sizing interval. A small overprediction becomes visible near the largest measured stretch, beyond that interval.
Standard run: equations, branch scores and checks
| Loading | Branch | Model 1 | Model 2 |
|---|---|---|---|
| Uniaxial | All tags | 0.99919 | 0.99796 |
| Uniaxial | uncut_0.001s-1_Xi0.5_R1 | 0.99919 | 0.99796 |
| Reported check | Model 1 | Model 2 |
|---|---|---|
| Sampled strong ellipticity | Not run / unverified | Not run / unverified |
| Reference tangent PSD | Not run / unverified | Not run / unverified |
| Float64 audit (mandatory) | Passed | Passed |
| FEM kinematic test | Not run / unverified | Not run / unverified |
| FEM robustness test | Not run / unverified | Not run / unverified |
| Affine patch benchmark | Not run / unverified | Not run / unverified |
| Free-DOF mesh/step convergence | Not run / unverified | Not run / unverified |
| Sampled common interval | Model 1 | Model 2 |
|---|---|---|
| Uniaxial (λ) | λ = 0.005018352119–10000 | λ = 0.1135285315–134.2722799 |
| Biaxial (λ) | λ = 0.005018352119–14.05855946 | λ = 0.1135285315–5.478840578 |
| Planar (λ) | λ = 0.005018352119–199.2092312 | λ = 0.1135285315–29.89963035 |
| Shear (γ) | γ = -241.8376212–240.2462891 | γ = -8.773655691–8.644577841 |
Model 1: Report equation only
Original report equation
Model 2: Report equation only
Original report equation
5. Apply the result and check its limits¶
Model 1 meets the 0.005 N force tolerance with a square-root law in \(\bar I_1\). Model 2 uses an exponential in \(\bar I_2\) and exceeds the tolerance despite a high overall \(R^2\). For the sizing calculation, substitute \(\bar I_1=\lambda^2+2/\lambda\) into the simplified Model 1 energy. Differentiate it with respect to \(\lambda\) to obtain nominal axial stress, then scale by the reference area.
from math import sqrt
stretch = 1.8
i1_bar = stretch**2 + 2 / stretch
term = 0.84431005 + i1_bar - 3
ds_d_stretch = 2 * stretch - 2 / stretch**2
stress_kpa = 3 * term**2 * ds_d_stretch / (2 * sqrt(term**3 - 0.31978202))
force_n = stress_kpa * 24 / 1000
extension_mm = 30 * (stretch - 1)
print(f"{extension_mm:.1f} mm, {force_n:.4f} N")
This gives 24.0 mm and about 0.1616 N at stretch 1.8. Check the force tolerance on another tensile repeat at the same rate before using the fit for sizing. If the repeat misses the tolerance, refit with observations concentrated in the 1.2–2.0 stretch interval and check a separate repeat. Unloading, fracture and other loading rates require separate measurements.