Upload
oleg-garcia
View
18
Download
1
Tags:
Embed Size (px)
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
Citation preview
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx1
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
Bruce Mayer, PERegistered Electrical & Mechanical Engineer
Engineering 25
EXCELIntegratio
n
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx2
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
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx3
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 xxyy
dA
2
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx4
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
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx5
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.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
6.0
6.5
7.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.3
X
Y,
A
Bmayer file: XY_Integration_0912.xls
xxey x 7ln9sin8 63.05
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx6
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
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx7
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
dxydA
xxdx
yyy
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx8
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
Integration Result
See next Slide for Graphic Note the relationship between y(x) and
Iy(x)
Since is Iy(x) is the ANTI-Derivative of y(x), then y(x) is the Derivative of Iy(x)• Can use y(x) to find Max/Min values of Iy(x)
• Can use y(x) to find Max/Min slopes of Iy(x)
xydxxydx
dI
dx
ddxxyI yy
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx9
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
-3.5
-3.0
-2.5
-2.0
-1.5
-1.0
-0.5
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
6.0
6.5
7.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.3
Y, A
X
XY Function for Integration
YCumAreaZeroLine
BMayer file: XY_Integration_1112.xls
MaximumLocal Slopes
Max/MinLocal Values
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx10
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
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx11
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
Time in Excel DAYS
Regardless of how TIME is DISPLAYED in a spreadsheet table, Excel ENCODES time in 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/or Subtract Dates & Times
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx12
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
Time↔DayCode Equivalency
Time Format Equivalent Decimal Fraction of a day
12: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
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx13
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
[email protected] • ENGR-25_EXCEL_Integration_Tutorial-Example.pptx14
Bruce Mayer, PE ENGR/MTH/PHYS25: Computational Methods
MA
TL
AB
Co
de
% 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])