-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPayload_Range.m
More file actions
254 lines (205 loc) · 9.78 KB
/
Payload_Range.m
File metadata and controls
254 lines (205 loc) · 9.78 KB
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
%% Payload Range
% Creates payload range diagram based on the document posted by Professor
% Van Dam
% Run iter_weights.m --> TO_TD_perf.m --> Drag_Analysis.m before this script
%% Range - Constant Altitude (Supersonic)
% Range at constant altitude (constant air density, rho, and constant air pressure, p)
% and Mach number, M, is (assuming thrust specific fuel consumption, c, remains constant throughout
% the mission)
% Dynamic pressure (psf)
atm.crRange = atm.rho_sl * atm.sig_rho; % density (slugs/ft^3)
V_cr = req.cr_M0(1) * Wt.fuel.a_snd * 1116.5; % cruise speed (ft/s)
q_cr = 0.5*atm.crRange*(V_cr^2); % dynamic pressure (psf)
% Drag Forces
D_0 = CD0.total.super * q_cr * WING.geom.S_area;
% Constants
K_perf = 1 / (pi * e * WING.geom.AR);
b1 = sqrt(D_0);
b2 = sqrt((K_perf / WING.geom.S_area) * (1/q_cr));
%%
% Pt. B
Wt.fuel.reserve = Wt.fuel.w_max - Wt.fuel.w_tot; % Amount of reserve fuel
Wt.W1.B = Wt.WOEW + Wt.pld.w_tot + Wt.fuel.reserve; % W1 = OEW + Max Pld + Fuel reserve
Range.c_alt.B = (V_cr / Wt.fuel.sfc_cr) * (1 / (b1 * b2)) * (atan((0.97 * Wt.WTO) * (b2/b1)) - atan(Wt.W1.B *(b2/b1)));
% Pt. C
Wt.W1.C = Wt.WTO - Wt.fuel.w_max + Wt.fuel.reserve;
Range.c_alt.C = (V_cr / Wt.fuel.sfc_cr) * (1 / (b1 * b2)) * (atan((0.97 * Wt.WTO) * (b2/b1)) - atan(Wt.W1.C *(b2/b1)));
% Pt. D
Wt.W0.D = Wt.WOEW + Wt.fuel.w_max;
Wt.W1.D = Wt.WOEW;
Range.c_alt.D = (V_cr / Wt.fuel.sfc_cr) * (1 / (b1 * b2)) * (atan((Wt.W0.D) * (b2/b1)) - atan(Wt.W1.D *(b2/b1)));
% Store ranges in array
Range.c_alt.array = [Range.c_alt.B, Range.c_alt.C, Range.c_alt.D];
% Convert ft to nmi
Range.c_alt.array = Range.c_alt.array * 0.000164579;
%% Range at Constant Altitude (Transonic M = 0.8)
h = 37; % transonic cruise altitude (kft)
[~,~,atm.sig_trans,atm.snd_trans] = AltTable(h,'h');
% Dynamic pressure (psf)
atm.transCr = atm.rho_sl * atm.sig_trans; % density (slugs/ft^3)
V_transCr = 0.8 * atm.snd_trans * 1116.5; % transonic cruise speed (ft/s)
q_trans = 0.5*atm.transCr*(V_transCr^2); % dynamic pressure (psf)
% Drag Forces
D_0 = CD0.total.sub * q_trans * WING.geom.S_area;
% Constants
K_perf = 1 / (pi * e * WING.geom.AR);
b1 = sqrt(D_0);
b2 = sqrt((K_perf / WING.geom.S_area) * (1/q_trans));
% TSFC
Wt.trans.sfc_cr = 0.484/3600; % From Mattingly (100% Thrust, 37 kft)
% Pt. B
Range.trans_alt.B = (V_transCr / Wt.trans.sfc_cr) * (1 / (b1 * b2)) * (atan((0.97 * Wt.WTO) * (b2/b1)) - atan(Wt.W1.B *(b2/b1)));
% Pt. C
Range.trans_alt.C = (V_transCr / Wt.trans.sfc_cr) * (1 / (b1 * b2)) * (atan((0.97 * Wt.WTO) * (b2/b1)) - atan(Wt.W1.C *(b2/b1)));
% Pt. D
Range.trans_alt.D = (V_transCr / Wt.trans.sfc_cr) * (1 / (b1 * b2)) * (atan((Wt.W0.D) * (b2/b1)) - atan(Wt.W1.D *(b2/b1)));
% Store ranges in array
Range.trans_alt.array = [Range.trans_alt.B, Range.trans_alt.C, Range.trans_alt.D];
% Convert ft to nmi
Range.trans_alt.array = Range.trans_alt.array * 0.000164579;
%% Payload Range Diagram (Const Mach Number and Altitude)
% Plot Payload Range Diagram
figure()
%-----Supersonic:Const Mach # and Alt-----%
% pt. A
plot(0, Wt.fuel.w_tot + Wt.pld.w_tot, 's', 'MarkerSize',6,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5])
hold on;
% pt. B
plot(Range.c_alt.array(1), Wt.fuel.w_tot + Wt.pld.w_tot,'s', 'MarkerSize',6,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5])
% pt. C
plot(Range.c_alt.array(2), Wt.WTO - Wt.fuel.w_max, 's', 'MarkerSize',6,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5])
% pt. D
plot(Range.c_alt.array(3), 0, 's', 'MarkerSize',6,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5])
% Connect points with lines
hLine1 = plot([0,Range.c_alt.array(1)], [Wt.fuel.w_tot + Wt.pld.w_tot,Wt.fuel.w_tot + Wt.pld.w_tot], 'b');
plot([Range.c_alt.array(1),Range.c_alt.array(2)], [Wt.fuel.w_tot + Wt.pld.w_tot, Wt.WTO - Wt.fuel.w_max], 'b')
plot([Range.c_alt.array(2),Range.c_alt.array(3)], [Wt.WTO - Wt.fuel.w_max,0],'b')
%-----Transonic:Const Mach # and Alt-----%
% pt. A
plot(0, Wt.fuel.w_tot + Wt.pld.w_tot, 'd', 'MarkerSize',6,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5])
hold on;
% pt. B
plot(Range.trans_alt.array(1), Wt.fuel.w_tot + Wt.pld.w_tot,'d', 'MarkerSize',6,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5])
% pt. C
plot(Range.trans_alt.array(2), Wt.WTO - Wt.fuel.w_max, 'd', 'MarkerSize',6,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5])
% pt. D
plot(Range.trans_alt.array(3), 0, 'd', 'MarkerSize',6,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5])
% Connect points with lines
hLine2 = plot([0,Range.trans_alt.array(1)], [Wt.fuel.w_tot + Wt.pld.w_tot,Wt.fuel.w_tot + Wt.pld.w_tot], 'r');
plot([Range.trans_alt.array(1),Range.trans_alt.array(2)], [Wt.fuel.w_tot + Wt.pld.w_tot, Wt.WTO - Wt.fuel.w_max], 'r')
plot([Range.trans_alt.array(2),Range.trans_alt.array(3)], [Wt.WTO - Wt.fuel.w_max,0],'r')
title('Payload Range Diagram (Constant M and Alt.)')
xlabel('Range (nmi)')
ylabel('Payload (lb)')
legend([hLine1,hLine2],'Supersonic Cruise (M=1.6)','Transonic Cruise (M=0.8)', 'Location', 'Southwest')
%% Range at Cruise Climb Conditions (Supersonic)
% Range at cruise climb conditions (constant lift coefficient, CL, and Mach number, M) and
% assuming thrust specific fuel consumption, c, remains constant throughout the mission
% Determine L/D
CL.cr.CFD = spline(WING.VSP.SUP.ALPHA,WING.VSP.SUP.CL, 2.86);
CD.cr.CFD = spline(CL.array,CD.total.super, CL.cr.CFD);
% See Roskam Airplane Aero and Perf Sect 11.1.2.1 (eqns 11.10 & 11.11)
L_D.cr_super.avg = CL.cr.CFD / CD.cr.CFD;
%L_D.cr_super.avg = 7.5;
% Pt. B
Range.cr_climb.B = ((Wt.fuel.a_snd * 1116.5) / Wt.fuel.sfc_cr) * req.cr_M0(1) * L_D.cr_super.avg * log((0.97 * Wt.WTO) / Wt.W1.B);
% Pt. C
Range.cr_climb.C = ((Wt.fuel.a_snd * 1116.5) / Wt.fuel.sfc_cr) * req.cr_M0(1) * L_D.cr_super.avg * log((0.97 * Wt.WTO) / Wt.W1.C);
% Pt. D
Range.cr_climb.D = ((Wt.fuel.a_snd * 1116.5) / Wt.fuel.sfc_cr) * req.cr_M0(1) * L_D.cr_super.avg * log((Wt.W0.D) / Wt.W1.D);
% Store ranges in array
Range.cr_climb.array = [Range.cr_climb.B, Range.cr_climb.C, Range.cr_climb.D];
% Convert ft to nmi
Range.cr_climb.array = Range.cr_climb.array * 0.000164579;
%% Range at Cruise Climb Conditions (Transonic M = 0.8)
% L/D for transonic cruise climb conditions
% See Roskam Airplane Aero and Perf Sect 11.1.2.1 (eqns 11.10 & 11.11)
CL.cr_trans.CFD = spline(WING.CFD.SUB.alpha,WING.CFD.SUB.CL, 2.86);
CD.cr_trans.CFD = spline(WING.CFD.SUB.alpha,WING.CFD.SUB.CD, 2.86);
L_D.cr_sub.avg = CL.cr_trans.CFD / CD.cr_trans.CFD;
% L_D.cr_sub.avg = 12;
% Pt. B
Range.climb_trans.B = ((atm.snd_trans * 1116.5) / Wt.trans.sfc_cr) * 0.8 * L_D.cr_sub.avg * log((0.97 * Wt.WTO) / Wt.W1.B);
% Pt. C
Range.climb_trans.C = ((atm.snd_trans * 1116.5) / Wt.trans.sfc_cr) * 0.8 * L_D.cr_sub.avg * log((0.97 * Wt.WTO) / Wt.W1.C);
% Pt. D
Range.climb_trans.D = ((atm.snd_trans * 1116.5) / Wt.trans.sfc_cr) * 0.8 * L_D.cr_sub.avg * log((Wt.W0.D) / Wt.W1.D);
% Store ranges in array
Range.climb_trans.array = [Range.climb_trans.B, Range.climb_trans.C, Range.climb_trans.D];
% Convert ft to nmi
Range.climb_trans.array = Range.climb_trans.array * 0.000164579;
%% Payload Range Diagram (Cruise Climb Conditions)
% Cruise climb conditions indicate constant lift coefficient and Mach
% number
%-----Supersonic:Cruise Climb-----%
% Plot Payload Range Diagram
figure()
% pt. A
plot(0, Wt.fuel.w_tot + Wt.pld.w_tot, 's', 'MarkerSize',6,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5])
hold on;
% pt. B
plot(Range.cr_climb.array(1), Wt.fuel.w_tot + Wt.pld.w_tot,'s', 'MarkerSize',6,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5])
% pt. C
plot(Range.cr_climb.array(2), Wt.WTO - Wt.fuel.w_max, 's', 'MarkerSize',6,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5])
% pt. D
plot(Range.cr_climb.array(3), 0, 's', 'MarkerSize',6,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5])
% Connect points with lines
hline3 = plot([0,Range.cr_climb.array(1)], [Wt.fuel.w_tot + Wt.pld.w_tot,Wt.fuel.w_tot + Wt.pld.w_tot], 'b');
plot([Range.cr_climb.array(1),Range.cr_climb.array(2)], [Wt.fuel.w_tot + Wt.pld.w_tot, Wt.WTO - Wt.fuel.w_max], 'b')
plot([Range.cr_climb.array(2),Range.cr_climb.array(3)], [Wt.WTO - Wt.fuel.w_max,0],'b')
%-----Transonic:Cruise Climb-----%
% Plot Payload Range Diagram
% pt. A
plot(0, Wt.fuel.w_tot + Wt.pld.w_tot, 'd', 'MarkerSize',6,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5])
hold on;
% pt. B
plot(Range.climb_trans.array(1), Wt.fuel.w_tot + Wt.pld.w_tot,'d', 'MarkerSize',6,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5])
% pt. C
plot(Range.climb_trans.array(2), Wt.WTO - Wt.fuel.w_max, 'd', 'MarkerSize',6,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5])
% pt. D
plot(Range.climb_trans.array(3), 0, 'd', 'MarkerSize',6,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5])
% Connect points with lines
hline4 = plot([0,Range.climb_trans.array(1)], [Wt.fuel.w_tot + Wt.pld.w_tot,Wt.fuel.w_tot + Wt.pld.w_tot],'r');
plot([Range.climb_trans.array(1),Range.climb_trans.array(2)], [Wt.fuel.w_tot + Wt.pld.w_tot, Wt.WTO - Wt.fuel.w_max], 'r')
plot([Range.climb_trans.array(2),Range.climb_trans.array(3)], [Wt.WTO - Wt.fuel.w_max,0],'r')
% Plot vertical lines for pt B and pt C
% plot([Range.climb_trans.array(1),Range.climb_trans.array(1)], [Wt.fuel.w_tot + Wt.pld.w_tot,0],'k:')
% plot([Range.climb_trans.array(2),Range.climb_trans.array(2)], [Wt.WTO - Wt.fuel.w_max,0],'k:')
% plot([Range.cr_climb.array(1),Range.cr_climb.array(1)], [Wt.fuel.w_tot + Wt.pld.w_tot,0],'k:')
% plot([Range.cr_climb.array(2),Range.cr_climb.array(2)], [Wt.WTO - Wt.fuel.w_max,0],'k:')
title('Payload Range Diagram (Cruise-Climb)')
xlabel('Range (nmi)')
ylabel('Payload (lb)')
legend([hline3, hline4],'Supersonic Cruise (M=1.6)','Transonic Cruise (M=0.8)', 'Location', 'Southwest')