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

How can I calculate fieldAverage in post-processing?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 11, 2012, 15:30
Default How can I calculate fieldAverage in post-processing?
  #1
New Member
 
Join Date: Oct 2010
Posts: 13
Rep Power: 6
moritzhoefert is on a distinguished road
Dear all,

I have got results of a chtMultiRegionFoam (2.0.x) simulation and I'd like to calculate a fieldAverage of T in a given region. Does anybody know how to do that?

I know, that it is easy with function objects... but how do I call those during post processing?

Thanks a lot for your help!
Best,
Moritz
moritzhoefert is offline   Reply With Quote

Old   January 12, 2012, 05:07
Default
  #2
Member
 
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 7
Toorop is on a distinguished road
Hi,

in my experience, nothing is easy in OF!

I had a similar problem a couple of months ago with a simple case (no multi region and stuff). Always start from the simplest problem and advance forward from that point - I nice advice that I always forget ...

I checked the work around in my multi region case and the solution is:
- make a separate file for post processing in the systems folder
- this file should contain the FoamFile header and the functions.
- didn't figure it out how to handle multiple domains simultaneously, so stick with one
- the simpleFunctionObject worked for me, other postproc sampling didn't

@systems/postproc
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

functions
{
    T_air
    {
        type volumeAverage;
        functionObjectLibs ( "libsimpleFunctionObjects.so" );
        region "air";
        fields ( T );
        factor 1.0;
        verbose true;
    }
}

// ************************************************************************* //
Code:
execFlowFunctionObjects -dict postProc -noFlow -latestTime -region air
Any addition, suggestion, improvement would be welcome.
Toorop is offline   Reply With Quote

Old   January 12, 2012, 06:20
Default
  #3
New Member
 
Join Date: Oct 2010
Posts: 13
Rep Power: 6
moritzhoefert is on a distinguished road
Dear Toorop,

thanks for the reply. I was not aware of execFlowFunctionObjects. In my version of OF it does not accept the options -region and -noFlow which is why it won't work for my current problem. But in the future I will use OF 2.1 and there the options are available!

Thanks again for the hint!
All the best,
Moritz
moritzhoefert is offline   Reply With Quote

Old   January 12, 2012, 06:40
Default
  #4
Member
 
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 7
Toorop is on a distinguished road
Hi Moritz,

I have 2.0.x as well so this shouldn't be an issue. Maybe an update to your current 2.0.x would solve the problem so make a git pull and a quick rebuild.
Code:
cd $WM_PROJECT_DIR
git pull
wcleanLnIncludeAll
./Allwmake
Toorop 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
Tecplot for CFX post processing pantangi goud CFX 2 August 24, 2005 16:42
post processing CL values Joe Bryant FLUENT 2 October 18, 2004 04:17
looking for a post processing s/w han Main CFD Forum 0 May 9, 2001 22:44
PRE and POST processing package Astrid Barros Main CFD Forum 6 November 16, 2000 11:31
post processing in CFD MANISH BHARGAVA Main CFD Forum 0 October 17, 1998 20:51


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