This directory contains Matlab(R) code for obtaining the eigenvalues and the eigenmodes of a Timoshenko beam.
The file example_chebfun_for_eigVals_and_eigModes.m includes an example that illustrates how to use the code and plot the results.
The user must download and point the .m files to the location of the chebfun package (http://www.chebfun.org/).
Some of the unique features of this algorithm is that the user does not need to specifiy a mesh for discretizing the beam whether for root finding, or plotting/finding the eigenmodes.
The chebfun representation adatively finds the optimal represenation of the characterisitic function and the eigenmodes within machine precision.
The user also needs to define a structure sys that holds the system parameters which include:
% beam parameters
sys.par.A: cross-sectional area of the beam
sys.par.I: mass moment of area of the beam
sys.par.L: length of the beam
% algorithm options:
sys.numStable: logic flag, if true, use numerically stable expressions, if false, use conventional (ill-conditioned) expressions
sys.MaxMode: the suprememum of the natural frequency to consider
sys.tol: the tolerance to use when comparing expressions to zero
% optional parameters:
sys.lambda_scale: (optional) a parameter used for scaling the eigvals
sys.norm: (optional) how to normalize the mode shapes. The options are 'mass' for mass orthonormalization, or 'unscaled' for no scaling.
The user must specify the boundary condition. Possible options for the boundary conditions are (case insensitive):
BC = "PP": pinned-pinned
BC = "CF": clamped-free
BC = "CP": clamped-pinned
BC = "PF": pinned-free
BC = "CC": clamped-clamped
BC = "FF": free-free
BC = "PR": pinned-roller
BC = "CR": clamped-roller
BC = "RR": roller-roller
BC = "RF": roller-free
The eigenmodes can be obtained by invoking the call
get_TB_eigVals(sys, BC)
which gives a chebfun representation of the characteristic funciton. The eigevalues can then be obtaind by calling the roots() command on the resulting output:
eigVal_chebfun = get_TB_eigVals(sys, boundary_condition);
The roots in the different regimes can be obtained be unpacking the output and using root() according to:
lambda_LT = roots(eigVal_chebfun{1}); % lambda < alpha
lambda_EQ = roots(eigVal_chebfun{2}); % lambda == alpha
lambda_GT = roots(eigVal_chebfun{3}); % lambda > alpha
% put the resulting eigenvalues into a cell array
eigVals_cell = {lambda_LT, lambda_EQ, lambda_GT};
The eigenmodes can then be obtained using:
cc = get_TB_eigModes(sys, boundary_condition, eigVals_cell);