Skip to main content

Blending Simulator Lib (blending_simulator_lib)

PyPI version License: MIT

Simulation library for Bulk Material Homogenization, implemented in C++.

Usage

from blending_simulator_lib import BlendingSimulatorLib

sim = BlendingSimulatorLib(
    60.0,  # heap_world_size_x: bed length in m
    20.0,  # heap_world_size_z: bed depth in m
    45.0,  # reclaim_angle in degrees
    8.0,  # particles_per_cubic_meter
    False,  # circular
    0.87,  # eight_likelihood (fast simulation)
    1.0,  # bulk_density_factor (detailed simulation)
    10.0,  # drop_height in m (detailed simulation)
    False,  # detailed
    1.0,  # reclaim_increment in m
    seed=1,  # optional, random if not given
    lattice=True,  # lattice simulation on a hexagonal close-packed lattice (angle of repose 45°) instead of the fast one
    record_particles=True,  # keep every particle for get_particles()
    # cone=True would choose the cone simulation instead: no particles, every stacked row one portion forming a 45° cone over the pile;
    # formula=True the formula simulation, the cone simulation reduced to the stacker line (all rows at one z, no circular beds);
    # eight_height_scale=6.5 would replace the fast simulation's constant eight likelihood by one scaled with the pile height, which
    # keeps round 45° piles at every particles_per_cubic_meter; with cone=True, cone_footprint_x=0.31 (and cone_footprint_z) would spread
    # every portion over a rectangle of these half sizes along and across the bed (a cone with a flat top) instead of a point
)
sim.stack_list(data, ["timestamp", "x", "z", "volume", "quality"])  # numpy array, one row per increment; other columns are parameters
sim.get_heights()  # height map, list of rows along z
sim.get_particles()  # dict of numpy arrays: position (n x 3 centers), size (n x 3), parameters (n x parameters) and columns
sim.reclaim()  # dict of x, volume and the parameters per reclaimed slice

The simulators are described in the README of the blending-simulation repository. bmh.simulation.BslBlendingSimulator wraps this class in the BlendingSimulator interface of bmh.

simulate_batch(data, columns, ..., lattice=False, threads=1, cone=False, formula=False, eight_height_scale=0.0, cone_footprint_x=0.0, cone_footprint_z=0.0) stacks and reclaims many inputs in one call. The formula simulation and the eight likelihood scaled with the pile height need a simulator release after 2026.3, the cone simulation's footprint one after 2026.4; bindings built against an older one raise a RuntimeError for formula=True, a nonzero eight_height_scale or a nonzero footprint. The footprint (half sizes in m along and across the bed, 0 by default: the point source of the released cone, bit for bit) applies to cone=True only (ValueError otherwise); 0.31 m along the bed was fitted to the calibrated detailed simulation at 0.25 m particles with 1 m cells. The formula simulation has no footprint. continuous_drops(volumes, parameters, portion_times, path_times, path_x, path_z, cell_x, cell_z) turns a material that flows while the stacker moves along a piecewise linear path into rows (x, z, volume, parameters): one drop per grid cell the path crosses, with the volume of the time spent over it (bmh.helpers.continuous_drops wraps it, with the cell sizes of each simulator in drop_grid).

Development

After making changes to the module, you need to regenerate the stubs. To regenerate the stubs, execute this command from the package directory:

uv run pybind11-stubgen blending_simulator_lib._blending_simulator_lib -o src

The C++ simulator is fetched from the blending-simulation repository at the tag set in CMakeLists.txt. To build against a local checkout instead, for example while changing both, point CMake's FetchContent to it:

SKBUILD_CMAKE_DEFINE="FETCHCONTENT_SOURCE_DIR_BLENDING-SIMULATION=/path/to/BlendingSimulator" uv sync --reinstall-package blending_simulator_lib

Metadata

Release files for blending_simulator_lib 2026.2

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

Built distributions (wheels)

Table of built distributions (wheels) for blending_simulator_lib 2026.2
File Actions
blending_simulator_lib-2026.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for blending_simulator_lib-2026.2-cp312-cp312-win_amd64.whl
blending_simulator_lib-2026.2-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details for blending_simulator_lib-2026.2-cp312-cp312-win32.whl
blending_simulator_lib-2026.2-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details for blending_simulator_lib-2026.2-cp312-cp312-musllinux_1_2_x86_64.whl
blending_simulator_lib-2026.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for blending_simulator_lib-2026.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
blending_simulator_lib-2026.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for blending_simulator_lib-2026.2-cp312-cp312-macosx_11_0_arm64.whl
blending_simulator_lib-2026.2-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details for blending_simulator_lib-2026.2-cp312-cp312-macosx_10_13_x86_64.whl

Total release size: 2.4 MB

Release files / blending_simulator_lib-2026.2-cp312-cp312-win_amd64.whl

Download URL blending_simulator_lib-2026.2-cp312-cp312-win_amd64.whl
Size 199.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
42a155a07ca9d1897b5fb94af434f3baf7306926f470c4cda66b97c7a9f71e8e
BLAKE2b-256 checksum
How to use checksums
2f3ef26e887bc0330d0f959e05e76ab9907677862a81bc43d45412b3a19f5755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / blending_simulator_lib-2026.2-cp312-cp312-win32.whl

Download URL blending_simulator_lib-2026.2-cp312-cp312-win32.whl
Size 166.3 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
1f33a89a5e174d528332e9b7589004584d96924c69b569f53debadfad3755c09
BLAKE2b-256 checksum
How to use checksums
2d2b164c1b28ed85ea098b7db317fe939ecb9331204f2cd3a6a30e2cb637a3a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / blending_simulator_lib-2026.2-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL blending_simulator_lib-2026.2-cp312-cp312-musllinux_1_2_x86_64.whl
Size 1.4 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
7214df419becaf61cd206c106b131e8ecef76a9e6e0ba9a0ec8c4cbf35f239a0
BLAKE2b-256 checksum
How to use checksums
aa6d9c2211c45aea1d6c0a6110292142c9849af9f1ae2d69c12b81a9b16750dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / blending_simulator_lib-2026.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL blending_simulator_lib-2026.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 326.6 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3841b2bb423fd70b9d7211d3ddf5883a9aa2e0fcee90f2211509d82d02898aa5
BLAKE2b-256 checksum
How to use checksums
33b16d04c63da54b4dd745d5096e1b01b429ce9a6b087ac2877585746d6dcac5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / blending_simulator_lib-2026.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL blending_simulator_lib-2026.2-cp312-cp312-macosx_11_0_arm64.whl
Size 142.4 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f56fb86d93f1960f1ac7beefe1304e1e43f8d8e5eb09bd6c9739423679bec93b
BLAKE2b-256 checksum
How to use checksums
107fa89ef7408360972c8ae53bec298ac192674807467f4249d90661a10f7b7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / blending_simulator_lib-2026.2-cp312-cp312-macosx_10_13_x86_64.whl

Download URL blending_simulator_lib-2026.2-cp312-cp312-macosx_10_13_x86_64.whl
Size 155.1 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
fe9d9b94ff47b64efb2c063ed1a35d50af463e26bc6d5cd0cea8dfe032da90d7
BLAKE2b-256 checksum
How to use checksums
582028c300edd0952e2dd8150f5be5e74de8bfb6295cd0a8514dbe32cf9a9d05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for blending_simulator_lib 2026.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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