ELEMENT_DATA
Preprocess data for DISPLAY4


ELEMENT_DATA is a FORTRAN90 program which preprocesses simple element-based data on a grid into a form that the DISPLAY4 program can handle.

A set of nodes are specified in a region, and groups of 4 nodes comprise elements. At each node, a set of physical quantities is given, in particular, the X and Y coordinates, the fluid pressure P, and the horizontal and vertical flow velocity components U and V. This information has been written into a file. That information must be reformatted to work with DISPLAY4.

Specifically, for each node, there is at least one line of the form:

        X  Y  P  PSI  U  V  W
      
where PSI (presumably the stream function) and W (the magnitude of (U,V)) are not of interest to us.

Each element is represented by listing the nodes that comprise it, with the initial node repeated at then end, followed by a blank line. All elements in the current data set comprise 4 nodes. Thus, the information defining one element would be the central lines of the following:

         (previous element just finishing up)
         X1  Y1  P1  PSI1  U1  V1  W1

         X1  Y1  P1  PSI1  U1  V1  W1
         X2  Y2  P2  PSI2  U2  V2  W2
         X3  Y3  P3  PSI3  U3  V3  W3
         X4  Y4  P4  PSI4  U4  V4  W4
         X1  Y1  P1  PSI1  U1  V1  W1

         X1  Y1  P1 PSI1 U1 V1 W1
         (New element being defined)
      

DISPLAY4, on the other hand, expects two data files, a node data file, which lists each node once, and the properties U, V, and P:

        X Y U V P
      
which implicitly assigns an index to each node, and an element data file, which lists the number of elements, the number of nodes per element, and then, for each element, the node indices related to the element:
        1024
        4
        N1 N2 N3 N4
        N1 N2 N3 N4
        ...
        ...(1024 records like this)
        ...
        N1 N2 N3 N4
      

ELEMENT_DATA reads the old data, counts items, discards duplicate node information, and writes out the two data files needed by DISPLAY4.

Usage:

The name of the input file is usually specified on the command line:

element_data input_file
reads input_file and creates two files, whose names are always element.txt and node.txt.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

DISPLAY4, a FORTRAN90 program which displays graphics from the flow data computed by FLOW3, FLOW5 or FLOW7. This program used to work, but it is very out of date;

ELEMENT_DATA is available in a FORTRAN77 version and a FORTRAN90 version.

Source Code:

Examples and Tests:

A first set of test data:

A second set of test data:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 18 January 2007.