CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   MshToFoam (http://www.cfd-online.com/Forums/openfoam-pre-processing/62056-mshtofoam.html)

hariya03 July 7, 2008 03:35

I have copied the .msh file co
 
I have copied the .msh file converted from adventure on windows to the folder smartvalve in simplefoam

The smartvalve is a new case I created by right clicking on the case browser and by using create case command.

The mesh file is placed in the smartvalve case folder. I have not did any proceedings in system and constant directories. First I started the mshToFoam command directly.

The mshToFoam command exits as like this


*---------------------------------------------------------------------------*\

| ========= |
|

| \ / F ield | OpenFOAM: The Open Source CFD Toolbox
|

| \ / O peration | Version: 1.4.1
|

| \ / A nd | Web: http://www.openfoam.org
|

| \/ M anipulation |
|

\*---------------------------------------------------------------------------*/



Exec : mshToFoam OpenFOAM/harikr-1.4.1/run/tutorials/simpleFoam
smartvalve CFD

Date : Jul 04 2008

Time : 18:21:20

Host : D6

PID : 22462

Root : OpenFOAM/harikr-1.4.1/run/tutorials/simpleFoam

Case : smartvalve

Nprocs : 1

Create time







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



file: CFD at line 1.



From function void Istream::getBack(token& t)

in file db/IOstreams/IOstreams/Istream.C at line 44.



FOAM exiting


could advice me where I had make mistake?

gschaider July 7, 2008 04:20

Hi Hari! a) you are not ver
 
Hi Hari!

a) you are not very specific: what was the msh-file generated with? etc
b) from your introduction I assume that the msh-file worked on windows? Propably the file was touched on the windows-system and introduced LF/CR instead of only LF and now the converter is choking on the CR. See http://en.wikipedia.org/wiki/End_of_...ommon_problems and use dos2unix on the file

Bernhard

hariya03 July 7, 2008 06:04

Thank you Mr.Bernhard, Sorr
 
Thank you Mr.Bernhard,

Sorry for the inconvenience.

I have created a mesh file from the IGES of a part by using ADVENTURE ON WINDOWS. I have saved it in .msh extension.

I rebooted to LINUX(OpenSUSE 10.3) and placed in directory as below
home/harikr/OpenFOAM/harikr-1.4.1/run/tutorials/simpleFoam/smartvalve/cfd12.msh

smartvalve is the new case directory i created.

When using mshToFoam command i used this mesh file cfd12.msh and the above said error occurs.

I am new to linux environment.

also with reference to your website where to execute the "tr" command

Would I need to convert the .msh file suit to unix system? If means how to do it.

Could you advice me where to use this dos2unix command as whether in MS command prompt or in UNIX Xterminal itself.

Thankyou,

V.Hari Krishnan

gschaider July 7, 2008 10:23

Hi! dos2unix is installed o
 
Hi!

dos2unix is installed on most Linux-systems (usually from the package of the same name)

Usage is easy (as the man-page will tell you): dos2unix test.msh

Bernhard

hariya03 July 9, 2008 03:22

Thank you Mr.Bernhard, The
 
Thank you Mr.Bernhard,

The problem is resolved. where the mistake is on myside. I have placed the mesh file in case directory instead of placing it in working directory


All times are GMT -4. The time now is 22:15.