different values between swakExpression & faceSource areaAverage
Hello,
I'm trying to calculate an area-weighted averaging of a field (gamma) in a arbitrary plane. First at all I did it with faceSource, cuttingPlane and the operation areaAverage: PHP Code:
I'm using this code: PHP Code:
http://img32.imageshack.us/img32/9551/v0rn.jpg Someone can explain me what is the problem with my swakExpression ? Or maybe the problem comes from faceSource ?? Best regards, Fabien. |
Quote:
This sounds completely stupid but could you please try the same surface-type (cuttingPlane) with swak (I've seen differences in the results in the past with plane vs cuttingPlane). Also try "area()" and see if the total area of the plane is correct (you should know that from your geometry). If the problem persists: which swak-version? Which OF-version? |
Thanks for your help gschaider!
Quote:
http://img13.imageshack.us/img13/9515/1awl.jpg Quote:
Quote:
Best regards, Fabien |
I think the problem of the configuration swak+cuttingPlane comes from the interpolate function. All the previous results used "interpolate true;". I changed it to "interpolate false;", then faceSource and swak with cuttingPlane give me (almost) the same result:
http://imageshack.us/a/img542/2724/oeei.jpg I tried also to used "plane" with faceSource and it gives the same results that "plane" with swak. So the main difference is between plane and cutting plane. Also, there is a difference on the face number: 31 for plane and much more for cuttingPlane (129). In reality I have 16 cells. So I think the plane's average result should be the correct answer. Someone can explain me what is the difference between cuttingPlane and Plane ?? best regards, Fabien. |
Quote:
|
Ok thanks.
So plane with faceSource or swak gives the same results when I don't use interpolation. If I active interpolation, I get a different result than previously (why not!), but the problem is that the result is different between faceSource and swak... I don't know where is the truth! :( |
Quote:
One possibility to check the "truth" is to calculate an expression whose value depends on the surface but whose value you already know. For instance the sum of "area()" (that should be the total area of the plane) - that would be independent of the interpolation. |
Quote:
|
All times are GMT -4. The time now is 13:48. |