CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   Output Format of MetaMesh (http://www.cfd-online.com/Forums/openfoam-meshing/61633-output-format-metamesh.html)

t42 August 3, 2007 04:28

Hi Forum, as i wrote in a m
 
Hi Forum,

as i wrote in a message few days ago iám searching
for a easy to use pre-processor/meshing tool which
also is not to expansive.

One of the candidates is MetaMesh. But i dont know if it creates understandable formats for OF.

I´ll cite a few sentences of the manual concerning output formats. Maybe somebody can tell
me if it will work:

Formats of the MetaMesh output file

In the structured, conformal mesh of MetaMesh, nodes are referenced withthe indices [I,J,K] where I (the index along the x axis) extends
from 0 to Imax, J (y axis) from 0 to Jmax and
K (z axis) from 0 to Kmax. The number of elements is approximately equal to the number of nodes. A single element(in the direction of positive x, y and z ) is associated with each node for
storage.
MetaMesh assigns integer region numbers to nodes and elements to associate them with structures in the solution space. For example, in an elec-
trostatic solution all nodes and elements that constitute an electrode would share the same region number. Physical properties are associated with regions only in subsequent solution programs. Therefore, the operation of
MetaMesh is independent of the nature of the physical solution – the program can be applied to any type of finite-element calculation (electrostatics,magnetostatics, electromagnetics, mechanics, thermal transport,...).
The format of the MetaMesh binary output file is simple and compact, making it easy to transfer information to other programs. The following code
extract comprises the entire output algorithm:

WRITE (OutMDF) IMax,JMax,KMax
DO K=0,KMax
DO J=0,JMax
DO I=0,IMax
WRITE (OutMDF) &
M(I,J,K).x,M(I,J,K),y,M(I,J,K).z, &
RegNo(I,J,K),RegUp(I,J,K)
END DO
END DO
END DO

The binary sequential file contains the mesh size parameters IMax, JMax and KMax (4-byte integers) followed by (IMax+1)(JMax+1)(KMax+1)data sequences containing the following quantities:
• The spatial coordinates of the node (x, y, z) (4 byte real)
• The region number of the node (RegNo) (1 byte integer)
• The region number of the associated upper element (RegUp) (1 byte integer)
The MetaMesh binary output file has a name of the form FPrefix.MDF
(MetaMesh Data File), where FPrefix is the prefix of the script file (1-20 176 characters). The numerical formats are consistent with FORTRAN 95 for I386 computers.
Optionally, MetaMesh can generate output files in text format for easy transfer of information to your own programs. In this case, the file has
a name of the form FPrefix.MTF (MetaMesh Text File). The following excerpt illustrates the text file format:

MetaMesh Output File - text format (Field Precision)
IMax: 20
JMax: 20
KMax: 40
I J K x y z RegNo RegUp
================================================== =============
0 0 0 -5.0000E+00 -5.0000E+00 -1.0000E+01 1 1
1 0 0 -4.5000E+00 -5.0000E+00 -1.0000E+01 1 1
2 0 0 -4.0000E+00 -5.0000E+00 -1.0000E+01 1 1
3 0 0 -3.5000E+00 -5.0000E+00 -1.0000E+01 1 1
4 0 0 -3.0000E+00 -5.0000E+00 -1.0000E+01 1 1
5 0 0 -2.5000E+00 -5.0000E+00 -1.0000E+01 1 1
6 0 0 -2.0000E+00 -5.0000E+00 -1.0000E+01 1 1
7 0 0 -1.5000E+00 -5.0000E+00 -1.0000E+01 1 1
8 0 0 -1.0000E+00 -5.0000E+00 -1.0000E+01 1 1
9 0 0 -5.0000E-01 -5.0000E+00 -1.0000E+01 1 1
10 0 0 9.0298E-08 -5.0000E+00 -1.0000E+01 1 1
11 0 0 5.0000E-01 -5.0000E+00 -1.0000E+01 1 1
12 0 0 1.0000E+00 -5.0000E+00 -1.0000E+01 1 1
13 0 0 1.5000E+00 -5.0000E+00 -1.0000E+01 1 1

output formats

I hope somebody can tell me if it will fit ?

Thanks a lot


All times are GMT -4. The time now is 12:38.