InteractiveComputerGraphics / SPlisHSPlasH

SPlisHSPlasH is an open-source library for the physically-based simulation of fluids.
https://splishsplash.physics-simulation.org/
MIT License
1.56k stars 285 forks source link

Density (ie: amount) of particles when comparing to FVM results? #57

Closed cesss closed 3 years ago

cesss commented 4 years ago

Hi!

I suppose the answer to this question depends on the fluid properties and in the problem being simulated, but let's suppose for example that you want to compare the simulation of a 2-phase fluid done with SPlisHSPlasH to the results of the same problem simulated with a Finite Volume Method approach.

If the finite volumes are cubes whose side length is a, how many particles would you initially put in each a * a * a cube to begin with? Of course it will be necessary to adjust some important settings in both simulations (SPH and FVM), such as turbulence model for example, but you cannot confirm if the turbulence models you use are properly chosen if you are not using an adequate number of particles...

mskr commented 4 years ago

Hi, interesting question. I cannot give you a definite answer, because I'm only a student. But since spatial discretization in FVM is done with a mesh, where in the cube example, 4 nodes define a control volume, I would say only 4 particles would yield a comparable resolution. I am thinking of particles as mesh nodes/vertices, without connecting edges, but still fulfilling the same purpose which is spatial discretization.

If you are really after the density variable, it might be completely unrelated, because density is stored on the particles and on the mesh, respectively. The flow of density in the velocity field should be, as far as I understand it, unrelated to the number of computational points. Remember that a particle actually represents a huge set of molecules in the usually simulated macroscopic scales.

Is your FVM simulation Lagrangian or Eulerian?

However, I think it is very difficult to compare SPH and FVM at such a detailled level that is required to compare turbulence simulation. While there are a few different turbulence models in FEM software (which may use FVM despite the name) such as RANS (k-e, SST...) or Large Eddy, I don't know of any analog in the SPH world.

Please correct me if I tell half-truths ;-)