How do I find the velocity of an object and use it to chaneg the colour of a material? I am trying to make a material for a fluid simulation in blender 2.8.2 that will change the colour of the fluid as the fluids velocity increases. I have tried a few things:



Both attempts were unsuccessful. Currently, it seems as if it is not possible to find the velocity as there is no way to detect how much time has passed.

I am aware that there is a question almost identical to this one (is there any way to get to velocity of a fluid and use it in the cycle material editor) that has already been asked but it has no answers so I thought it would be ok asking again.
As I told in comments, you can get that with a particle emitter. On the next image, you find a cube emitting a ball. The material of the emitted ball is the node setup presented. It works in cycles. 

If you need to get a surface made of the particles, you can use Cubesurfer addon, or instead of using a sphere as emitted object, you use a metaball, and fine tune the options of it (size, etc). However, the generated surface wont be with colour change by velocity, for both methods.

If you dont want to use a shape itself, another way, in the "particles" setup, you render as "halo", on "viewport display" you sent as "point", in "colour" you can choose "velocity" or "acceleration". You can fine tune the colours increasing "fade distance", as showed in the next image: