This directory contains Matlab(R) code for obtaining the eigenvalues and the eigenmodes of an Euler-Bernoulli beam.
The file example_EB_eigProb_solutions.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
% non-dimensional parameters:
sys.par.alpha: the value of non-dimensional parameter alpha=A*L^2/I
sys.par.T: non-dimensional time scaling factor T_E= L*sqrt(rho/E), where rho is the mass density, and E is the modulus of elasticity
% 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_EB_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_EB_eigVals(sys, boundary_condition);
The roots can be obtained using root() according to:
lambda_vec = roots(eigVal_chebfun);
While the corresponding physical natrual frequencies can be obtained according to:
omega_physical = sqrt(lambda_vec)/T; % where T is non-dimensional time scaling factor stored in sys.par.T