CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] groovyBC variable parallel reduce?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2013, 10:19
Default groovyBC variable parallel reduce?
  #1
Member
 
Join Date: Nov 2012
Posts: 58
Rep Power: 13
startingWithCFD is on a distinguished road
Hello there!

I would like to impose a boundary condition based on the amount of mass which is inside my domain, as follows

Code:
        type            groovyBC;
        ...
        variables
        (
            ...
            "Mass{cellSet'allCells}=sum(rho*vol());"
            ...
        );
        valueExpression "bananas*Mass";
The problem is that when the problem is decomposed, Mass contains the value corresponding to the current processor domain. Is there a way to force a parallel reduce operation?
startingWithCFD is offline   Reply With Quote

Old   April 5, 2013, 13:52
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by startingWithCFD View Post
Hello there!

I would like to impose a boundary condition based on the amount of mass which is inside my domain, as follows

Code:
        type            groovyBC;
        ...
        variables
        (
            ...
            "Mass{cellSet'allCells}=sum(rho*vol());"
            ...
        );
        valueExpression "bananas*Mass";
The problem is that when the problem is decomposed, Mass contains the value corresponding to the current processor domain. Is there a way to force a parallel reduce operation?
The question is "is there a way to force swak to NOT do a parallel reduce?". To which I would have to say "No".

Seriously: functions like sum, max, min AUTOMATICALLY reduce over all processors (if you find instances where this isn't the case: report a bug). In my mind this is the only behaviour that makes sense for this application
__________________
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
gschaider is offline   Reply With Quote

Old   April 8, 2013, 03:36
Default
  #3
Member
 
Join Date: Nov 2012
Posts: 58
Rep Power: 13
startingWithCFD is on a distinguished road
Great, thanks for the answer :-)
I guess I reached a conclusion too fast!
startingWithCFD is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running parallel case after parallel meshing with snappyHexMesh? Adam Persson OpenFOAM Running, Solving & CFD 0 August 31, 2015 22:04
Can not run OpenFOAM in parallel in clusters, help! ripperjack OpenFOAM Running, Solving & CFD 5 May 6, 2014 15:25
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel JR22 OpenFOAM Running, Solving & CFD 2 April 19, 2013 16:49
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 04:35
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 12:00


All times are GMT -4. The time now is 00:49.