AppendixF_User-Manual.pdf

F
DOCUMENTATION AND
USER INSTRUCTIONS OF
PROGRAM `SPLINE'
Appendix F contains the documentation for the program SPLINE developed in Chapter 2. It gives some information about the general features
of the programs. It also presents detailed input instructions and the specimen input data les.
F-1
F-2
F. Documentation and user instructions of program SPLINE
F. Documentation and User Instructions of
Program SPLINE
F.1 Program Documentation
F.1.1 Overview of the Program
Program SLINE computes and plots cubic b-spline curves from a set of key
points. This program can used independently. However, cubic spline curve
tting part of the SPLINE program is already included in SANOPT-S and
SANOPT-F analysis and optimization programs.
F.1.2 Block Structure and Main Routines
A modular approach is adopted, in that separate subroutines are employed
to perform the various operation required in curve tting and plotting. Each
module in turn is composed of one or more subroutines relevant only to its
own needs and, in some cases, of subroutines which are common to several
modules. Control of the modules is held by the main or master segment. The
main segment of the program structure for SPLINE is given in Figure F.1. Only
the important subroutines are shown. The modules are described in relation
to their general functions as follows:
FIMA
SGEODAT
SPLINE
SPARAM
PREPLO
SPLOT GEO
FIMA
Fig. F.1.
Main block diagram of program SPLINE.
1. FIMA handles the le management. This subroutine open and close the
necessary data les.
2. SGEODAT handles input data dening the geometry, such as coordinates
of the key points, end tangent parameter, segments, etc.
3. SPARAM calculates the control points for every cubic B-spline segment in
turn and computes the end tangents.
F.2 Input instructions
F-3
4. PREPLO set up the plotting parameters.
5. SPLOT GEO plots the cubic spline tted geometry of the structure.
F.1.3 File Structures
Program SPLINE uses the following les for input and output:
unit 5 (from keyboard) reads name of the les and some plotting control
parameters.
unit 6 (print screen) some basic data of cubic spline curve tting.
unit 10 reads the control parameters, key points coordinates, end tangents,
segment data.
unit 11 contains the results of the curve tting, control points and curve
tted geometry
F.1.4 Main Dimensions and Limitations of the Program
The program at present can handle 1000 key points points, 200 segment and
10 interpolation parameter.
F.2 Input Instructions
F.2.1 Main Structure of Input Data
In the following section user instructions for preparing the input data are
presented for program SPLINE.
F-4
F. Documentation and user instructions of program SPLINE
Data set 1: Title of problem | Three record (a80)
cols.
variable name
1-80
title
description
Title of the geometry
Data set 2: Parameters for spline | One record (*)
cols.
variable name
description
nsegg
Number of segments
npoig
Number of key points
npolr
Number of key points expressed in polar coordinates
Data set 3: Title of geometry | Three record (a80)
cols.
variable name
description
Data set 4a: Geometry denition
One record for each key point. Total of npoig records (*).
Omit this record, if npolr 6= 0
cols.
variable name
jpoin
coorg(jpoin,1)
coorg(jpoin,2)
description
Key point number
x1 -coordinate of key point
x2 -coordinate of key point
Data set 4b: Geometry denition
One record for each key point. Total of npoig records (*)
Omit this record, if npolr = 0
cols.
variable name
jpoin
lpoco(jpoin)
coorg(jpoin,1)
coorg(jpoin,2)
description
Key point number
Key point coordinate identication
= 0, global Cartesian coordinates system,
< 0, local coordinate system,
> 0, local polar coordiante system
x1 -coordinate of key point
x2 -coordinate of key point
F.2 Input instructions
F-5
Data set 5: Coordinates of origin (polar coord.) points
Omit this record, if npolr = 0; one record for each point expressed in
polar coordinates. Total of npolr records (*)
cols.
variable name
jpoco
polco(jpoco,1)
polco(jpoco,2)
description
Key point number
Value of x1 -coordinate of origin
Value of x2 -coordinate of origin
Data set 6: Segment data
Three sets of records for each segment. Total of nsegg records.
First record set (8) :
cols.
variable name
jsegg
nnseg(jsegg)
description
Segment number
Number of key points in each segment
Second record set (*): (repeated) for each key point of segment (key point connectivity)
cols.
variable name
lnodg(jsegg,1)
lnodg(jsegg,2)
..
..
..
lnodg(jsegg,nnseg(jsegg))
description
segment
1st
key points
segment 2nd key points .
..
..
.
segment nnseg(jsegg)th key points
Third record set (16i5) : end tangents
cols.
variable name
description
icotg(1)
Tangent indicator for cubic spline at start of
segment
icotg(2)
Tangent indicator for cubic spline at end of segment
= 0, natural spline condition,
= 1, horizontal tangent specied,
= 2, vertical tangent specied,
= 3, inclined tangent specied
F-6
F. Documentation and user instructions of program SPLINE
F.2.2 User Hints
The purpose of user hints is to guide the user in the preparation of the data.
In the following some comments are made about various parts of the input le.
In the data sets (*) indicates that free format is used for inputting the data.
The variable npolr species the number of polar coordinate systems, the
values of which are read in data set 1.4; the rst integer species key point.
Then centre of polar coordinate system is specied in the appropriate cartesian coordinate system.
Segments are dened by a sequence of geometry or key points (data set
1.5). The end conditions of segments (icotg(1) and icotg(2)) inuence the
shape of the geometry (see Chapter 2). The values which can be specied
are 0 for natural end condition, 1 for horizontal alignment, 2 for vertical
alignment, 3 for alignment between rst two or last two key points of a
segment. The two values are for the start and the end of a segment.
F.3 Specimen Input Data Files
In this section input and output data les are provided for a numerical example
presented in the book. This information will be of assistance to readers who
wish to run the program contained in the book on their own computer.
F.3.1 Wheel Geometry
Geometry denition: The wheel geometry is dened using 24 key points and
13 segments. The key points are dened in Cartesian coordinate system. In
other words, the polar coordinate system is not used.
A typical input le for SPLINE is displaced in Table F.1.
Table F.1. The input data le for wheel geometry.
WHEEL GEOMETRY SPLINE DATA
SPLINE CONTROL DATA
SEGG POIG POLR
13 24
0
KEY POINTS --- COORDINATES
1 23.00 10.00
2 27.00 10.00
Data Set
1
2
3
4
F.3 Specimen input data les
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
1
13
2
3
4
5
6
7
8
27.00 23.00
40.00 23.00
40.00 27.00
27.00 27.00
27.00 40.00
23.00 40.00
23.00 27.00
10.00 27.00
10.00 23.00
23.00 23.00
25.00 0.00
42.68 7.32
50.00 25.00
42.68 42.68
25.00 50.00
7.32 42.68
0.00 25.00
7.32 7.32
35.70 14.30
35.70 35.70
14.30 35.61
14.30 14.30
9 10 0
14 15 16 17 18 19 20 13
1 1
2 10 0
2 3
0 0
2 10 0
3 4
0 0
3 10 0
4 21 2
2 1
2 10 0
5 6
0 0
2 10 0
6 7
0 0
3 10 0
7 22 5
1 2
2 10 0
8 9
F-7
6
F-8
F. Documentation and user instructions of program SPLINE
0 0
9 2 10 0
9 10
0 0
10 3 10 0
10 23 8
2 1
11 2 10 0
11 12
0 0
12 2 10 0
12 1
0 0
13 3 10 0
1 24 11
1 2
A typical output les for SPLINE is displaced in Table F.2 and Figure F.2
Table F.2. The output data le for wheel geometry.
_______ _____
_____ __ _ _______
|______ |_____] |
| | \ | |______
______| |
|_____ __|__ | \_| |______
Spline Program
Copyright (c) E. Hinton, J. Sienz and M. Ozakca
Swansea, 1988 - 2003
WHEEL GEOMETRY SPLINE DATA
SPLINE CONTROL DATA
SEGG POIG POLR
13
24
0
KEY POINTS --- COORDINATES
1
2
3
4
23.000000
27.000000
27.000000
40.000000
10.000000
10.000000
23.000000
23.000000
F.3 Specimen input data les
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
1
13
1
2
2
0
3
3
0
4
4
2
5
5
0
6
6
0
7
7
1
8
8
0
9
9
14
1
2
3
0
2
4
0
3
21
1
2
6
0
2
7
0
3
22
2
2
9
0
2
40.000000
27.000000
27.000000
23.000000
23.000000
10.000000
10.000000
23.000000
25.000000
42.680000
50.000000
42.680000
25.000000
7.320000
0.000000
7.320000
35.700000
35.700000
14.300000
14.300000
15
2
5
16
27.000000
27.000000
40.000000
40.000000
27.000000
27.000000
23.000000
23.000000
0.000000
7.320000
25.000000
42.680000
50.000000
42.680000
25.000000
7.320000
14.300000
35.700000
35.610000
14.300000
17
18
19
20
13
F-9
F-10
F. Documentation and user instructions of program SPLINE
9
0
10
10
2
11
11
0
12
12
0
13
1
1
10
0
3
23
1
2
12
0
2
1
0
3
24
2
8
11
CONTROL POINTS
Segment: 1
1
6.394376
2
24.735095
3
44.665242
4
52.683935
5
44.599016
6
25.000000
7
5.400984
8
-2.683935
9
5.334758
10
25.264905
11
43.605624
Segment: 2
1
27.000000
2
27.000000
3
27.000000
4
27.000000
Segment: 3
1
14.000000
2
27.000000
3
40.000000
4
53.000000
Segment: 4
1
36.282560
2
41.858720
3
36.282560
4
27.211039
5.405714
-2.702857
5.405714
25.000000
44.594286
52.702857
44.594286
25.000000
5.405714
-2.702857
5.405714
-3.000000
10.000000
23.000000
36.000000
23.000000
23.000000
23.000000
23.000000
33.126716
22.788961
13.717440
8.141280
F.3 Specimen input data les
5
16.873284
Segment: 5
1
53.000000
2
40.000000
3
27.000000
4
14.000000
Segment: 6
1
27.000000
2
27.000000
3
27.000000
4
27.000000
Segment: 7
1
16.873284
2
27.211039
3
36.282560
4
41.858720
5
36.282560
Segment: 8
1
23.000000
2
23.000000
3
23.000000
4
23.000000
Segment: 9
1
36.000000
2
23.000000
3
10.000000
4
-3.000000
Segment: 10
1
13.724142
2
8.137929
3
13.724142
4
22.765504
5
33.213841
Segment: 11
1
-3.000000
2
10.000000
3
23.000000
4
36.000000
Segment: 12
1
23.000000
2
23.000000
3
23.000000
4
23.000000
Segment: 13
1
33.126716
13.717440
27.000000
27.000000
27.000000
27.000000
14.000000
27.000000
40.000000
53.000000
36.282560
41.858720
36.282560
27.211039
16.873284
53.000000
40.000000
27.000000
14.000000
27.000000
27.000000
27.000000
27.000000
16.867919
27.254022
36.115994
41.942003
36.115994
23.000000
23.000000
23.000000
23.000000
36.000000
23.000000
10.000000
-3.000000
13.717440
F-11
F-12
F. Documentation and user instructions of program SPLINE
2
3
4
5
Fig. F.2.
22.788961
13.717440
8.141280
13.717440
8.141280
13.717440
22.788961
33.126716
The output postscript le for wheel geometry.