Vous êtes sur la page 1sur 22

University of Naples Federico II

Department of Structures for Engineering and Architecture


2-years Master in Structural and Geotechnical Engineering --- 1-year Master in Emerging Technologies for Construction
A.Y. 2014-2015

Earthquake Engineering and Structural Control Course

Homework #4: Numerical Evaluation of Dynamic Response

Giorgio Serino - Full Professor of Structural Engineering

Nicol Vaiana - PhD Student in Structural, Geotechnical and Seismic Engineering


- Master Student in Emerging Technologies for Construction

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

CASE A: SYSTEM SUBJECTED TO EXTERNAL HARMONIC FORCE

Consider the Single Degree of Freedom model with viscous damping shown in Figure 1 and
subjected to an external harmonic force shown in Figure 2.

We want to determine the response of this system to this excitation by the Newmarks
Constant Average Acceleration Method (Noniterative Formulation), implemented by a computer program in Matlab Language.
m=100 Kg

A.1 Determine the peak values of:

k=150 N/m

c=20 Ns/m

Figure 1

- displacement of the system


- velocity of the system

A.2 Plot:

- acceleration of the system

- the time history of displacement, velocity and acceleration of the system


- spring force displacement relation
- damping force displacement relation
- spring force + damping force displacement relation

t
P(t)=p*cos(omega*t)

p=1000 N

omega=4 rad/s

Figure 2

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

CASE B: SYSTEM SUBJECTED TO EARTHQUAKE EXCITATION

Consider the Single Degree of Freedom model with viscous damping shown in Figure 3 and
subjected to an horizontal earthquake excitation shown in Figure 4: the earthquake record
used is the 2002 Gilroy record.

We want to determine the response of this system to this excitation by the Newmarks
Constant Average Acceleration Method (Noniterative Formulation), implemented by a computer program in Matlab Language.
m=100 Kg

B.1 Determine the peak values of:

k=150 N/m

c=20 Ns/m

Figure 3

- relative displacement of the system


0.4

- relative velocity of the system

B.2 Plot:

ag/g

- total acceleration of the system


0

- the time history of relative displacement and velocity and total acceleration

- spring force relative displacement relation


- damping force relative displacement relation
- spring force + damping force relative displacement relation
University of Naples Federico II - Department of Structures for Engineering and Architecture

-0.4

40
t
Gilroy: ag in units of g, 3997 steps, dt=0.01
Figure 4

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

%DYNAMIC SYSTEM PARAMETERS


m=100;
k=150;
c=20;

%Kg
%N/m
%Ns/m

mass
linear spring coefficient
linear dashpot damping coefficient

%EXTERNAL HARMONIC FORCE


T=50;
dt=0.01;
t=0:dt:T;
N=length(t);

%s
%s
%
%

harmonic force duration


time step
time vector
time steps number

%rad/s
%N

forcing frequency
force amplitude

for i=1:N
omega=2;
p=1000;
P(i)=p*cos(omega*t(i));

end

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

%NEWMARK'S CONSTANT-AVERAGE-ACCELERATION METHOD


%INTEGRATION PARAMETERS
alfa=0.5;
beta=0.25;
%INTEGRATION CONSTANTS
a1=1/(beta*dt^2);
a2=1/(beta*dt);
a3=1/(2*beta);
a4=alfa/(beta*dt);
a5=alfa/beta;
a6=dt*((alfa/(2*beta))-1);
%EFFECTIVE STIFFNESS
kroof=a1*m+a4*c+k;
%INITIAL CONDITIONS
u(1)=0;
ud(1)=0;
udd(1)=(P(1)-c*ud(1)-k*u(1))/m;

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

%CALCULATIONS FOR EACH TIME STEP


for i=1:N-1
%INCREMENTAL EFFECTIVE LOAD AT TIME STEP i
dP(i)=P(i+1)-P(i);
dProof(i)=dP(i)+(a2*m+a5*c)*ud(i)+(a3*m+a6*c)*udd(i);
%SOLUTION FOR du AT TIME STEP i
du(i)=dProof(i)/kroof;
%INCREMENTAL VELOCITY AT TIME STEP i
dud(i)=a4*du(i)-a5*ud(i)-a6*udd(i);
%INCREMENTAL ACCELERATION AT TIME STEP i

dudd(i)=a1*du(i)-a2*ud(i)-a3*udd(i);
%STATE OF MOTION AT TIME STEP i+1
u(i+1)=u(i)+du(i);
ud(i+1)=ud(i)+dud(i);
udd(i+1)=udd(i)+dudd(i);
end

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

%PEAK VALUES
umax=max(abs(u))
udmax=max(abs(ud))
uddmax=max(abs(udd))
%PLOTS
%DISPLACEMENT TIME HISTORY

figure
plot(t,u);
xlabel('time [s]');
ylabel('Displacement[m]');
%VELOCITY TIME HISTORY
figure
plot(t,ud);
xlabel('time [s]');
ylabel('Velocity [m/s]');
%ACCELERATION TIME HISTORY
figure
plot(t,udd);
xlabel('time [s]');
ylabel('Acceleration [m/s^2]');

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

%SPRING FORCE - DISPLACEMENT RELATION


for i=1:N
fs(i)=k*u(i);
end
figure
plot(u,fs);
xlabel('Displacement [m]');
ylabel('fs [N]');
%DAMPING FORCE - DISPLACEMENT RELATION
for i=1:N
fd(i)=c*ud(i);
end
figure
plot(u,fd);
xlabel('Displacement [m]');
ylabel('fd [N]');
%SPRING FORCE + DAMPING FORCE - DISPLACEMENT RELATION
f=fs+fd;
figure
plot(u,f);
xlabel('Displacement [m]');
ylabel('f = fs + fd [N]');

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

umax =
6.2312

udmax =
11.127

uddmax =
19.392

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

8
6

Displacement [m]

4
2
0
-2
-4
-6
-8

10

15

20

25
time [s]

30

35

40

University of Naples Federico II - Department of Structures for Engineering and Architecture

45

50

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

15

Velocity [m/s]

10
5
0
-5
-10
-15

10

15

20

25
time [s]

30

35

40

University of Naples Federico II - Department of Structures for Engineering and Architecture

45

50

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

20
15

Acceleration [m/s2]

10
5
0
-5
-10
-15
-20
0

10

15

20

25
time [s]

30

35

40

University of Naples Federico II - Department of Structures for Engineering and Architecture

45

50

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

1000

fs [N]

500

-500

-1000

-6

-4

-2

0
2
Displacement [m]

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

300
200

fd [N]

100
0

-100
-200
-300

-6

-4

-2

0
2
Displacement [m]

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE A

1000

f = fs + fd [N]

500

-500

-1000

-6

-4

-2

0
2
Displacement [m]

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE B

%DYNAMIC SYSTEM PARAMETERS


m=100;
k=150;
c=20;

%Kg
%N/m
%Ns/m

mass
linear spring coefficient
linear dashpot damping coefficient

%EFFECTIVE EARTHQUAKE FORCE


%GILROY
%ACCELERATION TIME HISTORY IN UNITS OF G
%3997
0.01
ACC=load('GILROY.txt');
ag=9.80665*ACC(:,1);
dt=0.01;
T=39.96;
t=0:dt:T;
N=length(ag);

%m/s^2
%s
%s
%
%

horizontal ground acceleration


ground acceleration time step
ground acceleration duration
time vector
time steps number

for i=1:N
P(i)=-m*ag(i);
end

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE B

%NEWMARK'S CONSTANT-AVERAGE-ACCELERATION METHOD


%INTEGRATION PARAMETERS
alfa=0.5;
beta=0.25;
%INTEGRATION CONSTANTS
a1=1/(beta*dt^2);
a2=1/(beta*dt);
a3=1/(2*beta);
a4=alfa/(beta*dt);
a5=alfa/beta;
a6=dt*((alfa/(2*beta))-1);
%EFFECTIVE STIFFNESS
kroof=a1*m+a4*c+k;
%INITIAL CONDITIONS
u(1)=0;
ud(1)=0;
udd(1)=(P(1)-c*ud(1)-k*u(1))/m;

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE B

%CALCULATIONS FOR EACH TIME STEP


for i=1:N-1
%INCREMENTAL EFFECTIVE LOAD AT TIME STEP i
dP(i)=P(i+1)-P(i);
dProof(i)=dP(i)+(a2*m+a5*c)*ud(i)+(a3*m+a6*c)*udd(i);
%SOLUTION FOR du AT TIME STEP i
du(i)=dProof(i)/kroof;
%INCREMENTAL VELOCITY AT TIME STEP i
dud(i)=a4*du(i)-a5*ud(i)-a6*udd(i);
%INCREMENTAL ACCELERATION AT TIME STEP i

dudd(i)=a1*du(i)-a2*ud(i)-a3*udd(i);
%STATE OF MOTION AT TIME STEP i+1
u(i+1)=u(i)+du(i);
ud(i+1)=ud(i)+dud(i);
udd(i+1)=udd(i)+dudd(i);
end

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE B

%PEAK VALUES
umax=max(abs(u))
udmax=max(abs(ud))
uddtmax=max(abs(udd+ag))
%PLOTS
%RELATIVE DISPLACEMENT TIME HISTORY

figure
plot(t,u);
xlabel('time [s]');
ylabel(Relative Displacement[m]');
%RELATIVE VELOCITY TIME HISTORY
figure
plot(t,ud);
xlabel('time [s]');
ylabel(Relative Velocity [m/s]');
%TOTAL ACCELERATION TIME HISTORY
figure
plot(t,udd+ag);
xlabel('time [s]');
ylabel(Total Acceleration [m/s^2]');

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Linear SDF Systems

MATLAB CODE: CASE B

%SPRING FORCE RELATIVE DISPLACEMENT RELATION


for i=1:N
fs(i)=k*u(i);
end
figure
plot(u,fs);
xlabel(Relative Displacement [m]');
ylabel('fs [N]');
%DAMPING FORCE RELATIVE DISPLACEMENT RELATION
for i=1:N
fd(i)=c*ud(i);
end
figure
plot(u,fd);
xlabel(Relative Displacement [m]');
ylabel('fd [N]');
%SPRING FORCE + DAMPING FORCE RELATIVE DISPLACEMENT RELATION
f=fs+fd;
figure
plot(u,f);
xlabel(Relative Displacement [m]');
ylabel('f = fs + fd [N]');

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Non-Linear SDF Systems

CASE A: SYSTEM SUBJECTED TO EXTERNAL HARMONIC FORCE

Consider the Single Degree of Freedom model with a non-linear spring and a non-linear
dashpot shown in Figure 1 and subjected to an external harmonic force shown in Figure 2.

We want to determine the response of this system to this excitation by the Newmarks
Constant Average Acceleration Method (Iterative Formulation: Pseudo-Force Method), implemented by a computer program in Matlab Language.
m=100 Kg

A.1 Determine the peak values of:


- displacement of the system

k1=150 N/m k3=10 N/m^3

c2=20 Ns^2/m^2

k5=20 N/m^5

n=2

Figure 1

- velocity of the system

A.2 Plot:

- acceleration of the system

- the time history of displacement, velocity and acceleration of the system


- spring force displacement relation
- damping force displacement relation
- spring force + damping force displacement relation

t
P(t)=p*cos(omega*t)

p=1000 N

omega=4 rad/s

Figure 2

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Homework

Matlab Code for Time History Analysis of Non-Linear SDF Systems

CASE B: SYSTEM SUBJECTED TO EARTHQUAKE EXCITATION

Consider the Single Degree of Freedom model with a non-linear spring and a non-linear
dashpot shown in Figure 3 and subjected to an horizontal earthquake excitation shown in
Figure 4: the earthquake record used is the 2002 Gilroy record.

We want to determine the response of this system to this excitation by the Newmarks
Constant Average Acceleration Method (Iterative Formulation: Pseudo-Force Method), implemented by a computer program in Matlab Language.

B.1 Determine the peak values of:


- relative displacement of the system

m=100 Kg

k1=150 N/m k3=10 N/m^3

c2=20 Ns^2/m^2

k5=20 N/m^5

n=2

Figure 3

- relative velocity of the system

0.4

B.2 Plot:

ag/g

- total acceleration of the system

- the time history of relative displacement and velocity and total acceleration

- spring force relative displacement relation


- damping force relative displacement relation
- spring force + damping force relative displacement relation

-0.4

40
t
Gilroy: ag in units of g, 3997 steps, dt=0.01
Figure 4

University of Naples Federico II - Department of Structures for Engineering and Architecture

Prof. Giorgio Serino - PhD Student Nicol Vaiana

Vous aimerez peut-être aussi