taichi-dev / taichi_elements

High-performance multi-material continuum physics engine in Taichi
MIT License
489 stars 70 forks source link

Seeding error if the mesh is outside the domain #32

Closed PavelBlend closed 4 years ago

PavelBlend commented 4 years ago

An error is reproduced on this scene: seeding_bug.zip

And at this commit: b49cd08433afebd9816cb0b477aa70245a828464

Particles are created where there is no mesh: 01

And it seems to me that the borders / walls of the domain are too thick.

UPDATE: I think I realized the wall thickness has two voxels. But why exactly two and not one voxel?

yuanming-hu commented 4 years ago

I'll take a look at this now.

And it seems to me that the borders / walls of the domain are too thick.

UPDATE: I think I realized the wall thickness has two voxels. But why exactly two and not one voxel?

This is because MPM is a hybrid particle-grid simulation, and for the grid part we need some padding so that the particles do not move out of the domain. I guess we have to accept this drawback for now, and after we have #3, the grid will become infinitely large and we can git rid of these issues.

PavelBlend commented 4 years ago

The error with Suzanne disappeared. But I noticed strange behavior: the walls of the domain are not the same thickness: 01 02 03 test_seed_all_domain.zip

I filled the whole domain with particles using cube emitter.

yuanming-hu commented 4 years ago

Ah sorry.. my bad. I just now updated PR #39, could you take a look?

About the wall thickness: I know it's too thick when we use grid size 32. For high-quality simulations, people can go up to 320x320x320 gird size, and then 3 cells are not too thick.

PavelBlend commented 4 years ago

resolved b836037114dbe2789554fac0368c74df731862b0