**UG_IO SimSys 2D Input/Output Grids**

Input grids for all UG related
routines, such as AFLR2, assume a consistent ordering of the connectivity.
Input grids for AFLR2 use the optional grid boundary condition and initial
normal spacing data if it is included. Output grids from AFLR2 usually include
face connectivity and typically don't contain any of the optional boundary edge
grid information.

**2D INPUT GRID CONNECTIVITY**

The node indices for edge and
face connectivity must be numbered 1 through Number_of_Nodes.
All nodes must be unique in physical space (a given coordinate location may not
have two or more different node numbers). Also, each possible node index, 1,2,..,Number_of_Nodes, must correspond to an actual node on
the boundary edge grid or planar face grid. Connectivity for faces must be
defined using either left- or right-hand rule. Connectivity for boundary edges
must be defined using the same ordering on a closed curve.

The node connectivity for
boundary edges is ordered as shown below.

where

*inode1 = Bnd_Edge_Connectivity[0];
inode2 = Bnd_Edge_Connectivity[1]; *

Indices for tria
faces, *itria*, are numbered one through *Number_of_Trias**.* Indices for nodes, *inode1,...*, are
numbered one through *Number_of_Nodes**.*

The node connectivity for tria faces is ordered as shown below.

where

*inode1 = Tria_Connectivity[0];
inode2 = Tria_Connectivity[1];
inode3 = Tria_Connectivity[2]; *

Indices for tria
faces, *itria*, are numbered one through *Number_of_Trias**.* Indices for nodes, *inode1,...*, are
numbered one through *Number_of_Nodes**.*

The node connectivity for
boundary surface quad faces is ordered as shown below.

where

*inode1 = Quad_Connectivity[0];
inode2 = Quad_Connectivity[1];
inode3 = Quad_Connectivity[2];
inode4 = Quad_Connectivity[3]; *

Indices for quad faces, *iquad*, are numbered one through *Number_of_Quads**.*
Indices for nodes, *inode1,...*,
are numbered one through *Number_of_Nodes**.*

**AFLR2 GRID BOUNDARY
CONDITION FLAG**

In AFLR2 the grid boundary
condition flag magnitude identifies special types of boundary edges. If the
magnitude is 1 then the boundary edge is a normal edge. If it is 3 then the
boundary edge is an embedded or transparent edge (grid domain on both sides).
The sign of the grid boundary condition flag controls which boundary edges will
have an adjacent boundary-layer or structured-layer type grid. If the grid
boundary condition flag is negative then that boundary
edge is included in a list of edges for boundary-layer or structured-layer type
generation. The sign of the grid boundary condition flag is only used if either
the boundary-layer or structured-layer option is selected. The default value
for the grid condition flag is -1.

**AFLR2 INITIAL NORMAL SPACING**

In AFLR2 the initial normal
spacing for boundary-layer elements can be specified as part of an input
boundary edge grid. If it is specified, then a value must be given for every
boundary edge node. Only those values for nodes on an edge with a negative grid
boundary condition flag will actually be used. The initial normal spacing is
only used if the boundary-layer option is selected. The default value for the
initial normal spacing is zero.