CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Integrating over a specified plane during run

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2023, 01:32
Default Integrating over a specified plane during run
  #1
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8
farzadmech is on a distinguished road
Hello all,
I want to calculate volume Flowrate and momentum over specified planes and report the value. My problem is that, I do not know how to define a plane. How can I define multiple planes inside the code? I wan integrate over cells and not over points, how it is possible?


Using below commands, I was just can integrate over points and not cells.

Calculate flux across surface

Thanks,
Farzad
farzadmech is offline   Reply With Quote

Old   September 25, 2023, 02:38
Default
  #2
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8
farzadmech is on a distinguished road
ok, I find the answer;
when interpolate is false it is integrating over cells, and when interpolate is true, it is integrating over points. To execute the code we need;

Code:
postProcess -fields "(* * *)" -latestTime -dict system/integrateOnSurfaceDict
Code:
flux
    {
        functionObjectLibs ("libfieldFunctionObjects.so");
        type            surfaceFieldValue; // volFieldValuerrrrrrrrr;  //surfaceFieldValue;

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

        name farzad;

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

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

        // Operation: areaAverage/sum/weightedAverage/...
        operation    areaIntegrate;  //areaNormalIntegrate;
        fields
        (
        U.water
            U.waterMean
        );
    }
Code:
flux22
    {
        functionObjectLibs ("libfieldFunctionObjects.so");
        type            surfaceFieldValue; // volFieldValuerrrrrrrrr;  //surfaceFieldValue;

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

        name farzad;

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

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

        // Operation: areaAverage/sum/weightedAverage/...
        operation    areaIntegrate;  //areaNormalIntegrate;
        fields
        (
            U.water
            U.waterMean
        );
    }
Quote:
Originally Posted by farzadmech View Post
Hello all,
I want to calculate volume Flowrate and momentum over specified planes and report the value. My problem is that, I do not know how to define a plane. How can I define multiple planes inside the code? I wan integrate over cells and not over points, how it is possible?


Using below commands, I was just can integrate over points and not cells.

Calculate flux across surface

Thanks,
Farzad

Thanks,
Farzad

Last edited by farzadmech; September 28, 2023 at 22:05.
farzadmech is offline   Reply With Quote

Reply

Tags
integrate, openfoam, plane


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 Coorectly Run sampleDict FlyBob91 OpenFOAM Post-Processing 5 September 13, 2017 05:01
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 19:45
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 03:09
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 13:43
Mixing plane geometry definition Hbet FLUENT 0 January 18, 2002 08:16


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