cb-geo / mpm

CB-Geo High-Performance Material Point Method
https://www.cb-geo.com/research/mpm
Other
245 stars 82 forks source link

Error in stress computation if there is particle lying on edge #656

Closed bodhinandach closed 4 years ago

bodhinandach commented 4 years ago

Describe the bug The stress computation shows a wrong result if there is a particle lying on an element edge/boundary. This is perhaps one of the major causes where the stress and the strain in the simulation sometimes show a singularity error. This happens in all constitutive model.

image

The error is resulted due to the incapability of preserving the rigid-body motion zero energy modes when a particle is lying exactly on element edge. See the following math for a single particle moving in rigid-body motion with v=+1 m/s:

image (1)

The following simulation is produced for an elastic particle with E=1000, v=-1, dt=1:

test2

To Reproduce Steps to reproduce the behavior:

  1. Compile 'cmake -DCMAKE_CXX_COMPILER=g++ .. && make -j8'
  2. Run on one node with './mpm/build/mpm -f \path\to\input\file -i input-file.json'
  3. Run any simulation where a particle is lying exactly on edge.

Expected behavior Rigid body motion should have no stress. The corrected version:

test_correct

Runtime environment (please complete the following information):

Additional context The easiest way to fix this is to implement a nudge of std::numeric_limits<double>::epsilon() while computing reference location.