CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Line Average during runtime or after (https://www.cfd-online.com/Forums/openfoam/128655-line-average-during-runtime-after.html)

ramachandran163 January 17, 2014 16:31

Line Average during runtime or after
 
Hi all,

I am trying to get the average value of different parameters along a line in an internal flow. The line does not lie on a patch or anything. I am able to read all the values using the sampleDict as below but I would like to get the average value of it. I am pretty confident that this should be straight forward and that I should be able to achieve it through controlDict or sampleDict, but I am just not able to.

My sampleDict file:
Code:

setFormat raw;
interpolationScheme cellPoint;

fields
(
    p
    Ux
    Uy
    Uz
    T
);


sets
(
    lineAB
    {
        type        uniform;
        axis        distance;
        start (4.16 6.16 0.0875);
        end (4.16 8.9 3.43);
        nPoints 50;
    }

    lineCD
    {
        type        uniform;
        axis        distance;
        start (4.16 8.9 0.07);
        end (4.16 6.16 3.41);
        nPoints 50;
    }
);

can I add something to this existing code to get the average or should I use something similar in the controlDict file to get the average. I am looking for the right keywords and as to where to use them in the code.

I did look in the fieldAverage function and some of the operations that can be used to get the averages during runtime but, I am not able to figure out how they can be used with "sets" type of data.

Thank you very much.

Ram


All times are GMT -4. The time now is 04:55.