{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ME 218 lab 12

# ME 218 lab 12 - v0 =.000832 choose slope of beam at x =...

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

Greg Gangluff ME 218 Lab 12 4/22/2008 1. Mfile ex1 function xprime=ex1(t,x) xprime=sin(t*x); Mfile ex1b - [t,x] = ode45( 'ex1' ,[0 15], 1); plot(t,x); grid

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

View Full Document
2. M Files: function yprime=ex2(t,y) yprime=[ cos(y(2))+sin(t); sin(y(1))-cos(t) ]; tspan=[0, 10]; y0=[5.1, 6.7]; [t, y]=ode45( 'ex2' , tspan, y0); plot(t, y);
3. First graph K=4 b= 2 m=2 2 nd graph k= 6 m= 2 b= 2 3 rd graph k=6 m=4 b=2

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

View Full Document
4 th graph k=4 m=4 b=2 4. y’=f(y,v,x)=v V’=g(y,v,x)= [1 + (v)^2]^(3/2)*[Ty/EI + wx(x - L)/2EI] 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]; 6. 7.My value was .000832

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

View Full Document
8.
Final vO value - 0.000833250289601 Error - 3.177811638294809e-007 Beamdeflect.m clear all ; clf xspan = [0 100]; % solve over this interval (length of the beam) y0 = 0; % beam displacement = 0 at x=0;

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: v0 = .000832; % choose slope of beam at x = 0; [x,z] = ode45( 'beamfunc' , xspan, [y0 v0]); y = z(:,1); % the deflection of the beam v0(1) = 0; % first guess for slope of beam at x = 0; v0(2) = .002; v1(1) = 0; v2(2)=.002 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, [0 0 v0(i) v1(i)]); y = z(:,3); b = z(:,4); error(i) = y(length(x)); v0(i+1) = v0(i)-((v0(i)-v0(i-1))*error(i))/(error(i)-error(i-1)); v1(i+1) = v1(i)-((v1(i)-v1(i-1))*error(i))/(error(i)-error(i-1)); % new guess from Secant method end format long , v0 format long , v1 error(i) plot(x,z) title( 'Greg Gangluff' ) xlabel( 'Position' ) ylabel( 'Deflection' )...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern