milldem
A cross-platform soft-sphere discrete element method (DEM) engine for tumbling-mill charge motion and
power. No C++ toolchain, no WSL: pure NumPy with an optional Numba JIT and an optional Torch-CUDA path.
(Repo: CAOS_MillDEM; import name and PyPI dist are both milldem.)
It resolves every particle and contact with a soft-sphere contact law (linear Hookean or Hertzian, Coulomb friction, Tsuji restitution damping) and offers two routes:
- 2D charge shape / regime (
simulate,MillDEM): a fast rotating disc-slice read of the DEM charge shape (toe/shoulder) and motion regime (cascading / cataracting / centrifuging). - Thin-3D-slab net power (
simulate_power,MillDEM3D): an axial slab with periodic axial boundaries that resolves the force chains carrying the charge lift, so the net power (van Nierop 2001 torque route,P = 2*pi*T*N) is size-consistent and within ~10% of the classical Hogg-Fuerstenau model. A single 2D disc slice cannot do this (its power/HF ratio drifts ~2x with mill size).
Install
pip install milldem # core (numpy + scipy), runs anywhere
pip install "milldem[jit]" # + numba, 10-50x on the hot loop
pip install "milldem[train]" # + torch (cu126) + torch-geometric, the GPU / surrogate path
Quick start
from milldem import simulate, simulate_power, MillConfig
# 2D charge shape + regime (fast, qualitative)
m = simulate(MillConfig(diameter_m=5.0, phi_c=0.75, fill=0.30), sim_time=2.0)
print(m.regime, m.toe_deg, m.shoulder_deg)
# validated thin-3D-slab net power [kW]
p = simulate_power(MillConfig(diameter_m=5.0, phi_c=0.75, fill=0.30, ball_diameter_m=0.10), sim_time=1.5)
print(p["net_power_kw"], p["arm_m"], p["n_particles"])
CLI:
milldem run --D 5 --phi 0.75 --J 0.30 --time 2.0 --json shape.json # 2D charge shape / regime
milldem power --D 5 --phi 0.75 --J 0.30 --ball 0.10 --L 6.0 # validated 3D net power
Validation
See docs/VALIDATION.md for the honest validated-scope statement: verified
single-particle statics, charge settling, contact-model correctness, determinism, the size-consistent
thin-3D-slab power (tested in tests/test_power3d.py), and the fill handling. Nothing is fitted to hide a
gap. Sources: Cundall & Strack 1979, Tsuji et al. 1992, Govender et al. 2015, van Nierop et al. 2001.
Contributing, conduct, security, license
CONTRIBUTING.md, the branch flow and the validation burden that physics changes carry.CODE_OF_CONDUCT.md, the Contributor Covenant.SECURITY.md, how to report a vulnerability privately.STRUCTURE.md, the repo layout.- MIT licensed.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file milldem-0.3.1.tar.gz.
File metadata
- Download URL: milldem-0.3.1.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3e89c60b7a1e841da1ad8191f81c1f221b810c13cb655eab66e17dbac8800a1
|
|
| MD5 |
5e37d32b25eb870da33bb8c79eb049e7
|
|
| BLAKE2b-256 |
6be5919f69ca1fda7ae717af5257e664f3f266af01c125403ae39034935686d1
|
Provenance
The following attestation bundles were made for milldem-0.3.1.tar.gz:
Publisher:
publish.yml on fsantibanezleal/CAOS_MillDEM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
milldem-0.3.1.tar.gz -
Subject digest:
d3e89c60b7a1e841da1ad8191f81c1f221b810c13cb655eab66e17dbac8800a1 - Sigstore transparency entry: 2209039544
- Sigstore integration time:
-
Permalink:
fsantibanezleal/CAOS_MillDEM@6b8e441724d846f8aabf2df6c574e7496eac56fc -
Branch / Tag:
refs/tags/v0.03.001 - Owner: https://github.com/fsantibanezleal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6b8e441724d846f8aabf2df6c574e7496eac56fc -
Trigger Event:
push
-
Statement type:
File details
Details for the file milldem-0.3.1-py3-none-any.whl.
File metadata
- Download URL: milldem-0.3.1-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
774aead712f20b57ea9c21117c2686aaa64b8ea85da757c4a86eecc811272734
|
|
| MD5 |
e0fb0786603b27a6a6315da2a0eb0396
|
|
| BLAKE2b-256 |
8d2e53b95617bbd7104c2caa011d2aff227f3d394c9e75180d924c47d5370743
|
Provenance
The following attestation bundles were made for milldem-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on fsantibanezleal/CAOS_MillDEM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
milldem-0.3.1-py3-none-any.whl -
Subject digest:
774aead712f20b57ea9c21117c2686aaa64b8ea85da757c4a86eecc811272734 - Sigstore transparency entry: 2209039600
- Sigstore integration time:
-
Permalink:
fsantibanezleal/CAOS_MillDEM@6b8e441724d846f8aabf2df6c574e7496eac56fc -
Branch / Tag:
refs/tags/v0.03.001 - Owner: https://github.com/fsantibanezleal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6b8e441724d846f8aabf2df6c574e7496eac56fc -
Trigger Event:
push
-
Statement type: