bruce mayer, pe registered electrical & mechanical engineer bmayer@chabotcollege

12
[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt 1 Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods Bruce Mayer, PE Registered Electrical & Mechanical Engineer [email protected] Engineering 25 EXCEL Integration

Upload: gavan

Post on 12-Feb-2016

18 views

Category:

Documents


0 download

DESCRIPTION

Engineering 25. EXCEL Integration. Bruce Mayer, PE Registered Electrical & Mechanical Engineer [email protected]. Game Plan: Divide Unknown Area into Strips (or boxes), and Add Up. Excel Numerical Integration . Employ Trapezoidal rule with used Slanted-Line tops. Trapezoidal Elements - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt1

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Bruce Mayer, PERegistered Electrical & Mechanical Engineer

[email protected]

Engineering 25

EXCELIntegratio

n

Page 2: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt2

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Excel Numerical Integration Game Plan:

Divide Unknown Area into Strips (or boxes), and Add Up

Employ Trapezoidal rule with used Slanted-Line tops

Page 3: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt3

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Trapezoidal Elements

By Trapezoid Geometry

Then the Incremental Area

ay

by

avgy

dAdx

WidthHgt-Avg Area

2

Hgt-Avg ayby

ab xx Width

abab xxyydA

2

Page 4: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt4

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Trapezoidal Integration by Excel Integrate over 1.7-4.3 using Excel

xxey x 7ln9sin8 63.05

That is, Find

Show Game Plan on Next Slides

dxxxeIx

x

xy

3.4

7.1

63.05 7ln9sin8

Page 5: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt5

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

The Function PlottedXY Function for Integration

-3.5-3.0-2.5-2.0-1.5-1.0-0.50.00.51.01.52.02.53.03.54.04.55.05.56.06.57.0

1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 4.1 4.3X

Y, A

Bmayer file: XY_Integration_0912.xls

xxey x 7ln9sin8 63.05

Page 6: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt6

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Set Up Integration Strips

2 2.5 3 3.5 4

-3

-2

-1

0

1

2

3

4

5

6

7

x

y

Page 7: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt7

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Integration Equations dA = [Avg Strip Hgt]*[Strip Width]

12

12

1

1

2

2

nn

N

nnn

N

n

avg

nn

nnavg

xxyydAA

dxydAxxdx

yyy

Page 8: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt8

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Data Acq integration – NO FcnXY DataAcq Plot

0

1

1

2

2

3

3

0:00:00 1:12:00 2:24:00 3:36:00 4:48:00 6:00:00 7:12:00

Time (hrs)

Q (W

)

Q (W)

BMayer Chabot College 0502..xls

Page 9: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt9

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Time in Excel DAYS Regardless of how TIME is DISPLAYED

in a spreadsheet table, Excel ENCODES as DAYS

Any “time” format can be converted to Fractional Days using either of• reFORMAT the current Cell• Copy-n-Paste VALUES into a number-

formatted cell Excel uses this “Day Code” to Add

and/orSubtract Dates & Times

Page 10: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt10

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Time↔DayCode Equivalency

Time Format Equivalent Decimal Fraction of a day12:00:00 0.500024:00:00 1.00006:00:00 0.25008:00:00 0.33330:03:11 0.00221:30:45 0.0630

19:50:20 0.8266

Page 11: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt11

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

Excel HELP on DATE Codes In Excel the “Date

Codes Start at the “zero hour” of the year 1900

See Excel help for more information

Remember all Times & Dates are internally stored as DAYS

Page 12: Bruce Mayer, PE Registered Electrical & Mechanical Engineer BMayer@ChabotCollege

[email protected] • ENGR-25_Prob_10-25_Catenary_Solution.ppt.ppt12

Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods

MATLA

B C

ode% Bruce Mayer, PE * 07Dec09% ENGR36 * EXCEL integration Prob% file = Excel_Integ_Stem_0912.m% % Set up WhtBd Graphic to show% integration Strips%x = [1.7:.05:4.3]y = 8*exp(-0.2*x).*sin(9*x.^0.63) + log(sqrt(7*x))stem(x,y), grid, axis([1.6 4.4 -3.5 7])