10.7.2 Computer Formulation The program elipfreq was written to compute frequencies and mode shapes for an elliptic membrane.. least squares points used, and the number of terms used in
Trang 1f (η) =
N
k=1 cos(η(k − 1)) a k , g(ξ) =
Trang 2The analogous approximations for the modes anti-symmetric about the x-axis are:
f (η) =
N
k=1 sin(ηk) a k , g(ξ) =
Let us choose a set of collocation points η i , i = 1, , n , and ξ j , j = 1, , m
Then substituting the series approximation for f(η) into the differential equation
gives the following over-determined system of equations:
where A is a column matrix consisting of the coefÞcients a k A similar equation
results when the series for g(ξ) is substituted into the differential equation for the
radial direction It reduces to
E B − α B + λ G B = 0.
The parameter α can be eliminated from the last two equations to yield a single
eigenvalue equation
W E + C W = λ ( −W G + D W ) where W = A B , and the tic mark indicates matrix transposition By addressing
the two-dimensional array W in terms of a single index, the eigenvalues λ and the
modal multipliers deÞned by W can be computed using the function eig Then the
values of the other eigenvalue parameter α can also be obtained using the known
λ, W combinations The mathematical developments just given are implementedbelow in a program which animates the various natural frequency vibration modesfor an elliptic membrane
10.7.2 Computer Formulation
The program elipfreq was written to compute frequencies and mode shapes for
an elliptic membrane The primary data input includes the ellipse semi-diameters, aßag indicating whether even modes, odd modes, or both are desired, the number of
Trang 3least squares points used, and the number of terms used in the approximation series.Natural frequencies and data needed to produce modal surfaces are returned Theprogram also animates the various mode shapes arranged in the order of increasingfrequency The modules employed are described in the following table.
elipfreq reads data, calls other computational
mod-ules, and outputs modal plots
frqsimpl forms the matrix approximations of the
Math-ieu equations and calls eigenrec to generate
frequencies and mode shapes
eigenrec solves the rectangular eigenvalue problem
plotmode generates animated plots of the modal
func-tions
modeshap computes modal function shapes using the
approximating function series
funcxi approximating series functions in the xi
2) results obtained from the commercial PDE toolbox from MathWorks employing
triangular Þnite element analysis The elliptic coordinate formulation is singular for
a circular shape, but a nearly circular shape with a = 1 and b = 0.9999 causes no
numerical difÞculty Figure 10.14shows how well frequencies from elipfreq with
nlsq=[200,200] and nfuns=[30,30] compare with the roots of J n (r) The Þrst Þfty
frequencies were accurate to within 0.8 percent and the Þrst one hundred frequencies
were accurate to within 5 percent The function pdetool from the PDE toolbox was
also used to compute circular membrane frequencies with a quarter circular shapeand 2233 node points The Þrst two hundred even mode frequencies from this modelwere accurate to within 1 percent for the Þrst one hundred frequencies and to within 7
percent for the Þrst 200 frequencies Since the function pdetool would probably give comparable accuracy for an elliptic membrane, results from elipfreq were compared
with those from pdetool using an ellipse with a = 1 and b = 0.5 The percent
difference between the frequencies from the two methods appears inFigure 10.15
This comparison suggests that the Þrst Þfty frequencies produced by elipfreq for the
elliptic membrane are probably accurate to within about 2 percent
The various modal surfaces of an elliptic membrane have interesting shapes The
program elipfreq allows a sequence of modes to be exhibited by selecting vectors of
frequency numbers such as 1:10 or 10:2:20 Two typical shapes are shown inFigures10.16and 10.17 The particular modes shown have no special signiÞcance besidestheir esthetic appeal A listing of some interactive computer output and the source
code for elipfreq follows.
Trang 5y axis
Figure 10.16: Surface for Anti-Symmetric Mode Number 98
Trang 6y axis
Figure 10.17: Surface for Symmetric Mode Number 99
Trang 7Interactive Input-Output for Program elipfreq
>> elipfreq;
VIBRATION MODE SHAPES AND FREQUENCIES
OF AN ELLIPTIC MEMBRANE
Input the major and minor semi-diameters > ? 1,.5
Select the modal form option
1<=>even, 2<=>odd, 3<=>both > ? 1
The computation takes awhile Please wait
Computation time = 44.1 seconds
Number of modes = 312
Highest frequency = 116.979
Press return to see modal plots
Give a vector of mode indices (try 10:2:20)
Trang 810: % a separation of variables formulation in elliptical11: % coordinates.
12: %
15: % nlsq - two-component vector giving the number
18: % nfuns - two-component vector giving the number of
21: % type - use 1 for even modes symmetric about the
25: %
26: % frqs - a vector of natural frequencies
28: % modes - a three dimensional array in which
32: % indx - a vector telling whether each
37: % alpha - a vector of eigenvalue parameters in
42: % cptim - the cpu time in seconds used to
45: % noplot - enter any value to skip mode plots
46: %
47: % User m functions called:
50:
51: if nargin==0
52: disp(’ ’)
53: disp(’VIBRATION MODE SHAPES AND FREQUENCIES’)
Trang 977: indx=ones(length(frqs),1);
78: [frqso,modeso,x,y,alphao,cpto]=frqsimpl( 79: a,b,2,nlsq,nfuns);
Trang 10107: % a,b - ellipse major and minor semi-diameters
108: % type - numerical values of one or two for modes
110: % nlsq - vector [neta,nxi] giving the number of least
113: % nfuns - vector [meta,mxi] giving the number of
116: % frqs - natural frequencies arranged in increasing
118: % Modes - modal surface shapes in the ellipse
119: % x,y - coordinate points in the ellipse
120: % alpha - vector of values for the eigenvalues in the
Trang 11157: % Compute values of the second eigenvalue
158: % parameter in Mathieu’s equation
159: alpha=zeros(1,nmax); tic;
160: s=size(modes); s=s(1:2); Vxi=Vxi’;
161:
162: % Obtain the modal surface shapes
163: Neta=91; Nxi=25; Modes=zeros(Neta,Nxi,nmax);
170: frqs=sqrt(2*frqs)/h; cptim(3)=toc;
171:
172: %==============================================173:
174: function [eigs,vecs,Amat,Bmat]=eigenrec(A,B,C,D)175: % [eigs,vecs,Amat,Bmat]=eigenrec(A,B,C,D)
176: % Solve a rectangular eigenvalue problem of the177: % form: X*A+B*X=lambda*(X*C+D*X)
178: %
179: % A,B,C,D - square matrices defining the problem.
182: % eigs - vector of eigenvalues
183: % vecs - array of eigenvectors where vecs(:,:,j)
186: % Amat,
187: % Bmat - matrices that express the eigenvalue
189: %
Trang 12190: n=size(B,1); m=size(A,2); s=[n,m]; N=n*m;191: Amat=zeros(N,N); Bmat=Amat; kn=1:n; km=1:m;192: for i=1:n
209: function plotmode(a,b,x,y,eigs,modes,indx)210: %
211: % plotdmode(a,b,x,y,eigs,modes,indx)
212: % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213: % This function makes animated plots of the214: % mode shapes of an elliptic membrane for215: % various frequencies
216: % a,b - major and minor semi-diameters217: % x,y - arrays of points defining the
219: % eigs - vector of sorted frequencies
220: % modes - array of modal surfaces for
222: % indx - vector of indices designating
230: while isempty(jlim), disp(’ ’)
231: disp([’Give a vector of mode ’,
233: jlim=input(’(input 0 to stop > ? ’);
Trang 13259: function [u,x,y]=modeshap(
261: %
262: % [u,x,y]=modeshap(a,b,type,modemat,nxi,neta,H)263: % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~264: % This function uses the eigenvectors produced by265: % the rectangular eigenvalue solver to form modal266: % surface shapes in cartesian coordinates.
267: % a,b - major and minor semi-diameters
268: % type - 1 for even, 2 for odd
269: % modemat - eigenvector matrix output by eigenrec270: % nxi,neta - number of radial and circumferential
274: % u,x,y - modal surface array and corresponding
278:
279: if nargin<7, H=1; end
Trang 14280: if nargin<6, neta=81; end; if nargin<5, nxi=22; end281: h=sqrt(a^2-b^2); r=atanh(b/a); x=[]; y=[];
282: xi=linspace(0,r,nxi); eta=linspace(-pi,pi,neta);283: if nargout>1
284: [Xi,Eta]=meshgrid(xi,eta); z=h*cosh(Xi+i*Eta);285: x=real(z); y=imag(z);
292:
293: %==================================================294:
303: % type - 1 for even valued, 2 for odd valued
304: % xi - vector of radial coordinate values
305: % f,f2 - matrix of function and second derivative
307:
308: xi=xi(:); nxi=length(xi); R=atanh(b/a);
309: if type==1, N=pi/R*(1/2:n); f=cos(xi*N);
310: else, N=pi/R*(1:n); f=sin(xi*N); end
311: f2=-repmat(N.^2,nxi,1).*f;
312:
313: %==================================================314:
321: % n - number of series terms used
322: % type - 1 for even valued, 2 for odd valued
323: % xi - vector of circumferential coordinate values324: % f,f2 - matrix of function and second derivative
Trang 15325: % values
326:
327: eta=eta(:); neta=length(eta);328: if type==1, N=0:n-1; f=cos(eta*N);329: else, N=1:n; f=sin(eta*N); end330: f2=-repmat(N.^2,neta,1).*f;
Trang 17con-of these entities is facilitated by use con-of singularity functions [9] The singularity
function of order n is denoted by < x − x0> nand is deÞned as
< x − x0> n dx = < x − x0> n+1
n + 1 .
The special case where n = −1 is appropriate for describing a concentrated load.
The term < x − x0> −1 means the limit as → 0 of the following function
< x − x0> −1 dx = < x − x0>0.Analyzing the loads and deformations in the beam requires computation of the shear,
moment, slope, and deßection designated as v(x), m(x), y (x), and y(x) The beam
lies in the range 0 ≤ x ≤ L A total of four end conditions are imposed at x = 0
and x = L Normally, two conditions will be speciÞed at each end; so, two known conditions applicable at x = 0 need to be found during the solution process Along with the end conditions, interior supports may exist at x = r , 1≤ ≤ N s
un-Displacements y will occur at supports, and the reactions R , as well as four end
Trang 18conditions, needed to cause the deßections will have to be determined during theanalysis Within the beam span, the applied loading will consist of known external
loads described as w e (x)and the support reactions Fundamentals of Euler beamtheory developed in standard textbooks [9, 102] imply the following differential andintegral relations:
< x − r >1k(x) dx;
Trang 19V) Deßection
y(x) = y0+ y
0x + m0
x0
x0
k(x) dx dx +
v0
x0
x0
x k(x) dx dx +
x0
x0
x0
< x − r >1k(x) dx dx
where E(x)I(x) is the product of the Young’s modulus and the cross section ment of inertia, y0, y
mo-0, v0, m0, are the left-end values of the deßection, slope, shear
and moment respectively The property k(x) will be spatially variable unless EI is
constant, which yields the following simple formulas
x0
The external loading conditions employed here can handle most practical situations
It is assumed that several concentrated loads F act at positions f , 1 ≤ ≤ N f.Distributed loads are described by linearly varying ramp loads A typical ramp load
starts at position p with intensity P and varies linearly to magnitude Q at position
q The ramp load is zero unless p ≤ x ≤ q A total of N r ramp loads may be
present Instances where P = Q can also occur, implying a uniformly distributedload The general external loading chosen can be represented as
Trang 20and each summation extends over the complete range of pertinent values Similarly,integration using the properties of singularity functions yields
The single and double integrals given earlier involving m e (x) and k(x) can easily
be evaluated exactly when EI is constant, but these are not needed here Since
k(x) will generally be spatially variable in the target problem set, the integrations
to compute y (x) and y(x) are best performed numerically Leaving the number of
integration increments as an independent parameter allows high accuracy evaluation
of all integrals whenever this is desirable Typically, problems using several hundredintegration points only require a few seconds to solve using a personal computer.Completing the problem solution requires formulations and solution of a system
of simultaneous equations involving v0, m0, y
0, y0, R1, , R N s The desiredequations are created by specifying the displacement constraints at the supports, aswell as four of eight possible end conditions To present the equations more conciselythe following notation is adopted:
x
0
k(x) dx = K1(x) ,
x0
x0
x0
x k(x) dx dx = L2(x),
x
0 m e (x) k(x) dx = I1(x) ,
x0
Trang 21and it is evident from their deÞnitions that both J1(x, r )and J2(x, r )both equal
com-at x = 0 and pin supported com-at x = L would require y(0) = 0, y (0) = 0, m(L) = 0,
and y(L) = 0 In general, conditions imposed at x = 0 have an obvious form since only v0, m0, y0, or y
0are explicitly involved To illustrate a typical right endcondition, let us choose slope, for example This yields
11.1.2 Program to Analyze Beams of General Cross Section
A program to solve general beam problems was written which tabulates and plots
the shear, moment, slope, and deßection The driver program vdb deÞnes the data,
calls the analysis functions, and outputs the results Six functions that implement themethods given in this section were written Understanding the program details canbest be achieved by studying the code closely The program was checked extensivelyusing examples from several texts and reference books The three span beam havingparabolically tapered haunches shown inFigure 11.2 was analyzed previously by
Arbabi and Li [5] The program vdb was used to analyze the same problem and
produces the results inFigure 11.3, which agree well with the paper
We believe that the computer program is general enough to handle a wide variety
of practical problems Some readers may want to extend the program by addinginteractive input or input from a data Þle Such a modiÞcation is straightforward
11.1.3 Program Output and Code
Output from Arbabi and Li Example
Analysis of a Variable Depth Elastic Beam
-Title: Problem from Arbabi and Li
Trang 23Beam Length: 3
Number of integration segments: 301
Print frequency for results: 10
| left deflection 0.0000e+000
| right deflection 0.0000e+000
EI values are specified
Solution time was 0.55 secs.
Reactions at Internal Supports:
Trang 24| X-location Shear Moment Theta Delta
| -
Variable Depth Beam Program
1: function vdb
2: % Example: vdb
3: % ~~~~~~~~~~~~
4: %
5: % This program calculates the shear, moment,
6: % slope, and deflection of a variable depth
7: % indeterminate beam subjected to complex
8: % loading and general end conditions The
9: % input data are defined in the program
10: % statements below.
11: %
12: % User m functions required:
13: % bmvardep, extload, lintrp, oneovrei,
14: % sngf, trapsum
Trang 2516: clear all; Problem=1;
17: if Problem == 1
18: Title=[’Problem from Arbabi and Li’];
19: Printout=10; % Output frequency
20: BeamLength=3; % Beam length
21: NoSegs=301; % # of beam divisions for
37: % EI or beam depth specification
38: EIorDepth=1; % 1=EI values specified
53: % Beam width and Young’s modulus
54: BeamWidth=[]; BeamE=[]; Depth=[]; DepthX=[];
Trang 2678: I=BeamWidth*Depth.^3/12; Imin=min(I); L1=36;79: k1=BeamE*Imin/L1; k2=k1/2; k3=k1;
80: t0=10.46/k1; t1=15.33/k1; t2=22.24/k1;
82: fprintf(’\n\nValues from reference’);
84: fprintf(’\n Theta (x= 36): %12.4e’,t1);85: fprintf(’\n Theta (x=108): %12.4e’,t2);86: fprintf(’\n Theta (x=144): %12.4e\n’,t3);
Trang 27133: fprintf(’\n |%4.0f %12.4e %12.4e’,
135: end
136: end
137: fprintf(’\n\nConcentrated Forces: (%g)’, 138: NoExtForce);
139: if NoExtForce > 0
141: fprintf(’\n | - - -’);142: for i=1:NoExtForce
143: fprintf(’\n |%4.0f %12.4e %12.4e’,
Trang 28150: fprintf(’ X-end Load’);
151: fprintf(’\n | - - -’);152: fprintf(’ - -’);
170: fprintf(’\nEI values are specified’);
172: fprintf(’\n | - - -’);173: for i=1:NoEIorDepths
174: fprintf(’\n |%4.0f %12.4e %12.4e’,
188: fprintf(’\n |%4.0f %12.4e %12.4e’,
Trang 29205: fprintf(’\nReactions at Internal Supports:’);
207: fprintf(’\n | - -’);208: for i=1:NoIntSup
238: plot(x,V,’k-’); grid; xlabel(’x axis’);
239: ylabel(’Shear’); title(’Shear Diagram’);
Trang 30240: subplot(2,2,2);
241: plot(x,M,’k-’); grid; xlabel(’x axis’);
242: ylabel(’Moment’); title(’Moment Diagram’)243: subplot(2,2,3);
244: plot(x,Theta,’k-’); grid; xlabel(’x axis’);245: ylabel(’Slope’); title(’Slope Curve’);
257: function [V,M,Theta,Delta,Reactions]=
258: bmvardep(NoSegs,BeamLength,Force,ExtRamp, 259: EndCond,IntSup,EIdata,BeamProp)
260: % [V,M,Theta,Delta,Reactions]=bmvardep 261: % (NoSegs,BeamLength,Force,ExtRamp,EndCond, 262: % IntSup,EIdata,BeamProp)
263: % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~264: %
265: % This function computes the shear, moment,266: % slope, and deflection in a variable depth267: % elastic beam having specified end conditions,268: % intermediate supports with given
269: % displacements, and general applied loading,270: % allowing concentrated loads and linearly271: % varying ramp loads.
272: %
273: % NoSegs - number of beam divisions for
275: % BeamLength - beam length
276: % Force - matrix containing the magnitudes
279: % ExtRamp - matrix containing the end
282: % EndCond - matrix containing the type of
Trang 31285: % left or right ends
286: % IntSup - matrix containing the location
288: % EIdata - either EI or depth values
289: % BeamProp - either null or beam widths
290: %
294: % Delta - vector of deflection values295: % Reactions - reactions at interior supports296: %
297: % User m functions required:
298: % oneovrei, extload, sngf, trapsum
299: 300:
% -301: if nargin < 8, BeamProp=[]; end
302: % Evaluate function value coordinates and 1/EI303: x=linspace(0,BeamLength,NoSegs)’;
304: kk=oneovrei(x,EIdata,BeamProp);
305:
306: % External load contributions to shear and307: % moment interior to span and at right end308: [ve,me]=extload(x,Force,ExtRamp);
309: [vv,mm]=extload(BeamLength,Force,ExtRamp);310:
311: % Deflections and position of interior supports312: ns=size(IntSup,1);
Trang 32330: % slope/deflection at the right end
331: ss=smat(NoSegs,ns+3); yy=ymat(NoSegs,ns+3);332:
333: % Equations to solve for left end conditions334: % and internal reactions
335: ns4=ns+4; j=1:4; a=zeros(ns4,ns4);
336: b=zeros(ns4,1); js=1:ns; js4=js+4;
337:
338: % Account for four independent boundary
339: % conditions Usually two conditions will be340: % imposed at each end.
Trang 33375: % are affected by end conditions, external
376: % loads, and support reactions.
406: end
407:
408: %=============================================409:
Trang 34420: % of shear, moment, slope and deflection all421: % equal zero when x=0.
422: %
424: % Force - concentrated force matrix
425: % ExtRamp - distributed load matrix
Trang 35465: end
466: end
467:
468: %=============================================469:
477: %
479: % EIdata - EI or depth values
480: % BeamProp - null or width values
% -487: if size(EIdata,1) < 2 % uniform depth case488: v=EIdata(1,1);
Trang 36510: % User m functions required: none
511: 512:
% -513: if nargin < 3, n=0; end
514: x=x(:); nx=length(x); x0=x0(:)’; n0=length(x0);515: x=x(:,ones(1,n0)); x0=x0(ones(nx,1),:); d=x-x0;516: s=(d>=zeros(size(d))); v=d.*s;
538: %
539: % a,b - limits of integration
540: % y - integrand that can be a vector-valued
548: % n - the number of function values used to
552: %
553: % v - integral value
554: %
Trang 37555: % User m functions called: none
556: 557:
% -558: if isstr(y)
559: % y is an externally defined function
560: x=linspace(a,b,n)’; h=x(2)-x(1);
561: Y=feval(y,x); % Function values must vary in
565: m=size(Y,2);
566: else
567: % y is column vector or a matrix
568: Y=y; [n,m]=size(Y); h=(b-a)/(n-1);
575: % function y=lintrp(xd,yd,x)
576: % See Appendix B
Trang 38Chapter 12
Applications of Analytic Functions
12.1 Properties of Analytic Functions
Complex valued functions of a single complex variable are useful in various ciplines such as physics and numerical approximation theory The current chap-ter summarizes a number of attractive properties of analytic functions and presentssome applications in which MATLAB is helpful Excellent textbooks presenting thetheory of analytic functions [18, 75, 119] are available which fully develop varioustheoretical concepts employed in this chapter Therefore, only the properties whichmay be helpful in subsequent discussions are included
dis-12.2 DeÞnition of Analyticity
We consider a complex valued function
F (z) = u(x, y) + iv(x, y) , z = x + iy
which depends on the complex variable z The function F (z) is analytic at point z if
it is differentiable in the neighborhood of z Differentiability requires that the limit
exists independent of how|∆z| approaches zero Necessary and sufÞcient conditions
for analyticity are continuity of the Þrst partial derivatives of u and v and satisfaction
of the Cauchy-Riemann conditions (CRC)