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

Error: keyword n is undefined in dictionary

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By pete20r2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 11, 2018, 09:55
Exclamation Error: keyword n is undefined in dictionary
  #1
New Member
 
mantas
Join Date: Feb 2018
Posts: 2
Rep Power: 0
mantuxas is on a distinguished road
Hello,

I'm trying to run a solver called windDrivenRain for openFoam 2.3.0.
But even when running the tutorial case that is included with the solver I get the following error:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : windDrivenRainFoam
Date   : Dec 11 2018
Time   : 16:51:50
Host   : "mantas-Box"
PID    : 2991
Case   : /home/mantas/Downloads/cubicBuilding/cubicBuilding.windDrivenRainFoam
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Reading transportProperties

Reading field U



--> FOAM FATAL IO ERROR: 
cannot find file

file: /home/mantas/Downloads/cubicBuilding/cubicBuilding.windDrivenRainFoam/0/U at line 0.

    From function regIOobject::readStream()
    in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting
I can't figure out how to fix this issue. The folder that the error is pointing to has multiple U files starting at U1 and ending with U17. If I for example rename one of them to simply U file name, I get other errors.

Maybe someone here could help me with this issue? I'm stuck at this point for couple of days now.

Thank you very much in advance, your help will definitely be appreciated.
mantuxas is offline   Reply With Quote

Old   December 11, 2018, 13:35
Default
  #2
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 11
pete20r2 is on a distinguished road
I've never used this solver before but reading through the Allrun scripts it looks like you've skipped ahead a bit.
It seems to want the U, k, epsilon and nut fields from a separate simpleFoam job copied into the 0 folder.
May be unrelated but:
Code:
file: /home/mantas/Downloads/cubicBuilding/cubicBuilding.windDrivenRainFoam0/U at line 0.
appears to be missing a '/' before the 0. It's probably fine though since OF reacts to putting a U file where it expects.
pete20r2 is offline   Reply With Quote

Old   December 11, 2018, 14:15
Default
  #3
New Member
 
mantas
Join Date: Feb 2018
Posts: 2
Rep Power: 0
mantuxas is on a distinguished road
Quote:
Originally Posted by pete20r2 View Post
I've never used this solver before but reading through the Allrun scripts it looks like you've skipped ahead a bit.
It seems to want the U, k, epsilon and nut fields from a separate simpleFoam job copied into the 0 folder.
May be unrelated but:
Code:
file: /home/mantas/Downloads/cubicBuilding/cubicBuilding.windDrivenRainFoam0/U at line 0.
appears to be missing a '/' before the 0. It's probably fine though since OF reacts to putting a U file where it expects.
Thanks a lot for pointing me into right direction

When, I'm trying to run it with simpleFoam I get the following error message:
Code:
mantas@mantas-Box:~/Downloads/cubicBuilding/cubicBuilding.simpleFoam$ simpleFoam
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : simpleFoam
Date   : Dec 11 2018
Time   : 21:03:14
Host   : "mantas-Box"
PID    : 3120
Case   : /home/mantas/Downloads/cubicBuilding/cubicBuilding.simpleFoam
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Reading field p

Reading field U



--> FOAM FATAL IO ERROR: 
keyword n is undefined in dictionary "/home/mantas/Downloads/cubicBuilding/cubicBuilding.simpleFoam/0/U.boundaryField.inlet"

file: /home/mantas/Downloads/cubicBuilding/cubicBuilding.simpleFoam/0/U.boundaryField.inlet from line 33 to line 14.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 437.

FOAM exiting
And the U file looks like this:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{

    #include "include/ABLConditions"
    
    top
    {
        type            slip;
    }

    inlet
    {
        type             atmBoundaryLayerInletVelocity;
        Uref             $Uref;
        Zref             $Href;
        flowDir                 $windDirection;
        zDir                 $zDirection;
        z0                 $z0;
        value            $internalField;
        zGround         $zGround;    
    }

    outlet 
    {
        type            zeroGradient;
    }
    ground      
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    cube      
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    sides
    {
        type            slip;
    }
}
As far as I understand I should put the n value in the inlet part of this code. But what n value should I use? Should it be a reference to other file?

This was an example case included with the solver so I have hard time figuring out why it isn't working out of the box. Is there any change there is some incompatibility issues due to using different Ubuntu version?
mantuxas is offline   Reply With Quote

Old   December 12, 2018, 05:06
Default
  #4
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 11
pete20r2 is on a distinguished road
There is a difference in the atmBoundaryLayerInletVelocity dictionary keywords between versions. Change "flowDir" to "n".
mantuxas and Agavi like this.
pete20r2 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
LEMOS InflowGenerator r_gordon OpenFOAM Running, Solving & CFD 103 December 18, 2018 00:58
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34


All times are GMT -4. The time now is 02:59.