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

Temperature Average on internal faceZone with swak4Foam

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

Reply
 
LinkBack Thread Tools 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: 3
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: 3
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, 19:20
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,803
Rep Power: 38
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
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
swak4Foam Warning messages during runtime postprocessing caduqued OpenFOAM Post-Processing 3 June 5, 2013 16:58
Problem with zeroGradient wall BC for temperature - Total temperature loss cboss OpenFOAM 9 January 28, 2013 13:11
temperature dependent internal heat generation dbrodrigues ANSYS 0 March 31, 2012 01:16
Bulk mean fluid temperature in internal flow mssound FLUENT 0 May 13, 2010 15:56
Temperature in vessel during throttling process Astrid Main CFD Forum 2 January 31, 2001 02:34


All times are GMT -4. The time now is 06:19.