BOXGR Version 2.1

Authors: William M. Chan

Date: May, 2002.

Introduction

BOXGR is a tool for generating the following two types of grids:
  1. A Cartesian box grid with a different uniform interior spacing in X, Y and Z and stretched outer layers - this grid can be used to enclose all the volume grids from solid bodies in external overset grid applications.
  2. A surface grid for an ellipsoid with at least one point overlap with the outer boundary of the Cartesian box grid - this grid can be used as the inner surface of a far field grid where the volume grid can be generated using a hyperbolic grid generator such as HYPGEN.

    More detailed description of the two types of grids are given below.

    Cartesian Box Grid

    This grid consists of 2 regions:
    1. An inner region with uniform spacing in each of X, Y and Z :
      The minmax and uniform X, Y, Z spacings of the inner region can be directly specified by the user, or automatically determined from surface/volume grids in a PLOT3D multiple grid file. This region can be used to enclose all volume grids from solid bodies thus providing communication between the different grids with a uniform grid resolution.
    2. Outer layers with stretching in any or all of plus/minus X, Y or Z :
      Three stretching options are available:
      • ISTR=1 Geometric stretching with fixed stretching ratio
        The user supplies the distance to march out and the stretching ratio. The number of points needed to cover at least the specified distance with the given stretching ratio is automatically determined. The distance is increased if needed to maintain the stretching ratio.
      • ISTR=2 Geomunic - geometric followed by uniform padding
        The user supplies the distance to march out from the inner region, an end spacing, and a max stretching ratio. A geometric stretching is used until the end spacing is reached, and the remaining distance is covered by a uniform spacing equal to the end spacing. The stretching ratio in the geometric region may be lowered to accommodate an exact fit of the uniform spacing. If the specified end spacing cannot be reached within the total distance, a hyperbolic tangent stretching is used.
      • ISTR=3 Geometric stretching with fixed distance
        The user supplies the distance to march out and the stretching ratio. The number of points needed to cover the specified distance with a stretching ratio less than or equal to the specified stretching ratio is automatically computed.

      If only the inner box is required, this can be achieved by specifying a zero distance to march out for all outer layers. The degenerate case of a 2D Cartesian grid is also available by specifying xmin=xmax or ymin=ymax or zmin=zmax.

      The outer layers are used as transition zones from the typically fine grid spacing of the inner region to a coarser spacing for communicating with the inner surface of the far field grid.

      Far Field Ellipsoid Surface Grid

      This is an ellipsoidal surface grid that fits inside the Cartesian box with at least one point overlap. The surface grid point distribution is taken from the outer boundary of the Cartesian grid. This grid can be can be used as input to HYPGEN to generate a volume grid for the far field. If xmin, or ymin or zmin is zero, then a symmetry condition is assumed at X, Y or Z = 0, respectively.

      Sample Input Files

      
      

      Sample input file for ISTR=1 or 3

      1, 3 IMODE,MLEVEL 2.172,2.484,0.0,0.108,0.996,1.212 X,Y,Z MINMAX (inner) 0.012, 0.006, 0.004 DX,DY,DZ 1 IOPT(1/2) 1 ISTR(1/2/3) 1, 0.05, 1.21, IAD,DOL,RMAX (JA) 1, 0.05, 1.21, IAD,DOL,RMAX (JB) 0, 0.00, 1.21, IAD,DOL,RMAX (KA) 0, 0.00, 1.21, IAD,DOL,RMAX (KB) 0, 0.00, 1.21, IAD,DOL,RMAX (LA) 1, 0.05, 1.21, IAD,DOL,RMAX (LB) output_box_grid_filename output_ellipsoid_surface_grid_filename

      Sample input file for ISTR=2

      1, 3                                   IMODE,MLEVEL
      0.24, 2.544, 0.0, 0.432, 0.144, 0.624  X,Y,Z MINMAX (inner)
      0.012, 0.006, 0.004                    DX,DY,DZ
      1                                      IOPT(1/2)
      2                                      ISTR(1/2/3)
      1, 0.24, 1.3, 0.048                    IAD,DOL,RMAX,SMAX (JA)
      1, 0.24, 1.3, 0.048                    IAD,DOL,RMAX,SMAX (JB)
      0, 0.00, 1.3, 0.048                    IAD,DOL,RMAX,SMAX (KA)
      1, 0.24, 1.3, 0.048                    IAD,DOL,RMAX,SMAX (KB)
      1, 0.24, 1.3, 0.048                    IAD,DOL,RMAX,SMAX (LA)
      0, 0.00, 1.3, 0.048                    IAD,DOL,RMAX,SMAX (LB)
      output_box_grid_filename
      output_ellipsoid_surface_grid_filename
      

      Sample input file for auto-determination of inner box minmax and DX,DY,DZ

      1, 3                                  IMODE,MLEVEL
      input_grid_filename
      0, 0, -1                              JCH,KCH,LCH
      1                                     IOPT(1/2)
      1                                     ISTR(1/2/3)
      1, 0.05, 1.21,                        IAD,DOL,RMAX (JA)
      1, 0.05, 1.21,                        IAD,DOL,RMAX (JB)
      0, 0.00, 1.21,                        IAD,DOL,RMAX (KA)
      0, 0.00, 1.21,                        IAD,DOL,RMAX (KB)
      0, 0.00, 1.21,                        IAD,DOL,RMAX (LA)
      1, 0.05, 1.21,                        IAD,DOL,RMAX (LB)
      output_box_grid_filename
      output_ellipsoid_surface_grid_filename
      
      
      These input files are located in boxgr_1.i, boxgr_2.i, and boxgr_3.i.

      Explanation of parameters

       IMODE = 1   Generate Cartesian box grid only
             = 2   Generate both Cartesian box grid and far field grid
      
       MLEVEL = 0  No restrictions on number of grid points
              = 1  Number of grid points in any direction must be odd
             >= 2  Number of grid points in any direction must allow MLEVEL
                   levels of multigrid
      
       Second line of input is inner box minmax or input grid filename.
      
       [X,Y,Z] MINMAX = xmin, xmax, ymin, ymax, zmin, zmax of inner box
      
       If inner box minmax is specified, DX,DY,DZ are needed where
      
        DX, DY, DZ = Uniform grid spacing of inner region in X, Y, Z, respectively
      
       else if input grid filename is specified, JCH, KCH, LCH are needed where
      
        JCH  =  0   Do not consider any J boundaries for computing DX,DY,DZ
             =  1   Consider J=1 boundary for computing DX,DY,DZ
             = -1   Consider J=JMAX boundary for computing DX,DY,DZ
             =  2   Consider both J=1 and J=JMAX boundaries for computing DX,DY,DZ
      
        Similarly for KCH and LCH
      
       endif
      
       IOPT  = 1   Keep DX,DY,DZ, make minmax bigger if needed
             = 2   Keep minmax, make DX,DY,DZ smaller if needed
      
       ISTR  = 1   Geometric stretching for outer layers (fix s.r., increase distance)
             = 2   Geomunic stretching for outer layers
             = 3   Geometric stretching for outer layers (fix distance, lower s.r.)
      
       IAD   = 0   No outer layer added in this direction
             = 1   Add outer layer in this direction
      
       DOL   =     Total distance to march out
      
       RMAX  =     Stretching ratio used for geometric stretching
      
       SMAX  =     Final grid spacing used for geomunic stretching
      
       The directions are indicated by JA (xmin), JB (xmax), KA (ymin), KB (ymax),
       LA (zmin), LB (zmax).
      

      Special Note for earlier users of BOXGR (version 1.5 or earlier)

      In BOXGR version 1.5 or earier, the outer box minmaxs are required in the input file. This is no longer needed in version 2.0 but the old input file format is still acceptable. If the outer box minmaxs are supplied in the input file, they are disregarded.

      Known Bugs

      The far field grid has a bug for 2D cases right now.
      Last modified: Thu May 16 12:28:00 2002