CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

FOAM FATAL IO ERROR: keyword pcorrFinal is undefined in dictionary

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By floquation
  • 1 Post By akesm
  • 1 Post By uribealdo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2017, 22:57
Default FOAM FATAL IO ERROR: keyword pcorrFinal is undefined in dictionary
  #1
New Member
 
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9
akesm is on a distinguished road
Hello everyone

I have simulated a T-juction for oil and water. Now I wanted to make use of dynamic mesh refinement. So having my current case I am modifying "dynamicMeshDict" as
Code:
dynamicFvMesh dynamicRefineFvMesh;
   dynamicRefineFvMeshCoeffs
   {
       refineInterval 1;
       field alpha.water;
       lowerRefineLevel 0.001;
       upperRefineLevel 0.999;
       unrefineLevel 10;
       nBufferLayers 1;
       maxRefinement 2;
       maxCells 200000;
       correctFluxes (( phi none) (nHatf none) (rhoPhi none) (ghf none)  (phirb none)(rho*nuEff none));
       dumpLevel true;
   }
the "correctFluxes" line I tried to use the fluxes that I introduced in my "divSchemes" to be consistent.

Also in my "controlDict" I changed to "application interDyMFoam;"

Now when running the case with "interDyMFoam" I get the error that
FOAM FATAL IO ERROR:
keyword pcorrFinal is undefined in dictionary "/home../run/Tjunction/system/fvSolution.solvers"

But my fvsolution is as below:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      2;
        nAlphaSubCycles 1;
        cAlpha          1;

        MULESCorr       yes;
        nLimiterIter    3;

        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-8;
        relTol          0;
    }

    pcorr
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-5;
        relTol          0;
    }

    p_rgh
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-07;
        relTol          0.05;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    U
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-06;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor   no;
    nOuterCorrectors    1;
    nCorrectors         3;
    nNonOrthogonalCorrectors 0;
    pRefCell 0; 
    pRefValue 0; 
}

relaxationFactors
{
    equations
    {
        ".*" 1;
    }
}


// ************************************************************************* //
I even do not have such a "pcorrFinal".

Where I have made a mistake you think?
akesm is offline   Reply With Quote

Old   March 30, 2017, 23:55
Default
  #2
New Member
 
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9
akesm is on a distinguished road
I solved the error by changing "pcorr" to the format "pcorr.*". But still don't know why this solved the issue. But now I am stuck in a error saying that
Solving for p_rgh, Initial residual = 1, Final residual = 0.0485562, No Iterations 185
#0 Foam::error:: printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 ? at tensorField.C:?
#4 ? at ??:?
#5 ? at ??:?
#6 ? at ??:?
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8 ? at ??:?
Floating point exception (core dumped)
akesm is offline   Reply With Quote

Old   March 31, 2017, 04:59
Default
  #3
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21
floquation will become famous soon enough
Quote:
Originally Posted by akesm View Post
I even do not have such a "pcorrFinal".
But that is exactly the problem.
You need the keyword pcorrFinal for the same reason that you need p_rghFinal: in the last iteration the "Final" version of the dictionary is used to give you better control over your simulation.

Your floating point exception (FPE) can have an infinite number of causes.
Start by checking whether your physical set-up is correct: boundary conditions, reasonable initial condition, mesh quality, etc.
Also check whether the FPE occurs when you do not use a dynamic mesh.
akesm likes this.
floquation is offline   Reply With Quote

Old   March 31, 2017, 16:11
Default
  #4
New Member
 
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9
akesm is on a distinguished road
Thanks for your reply.
To clarify that, I did not touch anything from my static mesh case that runs properly except those I mentioned above, so initial, boundary conditions mesh and all set up should be fine. Even if the same dynamic mesh case that I have now, I switch back to static mesh it runs perfectly, or even if I run it with interFoam instead of interDyMFoam it runs without error again.

Any guess that what is the issue?
Thanks
maasyraf3 likes this.
akesm is offline   Reply With Quote

Old   March 31, 2017, 16:36
Default
  #5
New Member
 
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9
akesm is on a distinguished road
I narrowed my investigation to the file "dynamicMeshDict".
there if I put the lower and upper intervals of
Code:
    lowerRefineLevel 0.001
    upperRefineLevel 0.999;
to be equal say both 0.1, or even 0.9, or any number, but both be equal, with interDyMFoam simulation runs perfectly with no error. So set up is fine I think

This is weird to me, why with for example 0.1 and 0.9 or 0.001 and 0.999 as above I get that error.

And this is my whole file
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh   dynamicRefineFvMesh;

dynamicRefineFvMeshCoeffs
{
    // How often to refine
    refineInterval  1;

    // Field to be refinement on
    field           alpha.water;

    // Refine field inbetween lower..upper
    lowerRefineLevel 0.001;
    upperRefineLevel 0.999;

    // If value < unrefineLevel unrefine
    unrefineLevel   10;

    // Have slower than 2:1 refinement
    nBufferLayers   1;

    // Refine cells only up to maxRefinement levels
    maxRefinement   2;

    // Stop refinement if maxCells reached
    maxCells        200000;

    // Flux field and corresponding velocity field. Fluxes on changed
    // faces get recalculated by interpolating the velocity. Use 'none'
    // on surfaceScalarFields that do not need to be reinterpolated.
    correctFluxes
    (
        (phi none)
        (nHatf none)
        (rhoPhi none)
        (alphaPhi none)
        (ghf none)
    );

    // Write the refinement level as a volScalarField
    dumpLevel       true;
}
And my complete log file is
Code:
Starting time loop

Courant Number mean: 0.00889225 max: 0.0998565
Interface Courant Number mean: 0 max: 0
deltaT = 5.48246e-06
Time = 5.48246e-06

PIMPLE: iteration 1
Selected 202 cells for refinement out of 50750.
Refined from 50750 to 52164 cells.
Selected 0 split points out of a possible 202.
Execution time for mesh.update() = 0.25 s
DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 9.05312e-06, No Iterations 466
time step continuity errors : sum local = 1.35364e-10, global = 2.31923e-13, cumulative = 3.11643e-11
smoothSolver:  Solving for alpha.water, Initial residual = 1.50215e-05, Final residual = 6.51628e-09, No Iterations 1
Phase-1 volume fraction = 0.909086  Min(alpha.water) = 0  Max(alpha.water) = 1
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.909086  Min(alpha.water) = 0  Max(alpha.water) = 1.00001
DICPCG:  Solving for p_rgh, Initial residual = 1, Final residual = 0.049169, No Iterations 383
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  ? at tensorField.C:?
#4  ? at ??:?
#5  ? at ??:?
#6  ? at ??:?
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? at ??:?
Floating point exception (core dumped)
akesm is offline   Reply With Quote

Old   April 1, 2017, 11:04
Default
  #6
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21
floquation will become famous soon enough
If you set those two to the same value, then it does not refine. After all, it refines between X and X, but there exist no numbers between X and X.
Then, despite having a dynamic mesh, you do not actually have a dynamic mesh.

Personally, I use 0.1 and 0.9 in interDyMFoam.

Questions:
1) How come max Courant is not zero when you're only just starting?

Since it starts at 0.1, and you then refine twice, max Courant very likely becomes 0.4. Whereas this should still be fine, it might get becomes too large when the new velocities are calculated.

2) What happens when you reduce the initial dt by, say, a factor 10?

I also notice that you need a lot of iterations for pressure.

3) What happens when you add under-relaxation for PIMPLE?
4) Or what happens when you use PISO instead of PIMPLE (so nOuterCorrector=0)?
floquation is offline   Reply With Quote

Old   April 3, 2017, 18:07
Default
  #7
New Member
 
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9
akesm is on a distinguished road
Kevin,

Thanks for your comment, FYI, everything was fine, the issue was that I was simulating a 2d case, I switched to 3d (added cells in the 3rd direction) now it is working fine.
akesm is offline   Reply With Quote

Old   August 9, 2018, 07:29
Default
  #8
New Member
 
Ainal Hoque Gazi
Join Date: May 2018
Location: India
Posts: 27
Rep Power: 8
A H Gazi is on a distinguished road
Quote:
Originally Posted by akesm View Post
Kevin,

Thanks for your comment, FYI, everything was fine, the issue was that I was simulating a 2d case, I switched to 3d (added cells in the 3rd direction) now it is working fine.



Hi..
For my understanding would you please tell me what change did you make with a example,that will be a great help for me.
thanks and regards.

Last edited by A H Gazi; August 10, 2018 at 08:57.
A H Gazi is offline   Reply With Quote

Old   August 10, 2018, 08:58
Default
  #9
New Member
 
Ainal Hoque Gazi
Join Date: May 2018
Location: India
Posts: 27
Rep Power: 8
A H Gazi is on a distinguished road
Quote:
Originally Posted by A H Gazi View Post
Hi..
For my understanding would you please tell me what change did you make with a example,that will be a great help for me.
thanks and regards.





I have solved it.
A H Gazi is offline   Reply With Quote

Old   September 26, 2018, 09:03
Default
  #10
Member
 
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 36
Rep Power: 9
krikre is on a distinguished road
I was surprised to see the keyword pcorrFinal not being required for interFoam v3.0.1, but required on v6. I ran my case with the fvSolution from the damBreak tutorial.



If anyone can effortlesly shed some light on the pcorr field I'd apreciate it. But it's not urgent. I just think it would be nice to have it explained online. I did a bit of research but it's starting to take to much time for me.


"pcorr.*" didn't used to be required:
https://github.com/OpenFOAM/OpenFOAM...199e76f37eb4a6


I was looking for clues in the interFoams pEqn.H:

https://cpp.openfoam.org/dev/multiph...8H_source.html


I did a

Code:
grep -r 'pcorr' $FOAM_SRC
which lead me to
https://cpp.openfoam.org/dev/CorrectPhi_8C_source.html


I'm not sure if CorrectPhi.C is executed by interFoam.
krikre is offline   Reply With Quote

Old   April 28, 2021, 07:14
Default
  #11
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by A H Gazi View Post
I have solved it.
Hi!

I am getting the same error of pcorrFinal not found when I switch my simulation from 2D to 3D. Any idea how you were able to solve it?
B_R_Khan is offline   Reply With Quote

Old   November 19, 2021, 11:43
Default Could you add the pcorrFinal tolerance:
  #12
New Member
 
Lima
Join Date: Oct 2020
Posts: 1
Rep Power: 0
uribealdo is on a distinguished road
In the fvSolution:

pcorr
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-5;
relTol 0;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-5;
relTol 0;
maxIter 50;
}

Add the next code: the tolerance can be the same.

pcorrFinal
{
$pcorr;
tolerance 5e-9;
relTol 0;
}
tukkuezgi likes this.
uribealdo is offline   Reply With Quote

Old   March 21, 2024, 07:23
Default
  #13
Dcn
New Member
 
Join Date: Aug 2022
Posts: 19
Rep Power: 4
Dcn is on a distinguished road
try changing the fvSolution from
Code:
pcorr
{
           solver PCG;
......
....
}
to

Code:
"pcorr.*"
{
          solver PCG;
......
......
}
and run again
Dcn 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
Second Derivative Zero - Boundary Condition fu-ki-pa OpenFOAM 11 March 27, 2021 05:28
LEMOS InflowGenerator r_gordon OpenFOAM Running, Solving & CFD 103 December 18, 2018 01:58
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 13:38
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 01:34


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