Laplace, Grad, snGrad of T
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? 
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. 
Hi,
are the grad/laplacian fields nonzero everywhere in your domain or only in certain places (skewed cells, boundary cells, …)? Philip 
Only in certain places:
grad(T)= Quote:

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 1e13) and as such can be considered zero for most applications as you are approaching the machine tolerance. Philip 
1 Attachment(s)
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. 
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 nonzero 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 
Thank you!
When using a 0temperature field, gradient and laplace are zero, too. It is not perfect yet, but acceptable. :) 
All times are GMT 4. The time now is 10:11. 