Installation and first run¶
1. Install the precompiled wheel¶
The precompiled Rend wheels target Windows x86-64 and contain the RSR search executable. You need Python 3.11 or newer, pip and a compatible CPU. pip installs the Python dependencies separately. The Windows wheel uses JAX on the CPU. Its native runtime may require the Microsoft Visual C++ Redistributable.
Choose one CPU build:
| Wheel version suffix | CPU requirement | Typical use |
|---|---|---|
+avx2 |
AVX2 | Widest of the provided AVX2 options (no FMA requested at compile time) |
+avx2fma |
AVX2 + FMA | Recommended on most supported modern CPUs |
+avx512f |
AVX-512F + FMA | Systems with AVX-512F support in the CPU and OS |
+avx512full |
AVX-512F, DQ, BW, VL + FMA | Machines supporting the full specified feature set |
For example, download one wheel from Rend Releases and install it from your download directory:
python -m pip install ".\rend-0.1.0+avx2fma-py3-none-win_amd64.whl"
Replace 0.1.0 with the version you received. Install one CPU variant. Uninstall the current build with python -m pip uninstall rend before switching variants.
2. Supply the measurements¶
Each row describes a deformation and the corresponding observed stress components. Volumetric rows use Cauchy pressure. See CSV formats for the columns and stress conventions for each loading family.
To start with a prepared dataset or your own measurements, see the example workflows. Save the selected CSV beside the example script and run the script with Python.
Save this minimal incompressible uniaxial dataset as my_data.csv in your working directory.
TestType,Tag,Stretch_1,Stress_1
uniaxial,trial_A,1.00,0.00
uniaxial,trial_A,1.10,0.18
uniaxial,trial_A,1.20,0.39
The three-row example demonstrates the format only. Reliable discovery requires adequately sampled experimental curves and coverage of the loadings you want to predict.
3. Run your first fit¶
This script uses the CSV above and runs with the required settings. Save it as fit.py and run python fit.py.
from rend import (
MaterialRegressor,
MaterialProfile,
ValidationRanges,
DeformationRange,
StressUnit,
)
regressor = MaterialRegressor(
csv_path="my_data.csv",
profile=MaterialProfile.INCOMPRESSIBLE_ISOTROPIC,
stress_unit=StressUnit.MPA, # must match the numbers in the CSV
max_generations=1000,
target_mse=1e-3,
validation_ranges=ValidationRanges(
uniaxial=DeformationRange(1.0, 1.2),
biaxial=None,
planar=None,
shear=None,
),
)
result = regressor.run()
if result.cancelled:
raise SystemExit(130)
if result.error:
raise RuntimeError(result.error)
print(result.report_path)
for model in result.models[:3]:
print(model.mse, model.as_string)
ValidationRanges sets the sampled Rust screening paths. Use None to skip a loading family in that screening, while retaining its CSV observations for fitting. The configuration guide explains how to add optional checks, weights and exports.
4. Interpret the outputs¶
- HTML report under
results/<name>_<timestamp>/result.html: candidate formulas sorted from smallest to largest full-dataclear_mse, plots and unweighted R² visible immediately; expandable numerical checks and sampled applicability limits. DiscoveryResult:models,report_path,elapsed_seconds,error,cancelledand final Rust rejections inrejected_models.- Optional JSON: the solver-neutral
rend.material.v4expression tree and compact check outcomes. Enableexport_json=True. - Optional solver source: use
export_uhyper=Truefor Abaqus orexport_calculix_umat=Truefor CalculiX. The report lists any unsupported expressions.
See how to read the report and solver integration for supported profiles, commands and verification results.
5. Troubleshooting¶
| Symptom | What to check |
|---|---|
0xC000001D / illegal instruction |
Installed CPU variant requires an instruction unsupported by the CPU/OS. Try the AVX2 wheel. |
JAX / jaxlib import failure |
Check that the Python version and native Windows JAX CPU wheel are compatible, install the required Microsoft VC++ Redistributable if indicated. |
| CSV validation failure | Check column spellings, component counts, stress convention, missing lateral stretches and unit consistency. |
Report unexpected errors on GitHub Issues.
Run python -m pip show rend to see which wheel version is installed. Use python -m pip uninstall rend before changing CPU variants.