CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   icoFoam "keyword pFinal is undefined in dictionary" (https://www.cfd-online.com/Forums/openfoam-solving/215977-icofoam-keyword-pfinal-undefined-dictionary.html)

gryphaea1635 March 24, 2019 13:53

icoFoam "keyword pFinal is undefined in dictionary"
 
Dear forum members,



I am a beginner in OpenFOAM and am working on the couette flow tutorial from The Foam House: https://www.thefoamhouse.es/products...l-plates-case/


I am at the stage of running icoFOAM from the case directory. However, I keep getting this error message:



Code:

alfred@alfred-VirtualBox:~/OpenFOAM/alfred-6/run/FoamCases/ppWall$ icoFoam
/*---------------------------------------------------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  6
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 6-e29811f5dff8
Exec  : icoFoam
Date  : Mar 24 2019
Time  : 13:36:59
Host  : "alfred-VirtualBox"
PID    : 19364
I/O    : uncollated
Case  : /home/alfred/OpenFOAM/alfred-6/run/FoamCases/ppWall
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.005

Courant Number mean: 0 max: 0
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 2.21638e-06, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG:  Solving for p, Initial residual = 1, Final residual = 1.27547e-07, No Iterations 24
time step continuity errors : sum local = 1.18442e-16, global = 8.25654e-19, cumulative = 8.25654e-19


--> FOAM FATAL IO ERROR:
keyword pFinal is undefined in dictionary "/home/alfred/OpenFOAM/alfred-6/run/FoamCases/ppWall/system/fvSolution.solvers"

file: /home/alfred/OpenFOAM/alfred-6/run/FoamCases/ppWall/system/fvSolution.solvers from line 14 to line 25.

    From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const
    in file db/dictionary/dictionary.C at line 701.

FOAM exiting

It seems to have something to do with my fvSolution file.



fvSolution:

Code:

FoamFile
{
    version        2.0;
    format        ascii;
    class        dictionary;
    location    "constant";
    object        fvSolution;
}

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

    U
    {
        solver        PBiCG;
        preconditioner    DILU;
        tolerance    1e-05;
        relTol        0;
    }
}

PISO
{
    nCorrectors        2;
    nNonOrthogonalCorrectors  0;
    pRefCell        0;
    pRefValue        0;
}

I don't know if this is needed but here is my fvSchemes:



Code:

FoamFile
{
    version    2.0;
    format        ascii;
    class        dictionary;
    location    "system";
    object        fvSchemes;
}

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
    grad (p)    Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)    Gauss linear;
}

laplacianSchemes
{
    default        none;
    laplacian(nu,U)    Gauss linear orthogonal;
    laplacian((1|A(U)),p)    Gauss linear orthogonal;
}

interpolationSchemes
{
    default        linear;
    interpolate(HbyA) linear;
}

snGradSchemes
{
    default        orthogonal;
}

fluxRequired
{
    default        no;
    p        ;
}

Could someone tell me what I need to fix? Also, please let me know if I need to provide more information.



Thank you so much!

RobertHB March 25, 2019 05:06

As with many OpenFOAM errors it is what it reads. In your fvSolution under solvers { } you have U and p but are missing pFinal. So either copy/paste your p entry and replace p with pFinal or write "(p|pFinal)" instead of p.


All times are GMT -4. The time now is 01:34.