CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   how to read plot3D mesh file (.x) (https://www.cfd-online.com/Forums/main/140900-how-read-plot3d-mesh-file-x.html)

pranavladkat August 26, 2014 00:38

how to read plot3D mesh file (.x)
 
Hi,

I need to write a function to read the plot3D mesh file in my code (in C). The mesh file will be 3D and currently single block. Can anybody explain me plot3D file format and how it is written. As a test case, I created a simple flat rectangular surface and exported it in 3D plot3D file format using pointwise. The surface mesh has 5x10x1 dimension. The output of the file is attaced at the end.

I came to know that first line denotes the number of blocks, second line specifies the number of nodes in each direction. But I wanted to know how the coordinates of each point are specified. Are those x's, y's and z's in any particular direction? I need a general outline of how and in which order the coordinates are specified.

It will be really great help.
Thank you


File output:
1
5 10 1
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 1.111111e+00 1.111111e+00 1.111111e+00
1.111111e+00 1.111111e+00 2.222222e+00 2.222222e+00
2.222222e+00 2.222222e+00 2.222222e+00 3.333333e+00
3.333333e+00 3.333333e+00 3.333333e+00 3.333333e+00
4.444445e+00 4.444445e+00 4.444445e+00 4.444445e+00
4.444445e+00 5.555555e+00 5.555555e+00 5.555555e+00
5.555555e+00 5.555555e+00 6.666667e+00 6.666667e+00
6.666667e+00 6.666667e+00 6.666667e+00 7.777778e+00
7.777778e+00 7.777778e+00 7.777778e+00 7.777778e+00
8.888889e+00 8.888889e+00 8.888889e+00 8.888889e+00
8.888889e+00 1.000000e+01 1.000000e+01 1.000000e+01
1.000000e+01 1.000000e+01
5.000000e+00 3.750000e+00 2.500000e+00 1.250000e+00
0.000000e+00 5.000000e+00 3.750000e+00 2.500000e+00
1.250000e+00 0.000000e+00 5.000000e+00 3.750000e+00
2.500000e+00 1.250000e+00 0.000000e+00 5.000000e+00
3.750000e+00 2.500000e+00 1.250000e+00 0.000000e+00
5.000000e+00 3.750000e+00 2.500000e+00 1.250000e+00
0.000000e+00 5.000000e+00 3.750000e+00 2.500000e+00
1.250000e+00 0.000000e+00 5.000000e+00 3.750000e+00
2.500000e+00 1.250000e+00 0.000000e+00 5.000000e+00
3.750000e+00 2.500000e+00 1.250000e+00 0.000000e+00
5.000000e+00 3.750000e+00 2.500000e+00 1.250000e+00
0.000000e+00 5.000000e+00 3.750000e+00 2.500000e+00
1.250000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00

agd August 26, 2014 22:53

Can you access
http://www.grc.nasa.gov/WWW/wind/valid/plot3d.html


All times are GMT -4. The time now is 16:04.