|
[Sponsors] |
[swak4Foam] different values between swakExpression & faceSource areaAverage |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 8, 2014, 13:50 |
different values between swakExpression & faceSource areaAverage
|
#1 |
New Member
Fabien DOS SANTOS
Join Date: Oct 2009
Location: Nevers, FRANCE
Posts: 8
Rep Power: 17 |
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:
Someone can explain me what is the problem with my swakExpression ? Or maybe the problem comes from faceSource ?? Best regards, Fabien. |
|
January 8, 2014, 15:03 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
January 9, 2014, 06:40 |
|
#3 | |||
New Member
Fabien DOS SANTOS
Join Date: Oct 2009
Location: Nevers, FRANCE
Posts: 8
Rep Power: 17 |
Thanks for your help gschaider!
Quote:
Quote:
Quote:
Best regards, Fabien |
||||
January 9, 2014, 10:56 |
|
#4 |
New Member
Fabien DOS SANTOS
Join Date: Oct 2009
Location: Nevers, FRANCE
Posts: 8
Rep Power: 17 |
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:
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. |
|
January 9, 2014, 17:27 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
January 13, 2014, 04:05 |
|
#6 |
New Member
Fabien DOS SANTOS
Join Date: Oct 2009
Location: Nevers, FRANCE
Posts: 8
Rep Power: 17 |
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! |
|
January 22, 2014, 20:39 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
December 23, 2015, 12:29 |
|
#8 | |
New Member
Join Date: Sep 2015
Location: Germany
Posts: 11
Rep Power: 11 |
Quote:
|
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TimeVaryingMappedFixedValue | irishdave | OpenFOAM Running, Solving & CFD | 32 | June 16, 2021 07:55 |
using chemkin | JMDag2004 | OpenFOAM Pre-Processing | 2 | March 8, 2016 23:38 |
Setting patch field values equal to internal field values | leroyv | OpenFOAM Programming & Development | 1 | October 21, 2014 16:49 |
Loading Cell Values in Tecplot | P1361 | OpenFOAM Post-Processing | 3 | September 16, 2014 05:02 |
Plotting raw data values | Wilesco | Siemens | 0 | January 5, 2006 06:34 |