Skip to content

Conversation

@lukashof
Copy link

@lukashof lukashof commented Nov 6, 2025

I discovered that the current implementation of emitters does not allow for changes in the emit-velocity. It works somewhat for small changes, but after setting the velocity to zero, for instance, the emitter won't wake up again. I mentioned this in #309, although I didn't fully understand it back then.

This PR changes the emitter concept to avoid using the calculation of future activity based on the current velocity. The emitter is simply filled at the beginning of the simulation and the particles are advected in every step as dictated by the current velocity. I also shortened the implementation by not repeating the code for square and circular emitters.

Additionally, I made the boundary surrounding the emitter optional. This is already the case elsewhere but was missing in this repo.

Lastly, I added velocity profiles for circular emitters: You can now select an integer as an exponent and the emitter will get a corresponding velocity profile with the max velocity in the center. 0 will result in a constant velocity across the emitter, 1 in a linear distribution, 2 in a quadratic and so on. The volume flow is always kept the same as it would be for a constant velocity. The max velocity will therefore be a bit higher than the specified velocity.

I am looking forward to your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant