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

FOAM FATAL IO ERROR: attempt to read beyond EOF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2023, 00:47
Default FOAM FATAL IO ERROR: attempt to read beyond EOF
  #1
Dcn
New Member
 
Join Date: Aug 2022
Posts: 16
Rep Power: 3
Dcn is on a distinguished road
Hi everyone i am using OpenFOAM-2.3.0 tutorial case called motorbike
i try to run it using rapidCFD but i get the error as shown below

Code:
file: /home/urban/DL-workspace/OpenFOAM/OpenFOAM-2.3.0/tutorials/incompressible/simpleFoam/motorBike_test_rapidCFD/system/controlDict.functions.readFields.fields at line 18.

    From function ITstream::read(token&)
    in file db/IOstreams/Tstreams/ITstream.C at line 83.

FOAM exiting
This is the control dictionary file

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

libs
(
    "libOpenFOAM.so"
    "libincompressibleTurbulenceModel.so"
    "libincompressibleRASModels.so"
);

application     simpleFoam;

startFrom       startTime; // latestTime;

startTime       0;

stopAt          endTime;

endTime         500;

deltaT          1;

writeControl    timeStep;

writeInterval   100;

purgeWrite      0;


//- Uncomment to have regular (every 2 hours of run time) restart files
//secondaryWriteControl    cpuTime; // runtime
//secondaryWriteInterval   7200;    // seconds
//secondaryPurgeWrite      1;       // keep all but last dump


writeFormat     binary;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    #include "readFields"
    #include "streamLines"
    #include "wallBoundedStreamLines"
    #include "cuttingPlane"
    #include "forceCoeffs"
}


// ************************************************************************* //
what changes shall i make in controlDict file to solve the error of "attempt to read beyond EOF"

thank you
Dcn is offline   Reply With Quote

Old   October 4, 2023, 05:09
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
OF tells you where the error appears:
Code:
controlDict.functions.readFields.fields at line 18.
Check for unbalanced brackets, missing semicolons ...
AtoHM is offline   Reply With Quote

Old   October 6, 2023, 08:19
Default
  #3
Dcn
New Member
 
Join Date: Aug 2022
Posts: 16
Rep Power: 3
Dcn is on a distinguished road
Hi i have resolved the above issue but now i am faced with new issue as shown below
Code:
--> FOAM FATAL ERROR:
Unknown function type readFields

Valid functions are :

7
(
fieldAverage
fieldCoordinateSystemTransform
fieldValueDelta
patchProbes
probes
sets
surfaces
)



    From function functionObject::New(const word& name, const Time&, const dictionary&)
    in file db/functionObjects/functionObject/functionObject.C at line 92.

FOAM exiting
it seems it is related with the controlDict but i can't figure it out
my controlDict is shown below
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

libs
(
    "libOpenFOAM.so"
    "libincompressibleTurbulenceModel.so"
    "libincompressibleRASModels.so"
);

application     simpleFoam;

startFrom       startTime; // latestTime;

startTime       0;

stopAt          endTime;

endTime         500;

deltaT          1;

writeControl    timeStep;

writeInterval   100;

purgeWrite      0;


//- Uncomment to have regular (every 2 hours of run time) restart files
//secondaryWriteControl    cpuTime; // runtime
//secondaryWriteInterval   7200;    // seconds
//secondaryPurgeWrite      1;       // keep all but last dump


writeFormat     binary;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    #include "readFields"
    #include "streamLines"
    #include "wallBoundedStreamLines"
    #include "cuttingPlane"
    #include "forceCoeffs"
}


// ************************************************************************* //
Dcn is offline   Reply With Quote

Old   October 6, 2023, 09:39
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,676
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You need the fieldFunctionObjects library for readFields
LuckyTran is offline   Reply With Quote

Old   October 9, 2023, 00:52
Default
  #5
Dcn
New Member
 
Join Date: Aug 2022
Posts: 16
Rep Power: 3
Dcn is on a distinguished road
Hi thank you for your reply now i am getting the error as shown below
Code:
--> FOAM FATAL ERROR:
Unknown function type readFields

Valid functions are :

7
(
fieldAverage
fieldCoordinateSystemTransform
fieldValueDelta
patchProbes
probes
sets
surfaces
)



    From function functionObject::New(const word& name, const Time&, const dictionary&)
    in file db/functionObjects/functionObject/functionObject.C at line 92.

FOAM exiting
where do i need to put those valid functions in which file

thank you
Dcn 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
FOAM FATAL IO ERROR attempt to read beyond EOF unoder OpenFOAM Running, Solving & CFD 10 April 16, 2024 03:03
FOAM FATAL IO ERROR: attempt to read beyond EOF HeloïseM OpenFOAM 1 February 26, 2023 10:14
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." lethu OpenFOAM Meshing & Mesh Conversion 1 June 3, 2020 07:49
error with reactingFoam BakedAlmonds OpenFOAM Running, Solving & CFD 4 June 22, 2016 02:21
[OpenFOAM] Take derivative of mean velocity in paraFoam hiuluom ParaView 13 April 26, 2016 06:44


All times are GMT -4. The time now is 13:12.