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

MshToFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2008, 03:35
Default I have copied the .msh file co
  #1
New Member
 
Hari Krishnan
Join Date: Mar 2009
Location: chennai, Tamil nadu, india
Posts: 27
Rep Power: 17
hariya03 is on a distinguished road
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?
hariya03 is offline   Reply With Quote

Old   July 7, 2008, 04:20
Default Hi Hari! a) you are not ver
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 7, 2008, 06:04
Default Thank you Mr.Bernhard, Sorr
  #3
New Member
 
Hari Krishnan
Join Date: Mar 2009
Location: chennai, Tamil nadu, india
Posts: 27
Rep Power: 17
hariya03 is on a distinguished road
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
hariya03 is offline   Reply With Quote

Old   July 7, 2008, 10:23
Default Hi! dos2unix is installed o
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 9, 2008, 03:22
Default Thank you Mr.Bernhard, The
  #5
New Member
 
Hari Krishnan
Join Date: Mar 2009
Location: chennai, Tamil nadu, india
Posts: 27
Rep Power: 17
hariya03 is on a distinguished road
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
hariya03 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[mesh manipulation] MshToFoam hariya03 OpenFOAM Meshing & Mesh Conversion 3 July 9, 2008 10:41
MshToFoam hariya03 OpenFOAM Bugs 0 July 7, 2008 03:37
[Other] MshToFoam hariya03 OpenFOAM Meshing & Mesh Conversion 0 July 7, 2008 03:32


All times are GMT -4. The time now is 21:05.