You are on page 1of 14

Structural Dynamics: Coursework

Salvatore Maraniello (CID: 00665685)


Department of Aeronautics
Imperial College London
email: salvatore.maraniello10@imperial.ac.uk
Due date: 17 Dec 2010
Contents
1 Modeling the System 2
1.1 Kinetic Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Strain Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Lagranges Equations . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Natural Modes 4
2.1 Analytical Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Comparison between Numerical and Analytical Results . . . . . . . 5
3 Response to Axial Load 9
3.1 Pre-analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Eect of the A-Dimensional Time . . . . . . . . . . . . . . . . . . 9
3.3 Eect of Time Step . . . . . . . . . . . . . . . . . . . . . . . . . . 10
A Numerical Codes 12
A.1 axelMKfun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
A.2 newbetasol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1
1 MODELING THE SYSTEM S. Maraniello
1 Modeling the System
To model the discrete system, Lagranges equation must be applied; therefore,
the kinetic and strain energies T and K must also be computed.
N being the total number of elements, we will set i 1 and i to be the left and
right nodes of the i th element used to discretize the beam. Each element has
a length of l = L/N, with L total length of the bar. The expressions for T and K
will be derived as follows.
1.1 Kinetic Energy
The system has been modeled with concentrated masses at the nodes; each
mass has been set equal to:
m
c
=
M
tot
N
=
mL
N
with m linear density of the bar.
The displacement being described into an inertial frame and considering that
the system only admits displacements u
i
in the x direction, the total kinetic energy
will simply be:
T =
N

i=1
T
i
=
1
2
m
c
N

i=1
u
2
i
with T
i
amount of kinetic energy related to the i-th mass.
1.2 Strain Energy
Having each element stiness equal to
k =
EA
l
the total strain energy is:
U =
N

i=1
U
i
=
1
2
k

u
2
1
+
N

i=2
(u
2
i
u
2
i1
)

in which the rst amount of energy U


1
is only dependent by the displacement of
the rst node u
1
due to the fact that the bar is clamped at x = 0.
1.3 Lagranges Equations
The general form of Lagranges equation is:
d
dt

T
u
i

T
u
i
+
U
u
i
+
D
u
i
= Q
i
(1)
Q
i
being the nodal force acting on the node i and D an expression for the dissipation
of the system. In this model, no damping was considered (D = 0), while only the
N-th node is loaded with a force F(t),
2
1 MODELING THE SYSTEM S. Maraniello
In our specic case, the derivatives in eq.1 assume the following expressions:
d
dt

T
u
i

= m
c
u
i
U
u
i
=

k(2u
i
u
i+1
) i = 1
k(u
i1
+ 2u
i
u
i+1
) i = i = 2, N 1
k(u
i
u
i+1
) i = N
This allows us to express the system in the form:
M u +Ku = Q (2)
with Q, M and K dened as follows:
M = m
c
I, I identical matrix
K =
EA
l

2 1 0 . . . 0 . . . 0
1 2 1 0 . . . . . . 0
0 1 2 1 0 . . . 0
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 . . . 0 1 2 1 0
0 . . . . . . 0 1 2 1
0 . . . 0 . . . 0 1 1

(3)
Q =

0
0
.
.
.
0
F(t)

3
2 NATURAL MODES S. Maraniello
2 Natural Modes
2.1 Analytical Solution
The dierential equation governing the free undamped axial vibrations of a bar
in the continuum is:
EA
m

2
u
x
2
=
u
t
(4)
with boundary conditions:
u(x = 0) = 0 , clamped edge at x = 0

u
x

x=L
= 0 , free edge at x = L (5)
In order to nd the natural modes and frequencies of vibration, we set the solution
to be of the form:
u(x, t) = Re

(x)e
jt

with (x) generic mode and related frequency. We get that the solution must
satisfy the relation:
EA
m

x
2
=
2
(6)
This last equation suggests a relationship between the physical parameters of the
bar (E, A, L, m) and the time frequency ; in order to establish it, we can introduce
the following dimensionless variables:

x =
x
L
=

=

L

EA
mL
2

x
2
=
2
o

2

(7)
If the reference frequency
o
is set to be:

2
o
=
EA
mL
2
(8)
the equation eq.6 reduces to:

x
2
=
2

(9)
An expression of the non-dimensional displacement

( x) is found by searching for
a solution of the form:

( x) = Asin(t x) +Bcos(t x)
that substituted into eq.9 leads to:
t
2
=
2
and imposing the boundary conditions to be satised for others then the trivial
solution

( x) = 0:

( x = 0) B = 0

( x = 1) = 0 , A = 0
2
n
=

2
+(n 1) n = 1, 2, ...
4
2 NATURAL MODES S. Maraniello
Therefore the axial dimensionless modes
1
and frequencies of vibration of the bar
are:

n
x = sin(
n
x)

n
=

2
+(n 1) n = 1, 2, ... (10)
Recalling the relationship in eq.7, the dimensional modes are found:
x = sin(
n
x
L
)
=
n

o
(11)

n
=

2
+(n 1) n = 1, 2, ...
The procedure just described applies identically to the discretised problem; more-
over, it shows the possibility to analyse the problem itself in dimensionless terms.
2.2 Comparison between Numerical and Analytical Re-
sults
In complete analogy with the continuum problem analysed in sec.2.1, the natural
modes and frequencies of the discrete model are found by setting the solution of
the eq.2 to be of the form:
u = Re

fe
jt

This leads to the solution of the eigenvalues-eigenvector problem:


(
2
M +K)f = 0
Even in this case, it is more eective to analyse the problem in dimensionless terms;
looking at the form of the M and K matrices (eq.3), it can be easily seen that the
same relationships in eq.7 and 9 can be used to non-dimensionalize the system.
In order to reproduce as well as possible in the discrete eld the behaviour of
the continuum model, two main point are worth considering:
the continuum model has an innite number of natural modes, while the
discrete model can only reproduce up to N modes;
in the discretization process, we must ensure that the modes that are supposed
to be more excited will be well reproduced. These change from one case to
an other in relation to the frequency content of the external forces acting on
the system.
Seen in the previous section that the axial modes of the bar are sinusoidal curves,
a mesh adequate to discretize a certain mode should have at least 4 elements for
each of its wave (see g.1); tab.1 shows the minimum number of elements required
to discretize the rst 5 modes of the bar by looking at the dimensionless wave length

n
= 4/(2n 1) of the modes themselves.
A comparison between the rst 5 modes of the numerical and analytical models
(g.2-6) has been made considering 3 dierent discretisations (N = 5, 9, 20). With
reference to tab.1, we can see that with N = 5 we conserve in the discrete model
1
The modes have been here normalized to give the maximum displacement equal to 1;
5
2 NATURAL MODES S. Maraniello
Figure 1: Minimum number of elements necessary to reproduce a wave;
Mode
n
N
min
1 4 1
2 4/3 3
3 4/5 5
4 4/7 7
5 4/9 9
Table 1: Minimum number of element necessary to discretise the rst 5 modes;
the rst 3 modes, while we lose the modes 4 and 5 (for which a higher number of
elements than 5 is required). With N = 9, even the shapes of modes 4 and 5 start
to be recognizable; N = 20 was chosen to show that for higher discretizations the
quality of the reproduction of the mode improves.
Of great interest is to look at the natural frequencies of the modes themselves:
tab.2 shows a comparison between numerical and analytical natural frequencies.
Mode N = 5 N = 9 N = 20 Continuum Model
1 1.4231 1.4864 1.5321 1.5708
2 4.1542 4.4187 4.5873 4.7124
3 6.5486 7.2305 7.6156 7.8540
4 8.4125 9.8451 10.5993 10.9956
5 9.5949 12.1911 13.5207 14.1372
Table 2: Dimensionless Natural Frequencies
n
=
n
/
o
of the the rst ve
modes for dierent discretization;
The data show how increasing the discretization, the discrete frequencies tend
toward the continua frequencies; moreover, if the number of elements used are not
enough to reproduce a certain mode, the information about the natural frequency
of that mode is lost (for instance, when N = 5 the information of mode number 5
is completely lost).
Furthermore, it can be seen that the discrete frequencies are always lower then
the continua ones: this is a consequence of how the mass of the system was modeled.
To show this, it can be interesting to notice that the natural frequency of the discrete
system in the case N = 1 (spring-mass system) with natural frequency:

n
=
o
is lower then the natural frequency of the rst mode of the continuum model

n
=

2

o
6
2 NATURAL MODES S. Maraniello
of a factor /2. This dierence being because in the mass spring system all the
mass is concentrated at the edge of the bar, while the analytical model considers
the mass continuously distributed along all the length of the bar. The higher the
discretization chosen, the better the simulation of a continuously distributed mass
will be and the value of the discrete frequencies will rise toward the analytically
predicted values
2
.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
x
L
u
L


Analytical: 1.5708 w
o
N = 5 : 1.4231 w
o
N = 9 : 1.4864 w
o
N = 20 : 1.5321 w
o
Figure 2: 1st mode of axial vibration of a clamped bar: comparison between
analytical and numerical solutions using a N = 5, 9, 20 elements discretization;
dimensionless natural frequencies included in the legend.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
x
L
u
L


Analytical: 4.7124 w
o
N = 5 : 4.1542 w
o
N = 9 : 4.4187 w
o
N = 20 : 4.5873 w
o
Figure 3: 2nd mode of axial vibration of a clamped bar: comparison between
analytical and numerical solutions using a N = 5, 9, 20 elements discretization;
dimensionless natural frequencies included in the legend.
2
To increase the accuracy, a distributed mass model could be used to model the bar;
however, this choice but would lead to full mass matrices in eq.2.
7
2 NATURAL MODES S. Maraniello
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
x
L
u
L


Analytical: 7.854 w
o
N = 5 : 6.5486 w
o
N = 9 : 7.2305 w
o
N = 20 : 7.6156 w
o
Figure 4: 3rd mode of axial vibration of a clamped bar: comparison between
analytical and numerical solutions using a N = 5, 9, 20 elements discretization;
dimensionless natural frequencies included in the legend.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
x
L
u
L


Analytical: 10.9956 w
o
N = 5 : 8.4125 w
o
N = 9 : 9.8451 w
o
N = 20 : 10.5993 w
o
Figure 5: 4th mode of axial vibration of a clamped bar: comparison between
analytical and numerical solutions using a N = 5, 9, 20 elements discretization;
dimensionless natural frequencies included in the legend.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
x
L
u
L


Analytical: 14.1372 w
o
N = 5 : 9.5949 w
o
N = 9 : 12.1911 w
o
N = 20 : 13.5207 w
o
Figure 6: 5th mode of axial vibration of a clamped bar: comparison between
analytical and numerical solutions using a N = 5, 9, 20 elements discretization;
dimensionless natural frequencies included in the legend.
8
3 RESPONSE TO AXIAL LOAD S. Maraniello
3 Response to Axial Load
A Newmark- method was improved in the matlab function newbetasol. Both
the implicit and explicit methods were implemented, but it was here chosen to use
the implicit method because:
the explicit method was found to be very unstable as N was increasing;
the mass matrix is diagonal and its inversion is not computationally prohibitive
(even due to the small size of the system analyzed);
Due to the fact that F
o
mainly contains low frequencies (this could be seen taking
a Fourier transformation), the high frequency modes of the structure will be not
excited and, therefore, a high discretization is not required to have a good quality
response. Here to set N = 20 and the non-dimensional time
o
t = 0.01 is more
than sucient.
Before starting the numerical investigation, some preliminary considerations are
bought to the attention of the reader.
3.1 Pre-analysis
Using some basic results of De Saint-Venant beam theory, it is easy to show
that a bar under an axial steady load of magnitude F
o
= EA has dimensionless
stretching (ie displacement at the tip u( x = 1)) equal to:

x
=
F
o
A
u( x = 1) =
x
=
F
o
EA
= 1
This is the rst thing to take into account while interpreting the numerical results:
the displacement of the bar must tend to this mean value when a steady state is
reached.
From an energetic point of view, when the beam deforms, it stores energy: in
the hypothesis of steady loads and no dissipations, only strain energy is stored; for
a linear elastic material this amount per mass unit equal to:
s =
1
2

x
=
1
2
E
3.2 Eect of the A-Dimensional Time
The three dimensionless times t
o

o
= .01, 1, 10 were taken into account; results
are shown in g.7. It can be seen that in all cases, the dimensionless displacement
u tends to a mean value of 1 as predicted. However, oscillations of increasing
amplitude with the decreasing of t
o

o
appear; some data has been collected in
tab.3.
Transient Steady State
Mean Oscillation A-dimensional
t
o

o
u( x = 1)|
t=t
o
Peak Time Value Amplitude Frequency
0.1 0.0278 2.1300 1 1.9454 1.5250
1 0.4753 2.5500 1 1.5562 1.5325
10 0.9775 11.1500 1 0.2071 1.5325
Table 3: Characteristics of system response for dierent dimensionless times
t
o

o
of the exciting force F(t);
9
3 RESPONSE TO AXIAL LOAD S. Maraniello
0 2 4 6 8 10 12 14 16 18 1
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
t w
o
u/L


t w
o
= 0.1
t w
o
= 1
t w
o
= 10
Figure 7: Eect of the dimensionless time t
o

o
on the response of the bar; the
red lines indicate the chosen characteristic times t
o

o
= 0.1, 1, 10.
This behaviour can be explained from an energetic point of view. As seen in the
previous section, if the loads are static, the energy per unit of mass stored into the
bar after F
o
has been applied is only the strain energy s =
1
2
E. However, in a real
situation, the deformation process is related to a deformation velocity, which means
that every point of the bar will have a nite velocity, higher as the deformation
occurs faster. In other terms, the structure is storing kinetic energy as well as
strain energy. If the model of the bar presents no damping, the kinetic energy will
not be dissipated and this explains the constant amplitude oscillations seen in the
response. It is even easy to understand that the oscillations are higher when t
o

o
is
small because this situation is related to a high speed of deformation, and therefore
to a higher amount of kinetic energy transferred to the structure. When t
o

o
is
high, a situation more similar to a steady load can be observed. In this last case
it can be even seen that the structure follows more the force F
o
: when t = t
o
the
displacement at the tip of the bar is already the 97.8% of the mean value at the
steady time and the peak time occurs not much later (tab.3).
A last parameter to observe is the frequency of the oscillation at the steady
time: it is almost identical in all the three cases ( 1.523) and it is not a case
that it is equal to the natural frequency of the rst mode in the discretization with
N = 20 elements (tab.2). The meaning of this behavior lies in the nature of the
excitation F
o
, which does not contain high frequencies: therefore, almost all the
kinetic energy is stored in the rst mode of axial vibration of the bar
3
.
3.3 Eect of Time Step
As seen in the previous section, what characterizes the behavior of the response
is the a-dimensional time t
o

o
; therefore, is logical to infer that the step t for the
time discretization must be chosen looking at the dimensionless time scale of the
3
For the sake of precision, it can be noticed that in the case t
o

o
= 0.1 the frequency of
vibration at the steady state is slightly higher then in the other cases. Looking at the related
response in g.7, it is possible to see that the vibration of the second mode is starting to be
recognizable. This conrms that if the force F
o
is applied in a short time, higher frequency
modes start to be excited.
10
3 RESPONSE TO AXIAL LOAD S. Maraniello
problem. From now on, therefore, we will talk of a-dimensional time step t
o
.
For a linear system, a Newmark- stability analysis leads to the conclusion that
the time step should be much smaller than the period of vibration of the highest
frequency mode: in fact, if instability occurs, this will be the rst to become unsta-
ble. In the 20 discrete elements system used in in this section, the highest frequency
mode included in the modal base has natural frequency
20
and a-dimensional pe-
riod of vibration T
20

o
equal to:

20
= 39.88
o
T
20

o
= 0.1575
Therefore, the dimensionless time step should in general satisfy the condition t
o

T
20

o
.
A comparison between the values t
o
=0.01, 0.1 and 1 was made, in order to
show the dierent behavior of the response. It can be seen that up to t
o
= 0.1
the quality of the response is satisfactory. For t
o
= t
o

o
, instability is not
observed (the total time of the simulation is small, and moreover the external force
here considered does not really excite the higher frequencies), but the response is
badly reproduced, with total loss of the information about the amplitude of the
oscillation at the steady time. This underlines the necessity of taking a temporal
step small enough to reconstruct with sucient accuracy the characteristic temporal
waves of the problem.
0 2 4 6 8 10 12 14 16 18
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
t w
o
u/L


t w
o
= 0.01
t w
o
= 0.1
t w
o
= 1
Figure 8: Eect of the dimensionless time step t
o
on the response of the bar
for t
o

o
= 1 and N = 20;
11
A NUMERICAL CODES S. Maraniello
A Numerical Codes
Two matlab codes were written to accomplish the tasks of the work: the function
axelMKfun (sec:A.1) creates the matrices of the system, and is therefore specic for
the problem analysed in the coursework, while the function newbetasol (sec.A.2)
can be applied to solve a general linear system using the explicit or implicit Newmark-
method. The modes of the structure where instead found simply by using the
matlab built in function eigs:
[V,D]=eigs(K,M,N);
A.1 axelMKfun
function [M,K]=axelMKfun(L,N,EA,m)
% function [M,K]=axelMKfun(L,N,EA,m)
%
% The function creates the Mass and Stiffness Matrices for a logitudinal
% equilibrium analysis of a beam. The beam will be uniformely discretized
% into N elements with concentrated masses at the nodes and only longitudinal
% stiffness.
% The i-th element will be connected to the nodes i-1 and i;
%
% Input:
% L : beam length;
% N : number of elements of the discrete model;
% EA: axial stiffness of the beam;
% m : linear density of the beam;
%
% Output:
% M: Mass Matrix (Diagonal);
% K: Stiffness Matrix (Tridiagonal);
% ----------------------------------------------
% Constants:
lel=L/N;
kel=EA/lel;
mel=m*lel;
% Allocation:
e = ones(N,1);
M = spdiags(mel*e,0,N,N);
e = kel*e;
K = spdiags([-e 2*e -e], -1:1, N, N);
K(N,N)=kel;
return
A.2 newbetasol
function rd=newbetasol(M,K,Qfun,ro,dro,dt,T,g,b,mode,istore)
% function rd=newbetasol(M,K,Qfun,ro,dro,dt,T,g,b,mode,istore)
%
% The function solves a linear undamped system:
% M r + K r = Q
% with Intial Conditions:
% r(tv(1)) = ro;
% r(tv(1)) = dro;
% over the time domain defined by the vector 0:dt:T.
% Qfun is the handle to function of the nodal forces acting on the system.
% The output of Qfun must be a vector of the N - equal to the dof of the
% system - component;
%
% The Newmark-beta algorithm with coeff. defined by g and b is used.
% Both the implicit (mode = impl) and explicit (mode = expl) form of
% the method are avaible.
%
% The algorithm presents some choised specific for a system:
% 1: modelled with concentrated masses (M diagonal);
% 2: supported against all rigid body motions (K positive definite);
12
A NUMERICAL CODES S. Maraniello
% The implicit algorithm could fail for unsupported system.
% The M and K matrices should be sparses in order to have the best
% performances in terms of speed and memory usage.
%
% Other Inputs:
% istore containes the indeces of the nodes where the displacements are
% required to be stored. If not passed, the displacements of all nodes will
% be stored.
%
% Output:
% rd: displacements at the nodes istore for the time steps 0:dt:T;
% -------------------------------------
%% Initial Checks:
switch nargin
case 9
istore = (1:length(ro)).;
case 8
mode = impl;
istore = (1:length(ro)).;
case 7
g = .5; b = .25;
mode = impl;
istore = (1:length(ro)).;
case 6
g = .5; b = .25;
mode = impl;
istore = (1:length(ro)).;
end
if nargin < 6
error(Unsufficient Input!)
end
ro=ro(:);
dro=dro(:);
%% Solver:
tv=0:dt:T;
rd=zeros(length(istore),length(tv));
rd(:,1)=ro(istore);
% Some Parameters:
Nt=length(tv);
dts=dt^2;
omgdt =(1-g)*dt;
gdt=g*dt;
ohmbdts=(.5-b)*dts;
bdts=b*dts;
% Newmark-Beta Method:
switch mode
case expl
Mi=inv(M);
MK=Mi*K;
ddro = Mi*Qfun(tv(1)) - MK*ro;
for ii=2:Nt
ddr = Mi*Qfun(tv(ii)) - MK*ro;
dr = dro + omgdt*ddro + gdt*ddr;
r = ro + dt*dro + ohmbdts*ddro + bdts*ddr;
% Storing Data:
rd(:,ii) = r(istore);
13
A NUMERICAL CODES S. Maraniello
% Updating:
ro = r;
dro = dr;
ddro = ddr;
end
case impl
L = chol(M + bdts*K,lower);
% ps: for supported system M + b*dt^2 * K is positive definite;
Lt = L.;
ddro = M\Qfun(tv(1)) - M\K*ro;
% ps: for M diagonal this operation in computationally cheap;
for ii=2:Nt
ddr = Lt\(L\Qfun(tv(ii))) - Lt\(L\(K*( ro + dt*dro + ohmbdts*ddro)));
dr = dro + omgdt*ddro + gdt*ddr;
r = ro + dt*dro + ohmbdts*ddro + bdts*ddr;
% Storing Data:
rd(:,ii) = r(istore);
% Updating:
ro = r;
dro = dr;
ddro = ddr;
end
end
return
14

You might also like