How to choose Smoothing Length and Artificial Viscosity

edited February 11
Hi guys,

How to choose a smoothing length. What are the criteria for choosing smoothing length? Is there a test similar to the convergence tests for the smoothing length.

I know that larger the smoothing lengths longer the simulation time. I know that having too large or too small will give unphysical results. But how can we know that a particular value is an optimal/best-fit value for a model?

Here is an example. I am currently during a sloshing tank simulation and I calculating the pressure at a particular position of the tank. I simulated for multiple smoothing length coefficients (coefh =1, 1.2, 1.5, 1.7, 2) and compared with the experiment. (blue line is the experimental maxima of the peak pressure and the green line is the experimental minima of the peak pressure).

How can I tell with is the best smoothing length value with and without considering experimental results?

Similarly, how to chose an artificial viscosity value? What are the criteria for choosing one?

Thank you

• In our experience working with wave flumes we found that:

1) H/dp>=10, so that 10 particles in one wave height is a good balance between accuracy and computational time

2) alpha(AV)=0.01

Those results can be found in Altomare et al., 2017
• So these parameters are more like hyperparameters which can only be found by multiple experiments and computational analysis.
• Yes, those parameters may need to be tuned only for some experiments, but we have also found good options for some applications (such as wave flumes). However note that the problem of choosing numerical resolution is also present in mesh-based methods where you also have to decide an initial value for the cell size, right?
• But in the mesh based method, choosing the cell size can be done by the convergence test. Is there any similar test for the SPH method.
• You can keep decreasing particle spacing until the solution does not change depending on number of particles. That is equivalent to making a finer mesh - of course currently it is not possible to do local refinement.

Kind regards
• I see the convergence in the particle spacing but not in the smoothing length. Is there any similar test for choosing the smoothing length.

Thank you
• In smoothing length the approach would be to shrink the smoothing length until changes in results are minimal. The reason for shrinking the smoothing length is to limit the amount of particles in each calculation and thereby speeding up calculation time. Maybe try shrinking with 10% at a time.

BE AWARE - that if you test a lot of different scenarios, you might have to make smoothing length analysis on all of them.

Kind regards
• edited February 18
I did the same in the above plot. I computed the pressure for different coefficients of the smoothing length i.e., coefh = 0.9, 1.0, 1.2, 1.5, 1.7, 2.0. But the amplitude of the pressure is decreased with the decrease in the coefh (I don't have a clear idea why....) and amplitude is decreased for the coefh = 2.0 (I think this is because of the smoothing due to considering the particles that are far).

And also in the above plot, the pressure amplitudes did not show any signs of convergence to a particular value but they showed a similar trend.
• Okay, I still don't understand your plot totally then. The amplitude of pressure might decrease because fewer particles are considered for each particle. Also your case might be incorrectly setup, try using an example from DualSPHysics with confirmed results and then try to redo your procedure.

Kind regards
• Alex, for the H/dp, what is H in this case? is it the h=coefh*sqrt(3*dp^2) or the value of h at the bottom in constants where h=5.1961524227E-02?

Same for dp, is it the dp that we vary or the one in constants at the bottom?
• H is the swl.
• Sorry to seem thick but what is swl?
• H is the wave height
swl is the still water level

Alex
• sorry，i think the H is the hswl at the beginning of simulating. Alex is right.
• it can be confusing....
"h" the smoothing lenght also appears as "H" in the code,
but in terms of terminology:
- h: smoothing length
- dp: initial particle distance
- H: water height
- hswl: still water level
- d: depth (so similar to hswl in some cases)
- speed of sound is computed, by defaults, as sqrt(g*hwsl)

Alex