lecture25bw

# lecture25bw - LECTURE 25 Numerical Integration Textbook...

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

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

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

View Full Document
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
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

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 11/01/2009 for the course ENGLISH 7 taught by Professor Sengupta during the Spring '09 term at Berkeley.

### 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
Ask a homework question - tutors are online