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

integrate several fields

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   January 31, 2014, 19:35
Default
  #21
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,862
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by maalan View Post
At last I got it!! This is an example of the correct expression... I just wanted to call the value of the field on another patch...

Code:
    {
        type swakExpression;
        valueType patch;
        variables (
            "ddtUin{INLET}=(U-oldTime(U))/deltaT();"
            "ddtV{BODY}=(U-oldTime(U))/deltaT();"
        );
        patchName CYLINDER;
        accumulations (
            sum
        );
        expression "(ddtV-ddtUin)&normal()*area()";
        verbose true;
}
Now I have another problem... I know that to set a velocity ramp at the inlet one can do it by using both the uniformFixedValue function in OF and groovyBC. Well, I would like to set a ramp with the freestream BC and it's not possible to do it with 'uniformFixedValue', so is there any way to do it with groovyBC??

Thank you so much, Bernhard!!
Best!
Of course. By using the fractionExpression to switch between gradientExpression and valueExpression you can emulate something like the freestream BC
__________________
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   February 7, 2014, 06:21
Default
  #22
Member
 
Join Date: Jun 2011
Posts: 59
Rep Power: 5
maalan is on a distinguished road
Quote:
Of course. By using the fractionExpression to switch between gradientExpression and valueExpression you can emulate something like the freestream BC
Thank you bernhard, but would you mind to explain further about this BC?? I have looked for this everywhere without success!!

Best,
maalan is offline   Reply With Quote

Old   February 13, 2014, 19:54
Default
  #23
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,862
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by maalan View Post
Thank you bernhard, but would you mind to explain further about this BC?? I have looked for this everywhere without success!!

Best,
I only help with technical aspects of swak/groovyBC. The physics you've got to work out yourself.

Usually the best way is to sit down with a piece of paper "If the flow goes the BC is a Dirichlet condition with this expression else a Neuman with this gradient expression". Implementing this in groovyBC is then pretty straightforward (if you understand the meaning of the phi-field - but this has been explained numerous times here on the MessageBoard and on the Wiki)
__________________
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

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
The mysterious _0 fields stevenvanharen OpenFOAM Running, Solving & CFD 2 January 4, 2011 08:24
Missing fields in reconstructPar flowris OpenFOAM 1 July 9, 2010 03:48
domainIntegrate, dieselFoam and Lagrangian Fields mturcios777 OpenFOAM 0 May 14, 2010 16:16
PostChannel maka OpenFOAM Post-Processing 5 July 22, 2009 10:15
Integrate Variables using PAraFoam nandiganavishal OpenFOAM Post-Processing 2 April 17, 2009 13:38


All times are GMT -4. The time now is 02:46.