Você está na página 1de 3

317 8.

3 Finite Difference Method


The astute observer may notice that some combinations of boundary conditions
will not work ineliminating the spillover. One suchcombinationis clearly y(a) =
1
and y

(a) =
2
. The other one is y

(a) =
1
and y

(a) =
2
. In the context of beam
theory, this makes sense: we can impose either a displacement y or a shear force
EI y

at a point, but it is impossible toenforce bothof themsimultaneously. Similarly,


it makes no physical sense to prescribe both the slope y

the bending moment EI y

at
the same point.
EXAMPLE 8.8
P
L
v
x
The uniform beam of length L and bending rigidity EI is attached to rigid sup-
ports at both ends. The beam carries a concentrated load P at its mid-span. If we
utilize symmetry and model only the left half of the beam, the displacement v can be
obtained by solving the boundary value problem
EI
d
4
v
dx
4
= 0
v|
x=0
= 0
dv
dx

x=0
= 0
dv
dx

x=L/2
= 0 EI
d
3
v
dx
3

x=L/2
= P/2
Use the nite difference methodto determine the displacement andthe bending mo-
ment M = EI d
2
v/dx
2
at the mid-span (the exact values are v = PL
3
/(192EI ) and
M = PL/8).
Solution By introducing the dimensionless variables
=
x
L
y =
EI
PL
3
v
the problem becomes
d
4
y
d
4
= 0
y|
=0
= 0
dy
d

=0
= 0
dy
d

=1/2
= 0
d
3
y
d
3

=1/2
=
1
2
We now proceed to writing Eqs. (8.13) taking into account the boundary condi-
tions. Referring to Table 8.1, the nite difference expressions of the boundary condi-
tions at the left end are y
1
= 0 and y
0
= y
2
. Hence Eqs. (8.13a) and (8.13b) become
y
1
= 0 (a)
4y
1
+7y
2
4y
3
+ y
4
= 0 (b)
More free ebooks : http://fast-file.blogspot.com
318 Two-Point Boundary Value Problems
Equation (8.13c) is
y
1
4y
2
+6y
3
4y
4
+ y
5
= 0 (c)
At the right end the boundary conditions are equivalent to y
n+1
= y
n1
and
y
n+2
= 2y
n+1
2y
n1
+ y
n2
+2h
3
(1/2)
Substitution into Eqs. (8.13d) and (8.13e) yields
y
n3
4y
n2
+7y
n1
4y
n
= 0 (d)
2y
n2
8y
n1
+6y
n
= h
3
(e)
The coefcient matrix of Eqs. (a)(e) can be made symmetric by dividing Eq. (e) by 2.
The result is

1 0 0
0 7 4 1
0 4 6 4 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 4 6 4 1
1 4 7 4
1 4 3

y
1
y
2
y
3
.
.
.
y
n2
y
n1
y
n

0
0
0
.
.
.
0
0
0.5h
3

The above system of equations can be solved with the decomposition and back
substitution routines in the functions LUdec5 and LUsol5 see Section 2.4. Recall
that these functions work with the vectors d, e, and f that formthe diagonals of upper
half of the coefcient matrix. The program that sets up solves the equations is
function fDiff8
% Finite difference method for the 4th-order,
% linear boundary value problem in Example 8.8.
xStart = 0; xStop = 0.5; % Range of integration.
n = 21; % Number of mesh points.
freq = 1; % Printout frequency.
h = (xStop - xStart)/(n-1);
x = linspace(xStart,xStop,n);
[d,e,f,b] = fDiffEqs(x,h,n);
[d,e,f] = LUdec5(d,e,f);
printSol(x,LUsol5(d,e,f,b),freq)
function [d,e,f,b] = fDiffEqs(x,h,n)
% Sets up the pentadiagonal coefficient matrix and the
% constant vector of the finite difference equations.
d = ones(n,1)*6;
More free ebooks : http://fast-file.blogspot.com
319 8.3 Finite Difference Method
e = ones(n-1,1)*(-4);
f = ones(n-2,1);
b = zeros(n,1);
d(1) = 1; d(2) = 7; d(n-1) = 7; d(n) = 3;
e(1) = 0; f(1) = 0; b(n) = 0.5*h3;
end
end
The last two lines of the output are
>> x y1
4.7500e-001 5.1953e-003
5.0000e-001 5.2344e-003
Thus at the mid-span we have
v|
x=0.5L
=
PL
3
EI
y|
=0.5
= 5.2344 10
3
PL
3
EI
d
2
v
dx
2

x=0.5L
=
PL
3
EI

1
L
2
d
2
y
d
2

=0.5

PL
EI
y
m1
2y
m
+ y
m+1
h
2
=
PL
EI
(5.1953 2(5.2344) +5.1953) 10
3
0.025
2
= 0.125 12
PL
EI
M|
x=0.5L
= EI
d
2
v
dx
2

=0.5
= 0.125 12 PL
In comparison, the exact solution yields
v|
x=0.5L
= 5.208 3 10
3
PL
3
EI
M|
x=0.5L
= = 0.125 00 PL
PROBLEM SET 8.2
Problems 15 Use rst central difference approximations to transform the bound-
ary value problem shown into simultaneous equations Ay = b.
Problems 610 Solve the given boundary value problem with the nite difference
method using n = 21.
1. y

= (2 +x)y, y(0) = 0, y

(1) = 5.
2. y

= y +x
2
, y(0) = 0, y(1) = 1.
3. y

= e
x
y

, y(0) = 1, y(1) = 0.
More free ebooks : http://fast-file.blogspot.com

Você também pode gostar