hw1

6
AE 5311 Structural Dynamics Homework #1 Dhruv Deshpande SN=26 1000958328

Upload: dhruv-deshpande

Post on 03-Oct-2015

8 views

Category:

Documents


2 download

DESCRIPTION

Structural aerodynamics

TRANSCRIPT

AE 5311 Structural DynamicsHomework #1

Dhruv Deshpande SN=261000958328

Code

%% AE 5311 Structural Dynamics Homework 1%% Dhruv Deshpande SN=26clear allclc%% Please note!!! %Mass and Spring constant were changed from 1800 lbs and 4200 lb/ft to%1.8 lb and 4.2 lb/ft because there was no effect of damping on earlier values m=1.800*0.453592;%kgk=4.200*0.453592/0.3048;%N/m%% Problem 1c=[0;0.25;1;1.5]; %damping factorwn=sqrt(k/m);cc=2*m*wn;zeta=c/ccwd=sqrt(1-zeta.^2)*wn;% Define the initial conditionsu0=0.5*0.3048/12;%ftv0=4*0.3048/12;%fttn=2*pi/wn;%natural perioddt=tn/20;t=0:dt:5*tn;%5 undamped periodsA=u0;B=(v0+u0*zeta*wn)/wd;disp('UI1=exp(-zeta*wn*t).*(A*cos(wd*t)+B*sin(wd*t))')UI1=exp(-zeta*wn*t).*(A*cos(wd*t)+B*sin(wd*t));% Plotting figuresfigure(1)plot(t,UI1(1,:),'b-','linewidth',2)hold onplot(t,UI1(2,:),'r-.','linewidth',2)plot(t,UI1(3,:),'g--','linewidth',2)plot(t,UI1(4,:),'m:','linewidth',2)xlabel('\bfTime')ylabel('\bfResponse')title('\bfProblem 1:Responses due to IC')legend('\bfDisplacement for c=0','\bfDisplacement for c=0.25',... '\bfDisplacement for c=1','\bfDisplacement for c=1.5','location','south')grid on %% Problem 2p0=420*0.453592; %step forcec=[0;0.25];wn=sqrt(k/m);cc=2*m*wn;zeta=c/cc;wd=sqrt(1-zeta.^2)*wn;tn=2*pi/wn;%natural perioddt=tn/20;t=0:dt:5*tn;%5 undamped periodsA=u0;B=(v0+u0*zeta*wn)/wd;disp('UI2=p0*(1-exp(-zeta*wn*t).*(A*cos(wd*t)+B*sin(wd*t)))/k')UI2=p0*(1-exp(-zeta*wn*t).*(A*cos(wd*t)+B*sin(wd*t)))/k;% Plotting figuresfigure(2)plot(t,UI2(1,:),'b-','linewidth',2)hold onplot(t,UI2(2,:),'r-.','linewidth',2)xlabel('\bfTime')ylabel('\bfResponse')title('\bfProblem 2:Responses due to Step input')legend('\bfDisplacement for c=0','\bfDisplacement for c=0.25',... 'location','south')grid on %% Problem 3a0=42;a1=0;a2=0.42;c=[0;0.25];b00=zeros(2,99);b0=(a0*k^2-a1*c*k-2*m*a2*k+2*a2*c.^2)/k^3;b0=[b0 b00];b1=(a1*k-2*a2*c)/k^2;b20=zeros(1,1);b2=a2/k;b2=[b2;b20];wn=sqrt(k/m);cc=2*m*wn;zeta=c/cc;wd=sqrt(1-zeta.^2)*wn;tn=2*pi/wn;%natural perioddt=tn/20;t=linspace(0,5*tn);%5 undamped periodsA=-a0;B=-(a1+zeta*wn*a0)/wd;up=b0+b1*t+b2*t.^2;uc=exp(-zeta*wn*t).*(A*cos(wd*t)+B*sin(wd*t));UI3=up+uc;% Plotting figuresfigure(3)plot(t,UI3(1,:),'b-','linewidth',2)hold onplot(t,UI3(2,:),'r-.','linewidth',2)xlabel('\bfTime')ylabel('\bfResponse')title('\bfProblem 3:Responses due to quadratic input')legend('\bfDisplacement for c=0','\bfDisplacement for c=0.25',... 'location','south')grid on

OUTPUTzeta =

0 0.0553 0.2213 0.3320

UI1=exp(-zeta*wn*t).*(A*cos(wd*t)+B*sin(wd*t))UI2=p0*(1-exp(-zeta*wn*t).*(A*cos(wd*t)+B*sin(wd*t)))/k

RESPONSES