|
[Sponsors] |
September 14, 2012, 05:52 |
Laplace, Grad, snGrad of T
|
#1 | |
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 14 |
I have a constant Temperature field with T=300:
Quote:
fvc::snGrad(T) = 0 fvc::grad(T) != 0 fvc::laplacian(constant,T) != 0 Having a constant Temperture field, I assume, that the gradient is zero. But in OF it is not zero!!! Using a vectorField (like U with Ux,Uy,Uz) the gradient is 0, that is ok. The problem occurs when solving a temperature equation, where the laplacian is calculated. If the laplacian of a constant temperature field is not zero, I get wrong results. Can anyone help? |
||
September 17, 2012, 09:43 |
|
#2 |
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 14 |
I tried different numerical schemes for grad and laplacian:
grad(T) - Gauss linear: not correct - leastSquares: ok - fourth: ok snGrad(T) - corrected: ok - uncorrected: ok laplacian(x,T) - Gauss xxxxxxx, uncorrected: not correct It seems, there is a problem with Gaussian differencing schemes. When I use them on a constant field, I get grad/laplacian which is not zero. |
|
September 17, 2012, 10:13 |
|
#3 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
Hi,
are the grad/laplacian fields non-zero everywhere in your domain or only in certain places (skewed cells, boundary cells, …)? Philip |
|
September 17, 2012, 11:00 |
|
#4 | |
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 14 |
Only in certain places:
grad(T)= Quote:
|
||
September 17, 2012, 11:13 |
|
#5 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
OK,
What are the certain places? Are they poor cells or boundary cells? It is very difficult to determine the problem without sufficient information. The gradients you have given are very very small (less than 1e-13) and as such can be considered zero for most applications as you are approaching the machine tolerance. Philip |
|
September 17, 2012, 11:34 |
|
#6 |
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 14 |
Thanks for your answer, Philip!
It seems, that all cells have wrong values (see picture). You are right, the values are very small, but unfortunately too high for the problem I am working on. These 'invented' temperatures induce a local fluid movement which destroyes my simulation. Anyway the gradient of a constant temperature fields must be zero. |
|
September 17, 2012, 11:50 |
|
#7 | |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
Quote:
As a computer can only store to a certain precision for double precision floating point number, then you would expect that the gradient would be zero within this tolerance. I believe the non-zero numbers you are seeing are due to this tolerance. If your simulations are sensitive to such very small numbers then you should consider using different base units (i.e. MPa instead of Pa, mm instead of m, etc.). Philip |
||
September 18, 2012, 08:13 |
|
#8 |
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 14 |
Thank you!
When using a 0-temperature field, gradient and laplace are zero, too. It is not perfect yet, but acceptable. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why define a grad Scheme when using linearUpwind? | Benedikt | OpenFOAM Pre-Processing | 2 | August 10, 2019 09:19 |
gauss grad no correction for coupled boundary??!! | doubtsincfd | OpenFOAM | 0 | December 19, 2011 19:19 |
advanced function with snGrad | Ingenierias2003 | OpenFOAM | 0 | July 21, 2011 10:29 |
Grad evaluation | cfdmarkus | OpenFOAM Bugs | 2 | July 16, 2009 19:54 |
Stokes: Laplace vs. elasticity formulation (P1nc-P0) | walli | Main CFD Forum | 0 | May 4, 2009 10:42 |