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

How to use the output of a function object as an input to another one?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By amuzeshi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 17, 2020, 01:03
Default How to use the output of a function object as an input to another one?
  #1
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10
amuzeshi is on a distinguished road
Hello,
I want to use an average pressure at a section as a reference pressure for pressure coefficient calculation. I have included the following function objects in my controlDict for pressure averaging and calculation of Cp:
Code:
averagedPressure
        {
            type            surfaceFieldValue;
            libs            (fieldFunctionObjects);
            enabled         true;

            writeControl    onEnd;
            executeControl  onEnd;
            writeFields     true;
            result          pRef;
            surfaceFormat   none;
     
            regionType      sampledSurface;
            name            sampledP;
            sampledSurfaceDict
            {
                type            cuttingPlane;
                planeType       pointAndNormal;
                pointAndNormalDict
                {
                    point     (-1.7 0 0.4);
                    normal    (1 0 0);
                }
                interpolate     true;
            }
            operation       areaAverage;
            fields          ( p );
        }

        pressure
        {
            type            pressure;
            libs            (fieldFunctionObjects);
            executeControl      onEnd;
            writeControl        onEnd;
            result              Cp;
            mode            staticCoeff;

            rho             rhoInf;
            rhoInf          1.0; 
            pInf              0;
      
            U               UInf;
            UInf            (1 0 0);

        }
Now I don't no how to use the calculated average pressure as a reference pressure for Cp (shown in red).

Ali
amuzeshi is offline   Reply With Quote

Old   February 17, 2021, 14:49
Default
  #2
New Member
 
Adrian Rouco
Join Date: Mar 2018
Posts: 13
Rep Power: 8
rouco75 is on a distinguished road
Have you achieved a solution, I am facing the same problem
rouco75 is offline   Reply With Quote

Old   February 22, 2021, 03:18
Default
  #3
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10
amuzeshi is on a distinguished road
Quote:
Originally Posted by rouco75 View Post
Have you achieved a solution, I am facing the same problem
No, but it was not due to that it is not possible, but because of my limited amount of time.
Instead, I ran the case one time in order to obtain the average pressure in the reference section, then ran it again and used the calculated reference pressure as pInf.
rouco75 likes this.
amuzeshi is offline   Reply With Quote

Reply


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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 10:51
[snappyHexMesh] How to define to right point for locationInMesh Mirage12 OpenFOAM Meshing & Mesh Conversion 7 March 13, 2016 14:07
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 06:27


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