lecture25bw - LECTURE 25 Numerical Integration Textbook:...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 LECTURE 25 Numerical Integration Textbook: Sections 8.1 & 8.2 E7, Fall 2008, M. Frenklach 1 f(x) NUMERICAL INTEGRATION b x 0 a b ( ) a f x dx 2 f(x) NUMERICAL INTEGRATION x 0 a b ( ) a f x Trapezoidal Rule 3
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 f(x) TRAPEZOIDAL RULE x 0 x i x i+1 () ( ) () + + + 1 1 2 ii yx xx Linear Interpolation 4 INTERPOLATION RULE Linear Trapezoidal Quadratic Simpson's High-order methods 5 MATLAB FUNCTIONS trapz(x,y) quad(@myFun,a,b) (@myFun,a,b,tol) quadl, quadgk, quadv cumsum, cumtrapz, cumprod 6
Background image of page 2
3 R v r v max EXAMPLE: PIPELINE FLOW = average vdA v A A 7 = average v A π = 2 dA r dr EXAMPLE: PIPELINE FLOW r dr R 8 = average v A () ⎛⎞ =− ⎜⎟ ⎝⎠ 1 max 1 n r vr v R = 2 EXAMPLE: PIPELINE FLOW = max average 2 1 0 12 R n r d r R v R 9
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 ⎛⎞ =− ⎜⎟ ⎝⎠ max average 2 1 0 2 1 n R v r vr d r R R EXAMPLE: PIPELINE FLOW R = 0.5; v_max = 1.5; n = 8; r = linspace(0,R); f = r.*(1-r/R).^(1/n); v_ave = (2*v_max/R^2)* trapz (r, f ) 10 max average 2 1 0 2 1 n R v r d r R R EXAMPLE: PIPELINE FLOW R = 0.5; v_max = 1.5; n = 8; f = @(r) r.*(1-r/R).^(1/n); v_ave =(2*v_max/R^2)* quad ( f ,0,R) 11 max
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

lecture25bw - LECTURE 25 Numerical Integration Textbook:...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online