WEEK 3 ASE 201

Sept 17, 2004 HAYES - REVISESD 9/20/04

USE THE DISP() FUNCTION - NO TABLES THIS WEEK


DUE: Sept 24 - 5 pm

TOPIC: Flow Charts, fprintf, for loops and simple if commands, plotting multiple functions on a plot
READING: Chapter 2.6.3; 3.5; 2.11.1-4; 4.2; 3.1-4; 3.6;

HANDWRITTEN: Quiz 2.3; Quiz 3.1 #1-9; Quiz 3.2 #1-4; Exercises: 3.1, 2, 3, 7; 4.1, 3, 4(use for loop), 4.7

PROGRAM: A Flow Chart is required

1. You will write a code that calculates the maximum height that a spherical balloon can reach for balloon radii ranging from 10 to 100 feet and for a range of weights ( balloon + payload).

2. The equations were given in Lecture notes for Week 2 in ASE 102. They are linked on our web page

FB = exp(-H / 25000)*Wair ; Where FB = Bouancy Force, H = height; Wair is the weight of the air displaced by the balloon at the surface of the earth. The density of air on the ground is 0.0625 pounds per cubic foot.

Wtotal = Wballon + Wpayload + Wgas ;

Wgas = MWgas / MWair *Wair ; Where MWgas is the molecular weight of the lifting gas; MWair is the molecular weight of air (28.88) ; and Wair is the weight of the air displaced by the balloon on the ground.

3. Your code will read the molecular weight of the lifting gas; the density of air; the initial radius, the final radius and an increment for the radius; and the initial weight of the balloon & payload, w, the weight increment and final weight.

Part 1: For each value of radius, your code will calculate the maximumweight which can be lifted off of the ground, ml

ml = ((1-mw/28.9) * Volumn* density

Print out values of r and ml using the disp() function. The output must include a title and column headings with units.

Plot ml vs r. The plot must have a title, axises labeled with units.

Part 2: For each value of radius find the maximum height that the balloon can reach for weights ranging from the initial weight to the final weight and incrementing by the weight increment. Weight will represent the combined weight of the balloon and the payload. If the weight exceeds the maximum that the balloon can lift off of the ground, then quit calculations for that balloon radius.

print the maximum heights for all combinations of weight and radius using the disp() function.

h = - alpha * ln [w/wa + MW/28.9] where wa is the weight of the air displaced by the balloon and MW is the molecular weight of the lifting gas.

For each value of radius, plot max height vs weight. Put all of your plots on the same figure (see the 'hold on' command). The plot must have a title and axises labeled with units. You can put a legend in by hand this week.

14. Write your code as an m-file so it can be executed by just typing its name.

YOU WILL TURN IN THE FLOW CHART, A COPY OF THE M-FILE FOR THE SOURCE CODE, THE PLOT (S) AND A COPY OF THE PRINTED OUTPUT .