Skip to content

Example workflows and tutorials

These examples demonstrate how to use Rend with different material profiles, loading conditions and search configurations.

Each tutorial starts with a fictional application or research question. Follow the workflow from preparing a stress–deformation CSV and configuring Rend to comparing candidate strain-energy laws and applying the result. The examples show how to read fit scores, inspect the response in the range that matters, and decide whether a candidate is ready for the next application step.

Each example includes a prepared CSV dataset, a complete Python script, recorded search results and an explanation of how to interpret the discovered material laws. Some examples use synthetic data generated from known constitutive models, while others use published experimental or simulation data. The datasets and search settings may differ from those used in the benchmark results.

Choose a workflow

Workflow What you will work through Downloads
Treloar rubber Shortlist a law for a flexible shaft coupling, then prepare an Abaqus material check. CSV, Python
Synthetic fiber composite Balance biaxial and directional shear branches for a pump diaphragm and interpret fitted fiber dispersion. CSV, Python
Synthetic reinforced membrane Test whether weighting high-stretch data improves a fixture closing-force estimate. CSV, Python
Soft elastomer Fit one tensile curve with the basic API and turn nominal stress into a gripper-strip force. CSV, Python
Synthetic compressible foam Reuse a configuration to compare two isolation-pad formulations under matched compression. Foam A CSV, Foam B CSV, Python
BCC lattice Screen a cubic surrogate for combined compression and shear using branch errors and sampled coverage. CSV, Python

Run a tutorial

Install a Rend wheel, then download the CSV and its Python script into the same folder. You can also copy the complete script from the example page. The scripts use the generation limits specified in their respective workflows. For a first exploratory run, set max_generations=500 and live_plot=True to watch the search progress. Once you are familiar with the workflow, restore the original generation limit for a longer search.

Open a terminal in the folder containing the script and run it with Python. For example:

python treloar.py

Prepare data

To adapt a workflow to your own data, set CSV in the script, verify the stress measure and units, and choose a material profile and screening paths for your application. ValidationRanges selects the paths to check. All supplied rows remain in the fit.

Select a result

  1. Open the printed result.html. Inspect the overall and per-tag R², then use the curves and local stress or force errors to judge the range your application uses.
  2. Compare clear_mse across candidates that use the same fitting objective. clear_mse reports weighted full-data error, while R² describes the unweighted measured components. target_mse sets a variance-scaled stopping criterion and the achieved R² comes from the report.
  3. Check the sampled applicability intervals and the required checks. Compare the best eligible fit with a simpler candidate. Use the final section of each workflow to turn that comparison into a calculation or verification step, or to identify what the fit still needs.
  4. Read the simplified energy \(W\) with its listed coefficients \(c_i\). It combines constants from the printed equation and sets the energy at \(\mathbf F=\mathbf I\) to zero. Expand Original report equation to see \(W_{\mathrm{raw}}\) with the original numerical constants.

Recorded session

The tables show results from individual searches. The recorded coupling, diaphragm, membrane and foam studies used Rend 0.1.0. Each workflow specifies its generation limit. The search may stop earlier if it reaches the target MSE. Because the search is stochastic, repeated runs can produce different equations and fit scores.

To run those study configurations from a source checkout, use the batch runner. It applies the study generation caps, includes the uniform membrane comparison, and saves each input, configuration, console log and report under results/example_workflows/.

python scripts/run_examples.py --only treloar fiber_composit reinforced_membran reinforced_membran_uniform foam foam_mid