Report Code inconsistent with the Guide of DeltaSPH

Dear DualSPHysics team,

In DeltaSPH for density correction, the formula in the guide is

While in the code:

So i guess is it the mistake of the guide?

With best Regards.


  • Hi Kyushu_panda,

    The δ-SPH formulation in the guide and code are correct.
    The answer is simple but I appreciate why it might be confusing (also please refer to the articles cited within our guides):

    The δ-SPH term is (ρ_b-ρ_a) as in the guide thus, by simplifying with the ρ_b (of the volume term) it becomes (1-ρ_a/ρ_b). This is correct and you have shown that above.

    Now look at the first term on the RHS of Eq. 15 on the guide:
    dρ/dt=-ρdivu + δ_SPH

    We choose to write that term as u_ab and not u_ba thus, the sign on the first term of Eq. 15 is positive and not negative and therefore the sign on the δ-SPH should be minus giving you:

    (ρ_a/ρ_b-1) as it is in the code.

    hope this helps.

Sign In or Register to comment.