CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

snappyHexMesh - problem using *.obj file

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 3, 2013, 06:09
Default snappyHexMesh - problem using *.obj file
  #1
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Hi all,

I am using a *.obj file as my geometry file instead of a *.stl file.
The problem is that stl files do not show curves whereas the curves on the geometry can be seen in *.obj file. Thus i am trying to use an obj file. The obj file i am trying to use has been generated using ProE wildfire 4. The geometry was exported in wavefront *.obj format.

The problem is that i cannot run surfaceFeatureExtract cause openFoam gives the following error -

Create time

Reading surfaceFeatureExtractDict

Surface : "pipe.obj"


Feature line extraction is only valid on closed manifold surfaces.

--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 0 the label 0

file: IStringStream.sourceFile at line 0.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting


Also if i do not run surfaceFeatureExtract and simply run snappyHexMesh -overwrite, i get the following errors -

Create time

Create mesh for time = 0

Read mesh in = 2.52 s

Overall mesh bounding box : (-51 -51 -1) (51 51 51)
Relative tolerance : 1e-06
Absolute matching distance : 0.00015333623

--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 0 the label 0

file: IStringStream.sourceFile at line 0.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting

Can anyone explain what i am doing wrong? The obj file seems to work flawlessly with the motorbike tutorial.

I am attaching my SHMDict and obj files in this zip file - pipe.zip
inf.vish is offline   Reply With Quote

Old   October 4, 2013, 01:06
Default [solved]
  #2
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
I solved the problem.

Just delet everything else in the *.obj file apart from
v
vn
vt
f
inf.vish is offline   Reply With Quote

Old   October 6, 2013, 17:00
Default
  #3
Member
 
Miro
Join Date: Jan 2013
Location: Europe
Posts: 51
Rep Power: 4
miro2000 is on a distinguished road
Is there a way to convert it to .stl? I bet there is. Maybe surface convert can do that?
miro2000 is offline   Reply With Quote

Old   October 6, 2013, 23:20
Default
  #4
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Quote:
Originally Posted by miro2000 View Post
Is there a way to convert it to .stl? I bet there is. Maybe surface convert can do that?
Hey,

Yeah there is a way to convert it to .stl. It cannot be done directly though using surfaceConvert. You have to open the .obj file in paraview and then File> Save Data - save as .vtk . Go to the directory where the file is saved and perform surfaceConvert <vtk_file_name> <stl_file_name>.
inf.vish is offline   Reply With Quote

Old   October 7, 2013, 03:54
Default
  #5
Member
 
Miro
Join Date: Jan 2013
Location: Europe
Posts: 51
Rep Power: 4
miro2000 is on a distinguished road
Nice. Anyway, maybe you can do that with foamToVTK?
miro2000 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
swak4foam building problem GGerber OpenFOAM Installation 54 April 24, 2015 16:02
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00
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 21:57.