Skip to content

Post-Processing Results problem fix - #19

Merged
tomvanmele merged 13 commits into
BlockResearchGroup:mainfrom
Baraa-Elmoussa:LMGC90-problem
May 18, 2026
Merged

Post-Processing Results problem fix#19
tomvanmele merged 13 commits into
BlockResearchGroup:mainfrom
Baraa-Elmoussa:LMGC90-problem

Conversation

@Baraa-Elmoussa

Copy link
Copy Markdown
Contributor

@tomvanmele

This pull request refactors and expands the example scripts for DEM (Discrete Element Method) analyses, standardizing the workflow across scripts, improving clarity, and updating material assignments and solver usage. The changes include renaming and reorganizing files, updating material property assignments, switching to a more consistent problem/solver setup, and adding or updating documentation strings. Minor code style improvements and bug fixes are also included.

Major changes by theme:

0. Fixed Post-processing Issue

  • Flipped the signs of the two tangential components in LMGC90 - Post-Processing function for correctness.

1. Standardization of Problem Setup and Solver Usage

  • Replaces direct solver calls (e.g., cra_penalty_solve, rbe_solve) with a consistent workflow using the Problem and Solver classes across all example scripts. This includes explicit setup of contact models, supports, and material assignments before solving.

2. Material Assignment and Properties

  • Added material assignments for models, often specifying density and using predefined materials (e.g., Stone, Concrete, LimeStone). This ensures all elements have appropriate material properties before analysis.

3. File Organization and Documentation

  • Renames and reorganizes example scripts into the scripts/DEM_Analysis_Examples/ directory, and adds or updates docstrings for improved clarity and usage instructions. New example scripts, such as dem_stack.py, are also introduced.

4. Solver Parameter Updates

  • Updated solver parameters in the test scripts

5. Minor Bug Fixes and Code Style Improvements

  • Fixes minor code issues (e.g., removal of unnecessary newlines, consistent string quoting, removal of type ignores) and ensures consistent viewer usage (e.g., replacing viewer.setup() with viewer.add_solution())

# ============================================================================

conc: Concrete = Concrete.from_strength_class("C30")
conc.density = 2000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what kind of special concrete is this? :)

from compas_dem.material import Stone
from compas_dem.models import BlockModel

# from compas_dem.analysis.cra import cra_penalty_solve

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we can avoid commented out parts that would be better

@tomvanmele
tomvanmele merged commit a676ef6 into BlockResearchGroup:main May 18, 2026
11 checks passed
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.

2 participants