I want to initiate dynamic analysis of truss structure to optimize its weight. Initial reading explore that it need natural frequencies. But I could not found how to get it. Could you please suggest or if possible share related materials?
Thje common way is to use the fintie element method to get the mass and stiffness matrices of the truss and solve an eigenvalue problem. This can be done by your own code in Matlab or using a commercial structural analysis software package (Nastran, Ansys and Abaqus, etc.)
Thje common way is to use the fintie element method to get the mass and stiffness matrices of the truss and solve an eigenvalue problem. This can be done by your own code in Matlab or using a commercial structural analysis software package (Nastran, Ansys and Abaqus, etc.)
Both Mr. Seyedpoor and Mr. Ouyang are correct. Mr. Tejani you can find some examples on how to carry out a truss analysis in some books of Finite Element Analysis (FEA). In general they use this kind of example to show how finite element (FE) matrix are obtained. This may help you to implement your own FE code. ANSYS and Nastran are good options if you intend to use commercial softwares.
I have already done truss topology optimization (TTO) using some advance optimization methods & FEA code. In which, I have considered stress, displacement, buckling, kinematic stability as constraints to get size, shape & topology optimum structure. And two research papers based on this are in communication with good journals.
Now I want to add dynamic constrain in TTO, for that I gone through many research papers. Yet I could not get clear idea to find first three principle natural frequencies
I don't know TTO well. However, if you want to obtain the natural frequencies using FE model, you just use matlab function such as "eig(K, M)". Here, K and M are stiffness and mass matrices, respectively.
If your FEA code is fortran or C, you should find eigenvalue solver. Intel fortran compiler offers MKL library which has powerful eigenvalue solver. ARPACK or LAPACK that are freewares may have it also.
A linear static analysis requires the stiffness matrix of the truss and the load vector. Free vibration analysis will require the stiffness matrix as well as the mass matrix. Natural frequencies and mode shapes are then obtained by solving the eigenvalue problem [K]-1 [M] {X} = (1/w2) {X} where [K] is the stiffness matrix, [M] is the mass matrix and {X} is the mode shape vector. Eigenvalues are the roots of the characteristic equation of the dynamic matrix [D] = [K]-1 [M], that is, determinant of dynamic matrix |D| = 0. Roots are the eigenvalues and are equal to (1/w2). Frequencies are obtained as w = sqrt(1/eigenvalue). Each eigenvalue has an associated eigenvector. Please refer S.S. Rao, Mechanical Vibrations for the underlying theory. Refer Weaver and Gere, Matrix Analysis of Framed Structures for linear static analysis. Assembling the mass matrix [M] is an extension of assembling [K].
There is a simple way to get the natural frequencies of any structure using ABAQUS and the related mode shapes with eigenvalues ,if you need more details I can help you.......Regards
If it is fairly uniform and simply supported, then you can estimate the frequency as 18 / sqrt( d ), where "d" is the maximum dead load deflection in millimetres. Otherwise, if you want more accuracy, you can create a model in any standard piece of structural software and do an eigenvector or ritz vector analysis.
For a unidimensional displacement a 2node Lagrangian link/bar finite element has K=EA/L*[1 -1; -1 1] and M=int(rho*Ni*Nj*Jacob*ds)= rho*A*L/6*[2 1; 1 2] as may be seen at http://what-when-how.com/the-finite-element-method/fem-for-trusses-finite-element-method-part-1/
For bi- or tri- dimensions apply a coordinate transformation using matrix T like in M'=transpose(T)*M*T. It is also explained at mentioned web page. Then solve sqrt(eig(K,M)) which gives the natural frequencies associated with axial modes of the elements of the truss.
An advice: with a bar (link) finite element you neglect all non-axial modes (of each bar) and assume links/terminations between/of bars as articulated/pinned. You can model all it as beams but except if care to be otherwise then links will be modelled as rigid connections which neglect the freedom of a pinned connection. In some cases after check with thin beam elements I got first frequencies a little upper than with bar element but could also be quite different.
I underline the advice because optimization will drive you for the optimum in the model which may not be the same in the reality. For example, if you optimize for mass a column under a force or self-weigth it will drive you to buckling problem which usually is not in the model or under consideration. Also, if you will use gradients be care to look at repeated eigenvalues problem as optimization most probably will drive you to there.
Mr. Tejani, I have seen you typed in a previous answer that natural frequency is sqrt(eig(M,K)). This is not completely wrong once you are dealing with a non-dissipative (conservative) system. If you take a look in the format of any eigenvalue extracted from a dynamic system (now with conservative behaviour) you are going to see that natural frequency is not rigorously sqrt of this eigenvalue but the norm of this one. I am just telling you this in case you intend to use your code for another system than just a conservative one.
If you are using Matlab the following code should get you the eigenvalues and modeshapes, assuming you have already assembled the stiffness matrix [K] and mass matric [M]:
D = inv(K)*M;
[X, L] = eig(D); % X = eigenvectors, L = diagonal matrix containing eigenvalues
L = diag(L); % extract values on the main diagonal of L
W = 1 ./ sqrt(L); % Elementwise inversion of square roots of elements of L
You can use almost the same code (except the last line, use W = 1 / np.sqrt(L) without the dot behind the /) if you are using Python. You will have to import numpy and function eig from scipy.linalg as follows:
import numpy as np
from scipy.linalg import eig
numpy provides the n-dimensioned array implementation to create [K] and [M]. Function eig() is defined in SciPy submodule linalg.
.I solved as per your method but I got natural frequencies as too much higher. And It should be noted that I am getting same total mass & deflection. So I think there is no other error.
Here is a Matlab code I developed for solving your problem.Attached is a pdf file explaining how the data for the computer is obtained. The geometry of the truss whose data is used in the program is shown in the pdf file. A Matlab script file "trussfreq.m" is also attached. Simply transfer this script file into the work directory of Matlab. Type trussfreq on the Matlab command prompt to get the program running. To solve your own problem replace the data in the script file with those for your own truss. The masses have been lumped at the nodes in order to obtain a classical eigen value problem. If an external dead load + imposed load, P, is applied at a node it should be converted to mass using m = P/g.
% Save the attached file "trussfreq.m" in work directory of Matlab
% Run it by typing trussfreq on Matlab's command prompt.
% Matlab program for frequency analysis of truss
% Em = Young’s modulus
% ne = no of elements; nn = no of nodes
% nsup = number of support freedoms
% ea = vector of node numbers at left ends of elements
% eb = vector of node numbers at right ends of elements
% x, y are vectors of coordinates of nodes
% In the given example ne = 13 and nn = 8
Em = 2000;
ne = 13; nn = 8; ndof = 2*nn ; nsup = 3;
% create the square matrix Kg of size ndof
Kg = zeros(ndof);
ea = [1 1 2 2 2 3 4 4 5 5 6 6 7 ] ;
eb = [2 3 3 4 5 5 6 5 6 7 7 8 8 ] ;
x = [ 0 5 5 10 10 15 15 20 ] ;
y = [ 0 0 4 0 4 0 4 0] ;
% Give ratios of areas of cross section of the elements.
A = [1 2 1 1 2 1 1 1 2 1 1 1 2] ;
% Obtain the actual areas.
A = 10*A ;
% create vectors of support freedoms.
% At support i, hor freedom = 2*i – 1, vertical freedom = 2*i. sup = [ 1 2 16];
% Give ratios of lump masses.
Mass = [1 1 10 10 2 2 10 10 2 2 10 10 2 2 2 2];
% Obtain the actual lumped mass values for all the nodes.
I have examined this same problem and discovered that you are more than right. my answers differ more greatly with your own and Kaveh and Zolghadr's. I am attaching a Matlab code for this problem so that you could see whether all my data and steps are in order.
Using Eq, 1 (Consistent mass matrix) I obtained the frequencies f = 11.808, 17.261, 29.181, 29.256, 32.891, 33.529, 47.409, 48.771
Using Eq, 3 (Lump mass matrix) I obtained the frequencies f = 11.277, 16.904, 28.446, 28.558, 30.157, 30.623, 44.771, 45.965
thus instead of a fundamental frequency of 7.0 my own program gave me 11.277 or 11.808. Something is wrong somewhere and I would want to know what it is!
Depending on the lumped mass or the consisitent mass in FEM, the natural frequency will be different. Which mode number is 19.98Hz in your model. The frequency in the 3rd or 4th mode is almost same as the result . calculate the mass of each truss member using material density and the cross sectional area and length. Then the mass can be divided to each D.O.F where the truss member is connected. In other words, 1/2 of the mass is just added to particular nodal mass like you added non structural mass .