SURGRD Version 8.2

Authors: William M. Chan, Pieter G. Buning

Date: July, 1999.

The SURGRD program is used to generate surface grids over a user-supplied surface geometry definition. Currently, the surface geometry definition is assumed to be a collection of panel networks or triangles. Straight forward extensions can be made to accommodate other types of surface definitions such as NURBS. Three schemes are available for surface grid generation:

  1. a hyperbolic marching scheme,
  2. an algebraic marching scheme (available for panel network reference surface only),
  3. a transfinite interpolation scheme.

For schemes (1) and (2), the grid is generated by marching from a user-supplied initial curve. The marching distance, start and end grid spacings and other parameters are specified in an input parameters file. For scheme (3) the grid can be generated from 2, 3, or 4 initial curves. Missing boundary curves are automatically constructed using straight lines. The interior points are generated by transfinite interpolation. Note that the TFI scheme is best suited for cases where the boundary curves are almost straight and that the projection distance to the surface is small. The three schemes combined gives SURGRD the capability to generate surface grids from 1, 2 adjacent, 2 opposite, 3, or 4 initial curves.

The primary application of SURGRD is intended for overset surface grid generation. SURGRD can be run in batch mode on any machine that supports Fortran 77. The code is currently in beta testing mode. Comments, questions, bug reports can be sent to wchan@nas.nasa.gov.

SURGRD has been successfully used to generate surface grids for

  1. collars grids used at the junction of intersecting geometric components such as a wing/body junction,
  2. cap grids at fuselage noses and wing tips,
  3. overlapping surface grids for more complex surfaces such as the Space Shuttle Orbiter, X-CRV Crew Return Vehicle, the V-22 tiltrotor and the Comanche.

Execution:

SURGRD is executed by typing

surgrd < [input parameters filename] > [output messages filename]

Input Files:

The input files required are:
-------------------------------------------------------------------------------
        Description                 File Type          Dimensions of each grid
-------------------------------------------------------------------------------

 Reference surface definition   PLOT3D multiple grid file *    jrmax,krmax,1

                                or 

                                surface triangulation grid
                                file in CART3D or FAST format

 Reference curves file          PLOT3D multiple grid file *    jcmax,1,1

 Input parameters (STDIN)             ASCI

 * If there is only one grid, either single or multiple grid format is accepted.
   The reference surface file may be omitted for runs using transfinite
   interpolation only with no projections (IAUC=-1).

   A surface triangulation file is recognized by its file name extension. Files
   that do not have the following extensions are considered PLOT3D grid files:

   File name extension              Filetype

        .tri             CART3D un-intersected geometry
       i.tri             CART3D intersected geometry
        .fst             FAST geometry with single zone (multiple components
                         are indicated in the flags for each triangle)

--------------------------------------------------------------------------------


    The output files produced are:

-------------------------------------------------------------------------------
        Description                 File Type          Dimensions of each grid
-------------------------------------------------------------------------------
 Output surface grids           unformatted PLOT3D        jmax,kmax,1
                                multiple grid file**

 Output messages (STDOUT)             ASCI

 ** If there is only one grid, single format is used.
--------------------------------------------------------------------------------


    The output PLOT3D command files produced are:

----------------------------------------------------
 Filename               Description                   
----------------------------------------------------
 refs.com         For viewing reference surface      
 refc.com         For viewing reference curves        
 surg.com         For viewing output surface grids     
 minmax.com       For setting minmax and view point   
 nowalls.com      For resetting to no walls          
----------------------------------------------------

Filenames Convention

The reference surface filename, reference curves filename and output grid filename can be specified by the user in the first 3 lines of the input parameters file. If no filenames are specified in the first 3 lines of the input parameters file, the following defaults are assumed:
   -------------------------------------
    Filename          Description
   -------------------------------------
    surgrd.body     Reference surface
    surgrd.ixyz     Reference curves
    surgrd.xyz      Output surface grids
   -------------------------------------

Special Notes on version 8.2

Version 8.2 of SURGRD allows generation of grids on triangulated databases. This is currently in alpha test mode. CART3D or FAST formats are allowed. If the reference surface filename has extensions .tri, .i.tri, or .fst, it will be considered a surface triangulation file, otherwise, it will be read as a PLOT3D grid file with multiple panel networks.

Algebraic marching B.C.'s (type 11,12,13,14,31,32,33,34) are not supported for triangulated reference surfaces.

Special Notes on version 8.1+

Version 8.1 of SURGRD will automatically detect the presence of one or more interior control curves and force the hyperbolic surface grid to float on such curves. The surface grid will follow an interior control curve if
  1. an end of the control curve is coincident with (or within a small tolerance from) an interior point of the initial curve, and
  2. the dot product of the control curve direction and the natural marching direction locally is >= TOL where TOL is currently set to about 0.3.

Interior control curves do not need to be explicitly specified but have to be included in the input reference curves file. An optional parameter NSMOO Serves to control the amount of smoothing added when interior control curves are detected. This new feature is currently under alpha testing.

Special Notes on version 8.0

Version 8.0 of SURGRD involved major re-writes of most high and mid-level routines. Memory for ALL arrays in the code are now dynamically allocated. All high level routines that communicate with the geometry definition have been isolated and given the prefix GEO*. This should make future interfacing with external geometry libraries much easier.

A transfinite interpolation scheme is implemented that allows generation of surface grids from 2 adjacent, 2 opposite, 3 and 4 initial curves. Straight lines are automatically generated to fill in the missing boundary curves for the first three cases. Grid point distributions on the missing curves are taken from any specified initial curve on the opposite boundary. In the case of 2 opposite curves, the user has to supply parameters for a hyperbolic tangent or geomunic stretching function similar to the hyperbolic marching scheme for the missing curves (see description of input parameters and example below).

Since many routines have changed in 8.0, there may be bugs to be found. Please report them ASAP.

Special Notes on version 7.0h

A new stretching option (`geomunic' stretching) is introduced. The user supplies the distance, initial and final spacings and a stretching ratio (s.r.). A geometric stretching is constructed using the given s.r. until the specified final spacing is exceeded. The rest of the domain is padded with a uniform spacing given by the specified final spacing. The total distance may have to be adjusted slightly. If the specified final spacing cannot be reached using a geometric stretching, a hyperbolic tangent scheme is used.

The geomunic stretching option is invoked by specifying KMAX=0, RMAX>1.0. The input line containing KMAX can take 2 or 3 parameters. When 2 parameters are supplied, they are assumed to be KMAX and NNOD (old format). When 3 parameters are supplied, they are assumed to be KMAX, RMAX and NNOD. The geomunic stretching can only be used with NNOD set to 1 currently.

Special Notes on version 7.0c

Description of Input Parameters and Example

The following is a sample input file for generating 6 surface grids. Note that it contains 9 `blocks' of input. The first is an optional block for the filenames. The next seven are input blocks for seven surface grids (two of which share the same initial curve and can be combined to form one grid, and hence there are only 6 final grids in the output). The last block contains information on specified BC's, auto-concatenation, and families.

Grid 1 is generated in one part using reference curve number 1, while grid 2 is generated in two parts using reference curve number 2 (RC2). The first part uses RC2 directly as the initial curve, while the second part uses RC2 in the reverse direction as the initial curve.

For grid 1, the float along KS=constant boundary conditions are used. The KS=constant lines are taken from reference grid number 3. A constant far field distance, initial and end grid spacings are specified. For grid 2, a variable far field distance is specified via 3 nodes. Grid topologies on all reference grids are to be determined automatically in the code. Two families on the reference surface are specified: a fuselage family and a wing family. Both grid 1 and grid 2 are generated on family 1.

Grids 3 to 6 are generated using the TFI scheme. An input parameters block with 4 integers in the first line indicates a TFI scheme will be used. The number of non-zero integers indicates the number of specified initial curves. In the case of 2 specified initial curves, the positions of the non-zero integers are used to distinguish between the adjacent and opposite curves cases (see example below). The non-zero integers represent the curve number to be used. For the TFI scheme, negative curve numbers are disregarded since the code automatically determines the appropriate direction for a curve.

The TFI case with 2 opposite curves is the only one that requires additional input other than the curve numbers and family number. These additional input are the number of points between the 2 curves (KMAX), the number of nodes which is restricted to a maximum of two (NNOD), the initial and end spacings (DETA and DFAR). The total distance is automatically determined from the end points of the two specified opposite curves.

ref_surface.dat
ref_curves.dat
output_grid.dat

1                      IC (Grid no. 1)
11, 12, 1              IBCJA, IBCJB, IAFAM
 3,  3,                NGBCA, NGBCB
14, 1                  KMAX, NNOD
1, 0.3, 0.01, 0.05     JNOD, ETAMX, DETA, DFAR
0.1, 0.0, 3            SMU, TIM, ITSVOL


2                      IC (Grid no. 2)
-1, -1, 1              IBCJA, IBCJB, IAFAM
14, 3                  KMAX, NNOD
 1, 0.3, 0.01, 0.05    JNOD, ETAMX, DETA, DFAR
15, 0.2, 0.01, 0.0
-1, 0.2, 0.01, 0.0
0.1, 0.0, 3            SMU, TIM, ITSVOL


-2                     IC (Grid no. 2)
-1, -1, 1              IBCJA, IBCJB, IAFAM
14, 3                  KMAX, NNOD
  1, 0.2, 0.01, 0.0    JNOD, ETAMX, DETA, DFAR
-15, 0.2, 0.01, 0.0
 -1, 0.3, 0.01, 0.05
0.1, 0.0, 3            SMU, TIM, ITSVOL


3, 0, 7, 0             TFI with 2 opposite initial curves (Grid no. 3)
1                      IAFAM
19, 1                  KMAX, NNOD
 1, 0.001, 0.02        JNOD, DETA, DFAR


3, 4, 0, 0             TFI with 2 adjacent initial curves (Grid no. 4)
1                      IAFAM


3, 4, 7, 0             TFI with 3 initial curves (Grid no. 5)
1                      IAFAM


3, 4, 7, 8             TFI with 4 initial curves (Grid no. 6)
1                      IAFAM


0, 1, 1                NSPBC, IAUC(-1/0/1), [ IFCC(0/1) ]

2                      NFAM
1, 5                   IFNUM, NGFAM  (fuselage family)
1,2,3,6,7              IGNUM
2, 4                   IFNUM, NGFAM  (wing family)
4,5,8,9                IGNUM


--------------------------------------------------------------------------------

    The input parameters are described in more detail below.

C-----------------------------------------------------------------------
C   INPUT NOTES:
C-----------------------------------------------------------------------
C
C   IC     > 0  Use reference curve number IC as initial curve for current grid
C          < 0  Use reference curve number IC in reverse direction as initial
C               curve for current grid
C
C   Boundary condition types for J=1
C   IBCJA  = -1 Free floating condition
C          =  1 Constant plane condition in X, float Y and Z
C          =  2 Constant plane condition in Y, float X and Z
C          =  3 Constant plane condition in Z, float X and Y
C          =  4 Reflected symmetry condition in X
C          =  5 Reflected symmetry condition in Y
C          =  6 Reflected symmetry condition in Z
C          = 10 Periodic condition (*)
C          = 11 Floating condition along KS=const line in +JS direction
C          = 12 Floating condition along KS=const line in -JS direction
C          = 13 Floating condition along JS=const line in +KS direction
C          = 14 Floating condition along JS=const line in -KS direction
C          = 15 Floating condition along user supplied line of points
C          = 20 Exact coordinates of boundary points prescribed by user
C          = 21 Constant X plane for all J from 1 to JMAX (*)
C          = 22 Constant Y plane for all J from 1 to JMAX (*)
C          = 23 Constant Z plane for all J from 1 to JMAX (*)
C          = 31 Float along KS=const line in +JS direction for all J (*)
C          = 32 Float along KS=const line in -JS direction for all J (*)
C          = 33 Float along JS=const line in +KS direction for all J (*)
C          = 34 Float along JS=const line in -KS direction for all J (*)
C
C   (*) Must also apply for IBCJB
C
C   Similarly for IBCJB at J=JMAX
C
C   IAFAM >0  Family number of family on which to project grid to
C
C   If IBCJA,IBCJB is 11-14 or 31-34 then enter NGBCA,NGBCB (**)
C   NGBCA = Reference grid number for floating constant JS,KS bc at J=1
C   NGBCB = Reference grid number for floating constant JS,KS bc at J=JMAX
C
C   If IBCJA,IBCJB is 15 or 20 then enter NGBCA,NGBCB (**)
C   NGBCA = Reference curve number at J=1
C   NGBCB = Reference curve number at J=JMAX
C
C   (**) If only one of IBCJA and IBCJB is in the above range, the NGBCA/NGBCB
C        corresponding to the other boundary is disregarded.
C
C   KMAX = 0 Use geomunic stretching (specify non-zero RMAX)
C        > 0 Number of points in eta (marching direction)
C   RMAX = Stretching ratio in geomunic stretching (disregarded if KMAX>0
C   NNOD <=1  Constant far field, initial/end grid spacing.
C        > 1  Number of nodes of piece-wise linear function for variable far
C             field distance, initial/end grid spacing.
C             (must be in range 2 < = NNOD < = MNOD, a constant far field,
C              distance, initial/end grid spacing is specified with NNOD=1)
C
C   Repeat the following for each node
C   Do N=1,NNOD
C    JNOD(N) = Node index of Nth node (-1 = last node, disregarded if NNOD=1)
C    ETAMX(N) = Far field distance at node N
C    DETA(N) = First grid point spacing in marching direction from initial curve
C              (or 0 for no spacing control)
C    DFAR(N) = Last grid point spacing in marching direction from initial curve
C              (or 0 for no spacing control)
C   Enddo
C
C   SMU    = Explicit smoothing coefficient O(1)
C   TIM    = TIM factor for smoothing in marching direction (0<=TIM<=3)
C   ITSVOL = Number of times prescribed areas DAREA(J) is smoothed
C   NSMOO  = Number of smoothing steps applied if interior control curves
C            are detected, or if IBC=15 or 20 at one of the boundaries
C            (optional parameter, default = 0)
C
C   NSPBC  = 0 topologies of all reference grids to be determined automatically
C          > 0 number of grids to specify topology
C   IAUC   = 0  Do not automatically concatenate consecutive grids that share
C               a common initial curve
C          = 1  Automatically concatenate consecutive grids that share
C               a common initial curve
C          = -1 Do not do projection
C   IFCC   = 0  Do not follow interior control curves automatically
C            1  Automatically detect and follow interior control curves
C               (optional parameter, default = 1)
C
C   Repeat the following for each reference grid that require topology
C   specification.
C   Topologies of grids not specified here will be determined automatically.
C   
C   IG     =     grid number of reference grid
C   IBCJS  = 0   non-periodic condition with no axis pts in J
C          = 1   axis point at J=1 only
C          = 2   axis point at J=jmax only
C          = 3   axis point at both J=1 and jmax
C          = 10  periodic condition in J
C   IBCKS  = 0   non-periodic condition with no axis pts in K
C          = 10  periodic condition in K
C
C   NFAM   > 0   Number of reference grid families
C          = 0   All input reference grids belong to same family, i.e family #1
C
C  If NFAM>0 read the following
C
C   IFNUM  = Family number
C   NGFAM  = Number of grids in IFNUM family
C   IGNUM  = Reference grid number in IFNUM family


CART3D Surface Triangulation File Format

write(2) nvert,nface write(2) (x(i),y(i),z(i),i=1,nvert) write(2) (face(i,1),face(i,2),face(i,3),i=1,nface) write(2) (comp(i),i=1,nface) where nvert = number of vertices nface = number of faces x,y,z = coordinates of vertex i face = vertex indices of face i (numbering begin with 1 and faces are sorted in ascending component number) comp = component number of face i (numbering begin with 1)

FAST Surface Triangulation File Format

write(2) nvert,nface,ntet write(2) (x(i),y(i),z(i),i=1,nvert), & (face(i,1),face(i,2),face(i,3),i=1,nface), & (comp(i),i=1,nface) where ntet = 0


| CGT Manual | CFD Programs | Website Menu | Search |


NASA Ames Research Center, Moffett Field CA 94035-1000, (650) 604-5000
URL: http://rotorcraft.arc.nasa.gov/
This Website Maintained By: Randall L. Peterson.
Responsible NASA Official: Dr. William Warmbrodt (Chief)

Privacy Statement
Ames Research Center Homepage
NASA Homepage

Last Modified: Monday, 07-Jan-2008 11:59:06 PST