CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] bad stream error (https://www.cfd-online.com/Forums/paraview/120412-bad-stream-error.html)

immortality July 6, 2013 09:40

bad stream error
 
what have to do to resolve this error?
Code:

ehsan@Ehsan-com:~/Desktop/WR_2$ paraFoam


--> FOAM FATAL IO ERROR:
Attempt to get back from bad stream

file: /home/ehsan/Desktop/WR_2/1.2e-05/U_0 at line 26324.

    From function void Istream::getBack(token&)
    in file db/IOstreams/IOstreams/Istream.C at line 56.

FOAM exiting


wyldckat July 7, 2013 10:46

Quote:

Originally Posted by immortality (Post 438131)
what have to do to resolve this error?
Code:

ehsan@Ehsan-com:~/Desktop/WR_2$ paraFoam


--> FOAM FATAL IO ERROR:
Attempt to get back from bad stream

file: /home/ehsan/Desktop/WR_2/1.2e-05/U_0 at line 26324.

    From function void Istream::getBack(token&)
    in file db/IOstreams/IOstreams/Istream.C at line 56.

FOAM exiting


Remove the file "1.2e-05/U_0". Problem solved. :p

iftikhar March 25, 2019 11:01

FOAM FATAL IO ERROR: Attempt to get back from bad stream
 
1 Attachment(s)
I am facing a similar problem.
First I have written a gmsh script file by the name of rectBlock.geo,
and then I have save the mesh file by the name rectBlock.msh.

when I used the command gmshToFoam rectBlock.msh, I got the following error.

I am in the run directory of openfoam.



--> FOAM FATAL IO ERROR:
Attempt to get back from bad stream

file: IStringStream.sourceFile at line 0.

From function bool Foam::Istream::getBack(Foam::token&)
in file db/IOstreams/IOstreams/Istream.C at line 56.

FOAM exiting


files are attached

Any help.

alexeym March 26, 2019 09:25

Hi,

gmshToFoam can convert only version 2 of Gmsh format. You MSH file is version 4. Use "-format msh2" command line switch when you generate MSH file (or select "Verion 2 ASCII" if you use Export from GUI).

IFX21 August 7, 2021 21:05

Really helpful, Thank you!!


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