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

[Technical] Creating your own mesh files

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread 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: 17
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
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
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: 17
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: 4,225
Rep Power: 51
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: 17
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, 00: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: 17
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, 10: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: 237
Rep Power: 18
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, 03:25
Default Hello! I'd like to create a s
  #28
New Member
 
Hansjoerg Seybold
Join Date: Mar 2009
Posts: 15
Rep Power: 17
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: 17
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


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Star CCM Overset Mesh Error (Rotating Turbine) thezack Siemens 7 October 12, 2016 11:14
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
3D Hybrid Mesh Errors DarrenC ANSYS Meshing & Geometry 11 August 5, 2013 06:42
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52


All times are GMT -4. The time now is 01:55.