Numerical Integration of Ship Forms (Review of CVEN 302)
Download
Report
Transcript Numerical Integration of Ship Forms (Review of CVEN 302)
Chapter III.
Numerical Integration for
Ship Forms
Review of CVEN 302
Data of Ship forms
• Discrete data (Line drawings, stations, water plane
etc)
• Evenly distributed (most times)
Methods of Numerical Integration
•Trapezoidal rule (linear)
•Sinpson’s 1/3 rule (quadratic)
•Simpson’s 3/8 rule (cubic)
•Multiple applications
•Tchebycheff’s (similar to Gauss Quadrature) rule
-applied to a continues function
fn (x) can be linear
fn (x) can be quadratic
fn (x) can also be cubic or other
higher-order polynomials
Trapezoidal Rule (single Application)
• Linear approximation
b
a
1
f ( x )dx c i f ( x i ) c0 f ( x0 ) c 1 f ( x1 )
i 0
h
f ( x0 ) f ( x 1 )
2
f(x)
L(x)
x0
x1
x
Multiple Applications of Trapezoidal Rule
b
a
x1
x2
xn
x0
x1
xn 1
f ( x )dx f ( x )dx f ( x )dx
f ( x )dx
h
f ( x0 ) f ( x 1 ) h f ( x 1 ) f ( x 2 ) h f ( x n 1 ) f ( x n )
2
2
2
h
f ( x0 ) 2 f ( x1 ) 2f ( x i ) 2 f ( x n1 ) f ( x n )
2
f(x)
ba
h
n
x0
h
x1
h
x2
h
x3
h
x4
x
Simpson’s 1/3-Rule (single application)
• Approximate the function by a
parabola
2
b
c i f ( x i ) c 0 f ( x0 ) c 1 f ( x 1 ) c 2 f ( x 2 )
a f ( x )dx
i 0
h
f ( x0 ) 4 f ( x 1 ) f ( x 2 )
3
L(x)
f(x)
x0
h
x1
h
x2
x
Multiple Applications of Simpson’s 1/3 Rule
Applicable only if the number of segments is even
Multiple Applications of Simpson’s 1/3 Rule
ba
h
n
n must be even
f ( x0 ) 4 f ( x 1 ) f ( x 2 )
f ( x2 ) 4 f ( x3 ) f ( x4 )
2h
6
6
f ( x n 2 ) 4 f ( x n 1 ) f ( x n )
2h
6
I 2h
n 1
n 2
( b a)
I
f ( x0 ) 4 f ( x i ) 2 f ( x j ) f ( x n )
3n
i 1, 3 , 5
j 2 , 4 ,6
Simpson’s 3/8-Rule (single application)
Approximate by a cubic polynomial
b
a
3
f ( x )dx c i f ( x i ) c0 f ( x0 ) c 1 f ( x1 ) c 2 f ( x 2 ) c 3 f ( x 3 )
i 0
3h
f ( x0 ) 3 f ( x 1 ) 3 f ( x 2 ) f ( x 3 )
8
L(x)
x0
h
f(x)
x1
h
x2
h
x3
x
Tchebycheff’s rule
Sum of ordinates (stations)
I Length
# of ordinates
See Table 4.3 at p58
•Positions of ordinates (stations) depending on
how many ordinates are used
•Odd # of ordinates is preferred