At time step zero, this is my density
This is quite confusing, since we set it as equal to 1000 initially?
I think that they initialise the fluid particle with a hydrostatic profile. If I may add a couple of questions:
If they used a hydrostatic profile, I am suspicious over why it would not take into account the "white cutout" which is basically a boundary rectangle. I see after a few time steps it is "fixed" but it produces a small density "explosion" which is unphysical and would be nice if it was not there at all.
For your second question, I don't think the code ever estimates the position of the free-surface since no special treatment has to be provided for the free-surface in SPH. Would love to hear if I am wrong regarding this.
Your image might also suggest that the code does know where the free surface is and increases the density moving down the water column. And it starts again after having gone across the solid rectangle. This is the close-source GenCase if I am not mistaken. The Developers are in the best position to clarify all the questions above, indeed.
That is a good point!
It is probably due to as you say that the density and pressure are linked, which means a fluid further down has to have a higher density initially. My understanding was that this step would be done after all particles have been drawn, but it seems like this is done in steps..
In my case it does not have a big significance, since the water depth is fairly small, but for any case where deep water is simulated, this could be a potential issue - you would have to let the simulation run without anything happening for a few time steps for it to normalize properly.
Perhaps developers could explain how it exactly is
The particles are initially created and a density gradient by considering the hydrostatic pressure due to the water column is assigned to the particles at time=0s. Density of free-surface particles with the reference density. Note that this density or pressure gradient is computed using the maximum water column or maximum depth and it can be also adjusted defining cte B (of equation of state) by the user in the XML if needed.
@Alex Is the hydrostatic profile that of an incompressible fluid or of a weakly compressible fluid? Thanks for clarifying this
Thanks for your comment @Alex !
Still, I suppose that my initial picture shows that no the same height is used everywhere. Else there would not be a difference in density initialization below the plate and at the same fluid height other places.