VariationalViscosity3D
VariationalViscosity3D copied to clipboard
How to insert a constant stream of particles?
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); } } }
This is not supported. You'd have to code it yourself. This involves basically two aspects:
- adding particles in a source region whenever you determine it has too few particles per cell.
- 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.