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

[swak4Foam] Temperature Average on internal faceZone with swak4Foam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2013, 22:27
Default Temperature Average on internal faceZone with swak4Foam
  #1
New Member
 
woodwick's Avatar
 
Alessandro
Join Date: Feb 2013
Location: Italia
Posts: 15
Rep Power: 11
woodwick is on a distinguished road
Hello,

I was trying to get the average temperature over a faceZone. I installed swak4Foam and add the following lines in controlDict:
Code:
    T_averaged_CORE
    {
        type swakExpression;
        variables "T";
        valueType faceZone;
        zoneName CORE;
        accumulations (
            average
        );
        expression "average(T)";
        verbose true;
    }
but I get the following error:
Code:
--> FOAM FATAL ERROR: 
Context: "- From dictionary: . T_averaged_CORE"
No terminating ';' found in expression '"T"'
Where am I doing wrong?
woodwick is offline   Reply With Quote

Old   October 26, 2013, 22:48
Default
  #2
New Member
 
woodwick's Avatar
 
Alessandro
Join Date: Feb 2013
Location: Italia
Posts: 15
Rep Power: 11
woodwick is on a distinguished road
I solved the problem by using a similar sintax in the mass flow example
http://openfoamwiki.net/index.php/Co...e_calcMassFlow

Code:
    T_averaged_CORE
    {
        type swakExpression;
        enabled         true;
        autoInterpolate true;  
        // I introduced the previous instruction in order to avoid the error : Could not find a field name T of type scalar (neither surfaceScalarField nor volScalarField) autoInterpolate
        outputControl   timeStep;
        outputInterval  1;        
        //variables "T";
        valueType faceZone;
        zoneName CORE;
        expression "T";
        accumulations (
            average
        );        
        verbose true;
    }
woodwick is offline   Reply With Quote

Old   October 28, 2013, 18:20
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,212
Rep Power: 49
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by woodwick View Post
I solved the problem by using a similar sintax in the mass flow example
http://openfoamwiki.net/index.php/Co...e_calcMassFlow

Code:
    T_averaged_CORE
    {
        type swakExpression;
        enabled         true;
        autoInterpolate true;  
        // I introduced the previous instruction in order to avoid the error : Could not find a field name T of type scalar (neither surfaceScalarField nor volScalarField) autoInterpolate
        outputControl   timeStep;
        outputInterval  1;        
        //variables "T";
        valueType faceZone;
        zoneName CORE;
        expression "T";
        accumulations (
            average
        );        
        verbose true;
    }
OK. But you are aware that this is "only" the arithmetic average? That it only gives the "physically correct" value if all faces are of the same size. Otherwise I'd recommend the weightedAverage-accumulation (if your swak-version already has it) or implementing a area-weighted averaging in swak-terms (there are plenty examples for that)
__________________
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 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
[swak4Foam] time average sample set with swak4Foam cnsidero OpenFOAM Community Contributions 3 July 30, 2018 10:06
Anys Average temperature apo FLUENT 2 November 4, 2014 12:31
time derivative of average temperature will_ca OpenFOAM Post-Processing 0 September 10, 2014 11:49
mass weighted average temperature along a curve preetam69 FLUENT 1 July 5, 2013 02:48
[swak4Foam] Mass flow through faceZone using swak4foam when running in parallel billie OpenFOAM Community Contributions 22 May 14, 2013 07:20


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