Professional Documents
Culture Documents
Natural Frequency C Program
Natural Frequency C Program
Natural Frequency C Program
qid=95399
thread384-95399
Since there is no response to Thread384-95346 , I would like to re-ask my question in a simpler form:
We have a cantilvered steel beam of length L with weight W2 at distance "a" from the cantilevered end.
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
if the base is truly fixed (not always correct), the spring rate is
k = (3 E I) / (L^3)
E = elastic modulus
I = section moment of inertia
L = length
If the weight of the beam is negligible compared to the weight at the end, you can just use the mass at the end and the spring
rate to calculate the first bending mode natural frequency.
The next iteration would be to add 25% of the beam mass to this calculation.
daveleo
1 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
I have a paper that derives formulas for various beam configurations, including a mass mounted on the end of a cantilever
beam.
Tom Irvine
Email: tomirvine@aol.com
www.vibrationdata.com
hello again
after reading tomirvine's reply, i recalled that about a year ago i posted a small program to calculate beam frequencies (with
distributed mass, *but no lumped mass* ) on this website...
http://www.heat-synch.com/Beams/Beams.html
if you click on the image there you should be able to downlaod the executable file.....no instructions....but it should be pretty
clear.
daveleo
He has solutions for simply supported beams with offset mass loading, but not cantileverss.
Cheers
Greg Locock
I would go about it using the following approximate method. I would treat it as a two degree of freedom system, with two
masses and two springs, as in Blevins table 6-2 case 3. I would solve for the lowest frequency - which means taking the
negative sign in Blevins formula. I would choose the values of the first mass and spring (closest to the encastre support) such
that they formed a lumped mass equivalent of the case in Blevins table 8-8 case 2. I would choose the values of the second
mass and spring such that they formed a lumped mass equivalent of Blevins table 8-1 case 3. Whether this will come out
anything like the solution given in Thread 384-95346, I don't know, but I doubt it. It does look as if it might have been derived
from a superposition method vaguely like mine however.
there are several approximate methods that work: dunkerley's, rayleighs, and of course finite element.
It is time to wrap up this thread. Here is the formula for a cantilever beam with a mass attached to the free end.
where
E = elastic modulus
I = area moment of inertia
rho = mass/length of beam
L = length
m = end mass
2 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
Tom Irvine
www.vibrationdata.com
Yes, that equation can be found in numerous places. But that wasn't the original question as I understand it. The mass is only
part way along the beam !
EM is correct. Beam with mass on the end is found several placed. I am looking for beam with mass attached at some point
along the beam.
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
Actually, tomirvines equation is the same as one of the ones I quoted from Blevins, ie table 8-8 case 2. Adding on the extra
piece of beam, (table 8-1 case 3) has the effect of reducing the natural frequency, and if the extra piece is very long compared
to the first piece, there will be two distinct and significant natural frequencies - one where the extra piece moves in phase with
the Mass, (corresponding to taking the minus sign in the first equation) and a second higher one where it moves in antiphase.
My method is not without difficulties, however, since strictly you need to find a way to take into account the fact that the slope
at the end of the basic beam and mass must be matched to the added-on piece. Probably can be done though. Thought
somebody might have spotted that and jumped on me.
My understanding of Raleigh's method is equate kinetic energy to potential energy. It requires an assumption on the deflection
profile of the beam.
Can I assume for this purpose that the beam (with weight) is deflected in the same manner it would statically deflect under the
influence of gravity?
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
Yes, if you're doing Rayleigh's method, that's generally the assumption you have to make, at least initially.
Much better to use Rayleigh Ritz, using two different curves with an abitrary weighting between them, then differentiate
frequency wrt to the weighting factor to find the weighting that gives the minimum frequency.
Another possible method is to use the theory of receptances, which describes how to work out the combined properties of two
simple systems, but I am not at all confident that it would work in this case. I'd guess you could consider the separate systems
as being a cantilever with a weight on its tip, and another cantilever with its base being moved vertically and rotated. Ug.
Of course for a specific case an FE model is the easiest method, if the least satisfying.
Cheers
Greg Locock
I just wrote a program using the finite element method to find the natural frequency of a cantilever beam with an added mass
at a user-defined length along the beam.
Tom
3 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
Tom,
I just joined after spotting the thread on the cantilever beam natural frequency. I could use the program you developed to help
design a dynamic simulator to replicate various frequency responses of satellite structures. I am looking for a easy to use tool
to determine the configuration of a cantilever beam with moveable mass that will produce frequencies in the range of 18 to 60
Hz for various mass loadings. Thanks
Tom
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
#include <math.h>
void enter_data(void);
void files(void);
void nearest_node(void);
void bc(void);
void symmetry(void);
void global1(void);
void print_global_before_BC(void);
void local(void);
void inverse_iteration(void);
void iteration(void);
void interactive(void);
void inverse_iteration(void);
void kshift(void);
// ********************************************************************************
// ********************************************************************************
long i,ii,ij,ik,j,jj,jk,k,kk;
long m,n,ne,nn;
4 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
int apply;
int iflag;
int nx;
int ipm;
double aa,ah,aj,aq;
double ajl;
double ccc;
double det;
double eigen;
double kd;
double mc;
double length,inertia;
double modulus,mpv,area,mpl,h,load;
double length_mass,cm;
double scale;
double shift=0.;
double x,xx;
double kl[5][5],ml[5][5];
double kg[MAX][MAX],mg[MAX][MAX],gmg[MAX][MAX];
double a[MAX][MAX];
double xi[MAX];
double bb[MAX];
double ac[MAX][MAX];
double ww[MAX];
double b[MAX];
FILE *pFile[20];
char filename[5][20];
void main()
{
enter_data();
5 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
files();
local();
global1();
// axial_stiffness();
symmetry();
if( ipm==1)
{
printf("\n cm=%12.4g \n",cm);
mg[nx][nx]+=cm;
}
print_global_before_BC();
printf("\n bc \n");
bc();
inverse_iteration();
}
void print_global_before_BC(void)
{
for(i=1; i<=nn; i++)
{
for(j=1; j<=nn; j++)
{
fprintf(pFile[2]," %11.4g",mg[i][j]);
}
fprintf(pFile[2],"\n");
}
6 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
// symmetric
}
void bc(void)
{
// cantilever bc
fclose(pFile[3]);
n=0;
void files(void)
{
strcpy(filename[1],"km.out");
pFile[1]=fopen(filename[1], "w");
7 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
strcpy(filename[2],"kmg.out");
pFile[2]=fopen(filename[2], "w");
strcpy(filename[3],"kmbc.out");
pFile[3]=fopen(filename[3], "w");
strcpy(filename[4],"eigen_data.out");
pFile[4]=fopen(filename[4], "w");
printf("\n");
}
void nearest_node(void)
{
double xr;
long matrix_point=1;
double hh=length/double(ne);
for(i=0;i<=ne;i++)
{
x=i*hh;
xx = fabs( x -length_mass);
nx=matrix_point;
xr=x;
}
matrix_point+=2;
}
8 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
}
void global1(void)
{
i=2*m-1;
kg[i][i] +=kl[1][1];
kg[i][i+1]+=kl[1][2];
kg[i][i+2]+=kl[1][3];
kg[i][i+3]+=kl[1][4];
j=i+1;
kg[j][j] +=kl[2][2];
kg[j][j+1]+=kl[2][3];
kg[j][j+2]+=kl[2][4];
j=i+2;
kg[j][j] +=kl[3][3];
kg[j][j+1]+=kl[3][4];
j=i+3;
kg[j][j] +=kl[4][4];
mg[i][i] +=ml[1][1];
mg[i][i+1]+=ml[1][2];
mg[i][i+2]+=ml[1][3];
mg[i][i+3]+=ml[1][4];
j=i+1;
mg[j][j] +=ml[2][2];
mg[j][j+1]+=ml[2][3];
mg[j][j+2]+=ml[2][4];
j=i+2;
mg[j][j] +=ml[3][3];
mg[j][j+1]+=ml[3][4];
j=i+3;
9 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
mg[j][j] +=ml[4][4];
}
void enter_data(void)
{
printf("\n Enter length (inch)\n");
scanf("%lf",&length);
int imat;
scanf("%d",&imat);
if( imat==1)
{
modulus = 1.0e+07;
mpv = 0.1;
}
if( imat==2)
{
modulus = 3.0e+07;
mpv = 0.28;
}
mpv/=386.;
10 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
load = 0.;
scanf("%d",&ipm);
if(ipm==1)
{
cm/=386.;
nearest_node();
}
mpl=mpv*area;
h=length/double(ne);
// printf("\n h= %12.4g\n",h);
mc=h*mpl/420.;
nn=2 + (ne*2);
n=nn;
}
void local(void)
{
ml[1][1]=156.*mc;
ml[1][2]=22.*mc;
ml[1][3]=54.*mc;
ml[1][4]=-13.*mc;
ml[2][2]=4.*mc;
ml[2][3]=13.*mc;
ml[2][4]=-3.*mc;
ml[3][3]=156.*mc;
ml[3][4]=-22.*mc;
ml[4][4]=4.*mc;
11 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
double kc=modulus*inertia/pow(h,3.);
kl[1][1]=12.*kc;
kl[1][2]=6.*kc;
kl[1][3]=-12.*kc;
kl[1][4]=6.*kc;
kl[2][2]=4.*kc;
kl[2][3]=-6.*kc;
kl[2][4]=2.*kc;
kl[3][3]=12.*kc;
kl[3][4]=-6.*kc;
kl[4][4]=4.*kc;
fclose(pFile[1]);
}
//************************************************************************
void inverse_iteration(void)
{
/*
printf("\n inverse_iteration.cpp, ver 1.1, February 19, 2004");
printf("\n\n by Tom Irvine ");
printf("\n Email: tomirvine@aol.com ");
printf("\n\n This program uses inverse iteration to determine the lowest ");
printf("\n eigenvalue and vector of the generalized eigen problem: \n\n");
printf("\n K - lambda M = 0");
printf("\n\n where K and M are symmetric matrices.");
*/
12 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
interactive();
if(apply==2)
{
kshift();
}
iteration();
}
void iteration(void)
{
double ddd=0.;
// printf("\n initialization" );
for(i=0;i<MAX;++i)
{
xi[i]=double(i);
}
zero_vector(MAX, bb);
zero_vector(MAX, ww);
zero_matrix(MAX, ac);
//*****************************************
long ijkl;
copy_matrix(n, a, kg);
copy_matrix(n, ac, kg);
copy_matrix(n, gmg, mg);
matrix_times_vector(n, b, gmg, xi );
for(i=0;i<n;++i)
{
// printf(" %d ",i );
aq=fabs(a[i][i]);
for(jj=i+1;jj<n;++jj)
{
// printf("\n switching");
ah=fabs(a[jj][i]);
13 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
if(aq<ah)
{
aq=fabs(a[jj][i]);
for(kk=0;kk<n;++kk)
{
ww[kk]=a[jj][kk];
a[jj][kk]=a[i][kk];
a[i][kk]=ww[kk];
}
aj=b[jj];
b[jj]=b[i];
b[i]=aj;
}
}
for(j=i+1;j<n;++j)
{
if( fabs( a[i][i] ) < 1.0e-20 )
{
printf("\n diagonal term %d %d equals zero ",i,i);
exit(1);
}
}
ik=i+1;
for(ii=ik;ii<n;++ii)
{
aa=a[ii][i]/a[i][i];
b[ii]+=-b[i]*a[ii][i]/a[i][i];
for(j=i;j<n;++j)
{
a[ii][j]+=-aa*a[i][j];
if( fabs(a[ii][j]) <1.0e-10)
{
a[ii][j]=0.;
}
}
b[n-1]/=a[n-1][n-1];
for(i=n-2;i>=0;i=i-1)
{
for(k=i+1;k<n;++k)
{
// printf("\n %d %d",i,k);
b[i]+=(-b[k]*a[i][k]);
14 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
}
b[i]/=a[i][i];
}
/***************************************************************/
// xt M x
ccc =sqrt(ccc);
for(i=0;i<n;++i)
{
b[i]/=ccc;
xi[i]=b[i];
}
ddd=0.;
ccc/=ddd;
}
// eigenvector
ccc+=shift;
15 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
h=length/double(ne);
fprintf(pFile[4]," 0. \t 0. \t 0. \n");
k=1;
for(ij=0;ij<n;ij+=2)
{
// printf(" %d %12.5e \n",ij,b[ij]);
fprintf(pFile[4]," %12.5e \t %12.5e \t %12.5e \n",k*h,b[ij],b[ij+1]);
k++;
}
}
void interactive(void)
{
apply = 1;
shift = 0.;
}
void kshift(void)
{
for(i=0; i< n; i++)
{
for(j=0; j<n; j++)
{
kg[i][j]-= shift*mg[i][j];
}
}
// *************************************************************************************
for(i=0;i<nd;++i)
{
aaa[i]=0.;
for(j=0;j<n;++j)
{
aaa[i]+=bbb[i][j]*ccc[j];
}
}
}
void vector_times_vector(long nd, double *csum, double aaa[], double bbb[])
{
long i;
*csum=0.;
16 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
for(i=0;i<nd;++i)
{
*csum+=aaa[i]*bbb[i];
}
}
void copy_matrix(long nd, double aaa[][MAX], double bbb[][MAX])
{
long i,j;
for(i=0;i<nd;++i)
{
&nb
With this canilevered spring arrangement,vibrating at natural frequency, is there a natural amplitude of vibration? If so what is
the formula?
with all due respect how do you have "cantilever" boundary conditions on satellite structures...
geoffthehammer, no there isn't. If you apply more excitation you'll get a bigger response. You'll almost certainly need to know
the damping as well.
hacksaw, well, a 1 kg mass fixed via a cantilever to a 100 kg satellite is pretty much going to behave like the simple model says.
Cheers
Greg Locock
that is okay as long as you are only focusing on the cantilever tip
Tom:
That's anice simple expression for the mass at the end of the beam, but is the ".2235" constant in any wise dependent on
whether one is using inches, centimeters, meters, pounds, kg, etc.?
Thanks,
RC
Cheers
Greg Locock
Join | Advertise
17 of 18 7/12/17, 4:10 PM
Natural frequency of a cantilevered beam with weight attached. - Mecha... http://www.eng-tips.com/viewthread.cfm?qid=95399
18 of 18 7/12/17, 4:10 PM