45
46
47
48
49
50
51
54
55
56
57#include "implicit_f.inc"
58#include "comlock.inc"
59
60#include "scr05_c.inc"
61#include "impl1_c.inc"
62#include "tabsiz_c.inc"
63
64
65
66 INTEGER, INTENT(IN) :: NEL ,NUMTABL,NVARTMP
67 my_real ,
INTENT(IN) :: hu, shape
68 my_real,
INTENT(IN) ,
DIMENSION(NEL):: zxx ,zyy ,zzz ,zxy ,zzx ,zyz
69 TYPE (TABLE_4D_), DIMENSION(NUMTABL) ,TARGET :: TABLE
70 my_real,
INTENT(INOUT) ,
DIMENSION(NEL) :: whysmax
71 my_real,
INTENT(OUT) ,
DIMENSION(NEL) :: damage
72 INTEGER ,DIMENSION(NEL,NVARTMP) ,INTENT(INOUT) :: VARTMP
73
74 INTEGER I,L
75 my_real,
DIMENSION(NEL) :: alambda1,alambda2,alambda3,z1,z2,z3,
76 . fener1,dener1,fener2,dener2,fener3,dener3
78 . ratio, whys(nel),epsilon(nel,3)
79
81 . ah1(nel),ah2(nel),ah3(nel),
82 . at2(nel),at3(nel),aa3(nel),aa2(nel)
83 INTEGER IPOS(NEL,1)
84 my_real,
DIMENSION(NEL,1) :: xvec
85 TYPE(TABLE_4D_), POINTER :: FUNC_ENER , FUNC_SIG
86
87
88 func_sig => table(1)
89 func_ener => table(2)
90
91 DO i=1,nel
92
93
94
95
96
97
98
99 ah1(i)=zxx(i)+zyy(i)+zzz(i)
100 ah2(i)=zyy(i)*zzz(i)+zzz(i)*zxx(i)+zxx(i)*zyy(i)
101 . -zyz(i)**2-zzx(i)**2-zxy(i)**2
102 ah3(i)=zxx(i)*zyy(i)*zzz(i)+two*zxy(i)*zyz(i)*zzx(i)
103 . -zxx(i)*zyz(i)**2-zyy(i)*zzx(i)**2-zzz(i)*zxy(i)**2
104
105
106
107 at3(i)=two*ah1(i)**3/twenty7 - ah1(i)*ah2(i)/three + ah3(i)
108 at2(i)=-ah2(i)+ah1(i)**2/three
109 at2(i)=
max(at2(i),em16)
110
111
112
113 aa3(i)=at3(i)/two/sqrt(at2(i)**3/twenty7)
114 aa3(i)=
min(one,aa3(i))
115 aa3(i)=
max(-one,aa3(i))
116 aa2(i)=sqrt(at2(i)/three)
117
118
119
120 z1(i)=two*aa2(i)*cos(third*acos(aa3(i)))
121 z2(i)=two*aa2(i)*cos(third*acos(aa3(i)) - two*pi/three)
122 z3(i)=two*aa2(i)*cos(third*acos(aa3(i)) - four*pi/three)
123
124
125
126 z1(i)=z1(i)+ah1(i)/three
127 z2(i)=z2(i)+ah1(i)/three
128 z3(i)=z3(i)+ah1(i)/three
129
130 ENDDO
131
132
133
134 DO i=1,nel
135
136
137
138 alambda1(i)=sqrt(two*z1(i) + one)
139 alambda2(i)=sqrt(two*z2(i) + one)
140 alambda3(i)=sqrt(two*z3(i) + one)
141
142
143
144 epsilon(i,1) = one - alambda1(i)
145 epsilon(i,2) = one - alambda2(i)
146 epsilon(i,3) = one - alambda3(i)
147 ENDDO
148
149
150
151 xvec(1:nel,1) = epsilon(1:nel,1)
152 ipos(1:nel,1) = vartmp(1:nel,16)
154 vartmp(1:nel,16) = ipos(1:nel,1)
155
156 xvec(1:nel,1) = epsilon(1:nel,2)
157 ipos(1:nel,1) = vartmp(1:nel,17)
159 vartmp(1:nel,17) = ipos(1:nel,1)
160
161 xvec(1:nel,1) = epsilon(1:nel,3)
162 ipos(1:nel,1) = vartmp(1:nel,18)
164 vartmp(1:nel,18) = ipos(1:nel,1)
165
166
167
168 DO i=1,nel
169 whys(i) = fener1(i) + fener2(i) + fener3(i)
170 whysmax(i)=
max(whysmax(i),whys(i))
171 ratio = whys(i) / whysmax(i)
172 damage(i) =(one-hu)*(one - ratio**shape)
173 ENDDO
174
175 RETURN
subroutine table_mat_vinterp(table, dimx, nel, ipos, xx, yy, dydx)