# Wendland.awen and Wendland.bwen

Hello

I understand that awen comes from 7/4pi = 0.557 in the 2D case, but I cannot figure out where bwen comes from?

My understanding is that the "-" comes because of "odd^3" will always produce odd, and that the extra 1/h comes from gradient estimation. Could anyone kindly explain it in bit more detail / show me briefly the math to derive -2.7852?

Kind regards

• Does anybody know or some literature where it is clearly explained?

Kind regards

• Does no one know where -2.7852 comes from?

• edited December 2022

Okay, I finally realized how. Say we have:

Then it is easy to prove "0.557", since:

But how to prove -2.7852?

The trick is to realize, that the derivative of W w.r.t. q, which is needed for the gradient calculation is given as:

Where we spot that the factor 5 is present. If we multiply on 0.557 from before:

5*7/4pi = 2.78521150411

Which is equal to 2.78! Now we only need to find out where the minus sign comes from. One can simply rewrite the parentheses as such:

And now with -5, we have -2.78.

So this is how it came to be.

I am unsure as to why one would do this, because why not just take +- 5/8 and remove the factors completely? Perhaps for some historical reasons, @Alex might be able to explain, but I see other SPH codes uses a similar approach

EDIT: The extra "h" in the denominator comes from when one makes the math to get the gradient, then a factor 1/h is produced.

Kind regards

• Looking at the derivative calculation in DualSPHysics (fac) I get a bit worried, because I do not see the divide by 8 any where, and that it uses 1-0.5q, instead of 2-q, which I cannot figure out why.

In the return statement I also see that "dr (relative displacement between point 1 and point 2 in one direction)" is missing, but further in the code for In/Out I see how this function is used:

So that part is correct. What I cannot get to match is:

1. Why 1-0.5q, instead of 2-q as shown in my derivation?
2. Where is the divide by 8 factor? It is not present in the -2.78 number.

Kind regards