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

simpleFoam: problem with the U file

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2012, 11:41
Default simpleFoam: problem with the U file
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
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
samiam1000 is offline   Reply With Quote

Old   March 21, 2012, 15:07
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   March 22, 2012, 03:46
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
Thanks for answering.

Got it!

Samuele
samiam1000 is offline   Reply With Quote

Old   December 17, 2012, 07:22
Default
  #4
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18
idrama is on a distinguished road
Hallo,

instead of uniform write constant. It's better.

Cheers
idrama is offline   Reply With Quote

Old   November 10, 2015, 14:05
Default Similar Problem
  #5
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
Hi All,

I am trying to run a DDES simulations, So I ran a sepearate RANS simulation first with the same mesh and then copied the U and p in to the 0 of the DDES case and started the simuation and I got this error,

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0
Exec   : pimpleFoam
Date   : Nov 10 2015
Time   : 18:00:57
Host   : "IT000968"
PID    : 27209
Case   : /mnt/hdd/WorkspaceHDD/Morphing/20ms/NWF/SmallInlet/Test3D/C1-A0Sp-IDDES
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

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model SpalartAllmaras
SpalartAllmarasCoeffs
{
    sigmaNut        0.66666;
    kappa           0.41;
    Cb1             0.1355;
    Cb2             0.622;
    Cw2             0.3;
    Cw3             2;
    Cv1             7.1;
    Cv2             5;
}

Creating finite volume options
No finite volume options present


PIMPLE: Operating solver in PISO mode


Starting time loop



--> FOAM FATAL IO ERROR: 
wrong token type - expected int, found on line 50 the doubleScalar 0.01

file: /mnt/hdd/WorkspaceHDD/Morphing/20ms/NWF/SmallInlet/Test3D/C1-A0Sp-IDDES/system/controlDict.functions.fieldAverage1.outputInterval at line 50.

    From function operator>>(Istream&, int&)
    in file primitives/ints/int/intIO.C at line 68.

FOAM exiting
But somewhere in my memory I rember doing this for an LES case and it worked,

- Is this the right way to intiate a Unsteady case with a steady simulation or am i doing some thing wrong,

Code:
application pimpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 0.2;
deltaT 5.5e-6;
writeControl adjustableRunTime;
writeInterval 0.01;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression compressed;
timeFormat general;
timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
maxDeltaT 2.25e-5;//2.25e-5
maxCo 1;//0.9
adjustTimeStep yes;
libs 
(
);
functions 
{
fieldAverage1
    {
        type            fieldAverage;
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        enabled         true;
        timeStart           0.1;// at 10FTT start measuring
        timeEnd             0.25;// end after simulation end
        outputControl       outputTime;
        outputInterval     0.01;// every flow through time
        resetOnOutput     false;
                

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }

            p
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }
        );
    }
- How can i get rid of this error. I am trying to do the mean and save it I have out same out put as write interval never seems to work, but long ago it worked with different number whats happening here

Regards,
Hasan K.J
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius
Alhasan is offline   Reply With Quote

Old   November 10, 2015, 16:47
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
Quote:
Originally Posted by Alhasan View Post
Code:
--> FOAM FATAL IO ERROR: 
wrong token type - expected int, found on line 50 the doubleScalar 0.01

file: [...]/system/controlDict.functions.fieldAverage1.outputInterval at line 50.
[...]

Code:
fieldAverage1
    {
        type            fieldAverage;
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        enabled         true;
        timeStart           0.1;// at 10FTT start measuring
        timeEnd             0.25;// end after simulation end
        outputControl       outputTime;
        outputInterval     0.01;// every flow through time
        resetOnOutput     false;
In other words, change this:
Code:
outputInterval     0.01;// every flow through time
To something like this:
Code:
outputInterval     1;// every flow through time
mizzou and Luana.M. like this.
wyldckat 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
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 14:14
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 10:19.