VariationalViscosity3D icon indicating copy to clipboard operation
VariationalViscosity3D copied to clipboard

How to insert a constant stream of particles?

Open alt0216 opened this issue 4 years ago • 1 comments

Currently I am adding particles in by inserting it at every point in a certain x,y,z space for each frame. This does not result in a constant steam of down flowing particles but chunk by chunk of particles. Is there a method to generate a constant steam of particles? Thanks.

for (float x = 48; x < 53; ++x) { for (float y = 85; y < 90; ++y) { for (float z = 48; z < 53; ++z) { Vec3f pt(0.01x, 0.01y, 0.01*z); sim.add_particle(pt); } } }

alt0216 avatar Jul 06 '20 15:07 alt0216

This is not supported. You'd have to code it yourself. This involves basically two aspects:

  1. adding particles in a source region whenever you determine it has too few particles per cell.
  2. prescribing the velocity in that region so that it flows at the desired rate. The latter is non-trivial since it involves velocity boundary conditions, at least on the pressure solve, and ideally on the viscosity solve too, which amount to changing the right hand sides of the relevant linear systems.

christopherbatty avatar Jul 06 '20 15:07 christopherbatty