SPEED
SDOF_SFS_MODEL.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
26
27subroutine sdof_sfs_model(sID, gr_acc, direction)
28
29 use speed_sci
30
31 implicit none
32
33 integer*4 :: sID, direction
34 real*8, dimension(3) :: gr_acc
35 real*8, dimension(4) :: tn, tn1, tn2, tn3, tn4, temp, du, df, vec, a_old, v_old, u_old, f_old
36
37 tn = 0; tn1 = 0; tn2 = 0; tn3 = 0; tn4 = 0; temp = 0; du = 0; df = 0; vec = 0
38 a_old = sys(sid)%a(:,direction); v_old = sys(sid)%v(:,direction); u_old = sys(sid)%u(:,direction); f_old = sys(sid)%f(:,direction)
39
40 tn1(1) = sys(sid)%Ms(1,1)*gr_acc(direction)
41 tn1(2) = sys(sid)%Mf*gr_acc(direction)
42 tn1(4) = (sys(sid)%Ms(1,1) + sys(sid)%Mf)*gr_acc(3)
43
44 temp = (1 - 2*sys(sid)%beta_newmark)/(2*sys(sid)%beta_newmark)*a_old + 1/(sys(sid)%beta_newmark*sys(sid)%dt)*v_old
45 tn2 = matmul(sys(sid)%MAT_M,temp)
46
47 temp = (sys(sid)%gamma_newmark - 2*sys(sid)%beta_newmark)/(2*sys(sid)%beta_newmark)*sys(sid)%dt*a_old + &
48 (sys(sid)%gamma_newmark - sys(sid)%beta_newmark)/(sys(sid)%beta_newmark)*v_old
49 tn3 = matmul(sys(sid)%MAT_C,temp)
50
51 tn4 = matmul(sys(sid)%MAT_KS,u_old)
52
53 tn = tn1 + tn2 + tn3 - tn4 - f_old
54
55 du = matmul(sys(sid)%MAT_MCinv,tn)
56
57 df = matmul(sys(sid)%MAT_KI,du)
58
59 sys(sid)%u(:,direction) = u_old + du
60
61 sys(sid)%f(:,direction) = f_old + df
62
63 vec = matmul(sys(sid)%MAT_KS,sys(sid)%u(:,direction))
64 sys(sid)%fs(direction) = vec(1)
65 sys(sid)%fb(direction) = sys(sid)%f(2,direction) + sys(sid)%Mf*(gr_acc(direction) - a_old(2))
66
67 sys(sid)%v(:,direction) = v_old + (2*sys(sid)%beta_newmark - sys(sid)%gamma_newmark)/(2*sys(sid)%beta_newmark)*sys(sid)%dt*a_old + &
68 sys(sid)%gamma_newmark/(sys(sid)%beta_newmark*sys(sid)%dt)*(du - v_old*sys(sid)%dt)
69
70 sys(sid)%a(:,direction) = (2*sys(sid)%beta_newmark - 1)/(2*sys(sid)%beta_newmark)*a_old + &
71 1/(sys(sid)%beta_newmark*sys(sid)%dt2)*(du - v_old*sys(sid)%dt)
72
73 sys(sid)%IntForce(1,direction) = sys(sid)%f(2,direction)
74
75 ! UnComment this after verifying
76 !sys(sID)%SDOFItF(3) = sys(sID)%f(4,direction)
77
78 return
79end subroutine sdof_sfs_model
subroutine sdof_sfs_model(sid, gr_acc, direction)
Response computation for 4DOF model.
Contains parameters for MDOF.
Definition MODULES.f90:725
type(system), dimension(:), allocatable sys
SDOF system.
Definition MODULES.f90:771