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 computing the particle natural size #641

Closed WeijianLiang closed 4 years ago

WeijianLiang commented 4 years ago

Describe the bug Error in computing the particle natural size. The dimension doesn't match, eg. _unit_elementlength is one-dimensional property, cell->nparticles_ is Tdim dimensional property. while the natural size should be dimensionless property.

This quantity doesn't affect any computation for standard MPM, but would significantly affect GIMP (make the support domain smaller, and its performance like standard MPM)

Bug source node.tcc (line 449 -450) this->natural_size_.fill(element->unit_element_length() / cell_->nparticles());

Expected behavior this->natural_size_.fill(element->unit_element_length() / std::pow(cell_->nparticles(), static_cast<double>(1. / Tdim)));

ezrayst commented 4 years ago

I think I agree with @WeijianLIANG. The definition of nparticles is the number of particles within the cell, while the length in GIMP is the length per dimension. What do you think @cw646?

cw646 commented 4 years ago

I think the listed reference alludes to the line "The initial size, 2l ip, is determined by dividing the cell spacing L by the number of particles per cell" from the paper. But the modification does make sense to me.

kks32 commented 4 years ago

Fixed in #647