0
$\begingroup$

I'm currently trying to implement a simple SPH simulation based on a variety of papers. However as I'm not a trained physicist nor mathematician I have a small issue with the following notation and formulation repeated in a number of different papers and internet sites:

and $\nabla_a$ denotes the gradient taken with respect to the coordinates of particle $a$.

As far as I can tell this is the first paper using this description.

So what is meant by this notation? Is it simply a vector with a partial derivative for each dimension? Or is it something like a directional derivative?

$\endgroup$
6
  • $\begingroup$ The grad of a scalar field is a vector field, so I would guess that $\nabla_a$ simply means the $a$th component of the vector. $\endgroup$ Commented Jun 25, 2013 at 8:34
  • $\begingroup$ Not absolutely sure what you mean, however $a$ is particle, so the $a$th component doesn't make sense. $\endgroup$
    – eric
    Commented Jun 25, 2013 at 8:55
  • $\begingroup$ Oops yes, I didn't read your question carefully enough. Ignore my comment! $\endgroup$ Commented Jun 25, 2013 at 9:04
  • $\begingroup$ It's indeed a vector (with as length the number of dimensions) with a partial derivative as each component. $\endgroup$
    – Vibert
    Commented Jun 25, 2013 at 9:05
  • $\begingroup$ I don't think it can be stated simpler than the definition you gave. If you have n particles ($p_{1}$, $p_{2}$, ..., $p_{n}$) then the gradient for the ith particle would be denoted $\nabla_{i}$. $\endgroup$
    – MoonKnight
    Commented Jun 25, 2013 at 9:06

3 Answers 3

3
$\begingroup$

The explict notation is the folowing.

you have i,j particle indexes, and you have the following definitions:

$\vec r_{ij} = \vec r_j - \vec r_i $ , where $\vec r_i$ is the position of the $i$-th particle.

$W(\vec r_{ij},h_i)$ is the smoothing-kernel evaluated between the 2 SPH particles, using the smoothing parameter of the j-th particle.

The notation he uses is the following:

$\nabla_i W_{ij}(h_i) = \frac{\partial W(\vec r_i - \vec r_j,h_i)}{\partial \vec r_i}$

In (most) hidrodynamic aplications of SPH, the usual convention is that for all i, $h_i=h$ is fixed, and $W(\vec r_{ij},h) = w(\frac{|\vec r_i-\vec r_j|}{h})$, and so, you can think that you have an $W(\vec r)$ and you have $\nabla W = \nabla w(r) = w'(r)\hat r$, ando so, in this case, we write:

$\nabla_i W_{ij}(h_i) = w'(r_{ij},h)\frac{\vec r_i - \vec r_j}{|\vec r_i - \vec r_j|}$

and so, you have an explicit formula for this gradient with respect to the i-th particle

It's possible to formulate an SPH formula with $h_i$ depending on the particle, and on the near particles (through the, implicit, dependence on $\rho_i$), and when you do that, you need to introduce 'correcting schemes', which involve calculating things like $\Omega_i = 1-\frac{\partial h_i}{\partial \rho_i}\sum_k m_k\frac{\partial W}{\partial h_i}(r_{ij},h_i)$

I personally don't like this kind of 'correction scheme' which involves changing the smoothing parameter(or using constant, but different parameters for each particle), but, it's a legit try, and in many occasions it works. Still, it makes difficult to enforce symmetries and conservations laws on the system based only on the equations of movement.

$\endgroup$
4
  • $\begingroup$ So if the smoothing parameter $h$ is the same $\nabla_{r_i}$ and $\nabla_{r_j}$ is exactly the same explicit formula? $\endgroup$
    – eric
    Commented Jun 26, 2013 at 7:00
  • $\begingroup$ There is a minus sign, $\nabla_{r_i} W_{ij}(\vec r_i-\vec r_j,h) = - \nabla_{r_j} W_{ij}(\vec r_i-\vec r_j,h) = +\nabla_{r_j} W_{ji}(\vec r_j-\vec r_i,h)$ $\endgroup$
    – Hydro Guy
    Commented Jun 26, 2013 at 12:25
  • $\begingroup$ @ewolter, You are planning to use SPH for what? Graphic Animations/Games? $\endgroup$
    – Hydro Guy
    Commented Jun 27, 2013 at 14:26
  • $\begingroup$ Nothing specifically at the moment, just wanted to try it for ages. But I'm definitely more interested in applying it to games. $\endgroup$
    – eric
    Commented Jun 29, 2013 at 14:00
1
$\begingroup$

Suppose you have a quantity depending on multiple coordinate sets. $ f(x_i,y_i,z_i,x_j,y_j,z_j)$ the gradient $\nabla_i$ indicates that you must take the gradient with respect to $x_i,y_i,z_i$. A 1 dimensional example to make it explicit. Suppose we have the following $$ f(x_1,x_2,x_3) = \exp(-x_1)*x_2 - x_3 $$ (where $x_i$ denotes the coordinate of the $i$'th particle), then $$\nabla_1 f \equiv \frac{\partial}{\partial x_1} f = -\exp(-x_1)*x_2.$$

$\endgroup$
1
  • $\begingroup$ The 1D examples helps in some ways but hurts in others, since the gradient has been reduced to a scalar, which is not in general the case. $\endgroup$
    – user10851
    Commented Jun 25, 2013 at 17:54
0
$\begingroup$

Suppose a $n$ dimensional vector space.

Each vector $\vec x$ belonging to this vector space has $n$ coordinates $(x)_{1}, (x)_{2}, ...(x)_{n}$

Suppose now that you have a function $\Phi$ of several vectors : $$\Phi = \Phi (\vec x_a, \vec x_b,..... \vec x_l)$$

Then $\vec \nabla_a \Phi$, for instance, is the vector of coordinates: $$\frac{\partial \Phi}{\partial (x_a)_{1}}, \frac{\partial \Phi}{\partial (x_a)_{2}},....,\frac{\partial \Phi}{\partial (x_a)_{n}}$$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.