|
[Sponsors] |
[swak4Foam] problems using "accumulations (weightedAverage)" in parallel |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 8, 2014, 05:57 |
problems using "accumulations (weightedAverage)" in parallel
|
#1 |
New Member
Sam Fredriksson
Join Date: Dec 2010
Posts: 20
Rep Power: 15 |
I have started to use swak4foam which seems to be a very interesting and powerful tool. I have though some problems as below.
I would like to use swak4foam to monitor RMS and mean for U and T during runtime. I have managed to do that in serial but get into trouble when doing it in parallel. As an example in my controlDict: libs ( "libOpenFOAM.so" "libsimpleSwakFunctionObjects.so" ); functions { TMean { type swakExpression; valueType surface; surfaceName monitoringSurface1; surface { type plane; basePoint (0 0 0.1023); normalVector (0 0 1); interpolate false; } functionObjectLibs ("libsampling.so"); outputControlMode timestep; outputInterval 1; zoneName monitoringZone1; accumulations (weightedAverage); expression "T"; verbose true; } } [1] --> FOAM FATAL ERROR: [1] Can not construct weight field of the expected size. For sizes on the processors see above [1] [1] [1] From function SampledSurfaceValueExpressionDriver::weightsNonPoi nt [1] in file SampledSurfaceValueExpressionDriver.C at line 316. Is this a general problem or something I have done wrong in my setup of the case? I then tried to use the "sum" function which would work (although not ideal) in this specific situation since all my cells are of the same size. It worked in parallel but then I get the twize the actual result - is this expected? libs ( "libOpenFOAM.so" "libsimpleSwakFunctionObjects.so" ); functions { TSum { type swakExpression; valueType surface; surfaceName monitoringSurface1; surface { type plane; basePoint (0 0 0.1023); normalVector (0 0 1); interpolate false; } functionObjectLibs ("libsampling.so"); outputControlMode timestep; outputInterval 1; zoneName monitoringZone1; accumulations (sum); expression "T"; verbose true; } } Regards, Sam |
|
January 8, 2014, 09:36 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
No. 2times the actual result shouldn't happen. You've got 2 CPUs and get EXACTLY 2 times the result (äh. Have you tried 3 CPUs?) In both cases I'd be interested in simple example cases to reproduce the problem
__________________
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 8, 2014, 10:09 |
|
#3 |
New Member
Sam Fredriksson
Join Date: Dec 2010
Posts: 20
Rep Power: 15 |
Thanks for your fast reply
I checked out the swak4foam version as svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam/ swak4Foam_2.x and the problem is running under openfoam/2.1.x-20120306 I do not think the 2 multiplyer has something to do with the number of CPU (could it be something with calculating both side of the face). I have now tried with both 16 and 32 wtih the same result. Since the case I am running is with a solver I have developed from one of the standard solvers I will try to make a simpler case with a standard solver and see if my problems persist. Regards, Sam |
|
January 8, 2014, 11:09 |
|
#4 |
New Member
Sam Fredriksson
Join Date: Dec 2010
Posts: 20
Rep Power: 15 |
I have now used the tutorial channel395 and changed the
system/controlDict as: ... libs ( "libOpenFOAM.so" "libsimpleSwakFunctionObjects.so" ); functions { fieldAverage1 { type fieldAverage; functionObjectLibs ( "libfieldFunctionObjects.so" ); enabled true; outputControl outputTime; fields ( U { mean on; prime2Mean on; base time; } p { mean on; prime2Mean on; base time; } ); } UMean { type swakExpression; valueType surface; surfaceName monitoringSurface1; surface { type plane; basePoint (2.1 0 0); normalVector (1 0 0); interpolate false; } functionObjectLibs ("libsampling.so"); outputControlMode timestep; outputInterval 1; // zoneName monitoringZone1; accumulations (weightedAverage); expression "U"; verbose true; } UMean_SUM { type swakExpression; valueType surface; surfaceName monitoringSurface1; surface { type plane; basePoint (2.1 0 0); normalVector (1 0 0); interpolate false; } functionObjectLibs ("libsampling.so"); outputControlMode timestep; outputInterval 1; // zoneName monitoringZone1; accumulations (sum); expression "U"; verbose true; } } // ************************************************** *********************** // and constant/polyMesh/blockMeshDict (to make it easier to compare the values) as: ... blocks ( hex (0 1 3 2 6 7 9 8) (40 25 30) simpleGrading (1 1 1) hex (2 3 5 4 8 9 11 10) (40 25 30) simpleGrading (1 1 1) ); ... and ran it both in serial and parallel (4 cpus) and get the same kind of problems. Regards, Sam |
|
January 8, 2014, 13:42 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
http://sourceforge.net/apps/mantisbt...l_bug_page.php to make sure that it will get looked at. Thanks PS: the version you're using is the last release. The public development version (the mercurial-repository) might or might not have already a fix for this
__________________
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, 03:53 |
|
#6 |
New Member
Sam Fredriksson
Join Date: Dec 2010
Posts: 20
Rep Power: 15 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] problems running in parallel on Mac OS X and Windows: only 1 cpu | windscion | OpenFOAM Installation | 20 | June 5, 2020 17:27 |
directMapped + regionCoupling + parallel problems | elisabet | OpenFOAM Running, Solving & CFD | 15 | October 3, 2018 11:04 |
[OpenFOAM.org] Problems with using MPIRUN/run cases in parallel in OpenFOAM 4.1 | Proportion | OpenFOAM Installation | 1 | August 25, 2017 14:43 |
MPI parallel meet problems | jiaojiao | OpenFOAM | 1 | May 10, 2016 03:30 |
Problems with "polyTopoChange" on parallel?!? | daZigeiner | OpenFOAM Programming & Development | 0 | March 14, 2011 11:05 |