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

pimpleFoam in OF1612 shows same time step twice in log file

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By kera
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 17, 2018, 13:09
Default pimpleFoam in OF1612 shows same time step twice in log file
  #1
Member
 
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12
shang is on a distinguished road
Dear all,

I recently installed OF1612 on my Uni's cluster (Scientific Linux 6.9 (Carbon)) without sudo right. I have been testing it using a wavy channel flow case. I found out something weird in the log file, i.e. the same time step appeared twice:

Code:
Time = 11.0001

PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.000628327, Final residual = 6.49228e-06, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00710122, Final residual = 7.02765e-06, No Iterations 4
DILUPBiCG:  Solving for Uz, Initial residual = 0.00741627, Final residual = 1.45782e-06, No Iterations 5
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.188916
DICPCG:  Solving for p, Initial residual = 0.198051, Final residual = 0.00192128, No Iterations 611
time step continuity errors : sum local = 2.37292e-07, global = -1.72581e-07, cumulative = -5.94041e-07
Pressure gradient source: uncorrected Ubar = 0.300001, pressure gradient = 0.147912
DICPCG:  Solving for p, Initial residual = 0.0992778, Final residual = 9.82839e-07, No Iterations 762
time step continuity errors : sum local = 1.72608e-07, global = -1.72581e-07, cumulative = -7.66622e-07
Pressure gradient source: uncorrected Ubar = 0.300002, pressure gradient = 0.141237
ExecutionTime = 52.3 s  ClockTime = 52 s

Courant Number mean: 0.0777575 max: 3.3662
Time = 11.0001

PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.000555812, Final residual = 7.84982e-07, No Iterations 3
DILUPBiCG:  Solving for Uy, Initial residual = 0.00624087, Final residual = 2.50926e-07, No Iterations 4
DILUPBiCG:  Solving for Uz, Initial residual = 0.00659523, Final residual = 8.90043e-06, No Iterations 2
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.126081
DICPCG:  Solving for p, Initial residual = 0.137678, Final residual = 0.00136057, No Iterations 522
time step continuity errors : sum local = 1.76456e-07, global = -1.43068e-07, cumulative = -9.0969e-07
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.153548
DICPCG:  Solving for p, Initial residual = 0.0448662, Final residual = 9.80399e-07, No Iterations 680
time step continuity errors : sum local = 1.43092e-07, global = -1.43068e-07, cumulative = -1.05276e-06
Pressure gradient source: uncorrected Ubar = 0.299999, pressure gradient = 0.156989
ExecutionTime = 72.1 s  ClockTime = 72 s

Courant Number mean: 0.0777578 max: 4.50452
Time = 11.0002

PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.000544009, Final residual = 3.90541e-06, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00601562, Final residual = 2.7355e-06, No Iterations 3
DILUPBiCG:  Solving for Uz, Initial residual = 0.00635443, Final residual = 5.66006e-06, No Iterations 3
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.158873
DICPCG:  Solving for p, Initial residual = 0.0671597, Final residual = 0.000644585, No Iterations 467
time step continuity errors : sum local = 1.35701e-07, global = -1.20709e-07, cumulative = -1.17347e-06
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.154128
DICPCG:  Solving for p, Initial residual = 0.0185901, Final residual = 9.677e-07, No Iterations 698
time step continuity errors : sum local = 1.20732e-07, global = -1.20709e-07, cumulative = -1.29418e-06
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.153915
ExecutionTime = 90.76 s  ClockTime = 91 s

Courant Number mean: 0.077758 max: 2.9458
Time = 11.0002

PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.000541136, Final residual = 2.5145e-06, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.00600186, Final residual = 5.11656e-06, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.00634764, Final residual = 4.17754e-06, No Iterations 2
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.153745
DICPCG:  Solving for p, Initial residual = 0.0565432, Final residual = 0.000557925, No Iterations 528
time step continuity errors : sum local = 1.16266e-07, global = -1.03347e-07, cumulative = -1.39752e-06
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.152974
DICPCG:  Solving for p, Initial residual = 0.0136746, Final residual = 9.9346e-07, No Iterations 656
time step continuity errors : sum local = 1.03369e-07, global = -1.03347e-07, cumulative = -1.50087e-06
Pressure gradient source: uncorrected Ubar = 0.3, pressure gradient = 0.154393
ExecutionTime = 110.86 s  ClockTime = 111 s

Courant Number mean: 0.077758 max: 2.6735
The \Deltat = 5e-5 for above case, so one would expect the time step to increase by 0.00005 each time rather than showing 11.0001 twice then 11.0002. Also, if I used \Deltat = 2e-5, same time step would appear 5 times then went to next time step.

Interestingly, however, I also run a test on traditional channel flow, it had no such problem. My initial thought was that the problem might be due to mesh, as the setup of both my channel flow and wavy channel cases were almost identical. Both of them were migrated from OF230 with only difference being that I regenerated the mesh for the traditional channel flow under the environment of OF1612. But as the mesh for wavy channel was created by icem-cfd and converted into OF230, I just copied the polyMesh directory from OF230 case to OF1612 case. However, the checkMesh under OF1612 indicated there was nothing wrong with the copied mesh. Here is the log of checkMesh (sorry that I wouldn't be able to attach the mesh file as it's too big):
Code:
Mesh stats
    points:           7323399
    faces:            21641920
    internal faces:   21316160
    cells:            7159680
    faces per cell:   6
    boundary patches: 5
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     7159680
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology
    TOPWALL             44352    44775    ok (non-closed singly connected)
    CORRUGATEDWALL      177408   178503   ok (non-closed singly connected)
    SIDEWALL            72320    73602    ok (non-closed singly connected)
    inlet               15840    16119    ok (non-closed singly connected)
    outlet              15840    16119    ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (0 -0.00415 0) (0.0528 0.01585 0.02)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-3.28573e-15 -2.8513e-15 1.13971e-15) OK.
    Max cell openness = 9.51632e-16 OK.
    Max aspect ratio = 35.2 OK.
    Minimum face area = 3.54174e-10. Maximum face area = 1.72206e-07.  Face area magnitudes OK.
    Min volume = 3.57751e-14. Max volume = 1.73945e-11.  Total volume = 1.87975e-05.  Cell volumes OK.
    Mesh non-orthogonality Max: 44.7586 average: 13.4414
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.877297 OK.
    Coupled point location match (average 2.55615e-12) OK.

Mesh OK.
The setup of wavy channel case are also listed here. You may notice they are largely based on the channel395 case for OF230. Although in OF1612, channel395 adopted different setup for fvSolution, the following setup did work well for traditional channel flow case in OF1612.

controlDict:
Code:
application     pimpleFoam;

startFrom       startTime;

startTime       11;

stopAt          endTime;

endTime         17;

deltaT          0.00005;

writeControl    timeStep;

writeInterval   200;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression on;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    fieldAverage1
    {
        type            fieldAverage;
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        enabled         true;
        outputControl   outputTime; 
        timeStart       12;

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }
        );
    }

    z10x0
    {
        type probes;
        functionObjectLibs ("libsampling.so");
        enabled         true;
        outputControl   timeStep; 
        outputInterval  1; 

        probeLocations
        (
                (0.0000000001 1.1e-3 0.0100000001)
                (0.0000000001 2.4e-3 0.0100000001)
                (0.0000000001 3.4e-3 0.0100000001)
                (0.0000000001 4.8e-3 0.0100000001)
                (0.0000000001 6.0e-3 0.0100000001)
                (0.0000000001 7.2e-3 0.0100000001)
                (0.0000000001 8.4e-3 0.0100000001)
                (0.0000000001 9.7e-3 0.0100000001)
                (0.0000000001 11e-3 0.0100000001)
                (0.0000000001 12e-3 0.0100000001)
                (0.0000000001 13.4e-3 0.0100000001)
                (0.0000000001 14.7e-3 0.0100000001)
        );

        fields
        (
                U
                UMean
                UPrime2Mean
        );
    }
}
fvSchemes
Code:
ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linear;
    div(phi,B)      Gauss limitedLinear 1;
    div(B)          Gauss linear;
    div(phi,nuTilda) Gauss limitedLinear 1;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}
fvSolution:
Code:
solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0.01;
    }

    pFinal
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0;
    }

    "(U|k)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.1;
    }

    "(U|k)Final"
    {
        $U;
        tolerance       1e-05;
        relTol          0;
    }
}

PIMPLE
{
    nOuterCorrectors 1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    pRefCell        1001; //
    pRefValue       0;
}
Therefore, I have no idea about what's gone wrong. Also it seems no one have reported similar problem in the forum. Does anybody know how to solve it?

Many thanks in advance,
Yeru

Last edited by shang; January 17, 2018 at 14:17. Reason: Provide more information
shang is offline   Reply With Quote

Old   January 17, 2018, 15:09
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
You have

Code:
timePrecision   6;
make it 7. Or 12. Your output can not resolve different time steps, internally they are quite different (at least according to residuals).
alexeym is offline   Reply With Quote

Old   January 18, 2018, 09:52
Default
  #3
Member
 
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12
shang is on a distinguished road
Dear Alexey,

Thank you for your advice. Changing the timePrecision to 7 and above did solve the problem. So it isn't a bug, rather it's my own setting problem.

Regards,
Yeru
shang is offline   Reply With Quote

Old   January 18, 2018, 11:58
Default Probed data shows same time step twice
  #4
Member
 
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12
shang is on a distinguished road
Dear Alexey,

After above issue was solved, I checked my case output again and spotted a similar problem in the probe data . The output of my probed data (located at postProcessing) shows:

Code:
#     Probe             0             1 
#     Time
      11.2001             (0.346425 -0.0206927 -0.0443701)             (0.396648 -0.0308353 0.0045432) 
      11.2001             (0.346504 -0.0208275 -0.0438397)             (0.396732 -0.0307284 0.00444979)
      11.2002             (0.346596 -0.0209262 -0.0432698)             (0.39684 -0.030652 0.00439261)
      11.2002             (0.346701 -0.0209961 -0.0426602)             (0.396971 -0.0306104 0.00437403)


My probe and average function object setup is:
Code:
functions
{
    fieldAverage1
    {
        type            fieldAverage;
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        enabled         true;
        outputControl   outputTime;
        timeStart       12;

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }
        );
    }

    z10x0
    {
        type probes;
        libs               ("libsampling.so");
        writeControl    timeStep;
        writeIntervel   1;

        fields
        (
                U
                UMean
                UPrime2Mean
        );

        probeLocations
        (
                (0.0000000001 1.1e-3 0.0100000001)
                (0.0000000001 2.4e-3 0.0100000001)
        );
    }
}


It happened even after I changed the timePrecision to 12. Do you know how to resolve this? Many thanks.

Yeru

Last edited by shang; January 18, 2018 at 12:03. Reason: Add more information
shang is offline   Reply With Quote

Old   January 18, 2018, 13:30
Default
  #5
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12
kera is on a distinguished road
Hallo Yeru

I would take a guess and say you have to change your "writePrecision" as well.

Hope this helps!

Regards,
Ricky
shang likes this.
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   January 18, 2018, 14:39
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi all,

@shang

Ricky is right, increase your writePrecision.
shang likes this.
alexeym is offline   Reply With Quote

Old   January 22, 2018, 07:52
Default
  #7
Member
 
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12
shang is on a distinguished road
Morning Alexey and Ricky,

Sorry for the late reply. Change the timePrecision together with the write Precision from 6 to 7 solved my problem. Thank you very much!

Do you know why the precision 6 was working fine for OF230, but it has to be a bigger number for OF1612?

Regards,
Yeru
shang is offline   Reply With Quote

Old   January 22, 2018, 16:59
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Maybe 2.3.x automatically increased precision for you, so it was 7, while you thought it is 6? In fact, version 5 should do this also: https://cpp.openfoam.org/v5/Time_8C_source.html#l01122.
alexeym is offline   Reply With Quote

Old   January 23, 2018, 20:30
Default
  #9
Member
 
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12
shang is on a distinguished road
Hi Alexey,

As the case setup of OF1612 was directly migrated from OF230, so the precisions were 6. I double checked my old case in OF230, with both writePrecision and timePrecision being 6, the old case has no problem in log file, but same time step appears twice in the probed data. In the old case log file I also found following sentences:

Code:
--> FOAM Warning :
    From function Time::operator++()
    in file db/Time/Time.C at line 1055
    Increased the timePrecision from 6 to 7 to distinguish between timeNames at time 10.67
Interestingly, however, although in OF1612's source code of Time.C I found the same lines of code as shown in your link, unlike what OF230 did, the case in OF1612 didn't automatically increase the timePrecision from 6 to 7.

I think the reason could be that the pimpleFoam in OF1612 doesn't include the Time.C. Whereas pimpleFoam in OF230 does. Because the output of "grep -r Time.H" in pimpleFoam directory are:

OF230:
Code:
...
pimpleFoam.dep:pimpleFoam.dep: $(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Time.H
...
OF1612 (no Time.H included):
Code:
...
pimpleFoam.C:    #include "createTime.H"
...
How do you think?

Anyway, to be on the safe side, I think it's better to set the write and time precision to 7 or even a larger value at the beginning.

Kind regards,
Yeru
shang is offline   Reply With Quote

Old   January 24, 2018, 04:17
Default
  #10
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Yes, in your controlDict timePrecision is 6, yet, as you have noted, there is

Code:
Increased the timePrecision from 6 to 7 to distinguish between timeNames at time 10.67
in your log files, so OpenFOAM just increased precision during run-time. I do not know why did you choose 6. Cause it is so in tutorials? You wanted smaller data files? You just adore number 6?

Time.H is included in other headers. Newer version of wmake generate dependency files (*.dep files, where you found Time.H in 2.3.0) in separate folder, grep -r does not search there.

This behaviour could be a bug of this concrete version, so you can try to report it (at develop.openfoam.com). Yet, I have doubts the version is still maintained.
alexeym is offline   Reply With Quote

Old   January 24, 2018, 11:43
Default
  #11
Member
 
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 12
shang is on a distinguished road
Hi Alexey,

Yes, the tutorial uses 6.

I will report it as a bug to see how the development team response.

Thank you very much for your help. This problem has troubled me for some time, despite it can be solved such easily.

Kind regards,
Yeru
shang 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
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


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