forked from marioarbras/aircraft-design-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8068b8a
commit 37e673a
Showing
12 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function mm = air_viscosity(t) | ||
% Sutherland's formula (Crane, 1988) | ||
% http://jullio.pe.kr/fluent6.1/help/html/ug/node294.htm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function [propulsion, performance] = design_point(mission, propulsion, performance, constants) | ||
|
||
wl = 0:10:10000; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function performance = drag_buildup(performance, aircraft) | ||
|
||
performance.c_d0 = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function mf_prop = estimate_mf_prop(f_install, pw_to, pw_ice, pw_gen, pw_em, pw_prop, config) | ||
% f_install: Factor that accounts for all auxiliary systems for propulsion (> 1) | ||
% pw_to: Shaft power to MTOW ratio | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function mf_subs = estimate_mf_subs(mf_prop, mf_struct) | ||
|
||
mf_subs = 3 / 7 * (mf_prop + mf_struct); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function cf = friction_coeff(x, v, a, rr, mm) | ||
re = reynolds(x, v, rr, mm); | ||
|
||
re = reynolds(x, v, rr, mm); | ||
if is_laminar(re) | ||
cf = 1.328 / sqrt(re); | ||
else | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function aircraft = fuselage(aircraft, segment) | ||
|
||
% Iterate over aircraft lifting surfaces | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function aircraft = lifting_surface(aircraft, segment) | ||
|
||
m = segment.v / segment.speed_sound; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
close all; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function mission = mtow(mission, propulsion, energy, performance, constants) | ||
|
||
% Initialize mission parameters | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function plot_mission(mission) | ||
|
||
x = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
% Aircraft design tool | ||
% | ||
% Mario Bras ([email protected]) and Ricardo Marques ([email protected]) 2019 | ||
% | ||
% This file is subject to the license terms in the LICENSE file included in this distribution | ||
|
||
function r = reynolds(x, v, rr, mm) | ||
r = rr * v * x / mm; | ||
|
||
r = rr * v * x / mm; |