CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] Problem with simpleFoam (https://www.cfd-online.com/Forums/openfoam-meshing/98961-problem-simplefoam.html)

appa March 22, 2012 13:19

Problem with simpleFoam
 
Hi,

I am learning how to use OpenFoam and I am really lost right now.

I created a 3D mesh file using gmesh (based on a scilab script to generate a geo file with NACA dat file).

I created a case directory under the simpleFoam airFoil2D directory, but after the simpleFoam command on a terminal I get this error .

PHP Code:

--> FOAM FATAL IO ERROR
keyword FrontAndBack is undefined in dictionary "/home/appa/Bureau/essaiOF/0/p::boundaryField"

file: /home/appa/Bureau/essaiOF/0/p::boundaryField from line 25 to line 40.

    From 
function dictionary::subDict(const wordkeyword) const
    
in file db/dictionary/dictionary.C at line 461.

FOAM exiting 

So I guess that the airFoil2D tutorial can not run my 3D example and I don't know how to it.

PHP Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    
inlet
    
{
        
type            freestreamPressure;
    }

    
outlet
    
{
        
type            freestreamPressure;
    }

    
wall
    
{
        
type            zeroGradient;
    }

    
frontAndBack
    
{
        
type            empty;
    }
}

// ************************************************************************* // 

I am not very good with C++ language so any hint would be helpful
thanks in advance

lovecraft22 March 22, 2012 16:32

Hi;
the solver is looking for FrontAndBack and is not finding it in your pressure boundary condition because it states frontAndBack instead.

Always remember that openFoam is case sensitive so you need to change that to a capital initial word: FrontAndBack.

appa March 23, 2012 02:45

You're right !!thank you for this quick answer. In fact, I had to do some changes in the boundary file under the polyMesh directory to make the keywords match. I guess I have to learn how to make programs with C++ to be more efficient with OF.

libia87 May 3, 2012 03:45

I have the same error!!!

--> FOAM FATAL IO ERROR:
keyword s1 is undefined in dictionary "/home/xr12/Anna/buoyantBoussinesqSimpleFoam/hotRoom_20/0/p_rgh::boundaryField"

and my problem is not the capital leters, what could it be??

appa May 3, 2012 05:59

you have to make sure that the keyword s1 is defined in all the files, here it seems that you didn't define it in the file "/home/xr12/Anna/buoyantBoussinesqSimpleFoam/hotRoom_20/0/p_rgh"


All times are GMT -4. The time now is 17:37.