-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodeler.h
171 lines (154 loc) · 6.22 KB
/
modeler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/* modeler.h */
/*
*=============================================================================
*
*
* Copyright (C) 2009 Anders Gidenstam (anders(at)gidenstam.org)
* Copyright (C) 2009 Ronald Jensen (ron(at)jentronics.com)
* http://www.gidenstam.org
* http://www.jentronics.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*=============================================================================
*/
#ifndef MODELER_H
/* Flight Conditions */
/* Optional Inputs */
struct OPTINS {
double ROUGFC, /* Surface Roughness Factor */
SREF, /* Reference Area, value of theoretical wing */
CBARR, /* Longitudinal Reference Value. MAC. */
BLREF; /* Lateral Reference Length. Wing Span. */
/* char pad[4]; */
} ;
/* SYNTHS Reference Parameters*/
struct SYNTHS {
double XCG, ZCG,
XW, ZW, ALIW,
XH, ZH, ALIH,
XV, ZV,
XVF, ZVF,
SCALE,
HINAX;
int VERTUP;
/* char[4] pad; */
} ;
/* Body Geometric Data */
struct BODY {
int NX; /* Number of longitudinal body stations at which data is specified, max of 20 */
double X[20]; /* Array(20) Longitudinal distance measured from arbitray location */
double S[20]; /* Array(20) Cross sectional area at station. See note above. */
double P[20]; /* Array(20) Periphery at station Xi. See note above. */
double R[20]; /* Array(20) Planform half width at station Xi. See note above. */
double ZU[20]; /* Array(20) Z-coordinate at upper body surface at station Xi
* (positive when above centerline)
* [Only required for subsonic asymmetric bodies] */
double ZL[20]; /* Array(20) Z-coordinate at lower body surface at station Xi
* (negative when below centerline)
* [Only required for subsonic asymmetric bodies] */
double BNOSE; /* Nosecone type 1.0 = conical (rounded), 2.0 = ogive (sharp point)
* [Not required in subsonic speed regime] */
double BTAIL; /* Tailcone type 1.0 = conical, 2.0 = ogive, omit for lbt = 0
* [Not required in subsonic speed regime] */
double BLN; /* Length of body nose
* Not required in subsonic speed regime */
double BLA; /* Length of cylindrical afterbody segment, =0.0 for nose alone
* or nose-tail configuration
* Not required in subsonic speed regime */
double DS; /* Nose bluntness diameter, zero for sharp nosebodies
* [Hypersonic speed regime only] */
int ITYPE; /* 1.0 = straight wing, no area rule
* 2.0 = swept wing, no area rule (default)
* 3.0 = swept wing, area rule */
int METHOD; /* 1.0 = Use existing methods (default)
* 2.0 = Use Jorgensen method */
} ;
/* Wing Planform Variables */
struct WGPLNF {
double CHRDR, /* Chord root */
CHRDBP, /* Chord at breakpoint. Not required for straight tapered planform. */
CHRDTP, /* Tip chord */
SSPN, /* Semi-span theoretical panel from theoretical root chord */
SSPNE, /* Semi-span exposed panel, */
SSPNOP, /* Semi-span outboard panel. Not required for straight tapered planform. */
SAVSI, /* Inboard panel sweep angle */
SAVSO, /* Outboard panel sweep angle */
CHSTAT, /* Reference chord station for inboard and outboard panel sweep angles, fraction of chord */
TWISTA, /* Twist angle, negative leading edge rotated down (from exposed root to tip) */
SSPNDD, /* Semi-span of outboard panel with dihedral */
DHDADI, /* Dihedral angle of inboard panel */
DHDADO; /* Dihedral angle of outboard panel. If DHDADI=DHDADO only input DHDADI */
int TYPE; /* 1.0 - Straight tapered planform
2.0 - Double delta planform (aspect ratio <= 3)
3.0 - Cranked planform (aspect ratio > 3) */
/* char[4] pad; */
} ;
/* Horizontal Tail Planform Variables */
struct HTPLNF {
char pad[4];
} ;
/* Vertical Tail Planform Variables */
struct VTPLNF {
char pad[4];
} ;
/* Vertical Fin Planform Variables */
struct VFPLNF {
char pad[4];
} ;
/* Jet Power Parameters */
struct JETPWR{
char pad[4];
} ;
/* Propeller Power Parameters */
struct PROPWR{
double AIETLP, /* Angle of incidence of engine thrust axis */
NENGSP, /* Number of engines 1 or 2 */
THSTCP, /* Thrust Coefficient */
PHALOC, /* Axial (X) location of propeller hub */
PHVLOC, /* Vertical (Z) location of propeller hub */
PRPRAD, /* Propeller radius */
BWAPR3, /* Blade width at 0.3 radius */
BWAPR6, /* Blade width at 0.6 radius */
BWAPR9, /* Blade width at 0.9 radius */
NOPBPE, /* Number of propeller blades per engine */
BAPR75, /* Blade angle at 0.75 radius */
YP; /* Lateral (Y) location of engine */
int CROT; /* True = counter rotating propeller */
} ;
/* Twin Vertical Panels */
struct TVTPAN{
char pad[4];
} ;
/* Airfoil */
/*************************
*
* This structure contains data
* calculated from the input NACA
* number or airfoil geometric data.
*
*************************/
struct AIRFOIL{
int COUNT; /* Number of entries */
double *DATAX; /* data elements */
double *DATAY;
};
typedef struct RIB3D {
int count; /* Number of entries */
double *X; /* data elements */
double *Y;
double *Z;
} RIB3D;
#define MODELER_H
#endif