Date: July, 1997.
This program splines, redistributes and projects points from grids supplied in a PLOT3D single/multiple grid file. The grids are assumed to be dimensioned (jmax,1,1) or (jmax,kmax,1), i.e. they are curve grids or surface grids. Spline knots are supplied by the original grid. An option allows the redistributed points to be projected back on to the piece-wise linear representation of the curve/surface defined by the original points.
For surface grids, redistribution is performed in the J direction along K=constant curves, and/or in the K direction along J=constant curves. Redistribution of each J or K constant curve is performed independent of each other.
Each curve in J or K can be divided into one or more segments on which redistribution is performed. Each segment is defined by its start and end indices IS,IE. The new number of points NP and grid spacings at the end points of the segment DELS,DELE can be specified. Grid points not on any defined segments are untouched.
For surface grids, a more complex situation may arise as follows. Suppose redistribution is to be performed in the J direction. Typically, the same end point spacings DELS and DELE are applied for all K=constant curves. In this case, the parameter NNODE (number of nodes) should be set to 1. If different end point spacings are desired at different K stations, NNODE > 1 should be used. At each node index (NODEI), a different set of DELS and DELE can be specified. Linear interpolation is used for values of DELS and DELE between nodes. For curve grids, NNODE should always be set to 1.
This program is modified from the spline.f program obtained from Bob Meakin and can be used as
input_grid_filename
output_grid_filename
1 NBI
1, 3 IG, IROPT
1, 1 IDIR, IMODE, [ISPEC]
2, 2, 1 NSEG, NNODE
1, 10, 20 IS, IE, PAR (segment 1)
1, 0.1, 0.1 NODEI, DELS, DELE (node 1)
-1, 0.2, 0.2 (node 2)
29, -1, 17 IS, IE, PAR (segment 2)
1, 0.0, 0.0 NODEI, DELS, DELE (node 1)
-1, 0.0, 0.0 (node 2)
2, 1, 2 IDIR, IMODE, [ISPEC]
2, 1 NSEG, NNODE
1, 20, 1.2 IS, IE, PAR (segment 1)
1, 0.1, 0.1 NODEI, DELS, DELE (node 1)
20, -1, 1.2 IS, IE, PAR (segment 3)
1, 0.1, 0.0 NODEI, DELS, DELE (node 1)
NBI = number of blocks of input ( <= number of grids + 1 ).
Each block of input contains SRAP parameters for one
grid (IG > 0) or for all grids (IG = 0) - see IG input
below. Parameters specified under IG > 0 overrides
parameters specified under IG = 0. Redistribution is
not performed on grids in the grid file that are not
specified in the input parameters file.
For N=1,NBI, enter the following block
{
IG >0 grid number of grid on which this block of parameters
is applied
=0 apply this set of parameters to all grids other than
the ones specified by IG>0. Parameters for IG=0 must
appear in the first block of input.
IROPT = redistribution direction
(0 = no redistribution,
1 = redistribute in J along K=constant lines,
2 = redistribute in K along J=constant lines,
3 = 1 followed by 2,
4 = 2 followed by 1,
1/2/3/4 => projection is performed afterwards
-1/-2/-3/-4 => no projection is performed)
Enter the following sub-block once for IROPT = 1 or 2.
Enter the following sub-block twice for IROPT = 3 or 4.
Do not enter the following sub-block if IROPT = 0.
[
IDIR = redistribution direction for this sub-block of parameters
(1 = J direction parameters, 2 = K direction parameters)
IMODE = input grid spacing option
(1 = absolute,
2 = relative to arc length of segment)
ISPEC = input specification option (if ISPEC is omitted in input
line, ISPEC=1 is assumed)
(1 = specify number of points NP and end spacings for each segment;
NP specified in PAR must be in range NP > 0 - see below,
2 = specify max stretching ratio RMAX and end spacings for each
segment, number of points is automatically determined;
RMAX specified in PAR must be in range RMAX > 1 - see below,
3 = specify uniform grid spacing in DELS, number of points
is automatically determined, DELS must be > 0.
NSEG = number of segments.
Each grid line in J or K can be divided into one or more
segments on which redistribution is performed. Each segment
is defined by its start and end indices IS,IE. The new number
of points NP and grid spacings at the end points of the
segment DELS,DELE can be specified. Grid points not on any
defined segments are untouched.
NNODE = number of nodes.
This is used to indicate variations in grid spacings in the
cross direction for surface grids. For curve grids, NNODE
should always be 1. For surface grids, suppose redistribution
is in J. One node in K would imply that the current sub-block
of parameters is used for all K. Multiple nodes in K would
allow a different DELS and DELE at different K stations K=NODEI.
Linear interpolation is used for values of DELS, DELE between
nodes.
IS, IE = start and end segment indices
PAR = new number of points for segment with end spacings given by
DELS and DELE (ISPEC = 1) - must be > 0, or
= max stretching ratio for segment with end spacings given by
DELS and DELE (ISPEC = 2) - must be > 1
Repeat the following line for each node.
(
NODEI = grid point index of node
DELS >0 prescribed grid spacing at start of segment
=0 float grid spacing at start of segment
DELE >0 prescribed grid spacing at end of segment
=0 float grid spacing at end of segment
(setting both DELS and DELE to zero with PAR>0 will given
uniform spacing for segment)
)
]
}
NASA Ames Research Center, Moffett Field CA 94035-1000, (650) 604-5000
Privacy Statement
URL: http://rotorcraft.arc.nasa.gov/
This Website Maintained By: Randall L. Peterson.
Responsible NASA Official: Dr. William Warmbrodt (Chief)
Ames Research Center Homepage
NASA Homepage