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 Tree10Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 24, 2023, 23:03
Default Integrating over cells instead of nodes
  #21
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 7
farzadmech is on a distinguished road
Dear Oliveira
Thanks for your piece of code, but it integrate over points and not cells. Do you know how can I use this code but integrate over cells instead of nodes?

Thanks,
Farzad

Quote:
Originally Posted by t.oliveira View Post
This is an updated version that works with OpenFOAM 5.x:

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

        enabled          true;
        writeControl     outputTime;
        writeInterval    1;
        writeFields      false;

        name myName;

        // regionType: patch/faceZone/sampledSurface
        regionType sampledSurface;

        sampledSurfaceDict
        {
            type                  plane;
            planeType             pointAndNormal;
            pointAndNormalDict
            {
                point  (0.1 0 0);
                normal (1 0 0);
            };
            interpolate false;
        }

        // Operation: areaAverage/sum/weightedAverage/...
        operation    areaNormalIntegrate;
        fields
        (
            U
        );
    }
}
Use it executing:

Code:
postProcess -fields "(U)" -dict system/integrateOnSurfaceDict
Best wishes,

Thomas
farzadmech is offline   Reply With Quote

Reply

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 20:39.