vibrations on a thin rectangular plate

14
Vibrations on a thin rectangular plate with free edges modeled using Matlab Mustafa M. Rajabali Project for Computers in Physics

Upload: muhammad-enam-ul-haq

Post on 09-Nov-2014

15 views

Category:

Documents


1 download

DESCRIPTION

fhy

TRANSCRIPT

Page 1: Vibrations on a Thin Rectangular Plate

Vibrations on a thin rectangular plate with free edges modeled using Matlab

Mustafa M. Rajabali Project for Computers in Physics

Page 2: Vibrations on a Thin Rectangular Plate

Preface

The following is a write up to a Matlab project written for the class Computers in Physics taught by Dr. William Schwalm at the University of North Dakota. This project was something that I have wanted to do after looking at the Chiladni Plate normal mode frequencies during an undergraduate physics laboratory. The credit for inspiration to work on this project is due to Mr. Don Brummond; my undergraduate physics laboratory instructor and later on my supervisor when I was a laboratory teaching assistant at Concordia College.

The write up consists of an introduction where the problem is presented and the code briefly described. The introduction is followed by sections which I have labeled program and numbered according to their relevance in unveiling the code.

The work is on display on my web pageℵ with the simulated plate movie files available for observation. Please note that only a few examples are up on the web for more examples and your experimentation, I encourage you to download the m-files and play around with them. I have presented explanations on almost every step of the way.

Mustafa M Rajabali Grand Forks, ND. May 3rd 2005.

ℵ http://uweb.und.nodak.edu/~mustafa.rajabali/classandresearchexpe.htm look under graduate class projects

2

Page 3: Vibrations on a Thin Rectangular Plate

Table of Contents PREFACE ....................................................................................................................... 2 TABLE OF CONTENTS .................................................................................................. 3 INTRODUCTION............................................................................................................. 4 PROGRAM FILES........................................................................................................... 6

PROGRAM I: READIN .................................................................................................................... 6 Reading.m ............................................................................................................................................ 6

PROGRAM II: PLATERHS ............................................................................................................... 8 Platerhs.m............................................................................................................................................. 8

PROGRAM III: MANCOL & ONECOL .............................................................................................. 9 Mancol.m ............................................................................................................................................. 9 Onecol.m .............................................................................................................................................. 9

PROGRAM IV: SECDEV ............................................................................................................... 10 Secdev.m ............................................................................................................................................ 10

PROGRAM V: PLATEMOVIE......................................................................................................... 11 Platemovie.m...................................................................................................................................... 11

PROGRAM VI: SURFMOVIE, CONTMOVIE & MOVIECALL ............................................................. 12 Moviecall.m ....................................................................................................................................... 12 Surfmovie.m....................................................................................................................................... 12 Contmovie.m...................................................................................................................................... 13

DISCUSSION................................................................................................................ 14 BIBLIOGRAPHY ........................................................................................................... 14

3

Page 4: Vibrations on a Thin Rectangular Plate

Introduction The governing differential equations [1] for plate vibrations is a fourth order problem

2

2

wD w h qt

ρ ∂∆ +

∂= (0.1)

where

4 4 4

2 24 2 22w ww w 4

wx x y y

⎛ ⎞∂ ∂ ∂∆ = ∇ ∇ = + +⎜ ∂ ∂ ∂ ∂⎝ ⎠

⎟ (0.2)

3

2 flexural stiffness of the plate12(1 )Young's modulus of elasticity of the plate material Poisson's ratio the thickness of the plate an externally applied force on the plate

EhDv

Evhq

= =−

====

(0.3)

Equation 1.1 is derived under the assumptions [1]

1) the thickness of the plate is small compared with the other dimensions 2) no strain is suffered by the middle surface 3) cross sections plane before the strain remain plane after strain 4) load is normal to the surface 5) deflections are small in comparison with the thickness of the plate 6) the influence of shear and rotating inertia is neglected.

If we give the plate a point impulse force, as an example I will use a delta function, the force would replace in equation 1.1 giving q

4 4 4 2

4 2 2 4 22 (

( ) ( )

( ) ( )

e e

xe e e

ye e e

w w w wD h Z xx x y y t

dM x x y ydydM y y x xdx

ρ δ δ

δ δ

δ δ

⎛ ⎞∂ ∂ ∂ ∂+ + + = − −⎜ ⎟∂ ∂ ∂ ∂ ∂⎝ ⎠

− − −

+ − −

) ( )ex y y

(0.4)

where

(0.5) the excitation moment about the x-axis

the excitation force vector for linear force in the z-directionxe

e

MZ

==

The problem was solved numerically in Matlab using the ode45 function. This function receives input in the form of a column vector and solves first order differential equations. Two

4

Page 5: Vibrations on a Thin Rectangular Plate

things needed to be done to the amplitude matrix ( ) so as to use the ode45 function. First, the second order time derivative had to be split into two first order time derivatives so that

w

1dw wdt

= (0.6)

1dw D qwdt h hρ ρ

= − ∆ + (0.7)

These are written out in the ode45 call function file: platerhs, which is in program II.

Secondly since the ode45 function, as it is written, takes input as only a single column matrix, had to be reshaped as needed. As it turned out, the built in reshape function in Matlab didn’t work as efficiently as expected so two more functions had to be written to do the reshaping; mancol and onecol, these are shown in program III.

w

For the part of solving the two dimensional gradient operator to the fourth power, a function for taking the second derivative with respect to one of the coordinates was sufficient. After taking the second derivative of , the second derivative of the result was taken which gives a fourth derivative. This was done for the fourth derivative with respect to a single coordinate. For the cross term with two second derivatives, it was done first with respect to the first coordinate, the result transposed and the function applied again after which the final result was transposed back. This process is illustrated in the function platerhs. The second derivative function used in this process was developed using the central or finite difference method with periodic boundary conditions and the function file secdev.m can be refered to in program IV.

w

Finally all these programs are brought together in the m-file platemovie.m which is in program V. The program is written with full instructions as you go along and can be followed quite easily. It is also available for download on the web under the graduate class projects section at http://uweb.und.nodak.edu/~mustafa.rajabali/classandresearchexpe.htm .

To display the movie, two movie files are included and placed in the same section, surfmovie.m gives a movie of the surface plot while contmovie.m give the movie of a 2-dimentional contour plot of the plate face. Both these files are executed by the file moviecall.m where you can choose to have a surface plot movie, a contour plot movie or both. All three files are in the section labeled program VI.

5

Page 6: Vibrations on a Thin Rectangular Plate

Program Files

Program I: readin

Reading.m This program reads in all the parameters needed, one can opt to enter their own values (within provided restrictions) or use the default values. The m-file is called in platemovie.m; see program II %This is the read in file where all the user specified variables will be %read in. If you opt not to type in values, say no in the begining and the %default values will be used. These default values can also be changed %but are currently: % xdim=20; % ydim=20; % h=2; % rho=8; % D=0.400; % a=(D/(rho*h)); % xforce=9.5; % yforce=9.5; % intforce=3; % tleng=5*pi; % %------------------------------------------------------------------------- global ydim xdim h rho D xforce yforce intforce tleng ref disp('This program show a movie of a thin vibrating plate solved numerically') disp('-------------------------------------------------------------------------') disp('Please enter the following specifications for the desired plate,') disp('for every pause hit the carriage return. If you opt not to type') disp('in the values default values will be read') disp('-------------------------------------------------------------------------') disp('would you like to enter the values or use the default? ') answer = input('enter "y" for yes and "n" for no '); if isequal(answer,n) xdim=20; ydim=20; h=2; rho=8; D=0.400; a=(D/(rho*h)); xforce=9.5; yforce=9.5; intforce=3; tleng=5*pi; disp('default values used hit return to continue') else

6

Page 7: Vibrations on a Thin Rectangular Plate

ydim = input('Length of the plate between 10 and 30 cm (y coordiantes) ydim = '); xdim = input('Length of the plate between 10 and 30 cm (x coordiantes) xdim = '); h = input('Thickness of plate (between 1 and 5 milimeters) h = '); rho = input('Volume density of the plate (AISI steel is about 8g/cc) rho = '); disp('Flexural stiffness of the plate (for a 5mm thick steel plate D ~= 0.04) ') D = input(' D = '); disp('----------------------------------------------------------------------') pause disp('You will now need to specify a source point for the applied force on') disp('the plate enter an x coordiante followed by a y coordinate. Keep in ') disp('mind the dimensions of your plate so if the plate is 20 by 20cm and') disp('I want the force in the center, my x-coord will be 9.5 and my y-coord 9.5') disp('-----------------------------------------------------------------------') pause disp('-----------------------------------------------------------------------') xforce = input('x coordinate for the force xforce = '); yforce = input('y coordinate for the force yforce = '); intforce = input('intensity of the force (scale of 0 to 5) intforce = '); disp('-----------------------------------------------------------------------') pause disp('-----------------------------------------------------------------------') disp('Finally type in the length of time you want to run the simulation') tleng = input('time length in seconds, do not exceed 10seconds tleng = '); disp('-----------------------------------------------------------------------') end

7

Page 8: Vibrations on a Thin Rectangular Plate

Program II: platerhs

Platerhs.m This is the function that ode45 calls, it contains the right hand side of the two ordinary differential equations. function wraw = platerhs(t,wout,ref) %calculates the right hand side of the DFQ % %dw/dt=v dv/dt=(-D*delfourth)/(ro*h) % %where delfourth = d^4w/dx^4 + 2d^4w/(dx^2*dy^2)+d^4w/dy^4 %--------------------------------------------- global ydim xdim a qforce ref=zeros(xdim,ydim); [L,M] = size(wout); wha1 = wout(1:(L/2),1); wha2 = wout((L/2)+1:L,1); w = mancol(wha2,ref); % % dw1 = wha1; %--------------------------------------------- % %calculates the del to fourth using the second derivative function % %------------------------------------------------------------------ secd2x=secdev(w); fortx=secdev(secd2x); %fourth derivative in x % % secd2y=secdev(w'); forty=secdev(secd2y); forty=forty'; %fourth derivative in y % % secdx=secdev(w); %second partial in x fortxy=secdev(secdx'); %second partial in y fortxy=fortxy'; %fourth total derivative second in x %and second in y % delfourth=fortx+forty+2*fortxy;%result of the delfourth % %------------------------------------------------- %with a continuous external force %dw2=-(a*delfourth)+(qforce*sin(t*pi*80)); %or with just the initial knock dw2=-(a*delfourth); %------------------------------------------------- wraw = [onecol(dw1);onecol(dw2)];

8

Page 9: Vibrations on a Thin Rectangular Plate

Program III: mancol & onecol

Mancol.m The fuction uses a a referece matrix to change a single column matrix to one that matches the reference matrix function mat2 = mancol(a,ref) [L,M] = size(ref); t2 = []; m=1; n=L; while n<=L*M t2 = [t2,a(m:n,1)]; m=n+1; n=n+L; end mat2 = t2;

Onecol.m The function onecol( ) only needs one input unlike its counterpart mancol( ). It converts a matrix with many columns to one with just one column, taking each column and placing it below the first. function mat1 = onecol(z) t1 = []; n=1; [L,M] = size(z); while n<=M t1 = [t1;z(:,n)]; n=n+1; end mat1 = t1;

9

Page 10: Vibrations on a Thin Rectangular Plate

Program IV: secdev

Secdev.m Here the finite difference method is used with a periodic boundary conditions. Since the first derivative it is a difference of the next point and the previous point to a reference xo divided by the total change, the second derivative is simply the process over again. function w2 = secdev(w) %This file containes the second derivative function %which will be used to solve the fourth order PDE. %L defines the length of the vector % %---------------------------------------------- [L,M] = size(w); n=1; while n<=M u = w(:,n); w(:,n) = (u([L,1:L-1])+u([2:L,1])-2*u)/((0.2)^2); n = n+1; end w2 = w;

10

Page 11: Vibrations on a Thin Rectangular Plate

Program V: platemovie

Platemovie.m This is the main program calculating the amplitude of the vibrations . ( )w %defined global variables to use global ydim xdim a qforce %closes all hidden and open handled graphic objects close all hidden %Calls the file 'readin' which asks for the user defined %variables you can opt to use default values by typing in %'n' when prompted readin % % %Cartesian coordinates x = linspace(0,xdim-1,xdim); y = linspace(0,ydim-1,ydim); %the reference matrix used for the reshaping fuctions %'mancol' and 'onecol' ref=zeros(xdim,ydim); % % %Defining the initial force and initial conditions e1 = exp(-0.9*((x-xforce)).^2); e2 = exp(-0.9*((y-yforce)).^2); qforce = intforce*0.03*(-e1'*e2); inwha1 = zeros(xdim,ydim); ic = [onecol(inwha1);onecol(qforce)]; % % %Defining the time steps tspan = linspace(0,tleng,10); % % %the ode function used to solve the differential equations %function file platerhs [t,z] = ode45(@platerhs,tspan,ic); %prompt to run the movie m-file disp('run the file "moviecall" to run moves of contour or surface plots ')

11

Page 12: Vibrations on a Thin Rectangular Plate

Program VI: surfmovie, contmovie & moviecall

Moviecall.m % one can make a movie file of a contour or surface plot. this m-file %calls on surfmovie and contmovie see the individual file for details. plotsurf = input('Would you like a surface plot movie? (y or n) '); plotcont = input('Would you like a contour plot movie? (y or n) '); if isequal(plotsurf,y) surfmovie end if isequal(plotcont,y) contmovie else disp('Thank you for trying out this program :)') end

Surfmovie.m %plot of the surface [L,M] = size(z); frames = moviein(length(t)); j = 1; n = 1; while j<=length(t) zsurf = z(j,floor((M/2)+1):M); zsurf = reshape(zsurf,xdim,ydim); surf(x,y,zsurf'); shading flat axis([0 xdim 0 ydim -0.1 0.1]); view(-37.5,15); %change the view point (theta, phi) frames(:,n) = getframe; j = n*5; %by changing the multiplier you can increase or decrease %the number of frames used in the movie n = n+1; end shg; %adjust the number of time the movie should loop movie(frames,1) %you can name the file what ever you want (within the quotes) movie2avi(frames,'name')

12

Page 13: Vibrations on a Thin Rectangular Plate

Contmovie.m %Contour plot of the surface [L,M] = size(z); frames = moviein(length(t)); j = 1; n = 1; while j<=length(t) zsurf = z(j,floor((M/2)+1):M); zsurf = reshape(zsurf,xdim,ydim); contour(x,y,zsurf',30); %adjust contour lines per frame frames(:,n) = getframe; j = n*5; %by changing the multiplier you can increase or decrease %the number of frames used in the movie n = n+1; end shg; movie(frames) %you can name the file what ever you want (within the quotes) movie2avi(frames,'name')

13

Page 14: Vibrations on a Thin Rectangular Plate

Discussion The results from this program have turned out to be quite good. As mentioned earlier, they are available on the web for observation. The Chiladni plate is a plate with free edges and a central force oscillating at a tunable frequency. This plate can be simulated well using this program, by changing the dimensions of the plate and the frequency of the force oscillation one can get the stationary modes of vibration. This has to be done in small steps of frequency and is quite time consuming hence only one mode was tried which showed up at 80 units on a 20cm by 20cm plate. Instead of using and oscillating continuous force, one can give the plate an initial bang at any point on the plate and see how, with time, the plate relaxes back. The initial bang is provided as a Gaussian deformation with an intensity (ranging from 1 to 5) the program user wants.

Bibliography

[1] Y. Chen, Vibrations: theoretical methods, (Addison-Wesely, Don Mills, 1966), p 224. [2] Y. Zhiming, A Nonlinear Dynamical Theory of Non-Classical Plates, School of

Architectural Engineering, Shanghai Institute of Applied Mathematics & Mechanics. [3] J. N. Reddy, Refined nonlinear theory of plates with transverse shear deformation.

International Journal of Solids and Structures, 20, (3), 881-896 (1984) [4] C. Shu, W. Chen and H. Du, Free Vibration Analysis of Curvilinear Quadrilateral Plates

by the Differential Quadrature method, Journal of Computational Physics 163, 452–466 (2000)

14