[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
Feb 12, 2016
[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
Engineering 25
EXCELIntegratio
n
[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
[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
[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
[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
[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
[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
[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
[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
[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
[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
[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])