You are on page 1of 14

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

Mustafa M. Rajabali Project for Computers in Physics

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

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

Introduction
The governing differential equations [1] for plate vibrations is a fourth order problem Dw + h where 2w =q t 2 (0.1)

4w 4w 4w w = 2 2 w = 4 + 2 2 2 + 4 x y y x 3 Eh = flexural stiffness of the plate D= 12(1 v) 2 E = Young's modulus of elasticity of the plate material v = Poisson's ratio h = the thickness of the plate q = an externally applied force on the plate
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 q in equation 1.1 giving 4w 4w 4w 2w D 4 + 2 2 2 + 4 + h 2 = Z e ( x xe ) ( y ye ) x y y t x d M xe ( x xe ) ( y ye ) dy d + M ye ( y ye ) ( x xe ) dx where M xe = the excitation moment about the x-axis Z e = the excitation force vector for linear force in the z-direction

(0.2)

(0.3)

(0.4)

(0.5)

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

things needed to be done to the amplitude matrix ( w ) 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 dw (0.6) = w1 dt dw1 D q = w + (0.7) dt h h 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, w had to be reshaped as needed. As it turned out, the built in reshape function in Matlab didnt 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. 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 w , 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. 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 2dimentional 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.

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

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 ycoord 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

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)];

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;

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

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

Program VI: surfmovie, contmovie & moviecall


Moviecall.m

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

this m-file for details. or n) '); or n) ');

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

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

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, 452466 (2000)

14

You might also like