From f68d4b6c4e1730d09e077af5f1430bd022871e51 Mon Sep 17 00:00:00 2001 From: NawaKhai Date: Thu, 11 Jul 2024 12:07:53 -0400 Subject: [PATCH 1/7] SUSAN Visualization Model Visualization Model and its accompanying files. --- +VisualizationPkg/+GeometrySpecsPkg/SUSAN.m | 158 ++++++++++++++++++ .../+GeometrySpecsPkg/SUSANEngines.dat | 70 ++++++++ .../+GeometrySpecsPkg/SUSANFuselage.dat | 35 ++++ 3 files changed, 263 insertions(+) create mode 100644 +VisualizationPkg/+GeometrySpecsPkg/SUSAN.m create mode 100644 +VisualizationPkg/+GeometrySpecsPkg/SUSANEngines.dat create mode 100644 +VisualizationPkg/+GeometrySpecsPkg/SUSANFuselage.dat diff --git a/+VisualizationPkg/+GeometrySpecsPkg/SUSAN.m b/+VisualizationPkg/+GeometrySpecsPkg/SUSAN.m new file mode 100644 index 00000000..9d645c15 --- /dev/null +++ b/+VisualizationPkg/+GeometrySpecsPkg/SUSAN.m @@ -0,0 +1,158 @@ +function [Aircraft] = SUSAN(Aircraft) +% +% SUSAN.m +% written by Nawa Khailany, nawakhai@umich.edu +% last updated: 13 may 2024 +% +% geometric parameters for a transport-like aircraft. +% +% inputs : Aircraft - aircraft structure with no geometry components +% outputs: Aircraft - aircraft structure with the geometry components +% + +% ---------------------------------------------------------- + +%% DEFINE THE WING %% +%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% list geometric parameters % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% parameters with numerical values +Wing.AR = 9.44 ; +Wing.area = 1470 ; +Wing.taper = 0.28; +Wing.sweep = 21 ; +Wing.dihedral = 2 ; +Wing.xShiftWing = 100 ; +Wing.yShiftWing = 0 ; +Wing.zShiftWing = -10 ; +Wing.symWing = 1 ; + +% parameters with characters +Wing.orientation = 'xz' ; +Wing.wingAfoil.airfoilName = '2412' ; +Wing.type = 'liftingSurface'; + + +%% DEFINE THE HTAIL %% +%%%%%%%%%%%%%%%%%%%%%% + +% parameters with numerical values +Htail.AR = 3; +Htail.area = 409; +Htail.taper = 0.25; +Htail.sweep = 28; +Htail.dihedral = 0 ; +Htail.xShiftWing = 161 ; +Htail.yShiftWing = 0 ; +Htail.zShiftWing = 32 ; +Htail.symWing = 1 ; + +% parameters with characters +Htail.orientation = 'xz' ; +Htail.wingAfoil.airfoilName = '0008' ; +Htail.type = 'liftingSurface'; + + +%% DEFINE THE VTAIL %% +%%%%%%%%%%%%%%%%%%%%%% + +% parameters with numerical values +Vtail.AR = 1.80; +Vtail.area = 280; +Vtail.taper = 0.8; +Vtail.sweep = 36; +Vtail.dihedral = 0 ; +Vtail.xShiftWing = 150 ; +Vtail.yShiftWing = 0 ; +Vtail.zShiftWing = 9 ; +Vtail.symWing = 0 ; + +% parameters with characters +Vtail.orientation = 'xy' ; +Vtail.wingAfoil.airfoilName = '0008' ; +Vtail.type = 'liftingSurface'; + + +%% DEFINE THE FUSELAGE %% +%%%%%%%%%%%%%%%%%%%%%%%%% + +% parameters with numerical values +Fuselage.Length = 150; + +% parameters with characters +Fuselage.type = 'bluntBody'; +Fuselage.Style = fullfile("+VisualizationPkg","+GeometrySpecsPkg","SUSANFuselage.dat"); + + +%% DEFINE THE ENGINES %% +%%%%%%%%%%%%%%%%%%%%%%%% + +% parameters with numerical values +Engine.Length = 8.5/2 ; +Engine.EngineInletRadii = 6.25 ; +Engine.EngineOutletRadii = 5.75; + +% parameters with characters +Engine.type = 'Engine'; +Engine.Filename = fullfile("+VisualizationPkg","+GeometrySpecsPkg","SUSANEngines.dat"); + +% %% DEFINE THE RIGHT CASING %% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% % parameters with numerical values +% CasingR.Length = 200; +% +% % parameters with characters +% CasingR.type = 'bluntBody'; +% CasingR.Style = fullfile("+VisualizationPkg","+GeometrySpecsPkg","SUSANCasingR.dat"); +% +% %% DEFINE THE LEFT CASING %% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% +% % parameters with numerical values +% CasingL.Length = 200; +% +% % parameters with characters +% CasingL.type = 'bluntBody'; +% CasingL.Style = fullfile("+VisualizationPkg","+GeometrySpecsPkg","SUSANCasingL.dat"); +% + +%% REMEMBER THE GEOMETRY PARAMETERS %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% save as one structure % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% remember the wing +Aircraft.Geometry.Wing = Wing; + +% remember the htail +Aircraft.Geometry.Htail = Htail; + +% remember the vtail +Aircraft.Geometry.Vtail = Vtail; + +%remember the fuselage +Aircraft.Geometry.Fuselage = Fuselage; + +%remember the engines +Aircraft.Geometry.Engine = Engine; + +% %remember the right casing +% Aircraft.Geometry.CasingR = CasingR; +% +% %remember the left casing +% Aircraft.Geometry.CasingL = CasingL; + +% ---------------------------------------------------------- + +end \ No newline at end of file diff --git a/+VisualizationPkg/+GeometrySpecsPkg/SUSANEngines.dat b/+VisualizationPkg/+GeometrySpecsPkg/SUSANEngines.dat new file mode 100644 index 00000000..bd03e547 --- /dev/null +++ b/+VisualizationPkg/+GeometrySpecsPkg/SUSANEngines.dat @@ -0,0 +1,70 @@ +NumberOfEngines=17 + +engine_1 +141 0 0 +4 1 +TURBOFAN +engine_2 +110 -16 -12 +5 0.25 +TURBOPROP +engine_3 +111 -20 -11.8 +0.5 0.25 +TURBOPROP +engine_4 +113 -24 -11.6 +0.5 0.25 +TURBOPROP +engine_5 +114 -28 -11.4 +0.5 0.25 +TURBOPROP +engine_6 +115.7 -32 -11.2 +0.5 0.25 +TURBOPROP +engine_7 +117 -36 -11 +0.5 0.25 +TURBOPROP +engine_8 +118.5 -40 -10.8 +0.5 0.25 +TURBOPROP +engine_9 +120 -44 -10.6 +0.5 0.25 +TURBOPROP +engine_10 +110 16 -12 +0.5 0.25 +TURBOPROP +engine_11 +111 20 -11.8 +0.5 0.25 +TURBOPROP +engine_12 +113 24 -11.6 +0.5 0.25 +TURBOPROP +engine_13 +114 28 -11.4 +0.5 0.25 +TURBOPROP +engine_14 +115.7 32 -11.2 +0.5 0.25 +TURBOPROP +engine_15 +117 36 -11 +0.5 0.25 +TURBOPROP +engine_16 +118.5 40 -10.8 +0.5 0.25 +TURBOPROP +engine_17 +120 44 -10.6 +0.5 0.25 +TURBOPROP \ No newline at end of file diff --git a/+VisualizationPkg/+GeometrySpecsPkg/SUSANFuselage.dat b/+VisualizationPkg/+GeometrySpecsPkg/SUSANFuselage.dat new file mode 100644 index 00000000..72ea6591 --- /dev/null +++ b/+VisualizationPkg/+GeometrySpecsPkg/SUSANFuselage.dat @@ -0,0 +1,35 @@ +x1=14.0 +x2=109 +TLength=140 +SuperEllipseNum=6 + +supell_1 +0.0 0.0 0.0 0.0 +2 2 2 2 +0.0 0.0 0.0 +NOTFVIEW +supell_2 +2.5 2.5 2.5 2.5 +2 2 2 2 +2.5 0.0 0.0 +FVIEW +supell_3 +7.5 7.5 7.5 7.5 +2 2 2 2 +14.0 0.0 0.0 +NOTFVIEW +supell_4 +10.0 10.0 10.0 10.0 +2 2 2 2 +28.0 0.0 0.0 +FVIEW +supell_5 +10.0 10.0 10.0 10.0 +2 2 2 2 +110 0.0 0.0 +NOTFVIEW +supell_6 +1.5 0.5 1.5 0.5 +2 2 2 2 +140 0.0 0 +NOTFVIEW \ No newline at end of file From bd4a30bf76d13f97a46820ad0affe1a0da3026eb Mon Sep 17 00:00:00 2001 From: NawaKhai Date: Fri, 12 Jul 2024 17:21:26 -0400 Subject: [PATCH 2/7] BWB Geometry Geometry files for a Blended-Wing-Body configuration --- +VisualizationPkg/+GeometrySpecsPkg/BWB.m | 102 ++++++++++++++++++ .../+GeometrySpecsPkg/BWBFuselage.dat | 50 +++++++++ 2 files changed, 152 insertions(+) create mode 100644 +VisualizationPkg/+GeometrySpecsPkg/BWB.m create mode 100644 +VisualizationPkg/+GeometrySpecsPkg/BWBFuselage.dat diff --git a/+VisualizationPkg/+GeometrySpecsPkg/BWB.m b/+VisualizationPkg/+GeometrySpecsPkg/BWB.m new file mode 100644 index 00000000..fd76e742 --- /dev/null +++ b/+VisualizationPkg/+GeometrySpecsPkg/BWB.m @@ -0,0 +1,102 @@ +function [Aircraft] = BWB(Aircraft) + +% +% BWB.m +% written by Nawa Khailany, nawakhai@umich.edu +% last updated: 19 may 2024 +% +% geometric parameters for a Blended Wing Body aircraft. +% +% inputs : Aircraft - aircraft structure with no geometry components +% outputs: Aircraft - aircraft structure with the geometry components +% + +% ---------------------------------------------------------- +%% DEFINE THE WING %% +%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% list geometric parameters % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +Wing.AR = 11 ; +Wing.area = 3000 ; +Wing.taper = 0.3; +Wing.sweep = 18 ; %was 1 degree +Wing.dihedral = 0 ; +Wing.xShiftWing = 84 ; +Wing.yShiftWing = 0 ; +Wing.zShiftWing = 10 ; +Wing.symWing = 1 ; + +% parameters with characters +Wing.orientation = 'xz' ; +Wing.wingAfoil.airfoilName = '0012' ; +Wing.type = 'liftingSurface'; + +%% DEFINE THE RIGHT WingTip %% + +% parameters with numerical values +WingTipR.AR = 2; +WingTipR.area = 60; +WingTipR.taper = 0.25 ; +WingTipR.sweep = 40 ; +WingTipR.dihedral = 8; +WingTipR.xShiftWing = 118 ; +WingTipR.yShiftWing = 90.5 ; +WingTipR.zShiftWing = 10 ; +WingTipR.symWing = 0 ; + +% parameters with characters +WingTipR.orientation = 'xy' ; +WingTipR.wingAfoil.airfoilName = '0004' ; +WingTipR.type = 'liftingSurface'; + +%% DEFINE THE LEFT WingTip %% + +% parameters with numerical values +WingTipL.AR = 2; +WingTipL.area = 60; +WingTipL.taper = 0.25 ; +WingTipL.sweep = 40 ; +WingTipL.dihedral = -8; +WingTipL.xShiftWing = 118 ; +WingTipL.yShiftWing = -90.5 ; +WingTipL.zShiftWing = 10 ; +WingTipL.symWing = 0 ; + +% parameters with characters +WingTipL.orientation = 'xy' ; +WingTipL.wingAfoil.airfoilName = '0004' ; +WingTipL.type = 'liftingSurface'; + +%% DEFINE THE FUSELAGE %% +%%%%%%%%%%%%%%%%%%%%%%%%% + +% parameters with numerical values +Fuselage.Length = 130; + +% parameters with characters +Fuselage.type = 'bluntBody'; +Fuselage.Style = fullfile("+VisualizationPkg","+GeometrySpecsPkg","BWBFuselage.dat"); + +%% REMEMBER THE GEOMETRY PARAMETERS %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% save as one structure % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +Aircraft.Geometry.Wing = Wing; + +Aircraft.Geometry.WingTipR = WingTipR; + +Aircraft.Geometry.WingTipL = WingTipL; + +Aircraft.Geometry.Fuselage = Fuselage; + +end \ No newline at end of file diff --git a/+VisualizationPkg/+GeometrySpecsPkg/BWBFuselage.dat b/+VisualizationPkg/+GeometrySpecsPkg/BWBFuselage.dat new file mode 100644 index 00000000..6ece1fc3 --- /dev/null +++ b/+VisualizationPkg/+GeometrySpecsPkg/BWBFuselage.dat @@ -0,0 +1,50 @@ +x1=14.0 +x2=135 +TLength=130 +SuperEllipseNum=9 + +supell_1 +0.0 0.0 0.0 0.0 +2 2 2 2 +0.0 0.0 -2 +NOTFVIEW +supell_2 +2.5 2.5 2.5 2.5 +2 2 2 2 +2.5 0.0 -2 +FVIEW +supell_3 +7.5 7.5 7.5 7.5 +3 3 2 2 +14.0 0.0 0.0 +NOTFVIEW +supell_4 +10.0 13.0 10.0 13.0 +3.7 3.7 2 2 +28.0 0.0 0.0 +FVIEW +supell_5 +10.0 20.0 10.0 20.0 +4 4 2 2 +44 0.0 0.0 +NOTFVIEW +supell_6 +10.0 35.0 10.0 35.0 +4.2 4.2 2 2 +80 0.0 0.0 +FVIEW +supell_7 +7 35.0 7 35.0 +4.2 4.2 2 2 +105 0.0 2 +NOTFVIEW +supell_8 +5.0 23.0 5.0 23.0 +4 4 1.9 1.9 +120 0.0 3 +NOTFVIEW +supell_9 +1.5 0.5 1.5 0.5 +2 2 2 2 +135 0.0 5 +NOTFVIEW \ No newline at end of file From 5a9fb48ed775ef16ca9a7d157534950cf17805aa Mon Sep 17 00:00:00 2001 From: NawaKhai Date: Fri, 12 Jul 2024 17:27:56 -0400 Subject: [PATCH 3/7] Propulsion Architecture bug fixing Fixed the bug when a propulsion architecture has only 1 thrust source that doesn't allow for all the power source connections to be made properly to that one thrust source. --- +VisualizationPkg/PlotArchitecture.m | 17 +++-- +VisualizationPkg/PropulsionArchitecture.m | 75 ++++++++++++++-------- 2 files changed, 63 insertions(+), 29 deletions(-) diff --git a/+VisualizationPkg/PlotArchitecture.m b/+VisualizationPkg/PlotArchitecture.m index 816b5e16..980292f3 100644 --- a/+VisualizationPkg/PlotArchitecture.m +++ b/+VisualizationPkg/PlotArchitecture.m @@ -1,11 +1,11 @@ function [] = PlotArchitecture(Architecture) % -% [] = PlotArchitecture(Architecture) +% PlotArchitecture.m % written by Nawa Khailany, nawakhai@umich.edu % modified by Paul Mokotoff, prmoko@umich.edu -% last updated: 22 mar 2024 +% last updated: 29 feb 2024 % -% Plot a user-prescribed propulsion architecture. +% plot a user-prescribed propulsion architecture. % % INPUTS: % Architecture - data structure with the propulsion architecture to be @@ -14,7 +14,6 @@ % % OUTPUTS: % none -% %% PRE-PROCESSING %% @@ -35,6 +34,16 @@ % allow for multiple plots (new figure created previously) hold on +% set background color to white +set(gcf,'color',[1 1 1]); + +% format the axes +yticks([]) +xticks([]) +ax = gca; +ax.XAxis.Visible = 'off'; +ax.YAxis.Visible = 'off'; + % loop through each source for i = 1:IdxNums diff --git a/+VisualizationPkg/PropulsionArchitecture.m b/+VisualizationPkg/PropulsionArchitecture.m index 43e38a25..a82892d8 100644 --- a/+VisualizationPkg/PropulsionArchitecture.m +++ b/+VisualizationPkg/PropulsionArchitecture.m @@ -1,12 +1,12 @@ function [Architecture] = PropulsionArchitecture(B_PSES, B_PSPS, B_TSPS) % -% [Architecture] = PropulsionArchitecture(B_PSES, B_PSPS, B_TSPS) +% PropulsionArchitecture.m % written by Nawa Khailany, nawakhai@umich.edu -% modified by Paul Mokotoff, prmoko@umich.edu -% last updated: 22 mar 2024 +% last modified by Nawa Khailany, nawakhai@umich.edu +% last updated: 22 Jun 2024 % -% Given a propulsion archictecture, identify the unique thrust/power/energy -% sources and their connections. Then, use these sources and connections to +% given a propulsion archictecture, identify the unique thrust/power/energy +% sources and their connections. then, use these sources and connections to % create an architecture that can be plotted graphically. % % For the matrix inputs below, nes, nps, and nts are the number of energy @@ -35,7 +35,6 @@ % Architecture - structure with the unique thrust/power/energy % sources and their connections. % size/type/units: 1-by-1 / struct / [] -% %% PRE-PROCESSING %% @@ -165,26 +164,52 @@ % loop through all thrust sources for j = 1:NumTSources - - % check for a connections - if B_TSPS(j, i - NumESources - NumPSources) - - % add the connection (from power source to thrust source) - ToEnter = [ToEnter; i - NumPSources]; - - % add the connection - Architecture.Index.(['x', num2str(i - NumPSources)]).Leaving = [Architecture.Index.(['x', num2str(i - NumPSources)]).Leaving; i]; - - % print statement - fprintf('%s is driven by %s\n',['ThrustSource_',num2str(j)] , ... - ['PowerSource_',num2str(i - NumESources - NumPSources)]) ; - - else - - % print statement - fprintf('%s is not driven by %s\n',['ThrustSource_',num2str(j)] , ... - ['PowerSource_',num2str(i - NumESources - NumPSources)]) ; + if NumTSources == 1 + + for k = 1:NumPSources + % check for a connections + if B_TSPS(j, i - NumESources - NumPSources + k - 1) + + % add the connection (from power source to thrust source) + ToEnter = [ToEnter; i - NumPSources + k - 1]; + + % add the connection + Architecture.Index.(['x', num2str(i - NumPSources + k - 1)]).Leaving = [Architecture.Index.(['x', num2str(i - NumPSources + k - 1)]).Leaving; i]; + + % print statement + fprintf('%s is driven by %s\n',['ThrustSource_',num2str(j)] , ... + ['PowerSource_',num2str(i - NumESources - NumPSources + k - 1)]) ; + + else + + % print statement + fprintf('%s is not driven by %s\n',['ThrustSource_',num2str(j)] , ... + ['PowerSource_',num2str(i - NumESources - NumPSources + k - 1)]) ; + + end + end + else + % check for a connections + if B_TSPS(j, i - NumESources - NumPSources) + + % add the connection (from power source to thrust source) + ToEnter = [ToEnter; i - NumPSources]; + + % add the connection + Architecture.Index.(['x', num2str(i - NumPSources)]).Leaving = [Architecture.Index.(['x', num2str(i - NumPSources)]).Leaving; i]; + + % print statement + fprintf('%s is driven by %s\n',['ThrustSource_',num2str(j)] , ... + ['PowerSource_',num2str(i - NumESources - NumPSources)]) ; + + else + + % print statement + fprintf('%s is not driven by %s\n',['ThrustSource_',num2str(j)] , ... + ['PowerSource_',num2str(i - NumESources - NumPSources)]) ; + + end end end From 17a1a65769296e481cd1f9f5ade54ba7306f6aca Mon Sep 17 00:00:00 2001 From: NawaKhai Date: Fri, 12 Jul 2024 17:35:50 -0400 Subject: [PATCH 4/7] Added TestGeometry.m to FAST repo Added TestGeometry.m to FAST repo which allows users to quickly view geometries in standalone mode --- +VisualizationPkg/TestGeometry.m | 71 ++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 +VisualizationPkg/TestGeometry.m diff --git a/+VisualizationPkg/TestGeometry.m b/+VisualizationPkg/TestGeometry.m new file mode 100644 index 00000000..1e71ce45 --- /dev/null +++ b/+VisualizationPkg/TestGeometry.m @@ -0,0 +1,71 @@ +function [Aircraft] = TestGeometry(iarch) +% +% TestGeometry.m +% written by Paul Mokotoff, prmoko@umich.edu +% Nawa Khailany, nawakhai@umich.edu +% last updated: 3/28/2024 +% +% try to create and plot an aircraft geometry configuration. +% +% inputs : none +% outputs: Aircraft - structure filled with the geometric parameters. +% + +% ---------------------------------------------------------- + +% initial cleanup +clc, close all + + +%% GET THE GEOMETRIC PARAMETERS %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% get the geometric parameters +if (iarch == 1) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.Transport(); + +elseif (iarch == 2) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.SmallDoubleAisleTurbofan(); + +elseif (iarch == 3) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.LargeTurbofan(); + +elseif (iarch == 4) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.LargeTurboprop(); + +elseif (iarch == 5) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.SmallTurboprop(); + +elseif (iarch == 6) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.LM100JNominalGeometry(); + +elseif (iarch == 7) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.LM100JTrussBraced(); + +elseif (iarch == 8) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.DeltaCanard(); + +elseif (iarch == 9) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.SUSAN(); + +elseif (iarch == 10) + + [Aircraft] = VisualizationPkg.GeometrySpecsPkg.BWB(); + +end + +% plot/view the geometry +[Aircraft, ~] = VisualizationPkg.vGeometry(Aircraft); + +% ---------------------------------------------------------- + +end \ No newline at end of file From df13aaec3443b357c4130568485676a036bc14fd Mon Sep 17 00:00:00 2001 From: NawaKhai Date: Fri, 12 Jul 2024 17:58:24 -0400 Subject: [PATCH 5/7] Added PropArchTest.m Added the PropArchTest file which allows users to rapidly view propulsion architectures into the FAST repository --- +VisualizationPkg/PropArchTest.m | 174 +++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 +VisualizationPkg/PropArchTest.m diff --git a/+VisualizationPkg/PropArchTest.m b/+VisualizationPkg/PropArchTest.m new file mode 100644 index 00000000..65255203 --- /dev/null +++ b/+VisualizationPkg/PropArchTest.m @@ -0,0 +1,174 @@ +function [] = PropArchTest(iarch) +% +% PropArchTest.m +% written by Nawa Khailany, nawakhai@umich +% modified by Paul Mokotoff, prmoko@umich.edu +% last updated: 29 feb 2024 +% +% given a propulsion architecture, plot a schematic of it. multiple +% propulsion architectures are provided. uncomment the one to be used, or +% create your own. +% +% inputs : iarch - the architecture to be drawn +% outputs: none +% + +%% PARALLEL HYRBID %% +%%%%%%%%%%%%%%%%%%%%% + +% energy-power sources +% B_PSES = [1 0 ; 0 1]; +% +% power -power sources +% B_PSPS = [1 0; 0 1]; +% +% power -thrust sources +% B_TSPS = [1 1]; + + +%% SERIES HYBRID %% +%%%%%%%%%%%%%%%%%%% + +% energy-power sources +% B_PSES = [1 0 ; 0 1]; +% +% power -power sources +% B_PSPS = [1 0 ; 1 1]; +% +% power -thrust sources +% B_TSPS = [0 1]; + + +%% SERIES HYBRID WITH MULTIPLE ENGINES %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% energy-power sources +% B_PSES = [1 0 0 0 ; +% 1 0 0 0 ; +% 0 1 1 0 ; +% 0 0 1 1] ; +% +% power -power sources +% B_PSPS = [1 0 1 0 ; +% 0 1 0 1 ; +% 0 0 1 0 ; +% 0 0 0 1]; +% +% power -thrust sources +% B_TSPS = [1 0 0 0; +% 0 1 0 0]; + + +%% ADDITIONAL ARCHITECTURES CREATED %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% get the architecture from the input argument +if (iarch == 0) + + % gas-turbine engines only + B_PSES = [1; 1; 1; 1]; + B_PSPS = eye(4); + B_TSPS = eye(4); + +elseif (iarch == 1) + + % independent parallel hybrid + B_PSES = [1 0; + 0 1; + 0 1; + 0 1]; + B_PSPS = eye(4); + B_TSPS = eye(4); + +elseif (iarch == 2) + + % new LM100J architecture + B_PSES = [1 0 0; 0 1 0; 0 1 1; 0 0 1]; + B_PSPS = eye(4); + B_TSPS = eye(4); + +elseif (iarch == 3) + + % conventional, multiple fuel tanks + B_PSES = [1 1 0; 0 1 1]; + B_PSPS = [1 0; 0 1]; + B_TSPS = [1 0; 0 1]; + +elseif (iarch == 4) + + % stress test + B_PSES = eye(2); + B_PSPS = [1 0; 1 1]; + B_TSPS = [1 1]; + +elseif (iarch == 5) + + B_PSES = [1 0; 0 0]; + B_PSPS = [1 0; 1 1]; + B_TSPS = [1 1]; + +elseif (iarch == 6) + + % SERIES HYBRID + + % energy-power sources + B_PSES = [1 0 ; 0 1]; + + %power -power sources + B_PSPS = [1 0 ; 1 1]; + + %power -thrust sources + B_TSPS = [0 1]; + +elseif (iarch == 7) + + % PARALLEL HYBRID + + % energy-power sources + B_PSES = [1 0 ; 0 1]; + + % power -power sources + B_PSPS = [1 0; 0 1]; + + % power -thrust sources + B_TSPS = [1 1]; + +elseif (iarch == 8) + + %energy-power sources + B_PSES = [1 0 0 0 ; + 1 0 0 0 ; + 0 1 1 0 ; + 0 0 1 1] ; + + %power -power sources + B_PSPS = [1 0 1 0 ; + 0 1 0 1 ; + 0 0 1 0 ; + 0 0 0 1]; + + %power -thrust sources + B_TSPS = [1 0 0 0; + 0 1 0 0]; + +end + + +%% PLOT THE PROPULSION ARCHITECTURE %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% create a figure +figure; + +% get the propulsion architecture in a graphical form +architecture = VisualizationPkg.PropulsionArchitecture(B_PSES, B_PSPS, B_TSPS); + +% plot the architecture +VisualizationPkg.PlotArchitecture(architecture); + +% enlarge the figure +set(gcf, 'Position', get(0, 'Screensize')); + +% ---------------------------------------------------------- + +end \ No newline at end of file From b3f9b024a7f6215a1206d9cd079019dba58712b4 Mon Sep 17 00:00:00 2001 From: prmoko Date: Mon, 2 Dec 2024 08:33:22 -0500 Subject: [PATCH 6/7] Updated PropulsionArchitecture Updated how the propulsion architecture connections are printed to the command line. --- +VisualizationPkg/PropulsionArchitecture.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/+VisualizationPkg/PropulsionArchitecture.m b/+VisualizationPkg/PropulsionArchitecture.m index a82892d8..b4bbeafd 100644 --- a/+VisualizationPkg/PropulsionArchitecture.m +++ b/+VisualizationPkg/PropulsionArchitecture.m @@ -84,13 +84,13 @@ ToLeave = [ToLeave; j + NumESources]; % print statement - fprintf('%s connects to %s\n',['PowerSource_' , num2str(j)], ... + fprintf('%s is powered by %s\n',['PowerSource_' , num2str(j)], ... ['EnergySource_', num2str(i)]) ; else % print statement - fprintf('%s does not connect to %s\n',['PowerSource_' , num2str(j)], ... + fprintf('%s is not powered by %s\n',['PowerSource_' , num2str(j)], ... ['EnergySource_', num2str(i)]) ; end @@ -122,13 +122,13 @@ ToLeave = [ToLeave; j + NumESources]; % print statement - fprintf('%s connects to %s\n',['PowerSource_', num2str(j)] , ... + fprintf('%s is powered by %s\n',['PowerSource_', num2str(j)] , ... ['PowerSource_', num2str(i - NumESources)]) ; else % print statement - fprintf('%s does not connect to %s\n',['PowerSource_', num2str(j)] , ... + fprintf('%s is not powered by %s\n',['PowerSource_', num2str(j)] , ... ['PowerSource_', num2str(i - NumESources)]) ; end @@ -178,13 +178,13 @@ Architecture.Index.(['x', num2str(i - NumPSources + k - 1)]).Leaving = [Architecture.Index.(['x', num2str(i - NumPSources + k - 1)]).Leaving; i]; % print statement - fprintf('%s is driven by %s\n',['ThrustSource_',num2str(j)] , ... + fprintf('%s is powered by by %s\n',['ThrustSource_',num2str(j)] , ... ['PowerSource_',num2str(i - NumESources - NumPSources + k - 1)]) ; else % print statement - fprintf('%s is not driven by %s\n',['ThrustSource_',num2str(j)] , ... + fprintf('%s is not powered by %s\n',['ThrustSource_',num2str(j)] , ... ['PowerSource_',num2str(i - NumESources - NumPSources + k - 1)]) ; end @@ -200,13 +200,13 @@ Architecture.Index.(['x', num2str(i - NumPSources)]).Leaving = [Architecture.Index.(['x', num2str(i - NumPSources)]).Leaving; i]; % print statement - fprintf('%s is driven by %s\n',['ThrustSource_',num2str(j)] , ... + fprintf('%s is powered by %s\n',['ThrustSource_',num2str(j)] , ... ['PowerSource_',num2str(i - NumESources - NumPSources)]) ; else % print statement - fprintf('%s is not driven by %s\n',['ThrustSource_',num2str(j)] , ... + fprintf('%s is not powered by %s\n',['ThrustSource_',num2str(j)] , ... ['PowerSource_',num2str(i - NumESources - NumPSources)]) ; end From ca186d53b4ac4589972de01c5cc1a25aa3eef81c Mon Sep 17 00:00:00 2001 From: prmoko Date: Mon, 2 Dec 2024 10:00:58 -0500 Subject: [PATCH 7/7] Updated PropulsionArchitecture Fixed typos in the printouts. --- +VisualizationPkg/PropulsionArchitecture.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/+VisualizationPkg/PropulsionArchitecture.m b/+VisualizationPkg/PropulsionArchitecture.m index b4bbeafd..88e0bf14 100644 --- a/+VisualizationPkg/PropulsionArchitecture.m +++ b/+VisualizationPkg/PropulsionArchitecture.m @@ -90,7 +90,7 @@ else % print statement - fprintf('%s is not powered by %s\n',['PowerSource_' , num2str(j)], ... + fprintf('%s is not powered by %s\n',['PowerSource_' , num2str(j)], ... ['EnergySource_', num2str(i)]) ; end @@ -178,7 +178,7 @@ Architecture.Index.(['x', num2str(i - NumPSources + k - 1)]).Leaving = [Architecture.Index.(['x', num2str(i - NumPSources + k - 1)]).Leaving; i]; % print statement - fprintf('%s is powered by by %s\n',['ThrustSource_',num2str(j)] , ... + fprintf('%s is powered by %s\n',['ThrustSource_',num2str(j)] , ... ['PowerSource_',num2str(i - NumESources - NumPSources + k - 1)]) ; else