CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Derivation of Gradient in SPH

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2012, 19:49
Default Derivation of Gradient in SPH
  #1
New Member
 
Scott Kulp
Join Date: Feb 2012
Posts: 3
Rep Power: 14
sckulp is on a distinguished road
I'm having a tricky time with the gradient using the SPH method. The standard SPH formulation makes sense:

A(\mathbf{r})=\int A(\mathbf{r'})W(\mathbf{r}-\mathbf{r'},h)d\mathbf{r'}

To find the gradient, integrate by parts:

\nabla A(\mathbf{r})=\int \nabla A(\mathbf{r'})W(\mathbf{r}-\mathbf{r'},h)d\mathbf{r'}

=\int\limits_{\Gamma} A(\mathbf{r'})W(\mathbf{r}-\mathbf{r'},h)d\Gamma-\int A(\mathbf{r'})\nabla W(\mathbf{r}-\mathbf{r'},h)d\mathbf{r'}

The first term is zero, since W(r,h)=0 for r>=h. So, we are left with

\nabla A(\mathbf{r})=-\int A(\mathbf{r'})\nabla W(\mathbf{r}-\mathbf{r'},h)d\mathbf{r'}\approx -\sum\limits_j \frac{m_j}{\rho_j}A(\mathbf{r}_j)\nabla W(\mathbf{r}-\mathbf{r_j},h)

However, the papers I am looking at [1] state

\nabla A(\mathbf{r})\approx \sum\limits_j \frac{m_j}{\rho_j}A(\mathbf{r}_j)\nabla W(\mathbf{r}-\mathbf{r_j},h)

That is, there is no minus sign. I feel that I'm missing some stupid mistake, but I've been looking at it for a while, and I don't see it.

Thanks in advance!

[1] J.J. Monaghan. "Smoothed Particle Hydrodynamics and Its Diverse Applications." Annual Review of Fluid Mechanics, Vol. 44: 323 -346. January 2012
sckulp is offline   Reply With Quote

Old   August 31, 2012, 08:51
Default
  #2
New Member
 
mehdi
Join Date: Nov 2010
Location: Tehran
Posts: 16
Rep Power: 15
mehdi kamyabi is on a distinguished road
Dear Scott Kulp

It came from a little astute trick, I advise you to read page 43 and 44 of the book "Smoothed particle hydrodynamic particle a meshfree particle method" by G.R.Liu and M.B Liu in order to understand what happened.
mehdi kamyabi is offline   Reply With Quote

Old   August 31, 2012, 10:46
Default
  #3
New Member
 
Scott Kulp
Join Date: Feb 2012
Posts: 3
Rep Power: 14
sckulp is on a distinguished road
This book is really nice and very informative. I see that equation 2.22 is basically the same as I wrote above (though 2.22 is the divergence), with the negative, and I do understand that. However, in the summary on page 44, equation 2.25 is not negative. I don't see any explanation on why the negative was removed... Any thoughts?

Thanks!
sckulp is offline   Reply With Quote

Old   August 31, 2012, 12:20
Default
  #4
New Member
 
mehdi
Join Date: Nov 2010
Location: Tehran
Posts: 16
Rep Power: 15
mehdi kamyabi is on a distinguished road
I understood your question first time,however I think the answer is in page 44 where the authors wrote : "it should be noted that grad(i)Wij is taken with respect to particle i so the negative sign in equation (2.21) is removed in equation (2.25)."

I agree with you there is an vagueness in the notation formulas,maybe we can say the mistake, but the concept is true, W is an even function so grad(W) is an odd one
it means W in the equation 2.25 is the symmetry as W in equation 2.22 because the first is about all neighbors(which detected by j counters) and second is about the determined particle itself (i), maybe if you put Wji instead of Wij in eq 2.22 everything become correct.
mehdi kamyabi is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vortex cause pressure gradient or pressure gradient induce vortex? fruitkiwi Main CFD Forum 4 June 12, 2012 02:12
sph -- scalar gradient diedro Main CFD Forum 0 September 7, 2011 08:45
Pressure Gradient in channelOodles sega OpenFOAM Running, Solving & CFD 14 August 12, 2009 07:21
can I use static enthalpy gradient to describe dT Jay CFX 0 August 7, 2008 00:01
How to compute gradient for non-orthogonal grids? Paul Hsieh Main CFD Forum 3 November 11, 2003 05:52


All times are GMT -4. The time now is 19:38.