0% found this document useful (0 votes)
35 views

Shock Interaction & Supersonic Inlet: Group Blackcird

This document provides an overview of graphical user interfaces (GUIs) and their development using MATLAB. It discusses GUI basics like flowcharts, elements, and the GUIDE environment. It then gives examples of using GUI tools to solve problems involving shock wave interactions and comparisons of supersonic inlet designs. Flowcharts outline the logic and GUIDE is used to build interfaces with elements like axes, buttons, and menus to automate calculations and analyses. This provides accurate, reliable solutions without requiring programming skills.

Uploaded by

SY
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Shock Interaction & Supersonic Inlet: Group Blackcird

This document provides an overview of graphical user interfaces (GUIs) and their development using MATLAB. It discusses GUI basics like flowcharts, elements, and the GUIDE environment. It then gives examples of using GUI tools to solve problems involving shock wave interactions and comparisons of supersonic inlet designs. Flowcharts outline the logic and GUIDE is used to build interfaces with elements like axes, buttons, and menus to automate calculations and analyses. This provides accurate, reliable solutions without requiring programming skills.

Uploaded by

SY
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

SHOCK INTERACTION & SUPERSONIC

INLET

TEACHING MODULES

GROUP BLACKCIRD

CHEAH KOK LIM 133700


KHOO HUI XIAN 133714
LIM HAN WEA 133718
TAN HUEY SIANG 133700
YAO SIN YEE 133751
Contents

Overview......................................................................................................... 3

1.0 Introduction …....………………………………………………………………………………3

2.0 Graphical User Interface (GUI) …………………………………….………………………...4


2.1 Flowchart……………………………………..………………………..…………………….....4
2.1.1 Introduction of Flowchart ………………………………………………………………...4
2.1.2 Basic Elements of Flowchart ……………………………………………………………...5
2.1.3 Assignment Symbols of Flowchart ………...………………………………………….....6
2.1.4 Flow Chart Planning …………………………….….……….…………………………....7
2.1.5 Example of Flowchart ….………………………….……….……………………………10
2.2 MATLAB and GUI……………..…………………………………………………………….10
2.2.1 Graphical User Interface Development Environment (GUIDE) …..…………………10
2.2.2 Axes …………….…………………………………………………………………………13
2.2.3 Static Text and Edit Text ………………………………………………………………..14
2.2.4 Push Button ………………………………………………………………………………15
2.2.5 Panel ……………………………………………………………………………………...16
2.2.6 Pop-up Menu ………………………..……………………………………..…………….17

3.0 Applications .............................................................................................. 21


3.1 Example Question 6.18 ……………………………………………………………………….21
3.1.1 Understanding ……………...……………………………….……………………………21
3.1.2 Strategy ……………………………….……...…………………………………………...22
3.1.3 Results.….…………………………….……...…………………………………………...24
3.2 Example Question 6.20 ……………………………...……………...…………….………….25
3.3 Real-life Problem …………………………………………………………………………...…26
3.3.1 Strategy …….………….………………………………………………………………….27
3.3.2 Results ……………...………………………………………………………………….....28

4.0 Summary ……..……………………..………………………………………………………...29

5.0 References ……...……………..……………….……………………………………………..30


Overview
This module is intended to provide readers a basic understanding on Graphical User Interface (GUI) and the
fundamental steps to develop a GUI in MATLAB. Examples given in this module are based on our project
that is related to shock interaction in opposed wedges problem and comparison between two preliminary
supersonic inlet designs (which is referred as real-life problem in the following sections). Theories behind the
solutions of the problems are included in the Application section.

1.0 Introduction

Figure 1.1: Shock wave formed on an aircraft.

Have you ever wondered what is that cone shape thing that form on the body of a supersonic aircraft as
shown in the Figure 1.1? If you are so lucky to see this phenomenon before, you already knew what shock
wave looks like. Shock waves are formed when an aircraft reached the speed of sound and drastic changes
of the properties of air that flow through it [1].
There are so many types of shock wave such as normal shock wave, oblique shock wave and curved shock
wave. Each shock wave has different effect on the airflow and their interaction will be another case to
study. The study of oblique shock waves is actually a useful tool that can be applied to solve real-life
problems. For example, there is a constraint for an aircraft to fly at supersonic speed as its turbojet engine
compressors are unable to handle supersonic air flow [2]. In order to solve this problem, normal shock
waves are introduced at the inlets of engines to bring the supersonic air flow to subsonic.
The application of shock wave can once again be seen in the Lockheed SR-71 Blackbird, which is a
supersonic aircraft capable of cruising at speeds in excess of Mach 3.2. This aircraft has applied a design
on its engine to make use of the shock wave in helping the aircraft to increase the total pressure recovery
[3]. In aerospace industries, everything had to be extremely precise and accurate, especially in the design
and calculation results. Since it is time consuming and inaccurate for a designer to do manual calculation,
computational analysis would be a better approach in this case.
Computational analysis such as MATLAB provides an accurate result for users, but it also requires a user
to be competent in his or her coding and programming skill so that he or she is able to develop the program.
Since it is strenuous for a user who has no experience in programming language to use MATLAB and
learn the programming languages, the most effective way is to use a user-friendly program, that is the
Graphical User Interface (GUI).

3
2.0 Graphical User Interface (GUI)
First of all, what is GUI? It is abbreviation of Graphical User Interface which is an interface that allows
users to interact or communicate with electronic devices by using icons or any other indicators [4]. It also
prevents users from learning a programming language or type commands in order to run the applications
[5].
As mentioned in Introduction section, GUI makes our life more convenient in the way of proceeding
complicate calculation. Basically, it can do more than that. Besides of simpler and easier to be used, GUI
provides better visualisation effect compared to those tedious and complicate programs. Furthermore, it
has higher reliability as it provides higher accuracy solution compared to manual calculation which having
higher risk of making errors. For instance, oblique shock problems involve monotonous calculation if the
calculation is done manually. Manual calculations consume users’ time and causing higher possibility to
make errors. Therefore, by using GUI, users can solve problems in shorter time and therefore having
higher efficiency.
After knowing the benefits of developing GUI, it’s time for us to learn the way to develop it. Before that,
as this module is written for readers to discover MATLAB GUI based on real-life problem and shock
waves interaction problem. It is important for readers to know the basic steps of develop MATLAB GUI
to solve these two problems. These basic steps are drawing flowchart, writing MATLAB program and
finally build MATLAB GUI. In following sections, these steps will be explained in detail.

2.1 Flowchart
2.1.1 Introduction of Flowchart
Flowchart is a chart diagram that consist of a set of standard symbols to represent the sequence of coding
for instructions that able to feed into the computer. Flow chart is the fundamental step to write a program
no matter in Linux based programming, JavaScript, C & C++ based programming, Python.
Algorithm is a procedure for solving problems by writing a logical step-by-step method. An algorithm
includes calculations, reasoning and data processing. The main purpose of a flowchart is to analyze
different processes [6]. These symbols of coding able to perform specific logical and arithmetic operations
[7]. Flow chart also helps users or programmers to visualize the steps in a system includes loops, input,
output [8].

4
Figure 2.1: Example of a Basic Flow Chart

2.1.2 Basic Elements of Flowchart


A program flowchart is comprised of four basic symbols which are start, process, decision, and end. Table
2.1 is showing the basic symbols and its definition.

Table 2.1: Basic Elements of Flowchart and Its Definition

Basic Elements of Flow Chart Description

Start Symbol
It is an event symbol signals the first
step of a process. It is representing a
start point

Process Symbol

It is a series of action or steps taken to


achieve a particular end.

Decision Symbol

It is the action or process of making


decision on something to resolving a
question or problem

5
End Symbol
It is an event symbol stands for the
result of a process that have been
done.
- It is representing an end point.

Table 2.1 presenting the four basic symbols for a program flow chart. There are other symbols is required
to perform a more complex resolving or calculation depending on the requirement of programmers as
shown in table 2.2 [9].

Table 2.2: Symbols Other Than Basic Symbols that can be Used in Flow Chart Plotting [9]

Symbol Description

Flow Line
Used to indicate the flow of the logic by
connecting the symbols together in sequence

Input/Output
Used for input and output operation for data input
and result output.

On-page Connector
Used to join different flowline from different
processes in the same page

Off-page Connector
Used to connect flowchart portion to different page
of flow chart.

Predefined Process/Function
Used to represent a group of statements
performing one processing task

6
2.1.3 Assignment Symbols of Flowchart
The assignment symbol is used to assign or operate the value to the given variable. There are several groups
of operators can be used to giving the statement for programming.
i. Mathematical Operators

Table 2.3: Examples of Mathematical Operators [10]

In our case, the operator of ‘-’ and ‘x’ are used for the statement of calculation.

Figure 2.2: Using of Mathematical Operator.

ii. Relational Operators

Table 2.4: Examples of Relational Operators [10]

In our case, the operator of ‘<’ is used for the statement of ‘Error’ and then making decision.

7
Figure 2.3: Relational Operator used in Flowchart.

iii. Loop control statements

Table 2.5: Examples of Loop Control Statements [10]

In our case, the operator WHILE loop is used until the final output is fulfilling the given statement.

Figure 2.4: WHILE Loop Operator.

8
2.1.4 Flow Chart Planning

Programming is the process of taking an algorithm and encoding the it into a notation to make computer
to execute the programming language. Before writing a program, the programmer needs to construct a
procedure for solving the problem. The program that written without proper pre-planning such as flow
chart plotting may have high chances of errors. Also flow chart enable the programmer to debug their
coding when encountering problem.

There are some knowledges need to be known by the beginners before construct the programming to
resolve problem [10].
Sequence
The structure of coding sequence is important to construct a programming. All the statements are
placed one after the other and the execution takes place starting from up to down.
Branching (Selection)
A condition of making decision of either TRUE or FALSE. ‘IF-ELSE’ is used to represent the
branch control.
Loop (Repetition)
The loop or repetition allow a statement to be executed repeatedly based on the loop condition
such as WHILE, FOR loops. The statements will end it process while it is fulfilling the loop
condition that defined before hands.

After the programmer understand the procedure of construct a programming, next step will be the writing
algorithm to resolve the problem:
Step 1
The algorithm input such as formula of calculation is defined by programmer before process in
calculation. In our case, for example, the calculation of Mach number across the normal shock of
given Mach number is defined and calculated.
Step 2
The variables of algorithm need to be defined. In our case, the specific heat ratio (), initial Mach
number (M1) and initial Pressure (P1) are defined for opposed wedges problem.
Step 3
Outline the operations of algorithm. This step is processing the input variable and store the value
in new variable. In our case, the maximum value of 2 and 3 is calculated and displayed before
proceeding to next process.

9
2.1.5 Example of Flowchart

Figure 2.5: Flow Chart for MATLAB GUI.

2.2 MATLAB and GUI

For the GUI development of this project, the coding is first done in the MATLAB program before transfer
to the GUI program. Although there is a way to directly write and edit the code in the GUI program, it is
still advisable for a new GUI developer to first develop the code in MATLAB program. There are some
differences in the way a syntax is write inside the input of the MATLAB program and GUI program. Since
the calculation of shock wave interaction involves many steps and complex calculation, there are high
possibility for an error to occur. Hence the use of MATLAB syntax would be a more familiar syntax for
new GUI user in the process of identification of the bug and debug.

2.2.1 Graphical User Interface Development Environment (GUIDE)


In this module, GUI is developed using GUIDE.

1. To open GUIDE, type and execute ‘guide’ in the command window.

2.

Figure 2.6: Syntax typed in command window to create GUI.


10
3. After the execution, a GUIDE Quick Start window as shown in Figure 2.7 will pop out. New GUI
can be created, or existing GUI can be opened in this window.

Figure 2.7: GUIDE quick start window.

4. An example of new GUI created is shown in Figure 2.8. The point at the right bottom can be dragged
to resize the dimension of the interface. The panel at the left is the component palette, where each
component is labelled in Figure 2.9.

Figure 2.8: A new blank GUI.

11
Select

Push Button Slider

Radio Button Checkbox

Edit Text Static Text

Pop-up Menu Listbox

Toggle Button Table

Axes Panel

Button Group ActiveX


Control
Figure 2.9: Component palette.

5. To edit the properties of a component, the component icon is double-clicked, and the property inspector
as shown in Figure 2.10 will pop out. Here, the basic properties of the component such as string, font
size, colour and so on, can be edited. Note that the tag of the component under the identifiers is
important as it is associated with the syntax in the editor.

Figure 2.10: Property inspector.

12
2.2.2 Axes

“Axes” in the component palette can be used to display plots, charts or images in the user interface. In
our project, “Axes” are used to display images.

Figure 2.11: Axes (indicated by the red box) in GUIDE.

The tag of the “Axes” is identified in its property inspector, or it can be modified according to own
desire as long as it is same in the syntax used in editor later.
1. Figure 2.13 shows an example of syntax that used to display a JPG image named “shock-
interaction.jpg” through an “Axes” component with the tag “axes1”.

Figure 2.12: Properties inspector of Axes.

13
Figure 2.13: Syntax used to insert image into Axes.

Figure 2.14: Image is displayed through Axes.

2.2.3 Static Text and Edit Text

“Static Text” components can be used to display texts or variable outputs, while “Edit Text” can be used
to let users input strings or to display outputs. The strings displayed by the “Static Text” cannot be edited
by the users, but users can edit in the “Edit Text” components. As mentioned above, the tag of the
component will decide its function according to the syntax in editor.

14
Figure 2.15: Properties inspector of Edit Text.

2.2.4 Push Button

Generally, “Push Button” is used to execute the commands typed in the syntax. Clicking “Push Button”
in interface will execute the decided function.
1. To decide the function of a “Push Button” component, relevant syntax need to be typed under its
callback function. To locate the callback function in editor, the “Push Button” component in GUIDE
is right-clicked and “View Callbacks > Callback” is chosen.

Figure 2.16: Locating callback function of push button in editor.


15
2. For our project’s GUI, there are three main parts under the callback function of “Push Button”, which
are the input, calculation and output. In Figure 2.17, the syntax underlined with red are the tags of the
respective “Edit Text” components. Syntax in the input part is to convert the strings inserted by users
into numerical values that will be used in the calculation part. Then, the calculated value (indicated by
blue boxes) will be displayed through the “Edit Text” component with the tag “delta_max23”.

Figure 2.17: Example syntax used to determine the function of a Push Button.

3. As a result, the calculated value will be displayed in the “Edit Text” component with the tag
“delta_max23” after the push button is clicked, providing values are input in the components with tags
“M1”, “P1” and “y” by the user.

Figure 2.18: Tags of each component.

2.2.5 Panel

Panels and button groups are containers that arrange components into groups.

1. For instance, in Figure 2.19, there are four “Static Text” components in Panel 3 which are the
instructions given to users, M1, P1 and γ, and there is one “Push Button” component with the string
“Next”. When Panel 3 is moved, all the components within the panel will move together.

16
Figure 2.19: Panels shown on interface.

2.2.6 Pop-up Menu

“Pop-up Menu” which is also known as drop-down menu, provides options to be selected by users.

Figure 2.20: Pop-up menu shown on interface.

17
Figure 2.21: Property inspector of Pop-up Menu.

1. Options to be displayed in the “Pop-up Menu” component is specified by setting the String property
to the desired items. The “String” window will pop out after the icon indicated by the red box in
Figure 2.21 is clicked.

Figure 2.22: Options to be selected by users.

2. The options can be typed in the pop-up “String” window as shown in Figure 2.22.
3. Under the callback function of “Pop-up Menu”, the visibilities of panels for each problem can be set.
By setting type of problem with different digits, condition can be set.

18
Figure 2.23: Syntax typed to change the visibilities of panels for each problem.

4. Based on Figure 2.23, if 1 (opposed wedges problem) is selected, the visibilities of the panels for
opposed wedges problem will be set as “ON” while the visibilities of the panels for real-life problem
will be set as “OFF” . If 2 (real-life problem) is selected, the visibilities of the panels for opposed
wedges problem will be set as “OFF” while the visibilities of the panels for real-life problem will be
set as “ON”.

19
Figure 2.24: Name of tag of each panel for shock interaction problem.

Figure 2.25: Name of tag of each panel for real-life problem.

5. Figure 2.24 visualises the interface that is shown to users when “Opposed Wedges Problem” is
selected, while Figure 2.25 visualises the interface when “Real Life Problem” is selected.

20
3.0 Applications

This section will cover the application of MATLAB GUI on two examples and one real life example,
which both related to oblique shock. After covering this section, the reader will understand the importance
and the beauty of MATLAB GUI in solving the oblique shock problems. Two examples are referred from
example 6.18 and example 6.20, from the book of compressible fluid flow, written by Patrick H. Oosthuizen
and William E. Carscallen [11]. The real-life example is designed according to the journal published by
Hongjun Ran and Dimitri Mavris, entitled “Preliminary Design of a 2D Supersonic Inlet to Maximize Total
Pressure Recovery” [12].
Before applying MATLAB GUI to solve for oblique shock problem, the fundamental understandings
towards an oblique shock, specifically oblique shock interaction must be strong and crystal clear. The
theory behind will be illustrated together with the given examples. Generally, to solve any problem, the
questions must be understood, strategized and then finally solved.

3.1 Example Question 6.18


If the Mach number and pressure ahead of the oblique shock wave system shown in Figure are 3 and
50kPa respectively, find the pressure in the region 4 downstream of the wave intersection. To ease the
solving part for this example, it is divided into three phases, understanding phase, strategy phase and
calculation phase.

Figure 3.1: Example question 1

3.1.1 Understanding

The upstream flow in the tunnel is a supersonic flow and it forms an oblique shock due to the deflections
of walls (upper and lower wall) towards the flow. Across the oblique shock, the flow is still supersonic, but
the pressure of the downstream flow will increase. The direction of downstream flow, behind the oblique
shock will be parallel to the wall. Note that the oblique shock created due to the deflection of upper wall
and lower wall will interact or intersect and then reflected as shown in Figure 3.1. Hence, the upstream
flow passes two oblique shocks either from region 1 to 2 to 4, or 1 to 3 to 4. In this case, there is a slipline
produced between the region 4a and 4b shown in Figure 3.2. The velocity, density and entropy between
these two regions are not the same but the pressure and direction of the flow above and below the slipline
must be the same.

21
Figure 3.2: Interaction of oblique shock waves.

3.1.2 Strategy

Region 1 to 2:

Figure 3.3: Across oblique shock (region 1 to 2)

1. With given value of M1 and δ12, β12 can be found using oblique shock chart.
2. 𝑀𝑁1 = 𝑀1 sin 𝛽12
3. Find 𝑀𝑁2 by using normal shock table based on value of 𝑀𝑁1 (as 𝑁1 is normal to shock wave
in region 1-2)
4. 𝑀𝑁2 = 𝑀2 sin(𝛽12 − δ12 ). 𝑀2 can be obtained.
𝑃
5. Find 𝑃2 by using normal shock table.
1

22
Region 1 to 3:

Figure 3.4: Across oblique shock (region 1 to 3)


1. With given value of M1 and δ13, β13 can be found using oblique shock chart.
2. 𝑀𝑁1 = 𝑀1 sin 𝛽13
3. Find 𝑀𝑁3 by using normal shock table based on value of 𝑀𝑁1 (as 𝑁1 is normal to shock wave
in region 1-3)
4. 𝑀𝑁3 = 𝑀3 sin(𝛽13 − δ13 ). 𝑀3 can be obtained.
𝑃
5. Find 𝑃3 by using normal shock table.
1

Region 4a & 4b:

Figure 3.5: Across oblique shock (Region 2 to 4a & Region 3 to 4b)


23
1. Directions of M42 and M43 are same (both parallel with slipline)
2. P42 = P43
P42 P2
P42 = P1 and same for P43
P2 P1

3. Guess the value of ∆ and assume it to be a positive value.


4. δ24 = δ12 − ∆
5. δ34 = δ13 + ∆
6. Once δ24 , δ34 , 𝑀2 and 𝑀3 values are known, 𝛽42 and 𝛽43 can be determined by using oblique
shock chart.
7. 𝑀𝑁42 = 𝑀2 sin 𝛽42
𝑀𝑁43 = 𝑀3 sin 𝛽43
P42 P43
8. Determine value of and by using normal shock table with the value of 𝑀𝑁42 and 𝑀𝑁43
P2 P3

respectively.
9. Find the value of P42 and P43.
10. Iterate the calculation until P42 = P43

3.1.3 Results

Iteration procedure is needed to be proceeded by guessing the slipline again if P42 is not equals to P43 . It is
repeated until the P42 = P43 , which indicates the correct slipline angle. This iteration process is tedious and
require a large amount of time. Therefore, MATLAB GUI introduced to increase the efficiency when
solving this oblique shock interaction problem. Figure 3.6 shows the application of MATLAB GUI in
solving example 6.18, which is developed for solving opposite wedge problem. The pressure of the
downstream flow at region 4 can be found directly by simply entering the input variable of Mach no,
pressure of upstream flow at region 1, specific heat ratio and the turning angle for upper and lower wall.

Figure 3.6: MATLAB GUI for opposite wedge problem (example 6.18)
24
Table 3.1: Comparison of pressure downstream and slipline angle between MATLAB GUI and manual calculation
for example 6.18

Percentage error
Region 4 MATLAB GUI Manual calculation
(%)
Pressure
133.5 134.4 0.67
downstream (kPa)
Slipline angle (°) 3.98 3.9 2.01

Based on Table 3.1, it is observed that the exact slipline angle that calculated manually varies from
MATLAB GUI. This leads to a deviation in pressure of the downstream flow. The results from MATLAB
GUI is more reliable as there is limitation in manual calculation, i.e. when obtaining the shock angle from
oblique shock chart. This in turns justified that MATLAB GUI has higher accuracy of results compared
to manual calculation.

3.2 Example Question 6.20


An air stream in which the Mach number is 3 and the pressure is 80kPa flows between two parallel walls.
The upper wall turns sharply through an angle of 18° and the lower wall turns sharply through an angle of
12° leading to the generation of two oblique shock waves which intersect each other. Sketch the flow
pattern and find the flow direction, the Mach number and the pressure immediately downstream of the
shock intersection.
Since this example belongs to opposite wedge problem, it can be solved by using the same approach as
mentioned in Example 6.18. Again, by using the same developed MATLAB GUI, the pressure
downstream and Mach no can be obtained by entering the input variables. Figure 3.7 shows the results
calculated by MATLAB GUI.

Figure 3.7: MATLAB GUI for opposite wedge problem (example 6.20)

25
Table 3.2: Comparison of Mach no, pressure downstream and slipline angle between MATLAB GUI and manual
calculation for example 6.20
Region 4 MATLAB GUI Manual Calculation Percentage error (%)
Mach no 1.649 1.637 0.73
Pressure downstream
523 526 0.57
(kPa)
Slipline angle (°) 5.82 5.8 0.34

As a summary for Example 6.18 and 6.20, both require iteration process to obtain the pressure of the
downstream flow due to intersection of shock waves. Henceforth, the calculation steps become lengthy
and time consuming. Besides, the accuracy of the results is reduced. However, with the development of
MATLAB GUI, all these problems can be easily solved.

3.3 Real-life Problem


For most aircraft engine, for example, SR-71 Blackbird, the supersonic inlet is designed to generate
multiple oblique shock to aid for compression process. Why use multiple oblique shock? Across a shock,
Mach no is reduced, and pressure is increased. This also results in total pressure losses at the downstream
flow due to the changes in entropy (non-isentropic). This can be specifically be seen for a normal shock
case. For oblique shock cases, the total pressure recovery is higher compared to normal shock.
What is total pressure recovery for an engine? The total pressure recovery is the ratio of the total pressure
of the airflow at the engine face to that of the freestream flow. Why is total pressure recovery important?
For 1% of total pressure losses, there will be at least 1% of thrust losses [12]. The percentage of total
pressure recovery can be maximized by increasing the number of oblique shock waves. Although the
turning angle can be optimized to maximize the total pressure recovery. Yet, in this problem, this main
interest is to compare the efficiency of total pressure recovery by varying the number of oblique shocks
used providing with fixed turning angle. Maximum total pressure recovery is desired for a supersonic inlet.
Figure 3.8 and 3.9 show two designs of the supersonic inlet that are analyzed, strategized and solve
accordingly. Supersonic inlet for design 1 has two oblique shock and one normal shock. On the other hand,
supersonic inlet for design 2 has three oblique shock and one normal shock.

Figure 3.8: Supersonic inlet for design 1.

26
3.3.1 Strategy

Region 1 to 2:
1. Given 𝑀0 & δ1 , find β1 from oblique shock chart.
2. Using the equation 𝑀𝑁𝑜 = 𝑀𝑜 sin β1 , find 𝑀𝑁𝑜 .
𝑃01
3. From the normal shock table, 𝑀𝑁1 and can be obtained.
𝑃0
4. 𝑀1 can be obtained from 𝑀𝑁1 = 𝑀1 sin(β-δ).

Region 2 to 3:
• Across the second oblique shock:
𝑃
• 𝑀2 and 𝑃02 can be found using the same approach as region 1 to 2.
01

Region 3 to 4:
• Across the normal shock:
𝑃03
• Using the value 𝑀2 calculated from region 3 to 4, find 𝑀3 and from normal shock table.
𝑃02

Total Pressure Recovery:


𝑃03 𝑃 𝑃02 𝑃01
• Total Pressure Recovery = 𝑃0
= 𝑃03
02 𝑃01 𝑃0

Figure 3.9: Supersonic inlet for design 2.


Region 1 to 2:
1. Given 𝑀0 & δ1 , find β1 from oblique shock chart.
2. Using the equation 𝑀𝑁𝑜 = 𝑀𝑜 sin β1 , find 𝑀𝑁𝑜 .
𝑃01
3. From the normal shock table, 𝑀𝑁1 and 𝑃0
can be obtained.
4. 𝑀1 can be obtained from 𝑀𝑁1 = 𝑀1 sin(β-δ).

Region 2 to 3 & Region 3 to 4:


• Across the second and third oblique shock:
𝑃 𝑃
• 𝑀2 and 𝑃02 & 𝑀3 and 𝑃03 can be found using the same approach as region 1 to 2.
01 02

27
Region 4 to 5:
• Across the normal shock:
𝑃
• Using the value 𝑀3 calculated from region 3 to 4, find 𝑀4 and 𝑃04 from normal shock table.
03

Total Pressure Recovery:


𝑃04 𝑃04 𝑃03 𝑃02 𝑃01
• Total Pressure Recovery = =
𝑃0 𝑃03 𝑃02 𝑃01 𝑃0

3.3.2 Results

Table 3.3: Comparison of total pressure recovery for design 1 and 2


Design Total Pressure Recovery (%)
1 85.9
2 94.2

Table 3.3 above justified that higher number of oblique shock waves result in greater total pressure recovery
for a supersonic inlet. The total pressure recovery in terms of percentage are shown higher in design 2
(94.2%) compared to design 1 (85.9%).
Nevertheless, if the number of oblique shocks is increased, the flow becomes more complex and less
satisfactory because of the boundary layer and the interaction between the boundary layer and the shocks.
The other drawback is the inlet length will increase with an increase in the number of oblique shocks and
hence increase in inlet length [12].
Now, MATLAB GUI for this type of problem is developed and utilized to calculate the total pressure
recovery. Figure 3.10 show the developed MATLAB GUI to tackle the given real-life problem.

Figure 3.10: MATLAB GUI for real life problem.

28
The results obtained from MATLAB GUI are compared with the results that calculated manually and
shown in Table 3.4.

Table 3.4: Comparison of total pressure recovery in terms of percentage between MATLAB GUI and manual
calculations
Supersonic inlet MATLAB GUI (%) Manual Calculations Percentage
(%) difference (%)
Design 1 87.3 85.9 1.60
Design 2 94.9 94.2 0.74

4.0 Summary
According to comparison of calculated results between manual calculation and MATLAB GUI, we can
notice that MATLAB GUI gives results with higher precision. In engineering world, accuracy and
precision play a crucial role. Inaccuracy can cause undesirable situation to occur such as aircraft failure,
machine failure and destruction of building. Once again, importance of developing a GUI is manifested.

After going through this module, readers can be considered as a beginner of MATLAB GUI developer. In
fact, there are other programming languages such as Java, C++ and Python which can be used to build
GUI. Exposure to building GUI through MATLAB makes developers familiar with the process and hence
understanding of other GUI developing programming languages can be faster. In addition, GUI is used in
a myriad of applications such as smartphones, gaming devices, industrial controls and computers.
Therefore, a competent GUI developer can apply his or her GUI developing skill on these fields and stands
a higher chance to be employed compared to those who has no experience on it.

There are some recommendations for readers. Firstly, interchange of interfaces for real-life problem and
shock waves interaction problem in this module is through changing the visibility of each panels. The
panels for each problem should be grouped together in order to make changing of visibility of panels more
convenient. Besides that, a main menu window which provide choices between two problems can be
created for a better display.

29
5.0 References
[1] Shock Waves. (n.d.). Retrieved from https://howthingsfly.si.edu/aerodynamics/shock-waves

[2] Tedeschi, D. (2002, November). How Things Work: Supersonic Inlets. Retrieved from
https://www.airspacemag.com/military-aviation/how-things-work-supersonic-inlets-
35428453/?page=1

[3] Anderson, T. (2014). SR-71 Inlet Design Issues And Solutions. Retrieved from
https://www.enginehistory.org/members/Convention/2014/Presentations/SR-71InletDesign.pdf

[4] What is a GUI (Graphical User Interface)? (2018, November 13). Retrieved from Computer Hope:
https://www.computerhope.com/jargon/g/gui.htm

[5] MATLAB GUI - MATLAB & Simulink. (n.d.). Retrieved from MathWorks:
https://www.mathworks.com/discovery/matlab-gui.html

[6] Explain Algorithm and Flowchart with examples. Retrieved from https://www.edrawsoft.com/explain-
algorithm-flowchart.php

[7] What’s Program Flowchart? - Definition & Examples. Retrieved from


https://www.edrawsoft.com/flowchart/program-flowchart-definition.php

[8] Flowchart Programming. Visualise your program or algorithm as a flowchart before you write code. Retrieved
from https://www.smartdraw.com/flowchart/flowchart-programming.htm

[9] Flowchart in Programming. Retrieved from https://www.programiz.com/article/flowchart-


programming

[10] Ravi K. Walia. Assistant Professor & Incharge Computer & Instrumentation Centre Dr. Y. S. Parmar
University of Horticulture & Foresty, Nauni Solan INDIA (HP). Algorithm & Flowchart Manual for
Students. Retrieved from http://www.yspuniversity.ac.in/cic/algorithm-manual.pdf

[11] Patrick H. Oosthuizen, William E. Carscallen. (1997). Compressible Fluid Flow. New York, NY:
McGraw-Hill.

[12] Hongjun Ran, Dimitri Mavris. (2005). Preliminary Design of a 2D Supersonic Inlet to Maximize
Total Pressure Recovery. Retrieved from
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.559.484&rep=rep1&type=pdf

30

You might also like