There are many ways of doing fluid simulations, especially if they don't need to be strictly physical correct, ie. simulating real fluids. In my sph simulation I have three different kernels:
1. a very spiky repulsive only kernel, whose sole purpose is to keep two interacting particles away from each other, based only on distance. Without this kernel, the particles may overlap and come to rest on top of each others at distance 0, which results in unwanted behaviour.
2. a less spiky repulsive / attractive kernel, whose purpose is to push or pull all the neighbouring particles of any particle, depending on the local pressure ie. how many particles are crammed into the interaction space of the given particle. At most distances this kernel applies more force to the particles than the repulsive-only kernel, keeping them "sucked" together, but not overlapping.
3. a damping kernel, whose purpose is to dampen the radial relative velocity of two interacting particles, ie. the velocity along the line connecting them. This works for both particles moving towards and away from each other. The spiky-ness of this kernel depends on wether you want to simulate thin liquids like water or thicker substances like slime or dough.
Together, these three kernels produce a liquid with complex emergent behaviour, like "ocean" waves at the surface, sound waves, current eddies, and surface tension resulting in droplets and molten-cheese style strings, depending on what values I feed it.
It's a good idea to test each kernel with the other ones turned off. This makes it easier to pinpoint bugs and unwanted behaviour.
Cheers,
Mike