ME 218 lab 12

ME 218 lab 12 - 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

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

This note was uploaded on 06/23/2011 for the course ME 218 taught by Professor Unknown during the Fall '08 term at University of Texas at Austin.

Page1 / 8

ME 218 lab 12 - 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

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

View Full Document
Ask a homework question - tutors are online