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

groovyBC variable parallel reduce?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 5, 2013, 10:19
Default groovyBC variable parallel reduce?
  #1
Member
 
Join Date: Nov 2012
Posts: 58
Rep Power: 4
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: 3,915
Rep Power: 40
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: 4
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
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas Main CFD Forum 1 May 30, 2008 04:35
Problems with additional variable Krishna Premi CFX 1 October 29, 2007 09:19
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 05:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 13:00


All times are GMT -4. The time now is 05:35.