labr12 - y0 = 0 beam displacement = 0 at x=0 v0 =.001...

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

View Full Document Right Arrow Icon
Doug Rivas ME 218 Lab 12 M 5-7 12.1 prb1.m: [t,x] = ode45( 'ex1' ,[0 15], 1); plot(t,x); grid ex1.m: function xprime=ex1(t,x) xprime=sin(t*x); fun1.m: function yprime = fun1(t,y) yprime = -2 * t * y^2; fun2.m: function yprime = fun2(t,y) yprime = [ y(2) ; y(1)-y(2) ]; 12.2
Background image of page 1

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

View Full Document Right Arrow Icon
12.3 m=2, b=2, k=2
Background image of page 2
m=4, b=2, k=2 m=2, b=2, k=4
Background image of page 3

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

View Full Document Right Arrow Icon
m=4, b=2, k=4 12.4 y’=f(x,y,z)= v v’= g(x,y,z)= ((1+v^2)^3/2)*((Ty/EI)*(wx(x-L)/2EI)) 12.5 function dz= beamfunc(x,z) L=100; w=100; E=10^7; T=500; I=500; v= z(2); y=z(1); yprime= v; vprime= ((1+v^2)^(3/2))*((T*y)/(E*I)+(w*x*(x-L))/(2*E*I)); dz= [yprime; vprime];
Background image of page 4
12.6 12.7 I used a value of v0=.000834
Background image of page 5

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

View Full Document Right Arrow Icon
(Proof that the beam is within the +/- .0001) 12.8 The final value for v0 was : 0.000833250297675, which is more exact than in 12.7. The final error was: 1.077018228256080e-007
Background image of page 6
beamdeflect.m: clear all ; clf xspan = [0 100]; % solve over this interval (length of the beam)
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y0 = 0; % beam displacement = 0 at x=0; v0 = .001; % choose slope of beam at x = 0; [x,z] = ode45( 'beamfunc' , xspan, [y0 v0]); y = z(:,1); % the deflection of the beam v0(1) = v0; % first guess for slope of beam at x = 0; v0(2) = 2; % second guess required for Secant method error(1) = y(length(x)); % the error obtained from the first guess. max_it = 10; tol = 0.000001; i = 1; while (i<max_it)&(abs(error(i))>tol) i = i+1; [x,z] = ode45( 'beamfunc' , xspan, [y0 v0(i)]); y = z(:,1); error(i) = y(length(x)); v0(i+1) = v0(i)-((v0(i)-v0(i-1))*error(i))/(error(i)-error(i-1)); % new guess from Secant method end format long , v0 error(i) plot(x,-y) title( 'Doug Rivas' ) xlabel( 'Position' ) ylabel( 'Deflection' )...
View Full Document

{[ snackBarMessage ]}

Page1 / 7

labr12 - y0 = 0 beam displacement = 0 at x=0 v0 =.001...

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

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