introduction to engineering computing geen 1300 elizabeth white elizabeth.white@colorado.edu office...

Post on 29-Dec-2015

217 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Introduction to Engineering ComputingGEEN 1300

Elizabeth Whiteelizabeth.white@colorado.edu

Office Hours: Tues 11am-12:30pm, Thurs 11am-12:30 pm,and by appointment; please send email.

Introduction to Engineering ComputingGEEN 1300

• why• solving problems that are hard or even impossible to do by

hand• graphing data• writing computer programs that perform large,

complicated tasks• ……..

Introduction to Engineering ComputingGEEN 1300

• what

~12 lectures~13 lectures

Class Meetings MATH 100 MW 8:00-8:50

Texts:• R. Larsen, Engineering with Excel, Third Edition, Pearson

Prentice Hall, 2009 • H. Moore, Matlab for Engineers, Second Edition, Pearson

Prentice Hall, 2009 • Readings for each week are posted on the CULearn calendar

Other Materials on class web page:http://csel.cs.colorado.edu/~ekwhite/

GEEN1300_Summer2010.html

20% Labs7.5% Prelabs (online)

7.5% Homework10% Class participation15% Project20% Midterm (in class)

20% Final (Friday, 2 July, 8-10:30am)

Grading

Labs

• Are the real meat of this course• Where you learn by doing, not just hearing or

reading• Start THIS week (beginning Thursday at 8am)• Happen in ECCH 107 • Are due at the end of the lab period – if you arrive

late, you may not finish…

• Bring a USB drive and the textbook

Lab Grade Policy

• Make-up labs after the fact only for medical or family emergencies.

• In some cases, make-up labs may be arranged with the instructor, but you must do so at least one weeks before the beginning of the recitation period

• Labs CANNOT be done at home and then turned in. Labs also CANNOT be emailed in from home. (But you can certainly work them in advance, then come in.)

Online prelabs

• Posted on web page• Based on the reading, labs, class info• Make sure you’re caught up on the reading before you

start them• To be done by yourself (but you may use the textbook,

the web, your course notes, etc.)• Due by 8am on Thursdays of lab weeks

Project

• Provide a more-substantial experience with a bigger problem

• …and an opportunity to deepen your programming skills

• Selected from a list of candidates (some from each engineering field)

• Due during the last week of classes

Homework

• Where you learn offline, at your own pace

• Are posted on webpage, along with textbook readings

• Are due at the beginning of lecture, typically on mondays, in manila folders outside this room

• Late HW is not accepted

• Solutions posted on web page after it’s turned in

Midterm

• In class TBD (I’ll know by Thursday)

• Coverage: Excel & VBA

• Tests whether you know what these tools do, how they work, and how to use them to solve engineering problems

• Cheat sheet allowed

Final Exam

• 8:00-10:30am on 2 July (Friday)• Look at your exam schedule NOW:registrar.colorado.edu/Calendar/calendars_schedules.html

• Covers whole course • Targets my learning goals:

Learning goals:

• Know what’s in your computational toolbox …and how/when to use it

• Develop the resourcefulness to learn about other tools

• Know the basics of computer programming

Academic Ethics

• All incidents of academic dishonesty will result in academic sanctions

• In addition, the Honor Code Council will be notified and a non-academic sanction can be issued by them

• For example, if two identical labs are turned in, that is considered cheating, and for both people

• That has implications for leaving your files on lab computers!

• But collaboration is not always cheating• If you have any questions about cheating, ASK!

Overview of Excel coverage in GEEN 1300

learning skills for efficient use of the software

understanding spreadsheet layout and operations

how to set up the solution of typical engineering problems

learning VBA: the missing link for most users

developing user interfaces and other enhancements

Familiarity with Excel…

(a) don’t know what it is

(b) know vaguely what it is

(c) have seen an Excel spreadsheet at least once

(d) have actually used Excel to create a spreadsheet

(e) have used Excel extensively (i.e., beyond simple spreadsheets)

Syntax for Excel formulas

formulas must start with =, + or - ( leftover from 1-2-3)

expressions are evaluated left-to-right

precedence for arithmetic operators is:negation unary –exponentiation ^multiplication & division * and /addition & subtraction + and -

Examples…

Negation – unary minus

algebraic format Excel syntax

23 -3^2

Result

9 or –9 ???

2yx =x^y^2 =x^(y^2)? =(x^y)^2?

Repeated exponentiation

algebraic format Excel syntax

[test it if you’re not sure!]

[What do you really want to have happen?]

Syntax for Excel formulas

formulas must start with =, + or - ( leftover from 1-2-3)

expressions are evaluated left-to-right

precedence for arithmetic operators is:negation unary –exponentiation ^multiplication & division * and /addition & subtraction + and -

More examples

algebraic format Excel syntax

2D

4L

=pi()*D^2/(4*L)

or =pi()*D^2/4/L

L

H L

T T

a T T

=(T-TL)/a*(TH-TL)

or =(T-TL)/(a*(TH-TL))

or =(T-TL)/a/(TH-TL)

Which will give you an answer of -9?

a) =-(3^2)

b) -(3^2)

c) =-3^2

d) (a) and (b)

e) (a) and (c)negation unary –exponentiation ^multiplication & division * and /addition & subtraction + and -

Syntax for Excel formulas

formulas must start with =, + or - ( leftover from 1-2-3)

expressions are evaluated left-to-right

precedence for arithmetic operators is:negation unary –exponentiation ^multiplication & division * and /addition & subtraction + and -

How do you write this formula in Excel?

a) =F*L^3/(3*E*I)

b) = F*L^3/3/E/I

c) = F*L^3/3*E*I

d) (a) or (b)

e) None of these

3F L

3 E I

3b dI

12

The formula for the deflection of a cantilever beam is:

How do you write this formula in Excel?

3F L

3 E I

3b dI

12

The formula for the deflection of a cantilever beam is:

Avoid this decoding issue by using parens!!

a) =F*L^3/(3*E*I)

b) = F*L^3/3/E/I

c) = F*L^3/3*E*I

d) (a) or (b)

e) None of these

Examples

algebraic format Excel syntax

2h 3R h

3

=PI()*h^2(3*Radius-h)/3

What’s wrong with this?

forgot the * operator

sin 45 =SIN(45)

What’s wrong with this?

=SIN(45/180*PI())

arguments to trig functionsmust be in radians

or =SIN(radian(45))

Examples

Logarithms and exponents Remember!

ln y x xy e exp x

10

Blog P A

T C

BA

T CP 10

a

ln xlog x

ln a

LN(y) EXP(X)

LOG10(P) 10^(A-B/(T+C))

=LN(x)/LN(a)

=LOG(x,a)

Syntax for Excel formulas

formulas must start with =, + or - ( leftover from 1-2-3)

expressions are evaluated left-to-right

parentheses are used to establish order for calculations

precedence for arithmetic operators is:negation unary –exponentiation ^multiplication & division * and /addition & subtraction + and -

functions are evaluated first and the result is insertedat the position of the function in the expression

Another example

algebraic format Excel syntax

2

y 2 x 2

x xy y

=(y+2)*(x-2)/(x^2+x*y+SQRT(y))

Order of evaluation:

1) put y into SQRT function, return answer to that position2) compute y+2 result3) compute x-2 result4) multiply y+2 result times x-2 result to get numerator result5) compute x^2 result6) compute x*y result7) add up x^2, x*y and SQRT(y) to get denominator result8) divide numerator result by denominator result

How to enter cell addresses in a formula?

How do you enter those cell references? How do you enter a range of cells?

By typing or by clicking (and dragging, if it’s a range like b1:b4)

p.s. see the “Insert Function” button on the Formulas tab for a list of Excel’s functions – or use the help docs.

Example: =b1+b2+b3+b4 or =sum(b1,b2,b3,b4) or =sum(b1:b4)

Cell names

• Default name: column letter followed by row number

• You can give cells other names via the “Name Box”

• And then use those names (instead of “B1” et al.) in your formulas

• Some names are reserved – watch out!• You can name a bunch of cells at once using

“Create from Selection” on the “Formulas” tab

“Filling” Cells

• Via the fill handle

• Works for formulas too!!

32

Engineering calculations in Excel

Deflection of cantilever beam

d

bL

F

3F L

3 E I

3b dI

12

E modulus of elasticity I moment of inertia

33

Deflection of cantilever beam

Basic data: F = 100 N L = 3 ft

E = 3 x 107 psi

b = 1 in d = 2 in

Find in mm

34

Deflection of cantilever beamFind in mm

Don’t forget your name!

35

Deflection of cantilever beamFind in mm

36

Deflection of cantilever beam

Case studies:

• How does change as L varies?• How does change as d varies?• How does change as b and d vary?

Lots of ways to do the one-variable case studies…

37

Using formula copy:

Single formula with only oneparameter changing

Range of parameter valuesin adjacent column

38

Another example:

Set up example forcase study of f(x) vs x

x

f x1 ln x

Case study bycopying formula

range B2:B11named x

Enrollment

• Only 35 (40?) people can enroll in GEEN 1300:• We cannot add people over those limits, nor can we add new

sections. Computers are the limiting factor.• If you’re in, don’t move sections; if you do, the registration

computer will instantly give away your spot, leaving you in limbo.

• If you’re not in, but you’re #1 on the waitlist, you may get in, but you should make backup plans. Come to lab in the meantime.

• If you’re further down the waitlist, you may wait & see if you get in, but you should really make plans to take this course later (e.g., in the fall) and/or explore other options (e.g., CSCI1300)

• June 2 is the last day to drop without charge; June 4 is the last easy day to drop; June 14 is the last day without petitioning the Dean, per http://www.colorado.edu/summersession/calendar/index.html

top related