CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Why Laplacian is used instead of a combination of divergence and gradient operators?

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 3 Post By HakikiCanakkaleli
  • 5 Post By Bernhard
  • 1 Post By AshwaniAssam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 23, 2013, 13:13
Default Why Laplacian is used instead of a combination of divergence and gradient operators?
  #1
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13
HakikiCanakkaleli is on a distinguished road
Hi

== 1 ==

The question is why Laplacian is considered as a single operator instead of a combination of the divergence and gradient operations despite these two mathematically the same.

== 2 ==

OpenFOAM programmer's guide Version 2.2.2, page 24, raises this point without giving any justifications:

Quote:
The Laplacian is an operation that can be defined mathematically by a combination of the divergence and gradient operators by ∇2 ≡ ∇ • ∇. However, the Laplacian should be considered as a single operation that transforms a tensor field into another tensor field of the same rank, rather than a combination of two operations, one which raises the rank by 1 and one which reduces the rank by 1.
== 3 ==
Some made mention of this in the forum as follows:

Quote:
Originally Posted by bigphil View Post

...

Mathematically both expressions are the same but numerically the laplacian is calculated using a compact molecule (i.e. each face uses just the cell centre either side) whereas the second expression calculates the full gradient using all the surrounding face neighbour-neighbours and then takes the normal component.
...
== 4 ==

My guess is that changing the rank of the tensor of interest would lead to an arbitrary issue during the tensor transformation via Laplacian operator if Laplacian is implemented as a combination of the divergence and gradient operators.

== 5 ==

Many thanks for any answer.
amuzeshi, granzer and SHUBHAM9595 like this.
HakikiCanakkaleli is offline   Reply With Quote

Old   December 24, 2013, 04:12
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
I have the impression you already answered the question yourself.

If you calculated the laplacian of a scalar field, you get a scalar field and you need to add 2 or 3 derivates that you calculated with some stencil.

If you calculate the gradient first, you calculate three derivative with some stencil AND need to store the intermediate result. Then, you calculate the divergence, which again needs three derivatives. Of course the amount of calculations would not change to much depending on the order of your schemes, but in any case you would need triple the amount of memory, which is undesired in most cases. This comes at the expense of additional implementation work, which should not be the biggest concern.
Bernhard is offline   Reply With Quote

Old   December 24, 2013, 13:40
Default
  #3
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13
HakikiCanakkaleli is on a distinguished road
Many thanks!
HakikiCanakkaleli is offline   Reply With Quote

Old   September 26, 2019, 07:40
Default
  #4
Senior Member
 
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 12
AshwaniAssam is on a distinguished road
Further, to add an answer it helps in avoiding pressure velocity decoupling for cases involving such issues by the use of compact stencil. Following line at this page may be helpful.


"The second measure undertaken to avoid a decoupling of the pressure at neighbouring points is achieved by the way the Laplacian operator is discretized: It computes the gradient at the cell faces by computing the difference between neighbour and owner cell centre and dividing this difference by the distance between this two points. In this way when the sum of all gradients is taken over the faces of a cell, the computational stencil is much smaller compared with the procedure to interpolated the gradient computed at the cell centre on the faces. Furthermore it involves direct neighbours without alternately skipping neighbours."
amuzeshi likes this.
AshwaniAssam is offline   Reply With Quote

Reply


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
Green's theorem or divergence theorem? Hermano Main CFD Forum 0 November 30, 2011 16:11
buoyantSimpleFoam divergence TomS OpenFOAM Running, Solving & CFD 0 November 24, 2011 14:16
Wall correction for the temperature gradient Hagen OpenFOAM 0 March 7, 2011 20:04
Pressure Gradient and Velocity Divergence alvin11 Main CFD Forum 4 May 29, 2010 11:11
How to compute UDS fourth order gradient Emma66 FLUENT 1 April 27, 2010 05:44


All times are GMT -4. The time now is 03:48.