OVERGRID Version 1.3
Author: William M. Chan
Date: November, 1999.
Notes:
- Transforms, zoom box, direct entity picking coded by Steven M. Nash
- Compatible with Chimera Grid Tools version 1.0
Introduction
OVERGRID is a graphical user interface (GUI) for performing general grid
manipulation and overset grid generation using modules from the Chimera Grid
Tools software package. The GUI contains a viewer for displaying the geometry and
grids, and various grid generation modules are accessed from a main menu.
The GUI uses a combination of languages listed below. It is assumed that
the necessary libraries are available on the local machine.
C - main program and driver for graphics
Tcl/Tk - window management, widgets creation
OpenGL - graphics display
Fortran - geometry/grid input routines
The Togl widget by Brian Paul and Ben Bederson is used for communication between
Tk and OpenGL ( Copyright (C) 1996, See the LICENSE file for copyright details ).
Togl is included in the overgrid package.
For users without Tcl/Tk, look under
http://www.scriptics.com/ftp/tcl8_0/
for information on down-loading and installing your own. OVERGRID is now compatible
with the following versions:
Tcl 8.0p2 / Tk 8.0p2 (tcl8.0p2.tar.gz and tk8.0p2.tar.gz)
Tcl 8.0.3 / Tk 8.0.3 (tcl8.0.3.tar.gz and tk8.0.3.tar.gz)
Tcl 8.0.4 / Tk 8.0.4 (tcl8.0.4.tar.gz and tk8.0.4.tar.gz)
Tcl 8.0.5 / Tk 8.0.5 (tcl8.0.5.tar.gz and tk8.0.5.tar.gz)
This code is in beta test mode so there may still be some undiscovered bugs
and it is under frequent modifications and improvements. OVERGRID is used by
invoking a C-shell script called overgrid which then calls the C executable og
and the Tcl/Tk script og.tcl. OVERGRID also has its own Makefile which should
be modified based on the instructions under the Installation section below.
The user is urged to go through the tutorial under chimera/gui/tutorial
for details on the capabilities and usage of the modules of OVERGRID.
Installation of Tcl/Tk on UNIX machines
Skip this if you already have Tcl/Tk installed in your system.
- Down load tcl8.0.5.tar.gz and tk8.0.5.tar.gz from the web-site given above.
- Expand the tcl file first.
- Go to the unix subdirectory and type ./configure to generate a Makefile
for your particular operating system and hardware.
- Type make to create the tcl library called libtcl8.0.so or libtcl8.0.a.
- Repeat the same procedure for the tk directory to create a library called
libtk8.0.so or libtk8.0.a.
Installation of OVERGRID
- The following 3 variables should be modified in the overgrid Makefile:
Modify the INCLUDES variable to point to where tcl.h and tk.h are located.
If you installed your own tcl/tk, this should be tcl8.0.n/generic and
tk8.0.n/generic, where n=3, 4 or 5.
Modify the LIBDIRS variable to point to where libtcl.a (or libtcl8.0..so) and
libtk.a (or libtk8.0.so) are located.
If you installed your own tcl/tk, this should be tcl8.0.n/unix and
tk8.0.n/unix, where n=3, 4 or 5.
Modify the tcl/tk library names in the LIBS variable. Use -ltk8.0 if the
library is called libtk8.0.so, or use -ltk if it is called libtk.so.
Follow a similar procedure for tcl.
- Type make to compile og.c and produce the og executable
(Makefile will only work on SGI's for now. Users with IRIX 6.5 have to use
the Makefile that produces -n32 objects. Other users should check the file
type of the library files libtcl8.0.so and libtk8.0.so to see if they are
the old -32 objects or the new -n32 objects. The same compile option should
be used for og.
- Modify the EXECDIR variable in the overgrid script file to point to the
directory where og and og.tcl are located.
- Move the overgrid script file to a directory in the user's path, e.g. ~/bin.
- The following modules in the chimera/src directory are used by overgrid:
grided, srap, progrd, seamcr, seamcrt, surgrd, sblock, wkcut, hypgen, and boxgr.
Single and double precision versions of the executables should be stored in
separate directories. Loading a single or double precision file into overgrid
will automatically trigger the use of executables in the appropriate directory
specified by the user (see next item below and on-line help under PREFERENCES
in the Controls Window).
- Create a preferences file called .overgridrc in the user's home directory.
This file should contain the following 3 lines:
< directory_path_for_single_precision_executables >
< directory_path_for_double_precision_executables >
< background_color >
where the first 2 lines must point to different locations, and
< background_color > = 0/1 (black/white). This file can also be created
from inside OVERGRID by clicking on the PREFERENCES button, filling in the
appropriate entries, and saving the contents to disk.
Execution
Type
overgrid
or
overgrid < FILENAMES >
where FILENAMES can be one or more filenames.
Input File Types
OVERGRID is intended to be used primarily for structured data types. Triangle
data types are accepted for visualization purposes or for use as a reference surface
geometry definition for the SEAMCR and SURGRD modules. The following file types
are currently readable by OVERGRID:
- PLOT3D grid (unformatted/formatted, single grid/multiple grid, 3-D/2-D,
with/without iblanks, single/double precision). The format is automatically
determined by OVERGRID. The filename can have any extension other than those
reserved for triangles data files listed below.
- CART3D triangulation (unformatted/formatted). The format is automatically
determined but the filename must have .tri (un-intersected components) or
.i.tri (intersected components) as the extension.
- FAST unstructured triangulation (unformatted/formatted). The format is automatically
determined but the filename must have .fst as the extension.
WARNING - the capabilities for triangles data types are currently restricted to
the list below. Attempts to use other OVERGRID features on triangles may produce unexpected
results. Further capabilities and error checks for triangles will be implemented in the
future.
- read/write .tri, .i.tri or .fst files
- view triangulation in wireframe or shaded modes
- perform reverse, mirror, scale, translate, rotate grided functions
- interrogate vertex or face index info by modifying constant vertex/face widgets in
Entity Highlight and Selection window
- extract seam curves or cutting planes curves in the SEAMCR module
- generate hyperbolic surface grids using triangulation as reference surface in
the SURGRD module
- project surface or curve entities onto triangulated reference surface in the
PROGRD module
PLOT3D File Format
write(2) ngrid
write(2) (nj(n),nk(n),nl(n),n=1,ngrid)
do n=1,ngrid
write(2) (((x(j,k,l),j=1,nj(n)),k=1,nk(n)),l=1,nl(n)),
& (((y(j,k,l),j=1,nj(n)),k=1,nk(n)),l=1,nl(n)),
& (((z(j,k,l),j=1,nj(n)),k=1,nk(n)),l=1,nl(n)),
& (((ib(j,k,l),j=1,nj(n)),k=1,nk(n)),l=1,nl(n))
enddo
where ngrid = number of grids
nj,nk,nl = j,k,l dimensions of each grid
x,y,z = vertex coordinates
ib = vertex iblank value (optional)
For single grid format, ngrid is omitted.
CART3D Surface Triangulation File Format
write(2) nvert,nface
write(2) (x(i),y(i),z(i),i=1,nvert)
write(2) (iface(i,1),iface(i,2),iface(i,3),i=1,nface)
write(2) (icomp(i),i=1,nface)
where nvert = number of vertices
nface = number of faces
x,y,z = coordinates of vertex i
iface = vertex indices of face i (numbering begins with 1
and faces are sorted in ascending component number)
icomp = component number of face i (numbering begins with 1)
FAST Surface Triangulation File Format
write(2) nvert,nface,ntet
write(2) (x(i),y(i),z(i),i=1,nvert),
& (iface(i,1),iface(i,2),iface(i,3),i=1,nface),
& (icomp(i),i=1,nface)
where ntet = 0
Help
General on-line help is available under the Main Menu window. More detailed on-line
help is also available under each module.
Transforms
Transforms using the mouse are almost like PLOT3D with the following exceptions.
- With mouse button depressed, the transforms continue when the mouse motion
stops in PLOT3D. In OVERGRID, the transforms stop when the mouse motion stops.
- There is no acceleration with mouse motion in OVERGRID.
Sensivity of mouse motion can be decreased/increased using the down/up arrow keys
on the keyboard.
Entity Highlight and Selection
Highlighting and selection are performed in the "Entity Highlight and Selection"
window at the lower right corner of the screen. For a black background, a highlighted
surface is painted white while a selected surface has a thick white perimeter and a
spherical icon in the middle. Similarly a highlighted curve is painted white with
white symbols at the grid points and a selected curve has a spherical icon near the
middle. The black/white colors are reversed for a white background.
Highlighting can be applied to a single entity (using the Entity # widget
at the upper left corner of the "Entity Highlight and Selection" window).
Highlighting is used when the user needs to flag a single entity for performing
operations such as grided functions.
Selection can be applied to multiple entities. After an entity is highlighted,
it can be selected by clicking on the Select button. Another entity can then be
highlighted and selected subsequently. All entities that belong to a certain
type (volumes, surfaces or curves) can be selected at once by pressing the
appropriate Select All button. Selection is used when the user needs
to flag multiple entities for performing further operations. The `Clear All'
button clears all selections.
Selection of an unblanked entity can also be achieved by holding down the
Ctrl key and clicking on the entity in the Graphics Display window with one of
the mouse buttons.
Ctrl + left mouse button - surface entity
Ctrl + middle mouse button - curve entity
Ctrl + right mouse button - point entity
Performing the above operation on a selected entity will unselect the entity.
Blank, Unblank, and Delete
Entities that are highlighted or selected can be blanked, unblanked or
deleted by clicking on the appropriate buttons. A deleted entity can only be
retrieved by reading from a file. Clicking the Tog Blank button will exchange
the display status of blanked and unblanked entities.
Index Notation
A J,K,L index notation is used for all grids. For a surface grid (J/K/1),
the tangent vector in J is indicated by an arrow, while the tangent vector
in K is indicated by a line when the Show Tangent vector checkbutton is activated.
A subset of an entity can be highlighted by clicking on the JS,JE,KS,KE,LS,LE
widgets in the Entity Highlight and Selection window. When the constant J, K and L
checkbuttons are all activated, the x, y, z coordinates and iblank value of a
point is displayed in the message window for structured entities. A similar display
for the vertex coordinates and face vertex indices are available for triangulated
entities.
GRIDED
- The Swap, Reverse, Mirror, Scale, Translate and Rotate functions can be used
on one or multiple entities. The Extract and Extrapolate functions can only be
used on a single entity at a time. The Concat function operates on two selected
entities only, i.e. the user must select the first and then the second entity
to be concatenated. The order of selection is important. Use the tangent vector
display to determine which should be selected first. The Auto-concat function
operates on two or more surface or curve entities. Auto-concat does not work on
volume entities currently.
- The Extract function operates on a highlighted subset of an entity.
- The old entity is replaced by the new entity for Swap J/K, Swap K/L, Swap J/L,
Reverse, Mirror, Scale, Translate and Rotate. The old entity is retained and the
new entity/entities is/are created for Extract, Extrapolate, Concatenate, Split,
and auto-concatenate.
- The UNDO button will erase the effects of the last operation only. UNDO's with
scale, translate, rotate may be subjected to round-off errors, i.e. entities after
the UNDO may not be bitwise identical to the original under these operations.
SRAP
- It is assumed that the user is familiar with the terminology used for SRAP.
See srap.html for explanation of usage.
- The current end spacings of the segment are displayed in Da_c and Db_c.
The new end spacings of segment can be specified under Da_n and Db_n.
PROGRD
PROGRD is a tool for performing projection of a grid subset (active grids)
onto a grid surface (reference grids). The features implemented in OVERGRID
is a subset of the features available in the batch version of PROGRD in
Chimera Grid Tools. The display colors for entities under the PROGRD module
are as follows:
Reference surface : yellow
Unprojected active entities : green
Projected active entities : red
DIAGNOS
The DIAGNOS module contains a number of grid diagnostic functions for surface entities.
Extensions to include volume entities will be implemented in the future. The functions
supported currently include:
- stretching ratio in J, K, or L
- turning angle in J or K
- truncation error estimate
- average cell size at vertex
- iblanks statistics
- Jacobians statistics
- surface grid topology
SEAMCR
The SEAMCR tool can operate on two types of reference surfaces: multiple panel networks
and triangulations. For multiple panel networks, it can be used for automatic extraction
of seam curves, generation of spider web surface grids around the seam corners (where
3 or more seam curves meet), trimming and redistribution of seam curves based on global
spacing and local turning angle. See seamcr.html for
more details. For surface triangulations, it can be used for automatic extraction of
seam curves and creation of cutting plane curves in x, y, or z.
SURGRD
- Once the SURGRD button is depressed from the main menu, the colors of all
entities will change: all surfaces will become gray and will be assumed to be
part of the reference surface; all curves will be colored individually and are
available for selection as reference curves.
- After generating one set of surface grids, the user must hit UNDO or
exit the overgrid session before trying to generate something else with SURGRD.
This limitation will be removed in the future.
- Use the SAVE button to store surface grids generated and the input parameter
file produced.
- It is assumed that the user is familiar with the terminology used for SURGRD.
See surgrd.html for explanation of usage.
SBLOCK
SBLOCK is a `block' surface grid generator which
requires the reference surface geometry and the seam grids as input.
WKCUT
WKCUT is a wake cut surface grid generator for wing and cap grids.
HYPGEN
HYPGEN s hyperbolic field grid generator for creating
field (volume) grids from one or more surface grids. The user can select one or more surface
entities before clicking on the HYPGEN button. Boundary conditions for multiple surface
entities are automatically determined while the same stretching parameters (marching distance,
number of points, grid spacings) are used for all the grids. Further details are found in
the HYPGEN User's Manual which is available as a NASA TM.
BOXGR
BOXGR is a Cartesian box grid generator. It can be used
to create box grids around selected entities.
Limitations
- Grid diagnostic functions are restricted to surface entities only.
- Arrowheads on direction vectors for curves may look squashed in
certain orientations.
To be implemented
- Grid diagnostic functions for volume entities
- Further grided functions
- Elliptic grid smoothing capability
- Input of IGES - NURBS/trimmed NURBS surfaces and NURBS curves
- Grid info panel: distance between points, etc.
- Better arrowheads for direction vectors for curves
- Communication with other Chimera Grid Tools modules...
References
Chan, W. M.,
Innovative Software Streamlines Overset Grid Generation , NAS News, Vol. 3, No. 3,
May-June, 1998.
Chan, W. M., OVERGRID - A Unified Overset Grid Generation Graphical Interface,
submitted to Special Chimera Issue of Electronic Journal of Grid Generation, 1999.
Sponsor
Funding for this work has been provided by the DOD High Performance Computing Modernization
Program under the CHSSI CFD 4 project.
Questions and Comments
Questions and comments can be directed to William M. Chan at NASA Ames Resaerch Center.
| 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:57:25 PST