CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Problems with simpleFoam (https://www.cfd-online.com/Forums/openfoam/93071-problems-simplefoam.html)

samiam1000 October 4, 2011 08:52

Problems with simpleFoam
 
Dear all,

when I try to run simpleFoam (to simulate wind over terrain - let's say that I am using the turbine siting tutorial, changing the stl fil!) I get this error:

Code:

sammy@nash:~/Desktop/mesh_test/cases/suisse$ simpleFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-cce6c678443c
Exec  : simpleFoam
Date  : Oct 04 2011
Time  : 14:48:43
Host  : nash
PID    : 20118
Case  : /home/sammy/Desktop/mesh_test/cases/suisse
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

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  in "/lib/x86_64-linux-gnu/libc.so.6"
#3  in "/lib/x86_64-linux-gnu/libm.so.6"
#4  log in "/lib/x86_64-linux-gnu/libm.so.6"
#5  Foam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#6  Foam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField::atmBoundaryLayerInletVelocityFvPatchVectorField(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#7  Foam::fvPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField>::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#8  Foam::fvPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
#9  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
#10  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readField(Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
#11  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readField(Foam::Istream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
#12  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
#13 
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
#14  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#15 
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
Floating point exception

Could anyone help?

Thanks a lot,

Samuele.

PS: the mesh is ok (the command chackMesh says this!)..

philipp. October 4, 2011 11:21

Hello Samuele,

there seems to be a problem with the "Reading/calculating face flux field phi". Maybe you should check your initial and boundary conditions again. For more help you probably need to post more details.

Regards, Philipp

samiam1000 October 4, 2011 11:22

Hi Philipp,

I can share my case, if you want. Maybe it is better to copy in a message just few files. Please, tell me which files I should post in order to allow you to help!

Thanks,

Samuele

philipp. October 4, 2011 13:32

Hello Samuele,

I just checked the tutorials - you are using OF2.0.1, right? There is a turbineSiting tutorial for the windSimpleFoam solver. Maybe you should use that solver...
If that does not work, which files you edited and which are like the ones of the tutorial.

Philipp

samiam1000 October 4, 2011 13:57

Dear Philipp,

it is curios that I get the same errore using the solver windSimpleFoam.

Also, if I use the file terrain.stl (the one that you can find in the turbineSitting tutorial) the command simpleFoam in my case works.

So, let me copy here all my files.. That's very strange, imho..

Here are the files:

1. epsilon

Code:

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

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

#include        "include/initialConditions"

internalField  uniform $turbulentEpsilon;

boundaryField
{
    #include "include/ABLConditions"

    "terrain_.*"
    {
        type            epsilonWallFunction;
        Cmu            0.09;
        kappa          0.4;
        E              9.8;
        value          $internalField;
    }

    outlet
    {
        type            zeroGradient;
    }

    inlet
    {
        type            atmBoundaryLayerInletEpsilon;
        Ustar          $Ustar;
        z              $zDirection;
        z0              $z0;
        value          $internalField;
        zGround        $zGround;
    }

    ground
    {
        type            zeroGradient;
    }

    #include "include/sideAndTopPatches"
}


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

2. p

Code:

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

#include        "include/initialConditions"

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

internalField  uniform $pressure;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value          $internalField;
    }

    "terrain_.*"
    {
        type            zeroGradient;
    }

    ground
    {
        type            zeroGradient;
    }

    #include "include/sideAndTopPatches"
}

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

3. nut

Code:

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

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

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            calculated;
        value          uniform 0;
    }

    outlet
    {
        type            calculated;
        value          uniform 0;
    }

    "terrain_.*"
    {
        type            nutkRoughWallFunction;
        Ks              0.2; //Ks = 20 Z0
        Cs              0.5;
        value          uniform 0.0;
    }

    ground
    {
        type            calculated;
        value          uniform 0;
    }

    #include "include/sideAndTopPatches"
}


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

4. k

Code:

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

#include        "include/initialConditions"

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

internalField  uniform $turbulentKE;

boundaryField
{
    #include "include/ABLConditions"

    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0.0;
        value          $internalField;
    }

    inlet
    {
        type            fixedValue;
        value          $internalField;
    }

    "terrain_.*"
    {
        type            kqRWallFunction;
        value          uniform 0.0;
    }

    ground
    {
        type            zeroGradient;
    }

    #include "include/sideAndTopPatches"
}


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

5. U

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.7.1                                |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.com              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include        "include/initialConditions"

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

internalField  uniform $flowVelocity;

boundaryField
{
    #include "include/ABLConditions"

    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          $internalField;
    }

    inlet
    {
        type            atmBoundaryLayerInletVelocity;
        Uref            $Uref;
        Href            $Href;
        n              $windDirection;
        z              $zDirection;
        z0              $z0;
        value          $internalField;
        zGround        $zGround;
    }

    "terrain_.*"
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }

    ground
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }

    #include "include/sideAndTopPatches"
}


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

6. ABLConditions

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.7.1                                |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.com              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

Ustar                0.82;
Uref                10.0;
Href                20;
z0                  0.1;
turbulentKE          1.3;
windDirection        (1 0 0);
zDirection          (0 0 1);
zGround              935.0;

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

7. initialConditions

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.7.1                                |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.com              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

flowVelocity        (0 0 0);
pressure            0;
turbulentKE          1.3;
turbulentEpsilon    0.01;

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

8. sideAndTopPatches

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.7.1                                |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.com              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

top
{
    type slip;
}

sides
{
    type slip;
}

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


philipp. October 5, 2011 05:30

Hi Samuele,
if it works with the stl-file of the tutorial there has to be a problem with your file respectly with your mesh. Even if checkMesh says that the mesh is ok there still can be problems. Maybe you can use a simpler geometriem at first.
Otherwise you can try different initial and boundary conditions. Maybe that will help.
Philipp


All times are GMT -4. The time now is 09:23.