CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Technical] Creating your own mesh files (https://www.cfd-online.com/Forums/openfoam-meshing/61656-creating-your-own-mesh-files.html)

deinstein August 6, 2007 14:04

Thanks Mattijs. That helps in
 
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

mattijs August 6, 2007 14:50

If using OpenFOAM writing bina
 
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.

deinstein August 6, 2007 15:05

Hmm. My situation would be the
 
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

gschaider August 7, 2007 05:21

Hi Daniel! But OpenFOAM rea
 
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)

soufy October 11, 2007 05:16

Hi all, i am a new user of
 
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!!!!!

naveen January 1, 2009 00:24

Hi all, i am a new user of
 
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!!!!!

fra76 January 4, 2009 10:35

If you have a .msh file, use f
 
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

hansjoerg March 12, 2009 03:25

Hello! I'd like to create a s
 
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

Xabi April 9, 2009 07:36

Get points of a face
 
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


All times are GMT -4. The time now is 06:51.