View Issue Details

IDProjectCategoryView StatusLast Update
0000898OpenFOAMBugpublic2013-07-23 12:38
Reporteruser687Assigned Touser2 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSRedhatOS Version5.6
Summary0000898: Restarting averaging fields with fieldAverage, without reseting is not working
DescriptionI am using the fieldAverage function to calculate average quantities. I am using an updated version of OpenFOAM 2.2.x with the necessary fixes for the restarting to work, since there was a bug in the code (see http://www.openfoam.org/mantisbt/view.php?id=854). Restarting works just fine, my problem is that when I restart from a previous calculation, it seems that the averaging is not continuous as it should be. In order to look at the time evolution of a mean value I am using the probeFunction.

I think that openFoam restarts the averaging of pMean, even though I am setting

resetOnOutput false;
resetOnRestart false;
Steps To ReproduceI can reproduce my problem using the cavity tutorial. I start averaging from the beginning up to 0.5 sec of simulation time. Then I restart the simulation for another 0.5 sec. Below are the functions objects used at the end of the controlDict:

functions
{
    fieldAverage1
    {
        type fieldAverage;
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        enabled true;
        outputControl outputTime;
        resetOnOutput false;
        resetOnRestart false;

        fields
        (
            p
            {
                mean on;
                prime2Mean off;
                base time;
            }
        );
    }

    probesP
    {
        type probes;
        functionObjectLibs ("libsampling.so");
        probeLocations
        (
            (0.05 0.05 0.0)
        );

        fields
        (
            p pMean
        );
    }
}
Additional InformationI have attached a figure showing the time evolution of p and pMean, using the data written from the probe function for a point at x=0.05, y=0.05. The figure also shows, the correct running average that I have calculated based on p values. Up to t=0.5 sec, the calculated running average and pMean from the probes match exactly. However, at t=0.5, when I restart the case, a clear discontinuous change can be seen in the evolution of pMean. Nevertheless, I can reproduce the discontinuity of pMean shown from the probes values, if I restart the averaging in my calculations, at t=0.5.

TagsNo tags attached.

Activities

user687

2013-06-21 07:34

 

user687

2013-06-26 07:02

  ~0002295

I did a git pull yesterday (25 Jul 2013) and recompiled. Still the same problem.

One thing to note is that pMean is written in a different file than p, e.g. p is written in postProcessing/0/p while pMean is written in postProcessing/0.005/pMean. That is, every time a mean value is written, a new time directory is created adding 0.005 to the current time.

user687

2013-07-11 13:15

  ~0002322

The fix recommended in this post:

http://www.cfd-online.com/Forums/openfoam/119520-not-continuous-averaging-when-restarting-calculation.html#post438175

works fine for me. If possible, please let us know, if this is the right way to fix this bug.

user256

2013-07-23 08:24

  ~0002339

Encountered the same bug (reset always true), and the fixed suggested at 119520 seems to work.

user2

2013-07-23 12:38

  ~0002341

Thanks for the report - fixed by commit 95dc52c

Issue History

Date Modified Username Field Change
2013-06-21 07:34 user687 New Issue
2013-06-21 07:34 user687 File Added: plotXY_pMeanVsTime_calculated.png
2013-06-26 07:02 user687 Note Added: 0002295
2013-07-11 13:15 user687 Note Added: 0002322
2013-07-23 08:24 user256 Note Added: 0002339
2013-07-23 12:38 user2 Note Added: 0002341
2013-07-23 12:38 user2 Status new => resolved
2013-07-23 12:38 user2 Fixed in Version => 2.2.x
2013-07-23 12:38 user2 Resolution open => fixed
2013-07-23 12:38 user2 Assigned To => user2