Presentation is loading. Please wait.

Presentation is loading. Please wait.

Announcements Next Tuesday (March 12 th ). Department meeting. – Ms. Liron’s office hours start at 2:15pm TAKE NOTES! fill in the blanks! 1.

Similar presentations


Presentation on theme: "Announcements Next Tuesday (March 12 th ). Department meeting. – Ms. Liron’s office hours start at 2:15pm TAKE NOTES! fill in the blanks! 1."— Presentation transcript:

1 Announcements Next Tuesday (March 12 th ). Department meeting. – Ms. Liron’s office hours start at 2:15pm TAKE NOTES! fill in the blanks! 1

2 Exam2 – Coding Review 2

3 Topics Library functions: ceil(), floor(), round(), mod() Loops – while – for Arrays – Create: [], rand() – Analyze: sum(), prod(), min(), max(), mean() – Dimensioning: length(), size(), numel() – Slicing/referencing: vector(k), matrix(r,c), array(_:_) – Concatenating: [] – Traversing: for k = 1:____ – Deleting: =[]; Plotting basics – plot(x,y) %plots y vs. x graph 3

4 Example - A wind tunnel AE 315 Experimental Aerodynamics Lab Source: http://wings.avkids.com/Tennis/Images/ten_wt.jpghttp://wings.avkids.com/Tennis/Images/ten_wt.jpg

5 Wind Tunnels Soruce: http://www.aerolab.com/Display_Pages/EWT.htmlhttp://www.aerolab.com/Display_Pages/EWT.html

6 What can you put in the test section? The photograph shows a stainless steel model of a Mk I which was used in 1941 for wind tunnel investigations into high speed dive characteristics. Source: http://wpcontent.answers.com/wikipedia/commons/thumb/0/04/Win dkanal.jpg/350px-Windkanal.jpg http://wpcontent.answers.com/wikipedia/commons/thumb/0/04/Win dkanal.jpg/350px-Windkanal.jpg NASA wind tunnel

7 Models (2) Helios wind tunnel model Source: http://www.speedace.info/solar_cars/aristotle_univ ersity_of_thessaloniki_helios.htm http://www.speedace.info/solar_cars/aristotle_univ ersity_of_thessaloniki_helios.htm Formula1 cars Source: http://www.lucamazzocco.com/images_all.asp ?CategoryID=42 http://www.lucamazzocco.com/images_all.asp ?CategoryID=42

8 Models (3/3) This is the motivation for the realization of an extensive wind tunnel model of the city part "Kleinbasel" at the scale 1:300. The model covers an area of a bit less than 3 km² of urban roughness densely covered by over 3 200 houses as it is typical for Basel and other european urban environments of comparable size. Source: http://pages.unibas.ch/geo/mcr/Projects/BUBBLE/textpages/md_windtunnel.en.htmhttp://pages.unibas.ch/geo/mcr/Projects/BUBBLE/textpages/md_windtunnel.en.htm

9 Random question… What happens to the water in a tube?

10 Models linked to the outside Source: http://technicalteachingequipment.com/images/Aerodynamics%20lab/wind%20tunnel%20panel%20board%20with%20manometer.JPGhttp://technicalteachingequipment.com/images/Aerodynamics%20lab/wind%20tunnel%20panel%20board%20with%20manometer.JPG

11 What you link to the models A multi-tube manometer Source: http://technicalteachingequipment.com/images/Aerodynamics%20lab/wind%20tunnel%20panel%20board%20with%20manometer.JPGhttp://technicalteachingequipment.com/images/Aerodynamics%20lab/wind%20tunnel%20panel%20board%20with%20manometer.JPG

12 Some visual results… Source: http://www.sewon-eng.co.kr/Brand_img/185_A.jpghttp://www.sewon-eng.co.kr/Brand_img/185_A.jpg Source: http://www.cussons.c o.uk/en/products/p32 02.html http://www.cussons.c o.uk/en/products/p32 02.html Source: http://www.aerolab. com/Display_Pages /EWT.html http://www.aerolab. com/Display_Pages /EWT.html

13 Velocity Distribution 13

14 Requirements – Method 1 Assume the static pressure is 32 inches, and the temperature is 78F (537Rankine) Let the user indicate how many pitot tubes were recorded. Trap when invalid. It should be above 5. Loop to generate the table of data. Store all data in one array, as values are calculated. – Total pressure: prompt user number between 30 and 32 inches. (Assume valid inputs given at this time) – Calculate velocity associated each time Display the table, with headers. Plot the local velocities vs. the pitot tube number Calculate the min, max, and average velocity. 14

15 Example These are just guidelines 15

16 Brainstorm Keywords? Algorithm ideas? 16

17 Algorithm clc clear … develop your algorithm please! 17

18 Code– part1 clc clear %set up constant data %prompt user for nb of tubes _______________________________ while_______________________________ _______________________________ end %loop for each tube for _______________________________ %store tube number in column 1 _______________________________ %generate water height (32-35), store in column2 _______________________________ %calculate velocity, store in column3 _______________________________ end 18

19 continued… %display header ___________________________________________________________________________________ %display table ___________________________________________________________________________________ %plot velocity vs. tube number ____________________________________________________ %find min, max, average ____________________________________________________ 19

20 Requirements – Method 2 Assume the static pressure is 32 inches, and the temperature is 78F (537Rankine) Let the user indicate how many pitot tubes were recorded. Trap when invalid. It should be above 5. Without a loop, create the table. – Total pressure: Generate random floats between 30 and 32 inches. Display the table with headers. Plot the local velocities vs. the pitot tube number Calculate the min, max, and average velocity. 20

21 Algorithm/Code clc clear %set up constant data %prompt user for nb of tubes while end % create column of tube number % generate column of water height (32-35) % calculate velocity % combine all columns into 1 table %display header %display table %plot velocity vs. tube number %find min, max, average 21

22 STUDY HARD! Practice tonight. Take the notes you just took, and code the example! The more practice, the easier it gets! 22


Download ppt "Announcements Next Tuesday (March 12 th ). Department meeting. – Ms. Liron’s office hours start at 2:15pm TAKE NOTES! fill in the blanks! 1."

Similar presentations


Ads by Google