|
[Sponsors] |
December 28, 2019, 08:44 |
strange in computation of normal vector
|
#1 |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Dear everyone,
I tried to plot the gradient of alpha.water and normal vector of interface using gradient of alpha.water with interFoam solver. And I found a thing that is quite strange for me as shown in the attached file. Variables are defined as: gradAlpha = fvc::grad(alpha1) nAlphaVec = gradAlpha/(mag(gradAlpha) + epsilon) with epsilon = 1.0e-8 I think that alpha1, gradAlpha and nAlphaVec should have the same contours, however, the contour of nAlphaVec is very different compare to 2 other ones. Could someone help me to explain what is the reason for that. I thank you very much |
|
December 29, 2019, 04:21 |
|
#2 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
the calculation of the surface normal should be confined to a certain alpha, representing the surface for which you wish to obtain the normal. the results you obtain make sense to me (they are not what you want, but you got what you asked for).
|
|
December 29, 2019, 07:39 |
|
#3 | |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Quote:
However, I think that I do not need to confine value of alpha for surface normal, because obviously we define as: then out of the interface, nAlphaVec should be zero because its gradient become zero, therefore it should have the same contour as gradAlpha and alpha.water. Thanks |
||
December 29, 2019, 09:13 |
|
#4 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
Quote:
Seen in other way, the value of gradAlpha is seldom truly "machine zero", hence dividing it by a rather small value may produce spurious results. by confining the operator to where it "makes sense", the problems you see may be avoided alltogether. |
|
December 29, 2019, 17:17 |
|
#5 | |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Computation of Turbulence Intensity Profile from PIV vector fields | emspinosa | Visualization & Post-Processing | 0 | October 24, 2014 07:00 |
Normal vector, slope and aspect angle | g_niro | Main CFD Forum | 0 | February 2, 2011 17:24 |
out normal vector | ztdep | Main CFD Forum | 0 | September 14, 2008 08:08 |
Normal vector to a cell??? | lagha | FLUENT | 2 | May 28, 2002 11:23 |
Normal Vector on Curved Surfaces | Karl | FLUENT | 0 | July 2, 2001 04:35 |