CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   simpleFoam: problem with the U file (http://www.cfd-online.com/Forums/openfoam/98895-simplefoam-problem-u-file.html)

samiam1000 March 21, 2012 12:41

simpleFoam: problem with the U file
 
Dear all,

I am trying to run simpleFoam, getting a very strange error. I am pretty sure that the same case worked until a couple of weeks ago.

Anyway, that's the error that I get:
Code:

lab@lab-laptop:~/Documenti/cases_OF/OF_case8_incomp_T_vol$ simpleFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : simpleFoam
Date  : Mar 21 2012
Time  : 16:36:28
Host  : "lab-laptop"
PID    : 7436
Case  : /home/lab/Documenti/cases_OF/OF_case8_incomp_T_vol
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:
wrong token type - expected word, found on line 50 the doubleScalar 0.0034803

file: /home/lab/Documenti/cases_OF/OF_case8_incomp_T_vol/0/U::boundaryField::bc_hc1_ext::flowRate at line 50.

    From function operator>>(Istream&, word&)
    in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting

and this is my U file:
Code:

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

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

internalField  uniform (0 0 0);

boundaryField
{
    wall-air_external
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    wall-air_internal
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    bc_intake
    {
        type            zeroGradient;
    }
    bc_hc2_ext
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    bc_hc2_int
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    bc_hc1_ext
    {
        type            flowRateInletVelocity;
        flowRate        0.0034803; // It's an incompressible case, hence the flow has to be in [m^3/s] (+ inlet, - outlet)
        value          uniform (-0.8203572715 0 -0.0717719589);
    }
    bc_hc1_int
    {
        type            flowRateInletVelocity;
        flowRate        0.0034803; // It's an incompressible case, hence the flow has to be in [m^3/s] (+ inlet, - outlet)
        value          uniform (-0.8203572715 0 -0.0717719589);
    }
    bc_back_1
    {
        type            flowRateInletVelocity;
        flowRate        0.0016784;
        value          uniform (0 0 -0.097500752);
    }
    bc_back_2
    {
        type            flowRateInletVelocity;
        flowRate        0.0014643;
        value          uniform (0 0 -0.1386807915);
    }
    bc_back_3
    {
        type            flowRateInletVelocity;
        flowRate        0.0014643;
        value          uniform (0 0 -0.1386807915);
    }
    bc_back_4
    {
        type            flowRateInletVelocity;
        flowRate        0.0014643;
        value          uniform (0 0 -0.1386807915);
    }
    bc_back_5
    {
        type            flowRateInletVelocity;
        flowRate        0.0014643;
        value          uniform (0 0 -0.1386807915);
    }
    bc_back_6
    {
        type            flowRateInletVelocity;
        flowRate        0.0014643;
        value          uniform (0 0 -0.1386807915);
    }
    symmetry-air_infinite
    {
        type        symmetryPlane;
    }
    symmetry-air_internal
    {
        type        symmetryPlane;
    }
    symmetry-air_external
    {
        type        symmetryPlane;
    }
    packs_front_6
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    packs_front_4
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    packs_front_5
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    packs_front_3
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    packs_front_2
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    walls_air_infinite
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    walls_ceiling
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    walls_floor-air_infinite
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    walls_floor-air_external
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    symmetry_2-air_infinite
    {
        type        symmetryPlane;
    }
    symmetry_2-air_internal
    {
        type        symmetryPlane;
    }
    symmetry_2-air_external
    {
        type        symmetryPlane;
    }
    bc_outlet_external
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    chamber_inlet
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    chamber_outlet
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
}
// ************************************************************************* //

Could anyone help?

Thanks,

Samuele

wyldckat March 21, 2012 16:07

Greetings Samuele,

Did the case work back then with OpenFOAM 2.0.1 or 2.1.0?
According to the output and file, it looks like a few weeks ago you were still using 2.0.1 and now are using 2.1.0.

The solution should be something like this on the line that gives the error:
Code:

flowRate                    uniform 0.0034803;
Here is a recent and similar reported issue: http://www.openfoam.org/mantisbt/view.php?id=471

Best regards,
Bruno

samiam1000 March 22, 2012 04:46

Thanks for answering.

Got it!

Samuele

idrama December 17, 2012 07:22

Hallo,

instead of uniform write constant. It's better.

Cheers


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