CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing Format & General Technical

Creating your own mesh files

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   August 6, 2007, 14:04
Default Thanks Mattijs. That helps in
  #21
New Member
 
Daniel Einstein
Join Date: Mar 2009
Posts: 22
Rep Power: 8
deinstein is on a distinguished road
Thanks Mattijs. That helps in terms of the faces and boundaries. It is a pretty strict format but so be it. Any guidance on binary vs. ascii?

Dan
deinstein is offline   Reply With Quote

Old   August 6, 2007, 14:50
Default If using OpenFOAM writing bina
  #22
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
If using OpenFOAM writing binary is pretty easy. Construct a regIOObject (e.g. labelIOList) and write with writeObject(..) using streamFormat=BINARY.

If using outside code writing binary is quite hard. Use ascii would be my advice. In 1.4.1 there is the foamFormatConvert to convert mesh files from binary to ascii and vice versa.
mattijs is offline   Reply With Quote

Old   August 6, 2007, 15:05
Default Hmm. My situation would be the
  #23
New Member
 
Daniel Einstein
Join Date: Mar 2009
Posts: 22
Rep Power: 8
deinstein is on a distinguished road
Hmm. My situation would be the latter. The ascii files are huge. You probably hear that a lot. An ascii --> binary utility would be helpful, if a patch, for the future.

I know it is relatively late in the game, but if you guys are in the mood to entertain suggestions, I would suggest an approach similar to the vtk XML unstructured grid format, whereby the ascii header indicates Little or Big Endian as well as type definitions. This will help to make everything as device independent as possible.

Dan
deinstein is offline   Reply With Quote

Old   August 7, 2007, 05:21
Default Hi Daniel! But OpenFOAM rea
  #24
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Daniel!

But OpenFOAM reads gnuzipped files transparently (the content is ascii). And these should be even smaller than the binary files. Because (correct me if I'm wrong, I hardly ever use the binary-format) in the binary files all digits get stored wheras in the Ascii-files only the number of digits specified in the controlDict get stored. And if "less information" is zipped according to Shannon it should be always smaller than the binary (which contains more information)

I think the ascii/gnuzipped variation has both advantages: less storage (even if you write all digits) and being VERY portable.

@xml: As I understand it the file format of OpenFOAM was specified before everyone and his dog was using XML (I don't know if XML was then even specified). For all practical purposes it looks rather XMLy to me (structured etc). It just doesn't look like XML (that's enough Zen for today)
__________________
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   October 11, 2007, 05:16
Default Hi all, i am a new user of
  #25
New Member
 
soufymer
Join Date: Mar 2009
Posts: 5
Rep Power: 8
soufy is on a distinguished road
Hi all,

i am a new user of openfoam. and i find a diffeculty to use it . please i need a help.
my question is: it is possible to import a geometrie in formet ".step " from a CAD ( for exemple solidworks ).
because for the complexe geometrie it's difficult.
please it's urgent!!!!!
soufy is offline   Reply With Quote

Old   January 1, 2009, 01:24
Default Hi all, i am a new user of
  #26
Senior Member
 
NAVEEN.K.M
Join Date: Mar 2009
Location: Bangalore, Karnataka, india
Posts: 114
Rep Power: 8
naveen is on a distinguished road
Hi all,

i am a new user of openfoam. and i find a diffeculty to use it . please i need a help.
my question is: is it possible to import a geometry in formet ".msh " from a fluentmeshTofOAM AND GAMBIT TO FOAM....

please it's urgent!!!!!
naveen is offline   Reply With Quote

Old   January 4, 2009, 11:35
Default If you have a .msh file, use f
  #27
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 215
Rep Power: 9
fra76 is on a distinguished road
If you have a .msh file, use fluentMeshToFoam or fluent3DMeshToFoam to convert it to OpenFOAM (you need a "minimal" case to work in; copying a tutorial case could be a good starting point).
If you find any problems with those tools, post the error in the forum...

Hope this helps,
Francesco
fra76 is offline   Reply With Quote

Old   March 12, 2009, 04:25
Default Hello! I'd like to create a s
  #28
New Member
 
Hansjoerg Seybold
Join Date: Mar 2009
Posts: 16
Rep Power: 8
hansjoerg is on a distinguished road
Hello!
I'd like to create a simple but HUGE(~500^3) block structured mesh from voxel tomography data.
(file of binary values 0,1, cubic blocks)

I tried to create a blockmesh dict with a script but I run out of memory when using blockmesh.
Also the mesh finally has to be decomposed for multiple CPU.

Does anybody have a idea how i can handle this problem.

thanks
hansjoerg

P.S. Sorry for double posting, but i've put it by accident in the gambit thread
hansjoerg is offline   Reply With Quote

Old   April 9, 2009, 07:36
Default Get points of a face
  #29
New Member
 
Join Date: Mar 2009
Posts: 20
Rep Power: 8
Xabi is on a distinguished road
Hi all!

Do anyone know how to get the points that define a surface?

Writing: mesh_faces()[i] I obtain the label with the four points for the face [i] but I am not able to split it up in order to thereafter read the number of point and get their values from the "points" file.
Thanks in advance.
Xabi
Xabi 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
creating geometry using "Script files" in ICEMCFD jaber Main CFD Forum 1 November 11, 2007 10:28
creating CFX mesh igor CFX 0 January 15, 2007 19:25
Creating a 2D Mesh using ICEM VSB CFX 0 November 1, 2006 23:17
Creating a mesh in Gambit Vidya Raja FLUENT 3 October 3, 2005 10:45
creating mesh using Gambit Rucy Hong FLUENT 3 April 26, 2005 23:27


All times are GMT -4. The time now is 18:24.