how to create morphing Water Effects

Hello everybody, Im not looking for visual water looks. I want to create pipe based game where the water particles can reform into any shape and connect with the other water particles. Say that you want to have a smaller pipe and have the water reform to fit into the smaller pipe heres an example from wheres my water.

[11938-wheres+my+water.png|11938]

Any advice or options would be greatly appreciated

Implement a computational fluid dynamics solver.