In computational fluid dynamics, the PLOT3D file format is a standard file format used for storing grid and results data. PLOT3D was created by NASA Ames Research Center in 1982 by Pieter Buning[1] and remains an often used file format. It can only store a structured grid. The structured grid allows random access, that is by knowing the block number, i location, j location, and k location, any grid point value or result value may be extracted. Additionally, given the location of any value, the block number, i location, j location, and k location may be determined. This makes it simple to iterate through a series of volumetric elements and calculate all required properties for the purpose of a CFD analysis.
The most basic format includes two different files, a grid file (G-file) and a solution file (Q-file). The filename extensions used vary, though .q is common for Q-files. Grid files may use .g, .x, .xy, or .xyz, among other extensions. The grid file contains the coordinates of the solution grid, while the solution file contains information typical of a CFD solution, flow density, flow momentum (a vector), and flow energy.[2] Data may be stored in either binary or ASCII text format and floating point values may be either single or double precision. There are also multiblock and unstructured extensions to the format, so it is often unclear how a particular set of nominally PLOT3D-format files is formatted on the binary level without referring to the software that created them.[3] Examination with a hex editor may be useful in determining the format variant.
Additional files may be present containing different kinds of ancillary data.
"Formatted" FORTRAN (ASCII text) data files will typically use CR-LF (0x0d 0x0a) delimiters at the end of the line, though the line breaks are implementation dependent. "Unformatted" FORTRAN (binary) files have the variables laid out in the same order but will normally lack delimiters such as line breaks. The binary format will be implementation and machine dependent.
A multiblock, 3 dimensional Q file begins with a single integer for the number of blocks M on its own line. The next M lines contain three integers for each of the blocks, which give the i, j, and k dimension sizes for each block. The M blocks are read in next. Each block begins with a line containing four floating-point values, the freestream Mach number, the freestream angle of attack, the freestream Reynolds number, and the time. The rest of the block contains the values iterated over i, j, k, m (block index), and the outermost n, which counts through 5 sections, the density, the 3 components of the momentum, and finally the energy.[4]
A multiblock, 3 dimensional grid file begins with a single integer for the number of blocks M on its own line. The next M lines contain three integers for each of the blocks, which give the i, j, and k dimension sizes for each block. The M blocks are read in next. Each block contains a coordinate value iterated over i, j, k, and then the three coordinates, x, y, and z.[5]
Additionally, the format may be simplified such that only a two-dimensional problem is analyzed or the iBlank parameter is omitted. The iBlank parameter indicates whether or not the cell is a physical or non-physical cell. For example, if two PLOT3D grids are intersected, one of an aircraft fuselage, and the other of an aircraft wing, there are internal cells that should not be analyzed. These are iBlank'ed cells and have a value of 0.
Other structured file formats
References
- ↑ PLOT3D User's Manual (PDF), NASA, retrieved 16 November 2010
- ↑ Data Analysis and Assessment Center. "PLOT3D". DoD HPC Modernization Program. Archived from the original on 27 May 2015. Retrieved 26 May 2015.
- ↑ "How to read Plot3D data" (PDF). Retrieved 26 May 2015.
- ↑ "Plot3d File Format for Grid and Solution Files". NPARC Alliance CFD Verification and Validation Website.
- ↑ "Plot3d File Format for Grid and Solution Files". NPARC Alliance CFD Verification and Validation Website.