Skip to main content

cosseratbench

A visual benchmark suite for evaluating rope, cable, and Cosserat rod simulation across deformation, contact, and dynamic stress cases.

# Experiment What it tests
1 Twist → plectoneme / knot twist, bending, buckling, extreme curvature, self-contact
2 Rope drop / pile gravity, friction, chaotic self-contact, many simultaneous contacts
3 Catenary / hanging cable basic gravity, tension, sag, stretch; good sanity/validation case
4 Cantilever bend + twist isolated bending stiffness, torsion, large deformation
5 Pendulum / swinging cable dynamics, inertia, damping, oscillation
6 Snap / whip test very fast motion, high curvature, timestep stability
7 Cylinder wrap / capstan rod-cylinder contact, friction, sliding, tension transfer
8 Pulley / sheave moving contact, bending around small radius, tension under motion
9 Obstacle course repeated contact against cylinders/planes/spheres, sliding and snagging
10 Two-rope interaction rod-rod contact, crossing, rubbing, entanglement
11 Loop / knot tightening persistent dense self-contact and friction under increasing tension
12 Compression / coiling rope pushed into a confined area; buckling and pile formation
13 Container packing rope fed into a box/cylinder; dense 3D self-contact
14 Parameter/extreme stress sweep deliberately push stiffness, friction, speed, resolution, timestep

Status

Early. Two experiments (catenary, cantilever) run against two solvers (PyElastica and MuJoCo's cable plugin), each scored against an analytical reference. Contact, driven boundaries and the web viewer are not built yet.

Usage

uv sync --all-extras        # from a clone; installs both solver backends
uv run cosseratbench list
uv run cosseratbench run    # every experiment x every solver, saved under results/
uv run cosseratbench run catenary --solver pyelastica --n-elements 100

Each run writes results/<experiment>/<solver>/result.json (metrics, wall time) and trajectory.npz (node positions over time).

How it fits together

  • A scenario describes the physics and nothing else: geometry, material, boundary conditions, loads, gravity, duration, all in SI units. Time steps, element counts, contact stiffnesses and damping coefficients are not part of it; they are each solver's business.
  • A solver adapter turns a scenario into a trajectory, node positions over time, at a requested resolution. It declares the physics it models (Capability), and an experiment that needs more is reported as unsupported rather than run.
  • An experiment pairs a scenario with metrics. Metrics see only the scenario and the trajectory, so every solver is judged by the same code.

Adding a solver or an experiment

Both are discovered through entry points, so they can live in your own package:

[project.entry-points."cosseratbench.solvers"]
mysolver = "mypackage.adapter:MySolver"

[project.entry-points."cosseratbench.experiments"]
myexperiment = "mypackage.experiments:my_experiment"
from cosseratbench import Capability, Scenario, Trajectory


class MySolver:
    name = "mysolver"
    capabilities = frozenset({Capability.STRETCH})

    def run(self, scenario: Scenario, *, n_elements: int, n_frames: int) -> Trajectory: ...

The built-in solvers and experiments register the same way; see src/cosseratbench/solvers and src/cosseratbench/experiments.

Release files for cosseratbench 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cosseratbench 0.0.1
File Size Uploaded
cosseratbench-0.0.1.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cosseratbench 0.0.1
File Interpreter ABI Platform
cosseratbench-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.3 kB

Release files / cosseratbench-0.0.1.tar.gz

Download URL cosseratbench-0.0.1.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
adc37654ed4cdb623b429d5b36b80bfbb92557824e7f81bdc51ecdc893b966bd
BLAKE2b-256 checksum
How to use checksums
9cde4ba023cae19cdcfd6acb8ea7aeaee9f746bfacc3f6836fa801a6fdd6b01d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cosseratbench-0.0.1-py3-none-any.whl

Download URL cosseratbench-0.0.1-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0942b21719749fc9e86f691c867eb14cea15b30ec27cf1afd005431f79e92085
BLAKE2b-256 checksum
How to use checksums
0d0bd97f0dd680f5979965bd5d1c30ae40e4081b683a0bf3bdbd15582eca0a25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.0

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page