Sei sulla pagina 1di 1

DREXEL UNIVERSITY

Department of Mechanical Engineering & Mechanics


Applied Engineering Analytical & Numerical Methods II
MEM 592 - Winter 2015
HOMEWORK #4: Due Thursday, February 12 @ 630pm

1. [100 points+10% bonus if submitted before or by 02/05 @ 630pm]


Consider a horizontal beam which is supported at its ends. Let denote the vertical displacement of the beam
length units away from the left side. If ′ is small and a uniformly transverse load is applied on the beam then it
can be shown that is modeled by the differential equation:

′′ ,0 (1)

where is the modulus of elasticity, is the moment of inertia and is the length of the beam.
i) Formulate the structure of the Shooting Method for this BVP using the Newton-Raphson approach to update
(present all the equations you will need to implement this method).
ii) Use the RK4 subroutine that you developed in previous homeworks and the Shooting Method structure in
question (i) to solve this BVP numerically for 7 ∗ 10 , 4, 50, 50 and 1. Plot and
compare it with the analytical solution:

(2)

where and / . Plot also the slope of the vertical displacement. Do both

displacement and its slope make sense?
(Hint: Use the demo code below)

function [x,y]=Shooting(dx);

%% Initial guess
% Shooting method
it=1;itmax=50;
crit1=inf;
crit2=inf;
tol=10e-12;
% Initial conditions

while crit1>tol & crit2>tol & it<itmax


% Setup the iterative scheme
.
.
.
.
fprintf('%3d % 20.14f %20.14f %10.6e %10.6e % 20.14f \n ', it,v2,v2new,crit1,crit2,y(1,end));
% Update
end

%% Compute the Analytical Solution


%% Plot the numerical y(x) and analytical yexact(x) solutions
figure(1),clf
plot(x,y(1,:),'bx','markersize',12),hold on
plot(x,yexact','ro','markersize',5)
set(gca,'fontsize',12)
xlabel('x','fontsize',12,'fontweight','bold')
ylabel('y(x)','fontsize',12,'fontweight','bold')
legend(['Shooting method dx = ' num2str(dx) ')'],'Analytical',1)
title('Solution of the BVP','fontsize',12,'fontweight','bold')

Potrebbero piacerti anche