--------------------------------- ARROW - Readme file Copyright 1997 Athanasios Nenes --------------------------------- [ 0. Table of Contents ] 1. General 2. User Parameters 3. Input File Format 3a. Structured Orthogonal 3b. Structured Non-Orthogonal 4. Files distributed [ 1. General ] ARROW is a program that creates 2-D vector field plots. If the vector field is a velocity field, then the program can calculate the streamline field (saving it in a output file) and plot the streamline contours. ARROW supports both orthogonal and non-orthogonal grids. Two types of coordinate systems are supported for calculating the streamline field: 1. Cartesian (x-y) 2. Cylindrical (z-r) Four types of graphic formats are currently supported: 1. Encapsulated Postscript (EPS) 2. Autocad DXF (DXF) 3. Hewlett Packart Graphics Language (HPGL) 4. Golden Software Plotcall Format (PLT) ARROW is written in ANSI Fortran 77. The only non-standard extensions used are the usage of include files and variable names longer than 6 characters. However, these extensions are usually supported by FORTRAN compilers. These extensions are also included in the Fortran 90 standard, so ARROW can be compiled by any compiler which conforms to the F90 standard. ARROW has been compiled and tested on the following platforms/compilers : - Lahey Fortran 77 (v3.0, v4.0), Lahey Fortran EM-16 v.2.0, Lahey Fortran EM-32 (v4.0, v5.0, v5.1) under MS-DOS - Microsoft Fortran 77 (v3.31, v5.1), Microsoft Powerstation Fortran 3.0 under MS-DOS - DECFortan under DEC UNIX - IBM RISC 6000 using XLF FORTRAN For compilation/linking instructions, the user should consult the manual of the specific compiler that they are using. For example, a typical UNIX compilation command is something like this: f77 arrow.f -o arrow After this, the program runs by typing arrow at the UNIX prompt. [ 2. User Parameters ] The plotting and i/o parameters are specified in the text file [arrow.cnf] which should be located in the current directory. If such a file is not found, or if invalid data is included, then ARROW creates (or overwrites) a new version of [arrow.cnf] that contains default values. This file can be seen or edited with any text editor, like UNIX 'vi' or MS-DOS 'edit'. Most of the options are self-explanatory. Some of them ask for a color code (a number from 0 to 15), which are: CODE COLOR 0 Black 1 Blue 2 Green 3 Cyan 4 Red 5 Violet 6 Brown 7 White 8 Grey 9 Bright blue 10 Bright green 11 Bright cyan 12 Orange 13 Pink 14 Yellow 15 Bright white [ 3. Input File Format ] ARROW supports two types of grids: orthogonal structured and non-orthogonal structured. The difference of the two types are explained below. [ 3a. Structured Orthogonal ] This is the simplest type of grid, an example of which is shown below: ----------------------------------------------------------------- j=jn | . | . | . | . | . | . | . | . | . | . | . | . | . | . | . | . | |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| | . | . | . | . | . | . | . | . | . | . | . | . | . | . | . | . | |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| j=1 | . | . | . | . | . | . | . | . | . | . | . | . | . | . | . | . | ----------------------------------------------------------------- i=1 i=in The main characteristic of this grid is that every node with the same "j" indice has also the same y-coordinate. Similarly, nodes with the same "i" indice has the same x-coordinate. The grid therefore is always shaped like a rectangle. The two vector components (x- and y-) are written one row (or one column) at a time, together with the x- and y- coordinates. The data should be written in an increasing x- and y- direction. This sample FORTRAN code creates a vector data file that can be read by ARROW : PROGRAM SAMPLE C DIMENSION X(4), Y(4), Ux(4,4), Uy(4,4) C C ** Assign arrays with values C DATA X/0.0, 0.5, 1.0, 1.5/ DATA Y/0.0, 0.5, 1.0, 1.5/ DATA Ux/0.8, 0.7, 0.6, 0.5, & 0.4, 0.3, 0.2, 0.1, & 0.0, 0.8, 0.7, 0.6, & 0.5, 0.4, 0.3, 0.2/ DATA Uy/0.0, 0.1, 0.2, 0.3, & 0.4, 0.5, 0.6, 0.7, & 0.8, 0.8, 0.7, 0.6, & 0.5, 0.4, 0.3, 0.2/ C C ** Open data file C OPEN (UNIT=1, FILE='demo.dat', FORM ='formatted', & ACCESS='sequential') C C ** Now write data (this DO loop writes one ROW at a time). C DO 10 j=1,4 DO 10 i=1,4 WRITE (1, *) X(i), Y(j), Ux(i,j), Uy(i,j) 10 CONTINUE C C ** All done C CLOSE (1) STOP 'OK, data file [demo.dat] created' END In the example program shown above, the DO loop can be written as: C C ** Now write data (this DO loop writes one COLUMN at a time). C DO 10 i=1,4 DO 10 j=1,4 WRITE (1, *) X(i), Y(j), Ux(i,j), Uy(i,j) 10 CONTINUE i.e., the i and j indexes are interchanged. [ 3b. Structured Non-Orthogonal ] An example of this type of grid is shown below: ------------\ | | |\ j=jn | . | . | `---------------------- | | | . | . | . | . | . | -------------|-------|---|-----|------ | | | . | . | . | . | . | j=1 | . | . | /--------------------- | | |/ -------------/ i=1 i=in The main characteristic of this grid type is that every node with the same "j" indice do not necessarily have the same y-coordinate. Similarly, nodes with the same "i" indice do not necessarily have the same x-coordinate. The grid therefore can have any shape. The data file is written in a fashion similar to a structured orthogonal, the two vector components written one row (or one column) at a time, together with the x- and y- coordinates. The only difference is that the first line of the file must have a header, of the type: 'VER2' NI NJ ROWTYPE Where: 'VER2' is a character constant, which indicates that this file is a non-orthogonal grid type. NI is the number of grid nodes in the X-direction NJ is the number of grid nodes in the Y-direction ROWTYPE is .TRUE. if the data are written one row at a time, and .FALSE. if the data are written one column at a time This sample FORTRAN code creates a non-orthogonal grid vector data file that can be read by ARROW : PROGRAM SAMPLE C DIMENSION X(4,4), Y(4,4), Ux(4,4), Uy(4,4) C C ** Assign arrays with values C DATA X/0.0, 0.5, 1.0, 1.5, & 0.0, 0.5, 1.0, 1.5, & 0.0, 0.5, 1.0, 1.5, & 0.0, 0.5, 1.0, 1.5/ DATA Y/0.0, 0.5, 1.0, 1.5, & 0.0, 0.5, 1.0, 1.5, & 0.0, 0.5, 1.0, 1.5, & 0.0, 0.5, 1.0, 1.5/ DATA Ux/0.8, 0.7, 0.6, 0.5, & 0.4, 0.3, 0.2, 0.1, & 0.0, 0.8, 0.7, 0.6, & 0.5, 0.4, 0.3, 0.2/ DATA Uy/0.0, 0.1, 0.2, 0.3, & 0.4, 0.5, 0.6, 0.7, & 0.8, 0.8, 0.7, 0.6, & 0.5, 0.4, 0.3, 0.2/ C C ** Open data file C OPEN (UNIT=1, FILE='demo.dat', FORM ='formatted', & ACCESS='sequential') C C ** Write HEADER (NI=4, NJ=4, ROWTYPE=.TRUE.) C WRITE (1,*) '''VER2'' ', 4, 4, ' .TRUE.' C C ** Now write data (this DO loop writes one ROW at a time). C DO 10 j=1,4 DO 10 i=1,4 WRITE (1, *) X(i,j), Y(i,j), Ux(i,j), Uy(i,j) 10 CONTINUE C C ** All done C CLOSE (1) STOP 'OK, data file [demo.dat] created' END In the example program shown above, if one wishes to write the vector data one column at a time, these changes should be made: C C ** Write HEADER (NI=4, NJ=4, ROWTYPE=.FALSE.) C WRITE (1,*) 'VER2 ', 4, 4, ' .FALSE.' C C ** Now write data (this DO loop writes one COLUMN at a time). C DO 10 i=1,4 DO 10 j=1,4 WRITE (1, *) X(i,j), Y(i,j), Ux(i,j), Uy(i,j) 10 CONTINUE i.e., the i and j indexes are interchanged. [ 4. Files distributed ] The following files are distributed with this version of ARROW: 1. arrow.f : The fortran source code of ARROW 2. arrow.inc : The INCLUDE file needed for arrow 3. arrow.cnf : Sample configuration for ARROW 4. demo1.dat : Sample vector data file (orthogonal, cartesian) 5. demo2.dat : Sample vector data file (non-orthogonal, cartesian) 6. demo3.dat : Sample vector data file (non-orthogonal, cartesian) 7. demo4.dat : Sample data file (non-orthogonal, cartesian) 8. arrow.txt : This file ----------------- End of arrow.txt -----------------