MATLAB Programming and Simple Ballooning Physics - Assignment | AE 100, Assignments of Aerospace Engineering

Material Type: Assignment; Class: Intro to Aerospace Engineering; Subject: Aerospace Engineering; University: University of Illinois - Urbana-Champaign; Term: Spring 2008;

Typology: Assignments

Pre 2010

Uploaded on 03/16/2009

koofers-user-bf6
koofers-user-bf6 🇺🇸

10 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
AE 100HAB
Alex Ghosh
02/20/08
Matlab Programming and Simple Ballooning Physics
AE 100HAB
Spring 2008
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download MATLAB Programming and Simple Ballooning Physics - Assignment | AE 100 and more Assignments Aerospace Engineering in PDF only on Docsity!

Alex Ghosh

E-mail: [email protected]

Matlab Programming and Simple Ballooning Physics

AE 100HAB

Spring 2008

Topics Covered

  • Matlab Logic
  • Matlab Functions
  • Application: Standard Atmosphere
  • Ballooning Physics
  • Parachutes
  • Putting it together: Programming in Matlab

Matlab Logic

if (Condition)

commands

else

commands

end

while (condition)

commands

End

for (i=start:finish)

commands

end

If Statements are useful for running different parts of your code under different situations

Useful for looping your code until a certain condition is met

Useful for running the came code with an index that increases; continues looping until the index reaches a predetermined length

TimeStep = 1; % second

V = 0; %initial velocity is 0 m/s

a = 2; %acceleration is a constant 2m/s^

d = 0; %distance is zero

time = 0 %start at second 0;

while (V < 100)

time = time+TimeStep;

V = V + a*TimeStep;

d = d + V*TimeStep;

end;

time

d

Example: Cart

d m

v m s

a m s

0

0

2

d

We have a cart that starts on the line at distance = 0. It has a constant acceleration of 2 m/s^2, and an initial velocity of 0. How far will it have travelled by the time the velocity is at least 100m/s, and how long will that take?

Standard Atmosphere

  1. 256

  2. 04

  3. 29

  4. 04 0. 00649

T P

T h

P e h

T

  1. 65 1.^730.^000157

  2. 68

  3. 388

  4. 6

  5. 488

  6. 93 0. 00299

T P

T h

Kg K

J R

P RT

  1. 9

Standard Atmosphere: Function Example

function p = standard_atmosphere_pressure(h)

%This function takes in height in meters and returns

if h<

T=288.04-0.00649h; %deg K p=101.29(T/288.08)^(5.256); %kPa

elseif h >=11000 & h<

T=216.68; %deg K p=22.65exp(1.73-0.000157h); %kPa

elseif h>=

T=141.93+0.00299h; %deg K p=2.488((T/216.6)^(-11.388)); %kPa

end

end

Parachutes: Air Drag

  • Drag depends on Drag Coefficient, wetted area, velocity and air density

g m

F a

m

F a

F ma

F c A v

D

D air D wetted

Note: This is assuming that ‘up’ is positive acceleration!

Putting it Together: Matlab Programming

Homework

You are given an m-file script and some pre-made functions. The code calculates the rise in altitude of the balloon up until it bursts. You need to program in the descent by parachute and graph the results.

The code assumes a constant ascent velocity instead of worrying about all the issues about balloon volume changes.You are given assumptions of balloon mass, payload mass, external pressure at which the balloon will pop, size of the parachute, drag of the parachute.

Assignment:

  1. Update BalloonProblem.m to graph Altitude vs Time, Velocity vs. Time.
  2. Display the Maximum Altitude, Time of Balloon Burst and Time of Landing
  3. Submit a short report that contains a description of what you have done, a hardcopy of your code (with lots of comments and your name at the beginning of the code), the two plots, your comments on the results. Focus on what happens after the balloon bursts to both the velocity and to the altitude.

Bonus: Modify one of the two standard atmosphere functions such that it outputs both values you need, and remove the other from your program.

More Code Snippets

while (Altitude > 0) % update time CurrentTime=CurrentTime+TimeStep;

%Calculate External Air Properties

%Calculate Drag

% update velocity, Acceleration and Altitude (with and without drag) Acceleration = VelocityDescent = Altitude=

% store new values for future display

end

My Graphs