Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developing a Solution How to create the computer-based solution for a real-world problem. The steps - Examples for each step.

Similar presentations


Presentation on theme: "Developing a Solution How to create the computer-based solution for a real-world problem. The steps - Examples for each step."— Presentation transcript:

1 Developing a Solution How to create the computer-based solution for a real-world problem. The steps - Examples for each step

2 General Idea of This Lesson
Give you methodology (i.e. a recipe) Example problems: “Find the optimum nozzle dimensions for …” “Solve for the optimum path for the robot …” “Find the range of temperatures adequate for …” In EGR115, most tasks will be: “Develop a program that ……”

3 General Terms Keep in mind there are 2 sides to software
The person who writes software: the programmer The person who uses software: the user (i.e. client)

4 “The programmer should make the user’s life easy.”
General Terms Keep in mind there are 2 sides to software The person who writes software: the programmer The person who uses software: the user (i.e. client) As you (the student) develop software, you will constantly jump back and forth between the two roles. Your goal: “The programmer should make the user’s life easy.” Clear directions Clear units Examples of answers Clean presentation

5 Scientific Problem-Solving Method
An everyday part of the engineer’s thought process. “If these steps are properly executed during the solution of problems in this text and all other courses, it is our belief that you will gradually develop an ability to solve a wide range of complex problems.” Engineering Fundamentals and Problem Solving, Eide, Jenison, Mashaw and Northup

6 Where do I even start? ME408 Clean Thermal Power Systems

7 Scientific Problem-Solving Method
Problem Statement Diagram Theory Assumptions Solution Steps Identify Results & Verify Accuracy Computerize the solution Deduce the algorithm from step 5 Translate the algorithm to lines of code Verify Results

8 Scientific Problem-Solving Method
Problem Statement Diagram Theory Assumptions Solution Steps Identify Results & Verify Accuracy Computerize the solution Deduce the algorithm from step 5 Translate the algorithm to lines of code Verify Results “coding” is very late in the process. NEVER create a program to “solve” a problem. => Create a program to re-use the solution for other sets of givens.

9 Scientific Problem-Solving Method
Problem Statement Summarize the given information Must contain all essential information, units included! GET RID OF useless information! State what is to be determined Diagram Theory Assumptions Solution Steps Identify Results & Verify Accuracy Computerize the solution

10 Example – Aerospace Engineering
Pb: ideal gas law Givens Temperature (Kelvin) Volume (meters cubed) n : chemical amount of gas (moles) R : gas constant R = Joules/(moles*Kelvin) Solve for The pressure (Pascals)

11 Example – Mechanical Engineering
R2 = 60lb R3 = 20lb Pb: Stress on a beam Givens Load 1: R1 = 10lb Load 2: R2 = 60lb Load 3: R3 = 20lb Load 4: R4 = 50lb Distances from start of beam to load2: 5ft Distance between load2 and 3: 15ft Distance between load3 and end of beam: 7ft Solve for shear diagram moment diagram 5ft 15ft 7ft square beam R1 = 10lb R4 = 50lb

12 Example – Civil Engineering
Pb: Elongation of rod Givens diameter of rod: 0.5in length of rod: 6ft weight of load: 2000lbs material: steel Solve for normal stress in rod (psi) strain (elongation for 1 unit) in the rod (in./in) elongation of rod (inches) 6ft 2000 lbs

13 Scientific Problem-Solving Method
Problem Statement Diagram Sketch Diagrams Indicate all dimensions Theory Assumptions Solution Steps Identify Results & Verify Accuracy Computerize the solution

14 Example – Aerospace Engineering

15 Example – Civil Engineering

16 Example – Electrical Engineering

17 Scientific Problem-Solving Method
Problem Statement Diagram Theory State/List all equations that will be used Explain all variables This step will be simple as a Freshmen, but may get to pages and pages of derivations in Senior year! Assumptions Solution Steps Identify Results & Verify Accuracy Computerize the solution

18 Example – General Equations
Volume of a sphere Equation of a line V = 4/3*∏*R^3 y = m*x + b Volume of a cube Slope V = L^3 m = Δy/Δx = (y2-y1)/(x2-x1) Newton’s second law of motion Weight W = mass * g F = m*a

19 Example – ME/AE Engineering
If the system is in equilibrium, ΣF = 0 (“sum of all forces equals zero”) Bernoulli’s Principle (fluid dynamic)

20 Example – Electrical/Civil Engineering
Ohm’s law V = R*I (V=voltage (V), R=resistance (Ω), I=current (A)) Electrical Power (i.e. Work) P = V * I (P = power, in Watts) Potential Energy Penergy = w * h (W=weight (Newtons), h=height (m), P (Joules)) Kinetic Energy Kenergy = ½*m * v2

21 Scientific Problem-Solving Method
Problem Statement Diagram Theory Assumptions List any assumptions (physical, mathematical, …) Make them clear to the reader Solution Steps Identify Results & Verify Accuracy Computerize the solution

22 For example… Assume no friction Assume wall thickness is negligible
Assume initial speed is zero Assume mass of object is negligible Aerodynamics: Assume laminar flow (i.e. no turbulence) Thermodynamics: Assume geometry of a turkey is that of an American football Solids: assume system is in equilibrium

23 Scientific Problem-Solving Method
Problem Statement Diagram Theory Assumptions Solution Steps Show all complete steps and equations Number the equations if it helps you Detail each step precisely, even those that seem trivial to you Choose actual numerical values if needed The READER is the one who needs to understand Identify Results & Verify Accuracy Computerize the solution

24 Examples Number the equations © FrigginPhysics.com

25 Scientific Problem-Solving Method
Problem Statement Diagram Theory Assumptions Solution Steps Identify Results & Verify Accuracy Circle your answer(s), draw a square around it, underline Make sure they have units VERIFY that the answer is plausible, realistic Computerize the solution

26 Identify Results Make sure the solutions are clearly identified
example: boxed, circled, colored, underlined, centered… © FrigginPhysics.com

27 Verify Do the values match/verify the diagram? Common sense Visually
Time cannot be negative Distance cannot be negative Visually If you drew a scaled diagram, verify that the results match the drawing? Is it realistic? Drive Time = 394,242,305,932seconds? Vrunner = miles/hr When turning in homework, always work on fixing errors, but if you fail, at least indicate “something wrong, this is unrealistic”… before turning it in..

28 Last but not least!!! Presenting the data
Paper, or machine Either way: Clearly present the information Words and sentences must explain what’s going on each step Skip lines, space things out! not everything has to fit on the top left corner!!!!

29 Bad Presentations inadequate paper size, incomplete (missing data, and units), change of orientation, no breathing room… where are the results?! Semester 2012 Fall

30 Scientific Problem-Solving Method
Problem Statement Diagram Theory Assumptions Solution Steps Identify Results & Verify Accuracy Computerize the solution Deduce the algorithm from step 5 Translate the algorithm to lines of code Verify Results If all steps above were done thoroughly, this step 7 should not be mind-stressing. b. and c. is what will be learned all this semester!

31 7.a. Deduce the algorithm In mathematics and computer science, an algorithm is a step-by-step procedure for calculation. (Wikipedia) More precisely, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. (Wikipedia) Algorithms must not be complex! should be detailed/organized must be general enough for different values of inputs Simple problem = simple algorithm Complex problem = detailed algorithm

32 Example The problem The algorithm Define base and height
Calculate area Display result OR Define side1 and 2’s length Define angle between the two sides height=6m base=3m “detailed yet general” side 1=25m side 2 = 45m angle = 26.5deg

33 Wrapping Up Determine what the problem is about: givens/solve for
Use diagrams to help, if possible to scale! Careful with units Solve step by step – DETAILED. Make clear where are the results VERIFY the 1)reality and 2)accuracy of your result then code… NEVER code immediately Vocabulary: user, programmer, algorithm

34 Try it yourself Apply steps 1 through 7a. for the following problem
You’re buying this odd shaped land. Cost of land is $100,000/acre. Given the following data (expressed in meters), how much do you expect to pay for this land?


Download ppt "Developing a Solution How to create the computer-based solution for a real-world problem. The steps - Examples for each step."

Similar presentations


Ads by Google