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

TotalIncompressiblePressure evaluation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jcw

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2018, 09:21
Default TotalIncompressiblePressure evaluation
  #1
jcw
New Member
 
Christian Wolf
Join Date: Mar 2009
Posts: 27
Rep Power: 17
jcw is on a distinguished road
Hello!


I am using OF4.1. I am struggeling with the evaluation of total pressure at patches named "IN" and "OUT". I was able to calculate the total pressure field. But I have no idea how to extract the mass-flow weighted total pressure at my boundary patches.


Solver: simpleFoam


controlDict:
.
.
runTimeModifiable true;

functions
{
#includeFunc flowRatePatch(name=IN)
#includeFunc flowRatePatch(name=OUT)
#includeFunc residuals

pressure1
{
type pressure;
libs ("libfieldFunctionObjects.so");
patches (IN);
writeControl timeStep;
writeInterval 1;
log on;
pRef 1;
// Calculate the total pressure
calcTotal yes; // yes | no

// Calculate the (total) pressure coefficient
calcCoeff no; // yes | no
}
}



BTW:
The flowRatePatches evaluation work perfect. And I would like to have total pressure value each for "IN" and "OUT".


Thanks for support!
jcw is offline   Reply With Quote

Old   November 5, 2018, 03:53
Default
  #2
jcw
New Member
 
Christian Wolf
Join Date: Mar 2009
Posts: 27
Rep Power: 17
jcw is on a distinguished road
No ideas? Are there information missing?
jcw is offline   Reply With Quote

Old   November 5, 2018, 07:44
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
This works with OF-5.0:

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

        writeFields     false;
        writeControl    timeStep;
        writeInterval   1;  

        // Output to log&file (true) or to file only
        log             true;
        valueOutput     true;
        source          patch;
        sourceName      "IN";

        regionType      patch;
        name            "IN";
        surfaceFormat   ensight;

        // Operation: areaAverage/sum/weightedAverage ... 
        operation       areaAverage;

        fields
        (
            p
        );
     }
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   November 5, 2018, 08:09
Default
  #4
jcw
New Member
 
Christian Wolf
Join Date: Mar 2009
Posts: 27
Rep Power: 17
jcw is on a distinguished road
Thanks! I works. I had to change 'type surfaceFieldValue' -> 'type surfaceRegion'. Then it can be used for OP4.1.


How can I evaluate the total pressure at patch called 'IN'? Changing the 'fields' to total(p) is not working:


Quote:
pIN
{
type surfaceRegion;
functionObjectLibs ("libfieldFunctionObjects.so");

writeFields false;
writeControl timeStep;
writeInterval 1;

// Output to log&file (true) or to file only
log true;
valueOutput true;
source patch;
sourceName "IN";

regionType patch;
name "IN";
surfaceFormat ensight;

// Operation: areaAverage/sum/weightedAverage ...
operation areaAverage;

fields
(
total(p)
);
}
gives the following error:


Quote:
Time = 1

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0903489, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0335626, No Iterations 3
smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0335636, No Iterations 3
GAMG: Solving for p, Initial residual = 1, Final residual = 0.0331327, No Iterations 7
time step continuity errors : sum local = 0.00124111, global = 0.000336422, cumulative = 0.000336422
smoothSolver: Solving for omega, Initial residual = 0.158845, Final residual = 0.00888191, No Iterations 2
smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.0486494, No Iterations 2
ExecutionTime = 7.84 s ClockTime = 8 s

surfaceRegion pIN write:
--> FOAM Warning :
From function virtual bool Foam::functionObjects::fieldValues::surfaceRegion: :write()
in file fieldValues/surfaceRegion/surfaceRegion.C at line 780
Requested field total(p) not found in database and not processed
And also important: Where can I find information on how to use the post-processing tools?
jcw is offline   Reply With Quote

Old   November 5, 2018, 09:13
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
You can't do in-situ postprocessing of the total pressure, because it is not available by default. Easiest solution is to compute the total pressure and the samples in post after the simulation has completed.

Your first stop for information on how to use the postprocessing tools is the openfoam manual.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   November 7, 2018, 06:19
Default
  #6
jcw
New Member
 
Christian Wolf
Join Date: Mar 2009
Posts: 27
Rep Power: 17
jcw is on a distinguished road
Here is my ./system/controlDict file to get relevant data during simulation. Maybe it helps other users with same problem.
It works well for OF4.1 and simpleFoam.

Code:
 functions
    {
    #includeFunc flowRatePatch(name=IN)
    #includeFunc flowRatePatch(name=OUT)
    #includeFunc residuals
        #includeFunc totalPressureIncompressible
    #includeFunc pressureDifferencePatch
    #includeFunc singleGraph
    #includeFunc surfaces
    #includeFunc streamlines

yPlus1
    {
    type    yPlus;
    libs ("libfieldFunctionObjects.so");
    result WALL;
    executeControl    writeTime;
    writeControl    writeTime;
    }


pressureTools1
    {
        type                pressure;
        functionObjectLibs ("libutilityFunctionObjects.so");
        enabled             yes;
        //region              0;
        calcTotal           yes;
        calcCoeff           no;
        timeStart           1;
        timeEnd             100000;
        writeControl        outputTime;
        writeInterval       1;
    pRef            0;
        rhoInf              1.17663;
        pInf                101325;
        UInf                (0 0 0);
     }


reloadPcalc
    {
        type        readFields;
        functionObjectLibs ("libfieldFunctionObjects.so");
        //region          0;
        enabled         yes;
        timeStart       1;
        timeEnd         10000;
        writeControl    writeTime;
        writeInterval    1;
        outputInterval 1; // 5000;
        fields
        (
        total(p)
        p
        
        );
    }


outlet_avg_p
    {
        

        type            surfaceRegion;
        libs            ("libfieldFunctionObjects.so");
    enabled         true;
        log             true;
    valueOutput     false;
        timeStart       1;
        writeControl    timeStep;
        writeInterval    1;
        writeFields     off;
        regionType      patch;
        name            OUT;
    surfaceFormat   none;
        operation       areaAverage;        
        fields
        (
           // total(p)
    p
        );
    }


outlet_avg_ptot
    {
         

        type            surfaceRegion;
    libs         ("libfieldFunctionObjects.so");
        enabled         true;
        log             true;
        valueOutput     false;
                   timeStart    1;
                writeControl    timeStep;
                writeInterval   1;
        writeFields     off;
        regionType    patch;
        name            OUT;
        surfaceFormat   none;
        operation    areaAverage;
        fields
    (
        total(p)
        //p
        );
    }

inlet_avg_p
    {


         type            surfaceRegion;
        libs            ("libfieldFunctionObjects.so");
        enabled         true;
        log             true;
        valueOutput     false;
                timeStart    1;
                writeControl    timeStep;
                writeInterval   1;
        writeFields     off;
        regionType    patch;
        name            IN;
        surfaceFormat   none;
        operation    areaAverage;
        fields
    (
           // total(p)
        p
    );
    }


inlet_avg_ptot
    {


        type            surfaceRegion;
        libs            ("libfieldFunctionObjects.so");
        enabled         true;
        log             true;
        valueOutput     false;
                timeStart    1;
                   writeControl    timeStep;
                   writeInterval   1;
        writeFields     off;
        regionType      patch;
        name            IN;
        surfaceFormat   none;
    operation    areaAverage;
        fields
        (
        total(p)
        //p
        );
Files needed in ./system directory:


Code:
controlDict
decomposeParDict
fvSolution
topoSetDict
fvSchemes
pressureDifferencePatch
residuals
singleGraph
streamlines
surfaces
 yPlus
Regards.
akidess likes this.
jcw is offline   Reply With Quote

Reply

Tags
post-processing pressure, pressure tools, simplefoam, total pressure


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
Tecplot 360 2011 R2 preview with OpenFOAM data loader available for evaluation scott_rumage OpenFOAM Post-Processing 50 January 23, 2017 02:49
Use of K-Epsilon Model for Hotspot Evaluation nomi.tahir Main CFD Forum 0 May 9, 2016 13:06
Evaluation of "diffusive flux" of Compressible Navier-Stoke in the corner tranhophu Main CFD Forum 5 January 19, 2016 09:30
yPlusRAS evaluation in OpenFOAM 2.2x MaLa OpenFOAM Post-Processing 1 December 10, 2013 09:34
Evaluation method for design improvement of bioreactor to prevent biofouling/biofilm kevinlipps FLUENT 0 March 8, 2012 09:53


All times are GMT -4. The time now is 14:12.