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