How could I check the correctness of my result of fluid simulation? I wrote a particle based fluid simulating program. It's hard to tell if I get the right result. The visualized result seems reasonable, but some part of it looks weird. I don't know wether it's a feature of fluid. Is there some accurate method to verify if my program is right?

Amending some details：

My program is a 2D particle-based simulating program. The fluid is compressible. The implementation is almost based on a classical paper:


  Müller, Matthias, David Charypar, and Markus Gross. "Particle-based fluid simulation for interactive applications." Proceedings of the 2003 ACM SIGGRAPH


I solved the Navier-Stokes equation with iteration method. It only considered pressure, gravity, viscosity and surface tension.
Compare it with someone else's software. Run some standardized test and find out if you get roughly the same answer as others. If you get the same answer, than the probability of having your code right is quite high.

Some tests:


Flow past cylinder. In 2d take rectangular domain, cylinder in the middle, inflow on the left, outflow on the fight and calculate the force on the cylinder. Here is benchmark comparing handful of codes.
Buoyancy flow. Closed box, hot plate on bottom, cold plate on top, hot fluid starts to rise due to the buoyancy force. Here is benchmark.
Rising bubble, benchmark.


But unfortunately it might be quite difficult to compare your code to scientific codes in those benchmarks. I guess you implemented something as SPH or stable fluids which are not made for accuracy but for stability. 

Take for example the flow past a cylinder. I would start the test with very small Reynolds number and then measure the force on cylinder as you increase accuracy of your simulation(lower time step, increase subdivision or increase number of particles). Does the force converges to some number? If no, than you have a problem, if yes, than have a look at the benchmark paper and compare your result with others.



This method is very similar technique to one I use for testing my raytracer. I just render test scene with someone else's renderer and compare it with my result. Do they converge to the same result? If yes than I have it right, if no, than I have it wrong.