engineering computation course 1

40
Syllabus and Introduction Engineering Computation – ENGR 2304

Upload: eka-yani

Post on 13-Jul-2016

221 views

Category:

Documents


1 download

DESCRIPTION

Engineering Computation

TRANSCRIPT

Page 1: Engineering Computation Course 1

Syllabus and Introduction

Engineering Computation –

ENGR 2304

Page 2: Engineering Computation Course 1

To introduce and reinforce the use of problem-solving methodology as

practiced by the engineering profession in general and as applied to the use of

computers to solve some problems in particular.

Course Objectives

Page 3: Engineering Computation Course 1

Course Objectives

After successful completion of the course, the following objectives should be attained:

1. Demonstrate qualitative and quantitative understanding of the use Excel

Spreadsheet.

2. Develop a working knowledge of the required mathematical solution procedures for

engineering analysis.

3. Demonstrate the use of spreadsheets to solve a variety of engineering problems.

4. Ability to use Excel built in features to solve all engineering problems.

5. Ability to use MATLAB to reinforce the use of problem-solving methodology as

practiced by the engineering profession and as applied to the use of computers to

solve problems.

Page 4: Engineering Computation Course 1

Class Session

Class session is every Tuesday and Thursday : 8AM-10.40AM Each session consists of : - Slide discussion : 30 minutes* - Exercise : 30 minutes* - Task : 100 minutes* *Time allocation isn’t final and may be subjected to change

Page 5: Engineering Computation Course 1

Class Session

There will be no homework

However, at the end of the class, you will be given the next session’s power point presentation file for you to study before the next class session. Make sure you study it before the class because I will not show you the whole slides again.

Page 6: Engineering Computation Course 1

Class Session

Any other class rule you’d like to add?

Page 7: Engineering Computation Course 1

Evaluation Components

- Mid Exam 1 : 25% - Mid Exam 2 : 25% - Final Exam : 25% - Daily Task* : 25%

*There will be no make-up session for daily task. Late submission will not be accepted under normal circumstances. Exception will only applied for those who are sick.

Page 8: Engineering Computation Course 1

Reference Book

- MATLAB for Engineers 3rd edition by Holly Moore

Page 9: Engineering Computation Course 1

Course Syllabus

Week 1 : (1 & 3 Mar) : Introduction to MATLAB and MATLAB environment

Week 2 : (8 & 10 Mar) : Functions and Matrices

Week 3 : (15 & 17 Mar) : Plotting

Week 4 : (22 Mar) : Mid Exam 1

Week 5 : (29 & 31 Mar) : User-defined Functions

Week 6 : (5 & 7 Apr) : User-controlled Input and Output

Week 7 : (12 & 14 Apr) : Logical Functions and Selection Structures

Week 8 : (19 & 21 Apr) : Repetition Structures and Mid Exam 2

Week 9 : (26 & 28 Apr) : Matrix Algebra and Other Kinds of Arrays

Week 10: (3 May) : Symbolic Mathematics and Numerical Techniques

Week 11: (10 & 12 May) : Advanced Graphics, GUI, and Microsoft Excel

Week 12: (17 May) : Final Exam

Page 10: Engineering Computation Course 1

Intro to MATLAB®

Chapter 1

Page 11: Engineering Computation Course 1

Objectives

After studying this chapter you should be able to: • Understand what MATLAB is and why it is

widely used in engineering and science • Understand the advantages and

limitations of the student edition of MATLAB

• Formulate problems by using a structured problem-solving approach

Page 12: Engineering Computation Course 1

What’s in this Chapter?

• What is MATLAB?

• How is MATLAB used in industry?

• Problem Solving in Engineering and Science

Page 13: Engineering Computation Course 1

Section 1.1 What is MATLAB?

• MATLAB is one of a number of commercially available, sophisticated mathematical computation tools

• Others include Maple

Mathematica

MathCad

Page 14: Engineering Computation Course 1

MATLAB excels at:

• Numerical calculations

• Especially involving matrices

• Graphics

• MATLAB stands for

Matrix Laboratory

Page 15: Engineering Computation Course 1

Why MATLAB

• Easy to use

• Versatile

• Built in programming language

• Not a general purpose language like C++ or Java

Page 16: Engineering Computation Course 1

MATLAB was originally

written in Fortran, then later

rewritten in C

Page 17: Engineering Computation Course 1

MATLAB 7

• MATLAB is updated regularly

• Versions that predate MATLAB 5.5 are substantially different

Page 18: Engineering Computation Course 1

Section 1.2 How is MATLAB used in Industry?

• Widespread, especially in the signal processing field

• Tool of choice in Academia for most engineering fields

• Some examples….

Page 19: Engineering Computation Course 1

Electrical Engineering

These images simulate the visual system used in a housefly

brain to detect collisions. The techniques developed are

being used in autonomous robot systems that depend upon

vision for navigation. The data was processed using MATLAB

Page 20: Engineering Computation Course 1

Biomedical Engineering

These images were created from MRI scan data using MATLAB.

The actual data set is included with the standard MATLAB

installation, allowing you experiment with manipulating the data

yourself.

Page 21: Engineering Computation Course 1

Fluid Dynamics

Results from a finite element analysis code were post processed

using MATLAB to create this image.

Page 22: Engineering Computation Course 1

Section 1.3 Problem Solving in Engineering and

Science

1. State the Problem

2. Describe the input and output

3. Develop an algorithm

4. Solve the problem

5. Test the solution

Page 23: Engineering Computation Course 1

State the Problem

• If you don’t have a clear understanding of the problem, it’s unlikely that you’ll be able to solve it

• Drawing a picture often helps you understand the system better

Page 24: Engineering Computation Course 1

Describe the Input and Output

• Be careful to include units

• Identify constants

• Label your sketch

• Group information into tables

Page 25: Engineering Computation Course 1

Develop an Algorithm

• Identify any equations relating the knowns and unknowns

• Work through a simplified version of the problem by hand or with a calculator

• Developing a flow chart is often useful for complicated problems

Page 26: Engineering Computation Course 1

Solve the problem

• Create a MATLAB solution

• Be generous with comments, so that others can follow your work

Page 27: Engineering Computation Course 1

Test the Solution

• Compare to the hand solution

• Do your answers make sense physically?

• Is your answer really what was asked for?

• Graphs are often useful ways to check your calculations for reasonableness

Page 28: Engineering Computation Course 1

If you use a consistent problem solving strategy you increase the chance that your result is correct

Here’s an example….

Page 29: Engineering Computation Course 1

Example 1.1

• Albert Einstein

• E=mc2

• The sun is fueled by the conversion of matter to energy

• How much matter does the sun consume every day?

Page 30: Engineering Computation Course 1

State the Problem

Find the amount of matter necessary to produce the amount of energy radiated

by the sun everyday

Page 31: Engineering Computation Course 1

Describe the Input and Output

• Input

• Rate of energy radiation

• E = 385*1024 Joules/second

• Speed of light

• c = 3.0*108 meters/second

• Output

• Mass in kilograms

Page 32: Engineering Computation Course 1

Develop an Algorithm – Hand Example

• The energy radiated in one day is:

• Rearrange E=mc2 and solve for m

• m=E/c2

Jdayday

hours

hour

J 3124 1033.31*24sec

3600sec

10385

28

31

sec/100.3

1033.3

m

Jm

22

14

sec/107.3

m

J

Page 33: Engineering Computation Course 1

But the units are wrong!!

1 J = 1 kg m2/sec2

kgm

mkg 14

22

2214 107.3

sec/

sec/ 107.3

14

2 23.7 10

/ sec

J

m

Page 34: Engineering Computation Course 1

Develop a MATLAB Solution to Solve the Problem

• We’ll start learning the details of how to use MATLAB in the next chapter.

• However, you can see from the following demonstration just how easy it is to use the command window

Page 35: Engineering Computation Course 1
Page 36: Engineering Computation Course 1

Test your Solution

• Matches the hand solution

• Is it reasonable?

• Consider…

• Mass of the sun = 2*1020 kg

• How long would it take to consume all that mass?

Page 37: Engineering Computation Course 1

time = (mass of the sun)/(rate of consumption)

yearsdays

year

daykg

kgtime 13

14

30

105.1365

*/107.3

102

That’s 15 trillion years!!

Yes – this is a reasonable

result

Page 38: Engineering Computation Course 1

Summary

• MATLAB is widely used

• MATLAB is easy to use

• A systematic problem solving strategy makes it more likely you’ve found the right answer

Page 39: Engineering Computation Course 1

1st Task • Please write an email to :

[email protected]

• The email address you use will be registered for this course task submission and announcement for the entire semester.

• Please write the subject: “ENG-COMP : Intro” • In the email body, please write your Full name, NIM, and tell

me your hobby and your favourite stuff (Favourite movie, video games, musician, etc)

• Have you done any programming before? If Yes, please tell me the programming language you’ve already learned.

Page 40: Engineering Computation Course 1

? Any

Questions