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

[snappyHexMesh] snappyHexMesh - problem using *.obj file

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2013, 07:09
Default snappyHexMesh - problem using *.obj file
  #1
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 12
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, 02:06
Default [solved]
  #2
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 12
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, 18:00
Default
  #3
Member
 
Miro
Join Date: Jan 2013
Location: Europe
Posts: 51
Rep Power: 13
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 7, 2013, 00:20
Default
  #4
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 12
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, 04:54
Default
  #5
Member
 
Miro
Join Date: Jan 2013
Location: Europe
Posts: 51
Rep Power: 13
miro2000 is on a distinguished road
Nice. Anyway, maybe you can do that with foamToVTK?
miro2000 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
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 18:25
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59


All times are GMT -4. The time now is 07:03.