Repository navigation
Expand file tree
/
Copy pathfiberDamage.for
More file actions
210 lines (168 loc) · 7.59 KB
/
Copy pathfiberDamage.for
File metadata and controls
210 lines (168 loc) · 7.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
Module CDM_fiber_mod
! Continuum damage mechanics fiber damage calculations
Contains
Subroutine FiberTenDmg(eps, ndir, E1, XT, GXT, n, m, Lc, cl, rfT, d1T, d1C)
! The purpose of this subroutine is to evaluate fiber damage.
! This subroutine is for tension-only fiber damage.
! Arguments
Double Precision, intent(IN) :: E1 ! Stiffness
Double Precision, intent(IN) :: XT ! Strength
Double Precision, intent(IN) :: GXT ! Toughness
Double Precision, intent(IN) :: n, m ! Coefficients for bi-linear softening
Double Precision, intent(IN) :: eps(ndir,ndir) ! Strain
Double Precision, intent(IN) :: Lc
Double Precision, intent(IN) :: d1C ! CDM compressive fiber damage variable
Integer, intent(IN) :: ndir
Double Precision, intent(IN) :: cl
Double Precision, intent(INOUT) :: rfT ! Fiber tension damage threshold, state variable (CDM_FIfT)
Double Precision, intent(INOUT) :: d1T ! Fiber direction damage variables for tension
! Locals
Double Precision :: FIfT ! Fiber direction failure index
Double Precision :: d1MAX ! Maximum value for damage variables
Double Precision :: eps_rfT ! strain corresponding to the maximum historical failure criterion
Double Precision :: eps_0, eps_f_A, eps_f_B ! strains for damage variable calculations
Double Precision :: dmg_A, dmg_B ! individual damage variables for superposed softening laws
Double Precision :: d1T_temp ! Stores the old value of d1T
Double Precision :: E1_temp, E1_secant
Double Precision :: eps_0_fn
Double Precision, Parameter :: zero=0.d0, one=1.d0, two=2.d0, four=4.d0
! -------------------------------------------------------------------- !
! Initialize
d1MAX = one
d1T = MAX(d1T, d1C)
d1T_temp = d1T
eps_0_fn = (-E1+SQRT(E1**two+four*E1*cl*XT))/(two*E1*cl)
E1_secant = XT/eps_0_fn
If (cl > 0) Then ! Account for fiber nonlinearity
If (d1T > 0) Then ! Use secant stiffness
E1_temp = E1_secant
Else ! Use tangent stiffness
E1_temp = E1*(1+cl*eps(1,1))
End If
Else
E1_temp = E1
End If
! Fiber tension failure criterion
FIfT = E1_temp/XT*eps(1,1)
! Update damage threshold
If (FIfT > rfT) rfT = FIfT
! Determine d1T if damage has occurred
If (rfT > one) Then
eps_rfT = rfT*XT/E1_temp
! Calculate constants
If (cl > 0) Then ! Account for fiber nonlinearity, use secant stiffness
eps_0 = eps_0_fn
Else
eps_0 = XT/E1
End If
eps_f_A = two*GXT*m/(XT*n*Lc)
eps_f_B = two*GXT*(one - m)/(XT*(one - n)*Lc)
! Calculate damage in each linear softening law
If (eps_f_A <= eps_0) Then ! Snap-back
dmg_A = one
Else
dmg_A = MIN(one, eps_f_A*(eps_rfT - eps_0)/eps_rfT/(eps_f_A - eps_0))
End If
If (eps_f_B <= eps_0) Then ! Snap-back
dmg_B = one
Else
dmg_B = MIN(one, eps_f_B*(eps_rfT - eps_0)/eps_rfT/(eps_f_B - eps_0))
End If
! Find the combined damage variable, d1T
d1T = n*(dmg_A - dmg_B) + dmg_B
! Prevent healing; if the current damage is less than previous damage, use previous damage
If (d1T < d1T_temp) d1T = d1T_temp
If (d1T >= d1MAX) Then
d1T = d1MAX
End If
Else
! This is only executed before any damage has occurred
! If no damage has occurred, use rfT as a fiber tension failure criterion state variable
rfT = FIfT
End If
Return
End Subroutine FiberTenDmg
Pure Subroutine FiberCompDmg(eps, ndir, E1, XC, GXC, n, m, Lc, cl, rfT, rfC, d1T, d1C)
! The purpose of this subroutine is to evaluate fiber damage.
! This subroutine is for compression-only fiber damage.
! Arguments
Double Precision, intent(IN) :: E1 ! Stiffness
Double Precision, intent(IN) :: XC ! Strength
Double Precision, intent(IN) :: GXC ! Toughness
Double Precision, intent(IN) :: n, m ! Coefficients for bi-linear softening
Double Precision, intent(IN) :: eps(ndir,ndir) ! Strain
Double Precision, intent(IN) :: Lc
Integer, intent(IN) :: ndir
Double Precision, intent(IN) :: cl
Double Precision, intent(INOUT) :: rfC ! Fiber compression damage threshold, state variable
Double Precision, intent(INOUT) :: rfT ! Fiber tension damage threshold, state variable
Double Precision, intent(INOUT) :: d1C ! Fiber direction damage variables for compression
Double Precision, intent(INOUT) :: d1T ! Fiber direction damage variables for tension
! Locals
Double Precision :: FIfC ! Fiber direction failure index
Double Precision :: d1MAX ! Maximum value for damage variables
Double Precision :: eps_rfC ! strain corresponding to the maximum historical failure criterion
Double Precision :: eps_0, eps_f_A, eps_f_B ! strains for damage variable calculations
Double Precision :: dmg_A, dmg_B ! individual damage variables for superposed softening laws
Double Precision :: d1C_temp ! Stores the old value of d1C
Double Precision :: E1_temp, E1_secant
Double Precision :: eps_0_fn
Double Precision, Parameter :: zero=0.d0, one=1.d0, two=2.d0, four=4.d0
! -------------------------------------------------------------------- !
! Initialize
d1MAX = one
d1C_temp = d1C
eps_0_fn = -(-E1+SQRT(E1**two-four*E1*cl*XC))/(two*E1*cl)
E1_secant = XC/eps_0_fn
If (cl > 0) Then ! Account for fiber nonlinearity
If (d1C > 0) Then ! Use secant stiffness
E1_temp = E1_secant
Else ! Use tangent stiffness
E1_temp = E1*(1+cl*eps(1,1))
End If
Else
E1_temp = E1
End If
! Fiber compression failure criterion
FIfC = -E1_temp/XC*eps(1,1)
! Update damage threshold
If (FIfC > rfC) rfC = FIfC
! Determine d1C if damage has occurred
If (rfC > one) Then
eps_rfC = rfC*XC/E1_temp
! Calculate constants
If (cl > 0) Then ! Account for fiber nonlinearity, use secant stiffness
eps_0 = eps_0_fn
Else
eps_0 = XC/E1
End If
eps_f_A = two*GXC*m/(XC*n*Lc)
eps_f_B = two*GXC*(one - m)/(XC*(one - n)*Lc)
! Calculate damage in each linear softening law
If (eps_f_A <= eps_0) Then ! Snap-back
dmg_A = one
Else
dmg_A = MIN(one, eps_f_A*(eps_rfC - eps_0)/eps_rfC/(eps_f_A - eps_0))
End If
If (eps_f_B <= eps_0) Then ! Snap-back
dmg_B = one
Else
dmg_B = MIN(one, eps_f_B*(eps_rfC - eps_0)/eps_rfC/(eps_f_B - eps_0))
End If
! Find the combined damage variable, d1C
d1C = n*(dmg_A - dmg_B) + dmg_B
! Prevent healing; If the current damage is less than previous damage, use previous damage
If (d1C < d1C_temp) d1C = d1C_temp
If (d1C >= d1MAX) Then
d1C = d1MAX
End If
Else
! This is only executed before any damage has occurred
! If no damage has occurred, use rfC as a fiber compression failure criterion state variable
rfC = FIfC
! If there's no damage in tension, set rfT to zero
If (d1T <= zero) rfT = zero
End If
Return
End Subroutine FiberCompDmg
End Module CDM_fiber_mod