GEN_X (X-ray Map Generator) Version 2.3m

Authors: William M. Chan, Pieter G. Buning, Robert L. Meakin

Date: May, 2023.

GEN_X creates a file called "gen_x.xry" which is used by OVERFLOW-D to cut chimera holes. "gen_x.xry" contains all object xray images available to the flow solver. Generation of the xrays is a pre-process, like grid generation, but fully automatic given appropriate object surface definitions. Object surface definitions are given to GEN_X via PLOT3D/mg/un grid files or CART3D unstructured surface triangulation files (.tri), where each grid component is a surface entity. Surface grids that define the hole cutter may overlap in an arbitrary amount. However, the combination of all surface grids in the definition MUST form a closed surface, and their surface normals should all be pointing outwards.

A single object definition can have any number of xrays images taken. The logic here is to make judicious use of the finite number of rays that make up the images. Hence, you may wish to xray the wings, fuselage, engine, flaps, etc. seperately (if the object is an aircraft) rather than the enitre aircraft in 1 image.

Sometimes it is convenient to xray objects seperately. For example, one might wish to xray a wing separate from an external store, or rotor blades separate from the helicopter fuselage, etc. Or, you might want to xray a portion of an object separate from the rest. For example, the v22 refueling tube, viewed from the top cannot be separated from the fuselage nose. However, if the tube is extracted from the object definition using, say OVERGRID, and closed off, the tube can be xrayed separately. When this is done, gen_x will create a gen_x.xry file for each object xrayed. In order for the flow solver to use the xrays, they must be concatenated into a single gen_x.xry file. This can be done in the GEN_X module in OVERGRID using READ NEW and READ APPEND.

Input Files

Two input files are required:
  1. PLOT3D or CART3D grid file containing object surface definition. PLOT3D files should be in 3-D format but can be single or multiple grids, unformatted or formatted.
  2. Input parameters file - described below.

Output Files

  1. Output message file
  2. gen_x.xry file containing bounding boxes, xray maps, and body ID's

Execution

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

Sample Input Parameters File and Explanation of Parameters


input_object_surface_definition_filename
2                   ISPOPT(1/2/3)
0.005               DS
0.0                 DELTA
1                   NCROPS
1                   IDBODY
0.0                 DEFAULT Bounding box


ISOPT       =  spacing specification option
               ( 1 = absolute
                 2 = fraction of global bounding box diagonal of object
                 3 = fraction of xray bounding box diagonal )

DS          =  xray image spacing

DELTA       =  maximum anticipated offset distance to be used with maps
               (obsolete parameter that can be set to zero)

NCROPS      = number of xray maps to be made

For N=1,NCROPS, enter the following block

{

IDBODY      =  body ID of xray map

               Enter a single 0.0 in the next line to indicate usage of
               default bounding box, or enter 6 real numbers to indicate
               specified bounding box
XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX    =   x,y,z minmaxs of bounding box for xray

}

X-ray File Format

The X-ray file format using Fortran i/o is given below. Each X-ray file may contain one or more X-rays.
     read(iu) nxray
     read(iu) (nj(n),nk(n),bodyid(n),n=1,nxray)
     do n=1,nxray
        read(iu) (xboxes(i,n),i=1,6)
     enddo
     do n=1,nxray
        read(iu) nppt(n)
        if (nppt(n).gt.0) then
           read(iu) (((iptr(j,k,l),j=1,nj(n)),k=1,nk(n)),l=1,2)
           read(iu) (zpt(i),i=1,nppt(n))
        endif
     enddo

     where iu          = unit number for reading
           nxray       = number of X-rays
           nj(n),nk(n) = j,k dimensions of image plane of n-th X-ray
           bodyid(n)   = integer tag containing body ID of n-th X-ray
           xboxes(1:6,n) =  xmin,xmax,ymin,ymax,zmin,zmax of bounding
                            box for n-th X-ray
           nppt(n)     > 0  number of pierce points in n-th X-ray
                       < 0  current X-ray is an identical copy of
                            X-ray number -nppt(n)
           iptr(j,k,1) > 0  starting index in array zpt for pierce points
                            at location (j,k)
                       <=0  no pierce points are present at location (j,k)
           iptr(j,k,2) > 0  ending index in array zpt for pierce points
                            at location (j,k)
           zpt(i)           z-coordinate of i-th pierce point

Last modified: Mon Nov 17 12:32:00 2025