• Home
  • |
  • Blog
  • |
  • Building My First GUI in Matlab

Building My First GUI in Matlab

Compressible Flow

As an Aerospace Engineering student pursuing my undergraduate and graduate degrees at the same time, I decided to take a class called 'Compressible Flow' for dual credit. That being said, the main difference between the undergrad and grad section was an additional research project. 

I am specializing in dynamics and control systems theory, so I thought it would be interesting to do a study of how mach number affects a control surface's deflection. I couldn't find any reference material on the matter, so all calculations and theory is based on my own assumptions. 

Shock Expansion Theory

Using Shock Expansion Theory, I was able to model how I theorize oblique shocks and expansion waves would behave along a diamond shape airfoil. Through modeling these shocks and expansions, one can calculate the pressures and Mach numbers along each surface of the airfoil. 

Above represents how I assume the flow would behave along the airfoil based on the flap deflection being deflected upwards, having no deflection, or being deflected downwards. Notice that three lines represent expansion waves and a singular line represents an oblique shock. Also note that I ignored the hinge gap as well in order to simplify calculations. 

Actually Building the GUI

This is one of the most challenging tasks I've encountered while coding. I spent about three days of staring at the documentation for Matlab functions such as uigridlayout, uibutton, uislider, uiaxes, etc. 

I coded it all by hand without the help of the built in app designer for Matlab. It is laid out to allow the user to vary sliders which affect the geometry and mach number, it has a visual representation in the middle, it has deflection curves on the right, and finally it has a button that varies the mach to see exactly how the deflection curves are affected for each mach number. 

Look below for a picture of the GUI with the flap deflected downwards.  

Why I Wanted This Data

Tying back into control systems theory, I wanted to see exactly how we might could take Mach effects into linearizing flight dynamics. The idea is that uncertainties of how the flow will behave based on mach number might cause our controllers to not be as effective at those conditions. 

I found that the lift coefficient derivative appears as a quadratic equation, while the drag coefficient derivative behaves more like an exponential equation. These graphs are below. 

Related Posts

Building My First GUI in Matlab

Building My First GUI in Matlab

Concrete Canoe

Concrete Canoe

The University of Alabama’s Division of Student Life, University Recreation

The University of Alabama’s Division of Student Life, University Recreation

Why I chose Aerospace Engineering

Why I chose Aerospace Engineering

Leave a Reply


Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}