SPEED
TRILINEAR.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
27
28subroutine trilinear(K, H, S, f, de, e, fy, fh, fu, ey, eh, eu, branch, damage)
29
30 implicit none
31
32 real*8 :: k, h, s
33 real*8 :: de, f, e0, temp, e, e_int, f0
34 real*8 :: fy, fh, fu, ey, eh, eu, eh_base, finf, fsup
35 integer*4 :: branch, damage, sgn
36
37
38 f0 = f
39 ! e0 = e - de;
40 if (e.ge.0.0) sgn = 1
41 if (e.lt.0.0) sgn = -1
42
43 if ((damage.eq.0).and.(abs(e).lt.eu)) then
44
45 if (branch.eq.1) then ! LINEAR ELASTIC branch
46 if (abs(e).lt.ey) then
47 f = k*e
48 branch = 1
49 elseif ((abs(e).ge.ey).and.(abs(e).lt.eh)) then
50 f = sgn*(fy + h*(abs(e)-ey))
51 if (sgn.eq.1) branch = 2
52 if (sgn.eq.-1) branch = 4
53 elseif (abs(e).ge.eh) then
54 f = sgn*(fh + s*(abs(e)-eh))
55 if (sgn.eq.1) branch = 3
56 if (sgn.eq.-1) branch = 5
57 endif
58
59 elseif (branch.eq.2) then ! HARDENING branch (positive)
60 if (de.ge.0.0) then
61 if (e.lt.eh) then
62 f = fy + h*(e-ey)
63 branch = 2
64 elseif (e.ge.eh) then
65 f = fh + s*(e-eh)
66 branch = 3
67 endif
68 elseif (de.lt.0.0) then
69 e_int = e0 - f0/k
70 temp = f0 + k*de
71 finf = k/(k-h) * (-fy + h*(e_int + ey))
72 if (temp.gt.finf) then
73 f = temp
74 branch = 6
75 elseif (temp.le.finf) then
76 if (e.gt.-eh) then
77 f = -fy + h*(e+ey)
78 branch = 4
79 elseif (e.le.-eh) then
80 f = -fh + s*(e+eh)
81 branch = 5
82 endif
83 endif
84 endif
85
86 elseif (branch.eq.3) then ! SOFTENING branch (positive)
87 if (de.ge.0.0) then
88 f = fh + s*(e-eh)
89 branch = 3
90 elseif (de.lt.0.0) then
91 e_int = e0 - f0/k
92 temp = f0 + k*de
93 finf = k/(k-h) * (-fy + h*(e_int + ey))
94 if (temp.gt.finf) then
95 f = temp
96 branch = 6
97 elseif (temp.le.finf) then
98 if (e.gt.-eh) then
99 f= -fy + h*(e+ey)
100 branch = 4
101 elseif (e.le.-eh) then
102 f = -fh + s*(e+eh)
103 branch = 5
104 endif
105 endif
106 endif
107
108 elseif (branch.eq.4) then ! HARDENING branch (negative)
109 if (de.le.0.0) then
110 if (e.gt.-eh) then
111 f = -fy + h*(e+ey)
112 branch = 4
113 elseif (e.le.-eh) then
114 f = -fh + s*(e+eh)
115 branch = 5
116 endif
117 elseif (de.gt.0.0) then
118 e_int = e0 - f0/k
119 temp = f0 + k*de
120 fsup = k/(k-h) * (fy + h*(e_int - ey))
121 if (temp.lt.fsup) then
122 f = temp
123 branch = 6
124 elseif (temp.ge.fsup) then
125 if (e.lt.eh) then
126 f = fy + h*(e-ey)
127 branch = 2
128 elseif (e.ge.eh) then
129 f = fh + s*(e-eh)
130 branch = 3
131 endif
132 endif
133 endif
134
135 elseif (branch.eq.5) then ! SOFTENING branch (negative)
136 if (de.le.0.0) then
137 f = -fh + s*(e+eh)
138 branch = 5
139 elseif (de.gt.0.0) then
140 e_int = e0 - f0/k
141 temp = f0 + k*de
142 fsup = k/(k-h) * (fy + h*(e_int - ey))
143 if (temp.lt.fsup) then
144 f = temp
145 branch = 6
146 elseif (temp.ge.fsup) then
147 if (e.lt.eh) then
148 f= fy + h*(e-ey)
149 branch = 2
150 elseif (e.ge.eh) then
151 f = fh + s*(e-eh)
152 branch = 3
153 endif
154 endif
155 endif
156
157 elseif (branch.eq.6) then ! transition branch
158 e_int = e0 - f0/k
159 temp = f0 + k*de
160 eh_base = eh - fh/k
161 if (abs(e_int).le.eh_base) then
162 fsup = k/(k-h) * (fy + h*(e_int - ey))
163 finf = k/(k-h) * (-fy + h*(e_int + ey))
164 elseif (e_int.gt.eh_base) then
165 fsup = k/(k-s) * (fh + s*(e_int - eh))
166 finf = k/(k-h) * (-fy + h*(e_int + ey))
167 elseif (e_int.lt.-eh_base) then
168 finf = k/(k-s) * (-fh + h*(e_int + eh))
169 fsup = k/(k-h) * (fy + h*(e_int - ey))
170 endif
171 if ((temp.gt.finf).and.(temp.lt.fsup)) then
172 f = temp
173 branch = 6
174 elseif (temp.ge.fsup) then
175 if (e.lt.eh) then
176 f = fy + h*(e-ey)
177 branch = 2
178 elseif (e.ge.eh) then
179 f = fh + s*(e-eh)
180 branch = 3
181 endif
182 elseif (temp.le.finf) then
183 if (e.gt.-eh) then
184 f = -fy + h*(e+ey)
185 branch = 4
186 elseif (e.le.-eh) then
187 f = -fh + s*(e+eh)
188 branch = 5
189 endif
190 endif
191 endif
192
193 elseif ((damage.eq.1).or.(abs(e).ge.eu)) then
194 damage = 1
195 f = 0
196 endif
197
198return
199end subroutine trilinear
subroutine trilinear(k, h, s, f, de, e, fy, fh, fu, ey, eh, eu, branch, damage)
Defines stress-strain relation for TRILINEAR SDOF oscillator.
Definition TRILINEAR.f90:29