Skip to content

Add hopper discharge, rotating drum examples and measurement plane enhancements#13

Open
SueHeir wants to merge 1 commit intomainfrom
researcher/industrial-dem
Open

Add hopper discharge, rotating drum examples and measurement plane enhancements#13
SueHeir wants to merge 1 commit intomainfrom
researcher/industrial-dem

Conversation

@SueHeir
Copy link
Copy Markdown
Owner

@SueHeir SueHeir commented Mar 16, 2026

Summary

  • Measurement plane enhancements: Circular plane shape for cylindrical geometries, rolling average statistics for smoothed flow rates, and per-atom-type tracking for multi-material flows
  • Cylinder wall angular velocity: Rotating cylinder walls with Coulomb tangential friction — enables rotating drum and mill simulations
  • Hopper discharge example: Classic DEM validation case measuring mass flow rate through a slot orifice (Beverloo correlation)
  • Rotating drum example: Particles avalanching inside a rotating cylinder at ~10 RPM, demonstrating dynamic angle of repose

Test plan

  • cargo test --no-default-features --workspace — all 26 crate tests pass
  • cargo clippy --no-default-features -- -D warnings — no warnings
  • New unit tests for circular measurement plane bounds and rolling average history
  • Run hopper_discharge example and verify mass flow rate output
  • Run rotating_drum example and verify avalanching behavior in VTP output
  • Compare hopper discharge flow rate against Beverloo correlation prediction

🤖 Generated with Claude Code

…hancements

Measurement plane enhancements (dem_measure_plane):
- Circular measurement planes (shape="circular" + radius) for cylindrical geometries
- Rolling average statistics (rolling_windows) for smoothed flow rate tracking
- Per-type measurement (per_type=true) to track different particle types separately
- New tests for circular bounds checking and rolling history

Cylinder wall angular velocity (dem_wall):
- Add angular_velocity field to WallCylinder for rotating cylinder walls
- Compute wall surface velocity at contact point via omega × r
- Apply Coulomb-limited tangential friction force opposing relative sliding
- Compute torque on particles from wall friction

Hopper discharge example:
- Slot hopper with funnel walls, blocker wall removal on settling
- Measurement plane at outlet tracks mass flow rate (Beverloo validation case)
- Rolling average flow rate for smoother statistics
- Two-stage simulation: filling → flowing

Rotating drum example:
- Z-axis cylinder with angular_velocity = 1 rad/s (~10 RPM)
- Particles inside drum, gravity in -y creates avalanching flow
- Demonstrates dynamic angle of repose in rolling/cascading regime
- Froude number ≈ 0.005 (well below centrifuging transition)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SueHeir
Copy link
Copy Markdown
Owner Author

SueHeir commented Mar 16, 2026

Maintainer Review: ❌ CHANGES REQUESTED

Good feature work — measurement plane enhancements and cylinder angular velocity are well-designed. However, both example configs have a blocking bug.

Blocking: Invalid TOML config format

Both examples/hopper_discharge/config.toml and examples/rotating_drum/config.toml use:

[comm]
processors = [1, 1, 1]

CommConfig has #[serde(deny_unknown_fields)] and only accepts processors_x, processors_y, processors_z — NOT an array. This will cause a runtime TOML parse error:

unknown field `processors`, expected one of `processors_x`, `processors_y`, `processors_z`

Fix: Replace with:

[comm]
processors_x = 1
processors_y = 1
processors_z = 1

Non-blocking

  1. README.md not updated with new examples — please add to examples table
  2. Cylinder angular velocity friction uses simplified Coulomb friction (no tangential spring). Fine for rotating drums, but add a code comment noting the simplification
  3. Code quality is otherwise excellent — circular plane bounds, rolling average via VecDeque, per-type tracking, 3 unit tests ✓

Please fix the config format and I'll merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant