CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   wrong behavior of functionObject volAverage (http://www.cfd-online.com/Forums/openfoam-post-processing/125343-wrong-behavior-functionobject-volaverage.html)

HaZe October 23, 2013 11:41

wrong behavior of functionObject volAverage
 
Hi FOAMers!

There are some issues with the functionObjects in my simulation. I'm running an engine simulation and try to calculate the volume averages of some fields inside the cylinder. In order to this I defined a functionObject [1] in my controlDict. Unfortunately it's not behaving like I expected. Running this case (startTime 280, writeInterval 1) I get a directory ./volumeAverage_myAverage/280/ with files p,T,k... with the averages inside. So far, so good. But instead of getting new directories 281, 282 in ./volumeAverage_myAverage all the averages are written to the files p,T,k in ./volumeAverage_myAverage/280. And additionally the column "Time" in this files is some value with no relation to the timeStep or anything [2]. For "Time" I expected 280.25 280.5...
I already play around with the valueOutput and outputControl options but whatever I set, it did always the same.

Next problem is the volume taken for averaging. I need to use a cellZone to get rid of the intake and exhaust cells and just averaging the cylinder cells. The "source cellZone" option should be great for this. But I played a little bit with it and did the banana test with the cellZone name. I expected to get an error like "Could not find cellZone with the name "banana" but it didn't complain.
My solver does already calculate a volume average of the complete field (including exhaust and intake) and it's exactly the same values as calculated with the functionObject and correct set "source cellZone" and "sourceName cylbox".
So what am I doing wrong?

I'm using OpenFOAM-1.5-dev and so I can't use swak4foam.

Thanks for your help in advance.

Regards, HaZe.

[1] functions in controlDict
Code:

functions
(
    myAverage
    {
        type volumeAverage;
        functionObjectLibs ("libsimpleFunctionObjects.so");
        enabled true;
        outputControl outputTime;
        outputInterval 1;
        verbose true;
        valueOutput false;
        source cellZone;
        sourceName cylbox;
        operation volAverage;
        fields
        (
                k
                kDiffusion
                EpsilonDiffusion
                p
                T
        );
    }
);

[2] ./volumeAverage_myAverage/280/p
Code:

#        Time  average
    0.0291927        99112
    0.0292188      98202.7
    0.0292448      97322.1
    0.0292708      96473.4
    0.0292969      95644.5
    0.0293229      94824.6
    0.029349      94006.4
    0.029375      93184.4
    0.029401      92354.2
    0.0294271      91512.5
    0.0294531      90657.8
    0.0294792      89790.9



All times are GMT -4. The time now is 20:58.