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

Calculate flux across surface

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 20, 2016, 11:44
Default
  #7
Senior Member
 
Thomas Oliveira
Join Date: Apr 2015
Posts: 114
Rep Power: 12
t.oliveira is on a distinguished road
Quote:
Originally Posted by t.oliveira View Post
I need to compute the integral of U over a plane defined by its basePoint and normalVector. Could you please shed some light on how to do it?
Use the following function object:

Code:
functions
{
    flux
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");

        enabled         true;
        outputControl   outputTime;
        surfaceFormat   off;

        // Output to log&file (true) or to file only
        log             true;
        // Output field values as well
        valueOutput     true;
        // Type of source: patch/faceZone/sampledSurface
        source          sampledSurface;        
        //// if sampledSurface: dictionary with a sampledSurface
        //// Note: will not sample surface fields.
        sampledSurfaceDict
        {           
            type            plane;
            basePoint       (8.1e-4 0 0);
            normalVector    (1 0 0);
            interpolate       false;
        }
        operation       areaNormalIntegrate;
        fields
        (
            U
        );
    }
}
I saved it in a file called system/integrateOnSurfaceDict, instead of writing it on the bottom of controlDict, just to keep it more organised.

Use it executing:

Code:
execFlowFunctionObjects -dict system/integrateOnSurfaceDict -noFlow
To find out this solution, I started looking some examples on /src/postProcessing/functionObjects. It is a good starting point.

I tried also using cuttingPlane instead of plane, and interpolate true, and got slightly different results. If I put the plane over a patch, the usage of plane and interpolate false gave the same result as running
Code:
patchIntegrate U <patchName>
Best wishes,

Thomas
t.oliveira is offline   Reply With Quote

 

Tags
flux calculation, integrate


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
How to specify surface flux of a species? ked FLUENT 18 February 15, 2022 15:03
Total heat transf. rate vs Total surface heat flux Renato Sousa FLUENT 1 April 14, 2020 03:27
Symmetry and total surface heat flux CCHunter FLUENT 2 November 8, 2017 04:47
how to Calculate heat flux??? sandip Main CFD Forum 0 December 4, 2009 04:58
Total Heat Transfer Rate & Total Surface Heat Flux Mismatch icaro FLUENT 0 November 24, 2009 07:01


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