View Issue Details

IDProjectCategoryView StatusLast Update
0000895OpenFOAM[All Projects] Bugpublic2015-05-01 16:41
ReporteramwoudenAssigned Tohenry 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformMacOSOS Version10.6.8
Product Version 
Fixed in Version 
Summary0000895: faulty pressure relaxation in pimpleFoam solver
DescriptionpimpleFoam/pEqn.H contains p.relax() at line 42. But is not preceded with p.storePrevIter() causing the following error to occur:

FOAM FATAL ERROR: previous iteration field IOobject: volScalarField p "personalCaseDirectory/0" not stored. Use field.storePrevIter() at start of iteration.
Steps To Reproducemodify tutorial/pimpleFoam/TJunction/system/solution to include a relaxation factor on p. and rerun using pimpleFoam
TagsNo tags attached.

Activities

amwouden

2013-06-20 18:43

reporter   ~0002288

Consequently the same issue is present in pimpleDyMFoam and SRFPimpleFoam

wyldckat

2015-02-15 15:43

updater   ~0003782

I was able to reproduce this error with 2.3.x as well, but only if I did this:

    relaxationFactors
    {
        fields
        {
            "p.*" 0.3;
        }
        equations
        {
            "U.*" 1;
            "k.*" 1;
            "epsilon.*" 1;
        }
    }


This error does not occur if I do this:

    relaxationFactors
    {
        fields
        {
            p 0.3;
        }
        equations
        {
            "U.*" 1;
            "k.*" 1;
            "epsilon.*" 1;
        }
    }

which is based on the tutorial file "incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSolution":

    relaxationFactors
    {
        fields
        {
            p 0.3;
        }
        equations
        {
            "(U|k|omega)" 0.7;
            "(U|k|omega)Final" 1.0;
        }
    }


I guess is that this can be considered to be user error?

henry

2015-02-15 17:09

manager   ~0003785

The issue is that the names of the fields requiring storePrevIter must be known at the beginning of the time-step and this is infered from the list of fields requiring relaxation. To support regular expressions in this inference would require a scan of all the fields currently registered in the objectRegistry and compare the names with the regular expressions. It is likely that there will be several matches for which storePrevIter is not required which would unnecessarily increase storage.

So for the moment the names of the fields requiring relaxation must be provided explicitly rather than via regular expressions. I could explicitly remove the support for regular expressions from the fields lookup but then no warning or error would be generated if a regular expressions were specified for a field; it would simply be ignored and no relaxation applied. To avoid this the fields list could be scanned for the presence of regular expressions and an error issued stating that this is not supported for fields and the names MUST be specified explicitly. I will consider this option further.

Issue History

Date Modified Username Field Change
2013-06-20 18:39 amwouden New Issue
2013-06-20 18:43 amwouden Note Added: 0002288
2015-02-15 15:43 wyldckat Note Added: 0003782
2015-02-15 17:09 henry Note Added: 0003785
2015-02-15 17:09 henry Status new => resolved
2015-02-15 17:09 henry Resolution open => no change required
2015-02-15 17:09 henry Assigned To => henry