1 / 19

An Example (Conversion between matter and energy)

Calculate the amount of matter needed to produce the energy radiated by the sun every day using Einstein's relativity theory. Also, compute the gas mileage for a car each time it gets filled up.

Download Presentation

An Example (Conversion between matter and energy)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Example(Conversion between matter and energy) • Problem statement: • Find the amount of matter necessary to produce the amount of energy radiated by sun every day. • What do we know? (Input) • Sun radiates 385×1024 Joules/sec • The equation connecting energy and matter is formulated by famous Einstein’s relativity theory E = mc2where E is the energy, m is the mass and c is the speed of light which is 3.0 × 108meter/sec.

  2. An Example(Conversion between matter and energy) • What do we need to output? • Mass m in kilogram (kg) • Energy radiated in one day (E) • 24 × 60 × 60 × 385 × 1024 = 3.3 × 1031 Joules • Mass needed for the energy radiated in 1 day • m = E/c2 = (3.3 × 1031 Joules)/(3.0 × 108 meter/sec)2 = 3.7 × 1014 Joules/(meter/sec)2 = 3.7 × 1014 Kg since 1 Joule = 1 Kg × (meter/sec)2 • The answer is 3.7 × 1014 Kg mass is needed to produce the energy sun radiates over 1 day.

  3. MATLAB solution(Conversion between matter and energy) >>E=385e24 % E = Energy in Joules E= 3.8500e+026 >>EperDay=24*60*60*E %EperDay = Energy per day EperDay= 3.324e+031 >>c=3.0e8 %c = speed of light/sec c= 300000000 >>m=EperDay/(c^2) %m = mass in Kg m= 3.6960e+014

  4. How long (years) will it take to consume the mass of sun? • Estimated weight (mass) of sun = 2 × 1030Kg • Time (year) = (2 × 1030Kg)/(365 × 3.69e14 Kg/year) = 1.5 × 1013 years

  5. Another problem Taken from the book: Learning Programming Using MATLAB by Khalid Sayood (available online using the library account)

  6. Gas mileage problem • Computing the gas mileage for a car each time it gets filled. • Need a set of simple instructions that when followed will correctly compute the gas mileage. • The individual to implement the instructions is very simple minded (computer). • The gas mileage is the number of kilometers (kms) traveled divided by the number of liters of gas used. Need to determine the number of kms traveled since the last fill-up, and the number of liters used during this period.

  7. Computing gas mileage(First attempt) • Read the odometer value. • Subtract previous odometer value from the current odometer value to determine the number of kms traveled. • Divide by the number of liters of gas pumped to determine the mileage.

  8. Computing gas mileage(First attempt) • Read the odometer value. • Subtract previous odometer value from the current odometer value to determine the number of kms traveled. • Divide by the number of liters of gas pumped to determine the mileage. The computer doesn’t remember the previous odometer reading!

  9. Computing gas mileage(Second attempt) • Read the current odometer value. • Retrieve the previous value from the glove compartment. • Subtract the value obtained in step 2 from the value obtained in step 1. • Fill up the tank. • Read the number of liters pumped. • Divide by the number obtained in step 3 by the number obtained in step 5. • Display the number obtained in step 6 as the mileage. • Write the odometer value obtained in step 1 on a piece of paper. • Store the paper from step 8 in the glove compartment. • Stop

  10. Computing gas mileage(Second attempt) • Read the current odometer value. • Retrieve the previous value from the glove compartment. • Subtract the value obtained in step 2 from the value obtained in step 1. • Fill up the tank. • Read the number of liters pumped. • Divide by the number obtained in step 3 by the number obtained in step 5. • Display the number obtained in step 6 as the mileage. • Write the odometer value obtained in step 1 on a piece of paper. • Store the paper from step 8 in the glove compartment. • Stop Are the instructions simple enough?

  11. Computing gas mileage(Second attempt) • Read the current odometer value. • Retrieve the previous value from the glove compartment. • Subtract the value obtained in step 2 from the value obtained in step 1. • Fill up the tank. • Read the number of liters pumped. • Divide by the number obtained in step 3 by the number obtained in step 5. • Display the number obtained in step 6 as the mileage. • Write the odometer value obtained in step 1 on a piece of paper. • Store the paper from step 8 in the glove compartment. • Stop Are the instructions simple enough? In step 8 we are recalling something happened in step 1.

  12. Computing gas mileage(Third attempt) • Read the current odometer value. • Write the odometer value obtained in step 1 on a piece of paper. • Retrieve the previous value from the glove compartment. • Store the paper from step 2 in the glove compartment. • Subtract the value obtained in step 3 from the value obtained in step 1. • Fill up the tank. • Read the number of liters pumped. • Divide by the number obtained in step 5 by the number obtained in step 7. • Display the number obtained in step 8 as the mileage. • Stop

  13. Computing gas mileage(Third attempt) • Read the current odometer value. • Write the odometer value obtained in step 1 on a piece of paper. • Retrieve the previous value from the glove compartment. • Store the paper from step 2 in the glove compartment. • Subtract the value obtained in step 3 from the value obtained in step 1. • Fill up the tank. • Read the number of liters pumped. • Divide by the number obtained in step 5 by the number obtained in step 7. • Display the number obtained in step 8 as the mileage. • Stop The program has a bug.

  14. Computing gas mileage(Third attempt) • Read the current odometer value. • Write the odometer value obtained in step 1 on a piece of paper. • Retrieve the previous value from the glove compartment. • Store the paper from step 2 in the glove compartment. • Subtract the value obtained in step 3 from the value obtained in step 1. • Fill up the tank. • Read the number of liters pumped. • Divide by the number obtained in step 5 by the number obtained in step 7. • Display the number obtained in step 8 as the mileage. • Stop The program has a bug. The first time we execute it there will be no paper in the glove compartment.

  15. Computing gas mileage(Fourth attempt) • Read the current odometer value. • Write the odometer value obtained in step 1 on a piece of paper. • Is this the first time for this procedure? (a) If the answer is yes, (i) Store the paper from step 2 in the glove compartment. (ii) Stop. (b) If the answer is no, retrieve the previous value from the glove compartment. 4. Store the paper from step 2 in the glove compartment. 5. Subtract the value obtained in step 3 from the value obtained in step 1. 6. Fill up the tank. 7. Read the number of liters pumped. 8. Divide by the number obtained in step 5 by the number obtained in step 7 9. Display the number obtained in step 8 as the mileage. 10. Stop

  16. Computing gas mileage(Fourth attempt) • Read the current odometer value. • Write the odometer value obtained in step 1 on a piece of paper. • Is this the first time for this procedure? (a) If the answer is yes, (i) Store the paper from step 2 in the glove compartment. (ii) Stop. (b) If the answer is no, retrieve the previous value from the glove compartment. 4. Store the paper from step 2 in the glove compartment. 5. Subtract the value obtained in step 3 from the value obtained in step 1. 6. Fill up the tank. 7. Read the number of liters pumped. 8. Divide by the number obtained in step 5 by the number obtained in step 7 9. Display the number obtained in step 8 as the mileage. 10. Stop Problem! Asking the computer to remember whether it has performed this procedure before.

  17. Computing gas mileage(Final attempt) • Read the current odometer value. • Write the odometer value obtained in step 1 on a piece of paper. • Is there a previous odometer reading in the glove compartment? (a) If the answer is no, (i) Store the paper from step 2 in the glove compartment. (ii) Stop. (b) If the answer is yes, retrieve the previous value from the glove compartment. 4. Store the paper from step 2 in the glove compartment. 5. Subtract the value obtained in step 3 from the value obtained in step 1. 6. Fill up the tank. 7. Read the number of liters pumped. 8. Divide by the number obtained in step 5 by the number obtained in step 7 9. Display the number obtained in step 8 as the mileage. 10. Stop

  18. FLOWCHART Flowchart

  19. Next we will cover Chapter 2

More Related