53 SUBROUTINE cst_coh(coor,lmc,matc,R_co,d,deltan,deltat, &
54 sigmax,taumax,sinit,sthresh,nstep,numnp,numco,numat_coh, &
55 delta, numploadelem, idpressload, pressload, &
56 numboundmesh, idmesh, rmesh, nboundtype,num_fail_coh, &
57 index_fail_coh, npress, nmesh, ielem_coh, iface_coh)
75 INTEGER :: numploadelem
76 INTEGER :: numboundmesh
77 INTEGER :: num_fail_coh
78 INTEGER,
DIMENSION(1:5,1:npress) :: idpressload
79 REAL*8 ,
DIMENSION(1:3,1:npress) :: pressload
80 INTEGER,
DIMENSION(1:4,1:nmesh) :: idmesh
81 REAL*8 ,
DIMENSION(1:3,1:nmesh) :: rmesh
82 INTEGER,
DIMENSION(1:numnp) :: nboundtype
83 INTEGER,
DIMENSION(1:numco) :: index_fail_coh
84 INTEGER,
DIMENSION(1:2,1:numco) :: ielem_coh
85 INTEGER,
DIMENSION(1:2,1:numco) :: iface_coh
88 REAL*8,
DIMENSION(1:3,1:numnp) :: coor
90 INTEGER,
DIMENSION(1:6,1:numco) :: lmc
92 INTEGER,
DIMENSION(1:numco) :: matc
94 real*8,
DIMENSION(1:3*numnp) :: r_co
96 REAL*8,
DIMENSION(1:3*numnp) ::
d
98 REAL*8,
DIMENSION(1:3,1:numco) :: sthresh
100 REAL*8,
DIMENSION(1:numat_coh) :: deltan
102 REAL*8,
DIMENSION(1:numat_coh) :: deltat
104 REAL*8,
DIMENSION(1:numat_coh) :: sigmax
106 REAL*8,
DIMENSION(1:numat_coh) :: taumax
108 REAL*8,
DIMENSION(1:numat_coh) :: sinit
111 REAL*8 :: deltn, deltt
115 REAL*8 :: dx1,dy1,dz1
116 REAL*8 :: dx2,dy2,dz2
117 REAL*8 :: dx3,dy3,dz3
118 REAL*8 :: dn1,dn2,dn3
119 REAL*8 :: dt1,dt2,dt3
122 REAL*8 :: tx1,tx2,tx3
123 REAL*8 :: ty1,ty2,ty3
124 REAL*8 :: tz1,tz2,tz3
125 REAL*8 :: rx1,rx2,rx3
126 REAL*8 :: ry1,ry2,ry3
127 REAL*8 :: rz1,rz2,rz3
129 REAL*8 :: dt_x, dt_y, dt_z
131 REAL*8 :: xtangent_1,ytangent_1, ztangent_1
132 REAL*8 :: xtangent_2,ytangent_2, ztangent_2
133 REAL*8 :: xtangent_3,ytangent_3, ztangent_3
135 REAL*8 :: vec1_x,vec1_y,vec1_z,vec2_x,vec2_y,vec2_z
137 REAL*8 :: xnormal,ynormal,znormal
145 INTEGER :: n1,n2,n3,n4,n5,n6
150 parameter(g1 = 0.666666666666667, &
151 g2 = 0.166666666666667, &
152 w1 = 0.333333333333333)
155 IF (index_fail_coh(
i) .eq. 0)
then
158 deltn = 1.d0/deltan(
m)
159 deltt = 1.d0/deltat(
m)
172 vec1_x = coor(1,lmc(3,
i)) - coor(1,lmc(1,
i))
173 vec1_y = coor(2,lmc(3,
i)) - coor(2,lmc(1,
i))
174 vec1_z = coor(3,lmc(3,
i)) - coor(3,lmc(1,
i))
175 vec2_x = coor(1,lmc(2,
i)) - coor(1,lmc(1,
i))
176 vec2_y = coor(2,lmc(2,
i)) - coor(2,lmc(1,
i))
177 vec2_z = coor(3,lmc(2,
i)) - coor(3,lmc(1,
i))
179 xnormal = vec1_y*vec2_z - vec2_y*vec1_z
180 ynormal = - (vec1_x*vec2_z - vec2_x*vec1_z)
181 znormal = vec1_x*vec2_y - vec2_x*vec1_y
183 xnorm =
sqrt(xnormal**2 + ynormal**2 + znormal**2)
191 xnormal = xnormal/xnorm
192 ynormal = ynormal/xnorm
193 znormal = znormal/xnorm
195 dx1 =
d(n5-2) -
d(n1-2)
196 dy1 =
d(n5-1) -
d(n1-1)
203 dn1 = dx1*xnormal + dy1*ynormal + dz1*znormal
209 dt_x = dx1 - dn1*xnormal
210 dt_y = dy1 - dn1*ynormal
211 dt_z = dz1 - dn1*znormal
217 dt1 =
sqrt( dt_x**2 + dt_y**2 + dt_z**2)
230 xtangent_1 = dt_x / dt1
231 ytangent_1 = dt_y / dt1
232 ztangent_1 = dt_z / dt1
238 dx2 =
d(n6-2) -
d(n2-2)
239 dy2 =
d(n6-1) -
d(n2-1)
242 dn2 = dx2*xnormal + dy2*ynormal + dz2*znormal
244 dt_x = dx2 - dn2*xnormal
245 dt_y = dy2 - dn2*ynormal
246 dt_z = dz2 - dn2*znormal
247 dt2 =
sqrt( dt_x**2 + dt_y**2 + dt_z**2)
254 xtangent_2 = dt_x / dt2
255 ytangent_2 = dt_y / dt2
256 ztangent_2 = dt_z / dt2
262 dx3 =
d(n4-2) -
d(n3-2)
263 dy3 =
d(n4-1) -
d(n3-1)
265 dn3 = dx3*xnormal + dy3*ynormal + dz3*znormal
267 dt_x = dx3 - dn3*xnormal
268 dt_y = dy3 - dn3*ynormal
269 dt_z = dz3 - dn3*znormal
270 dt3 =
sqrt( dt_x**2 + dt_y**2 + dt_z**2)
277 xtangent_3 = dt_x / dt3
278 ytangent_3 = dt_y / dt3
279 ztangent_3 = dt_z / dt3
286 dt = g1*dt1 + g2*dt2 + g2*dt3
287 dn = g1*dn1 + g2*dn2 + g2*dn3
288 x = 1.d0 -
sqrt( dn*dn + dt*dt )
291 ELSEIF (
x.LE.sthresh(1,
i))
THEN
295 tn = sthresh(1,
i)/(1.d0-sthresh(1,
i))*sig*dn
297 tn = sinit(
m)/(1.d0-sinit(
m))*sig*dn
299 tt = sthresh(1,
i)/(1.d0-sthresh(1,
i))*tau*dt
304 tx1 = tn*xnormal + tt*xtangent_1
305 ty1 = tn*ynormal + tt*ytangent_1
306 tz1 = tn*znormal + tt*ztangent_1
308 dt = g2*dt1 + g1*dt2 + g2*dt3
309 dn = g2*dn1 + g1*dn2 + g2*dn3
310 x = 1.d0 -
sqrt( dn*dn + dt*dt )
313 ELSEIF (
x.LE.sthresh(2,
i))
THEN
317 tn = sthresh(2,
i)/(1.d0-sthresh(2,
i))*sig*dn
319 tn = sinit(
m)/(1.d0-sinit(
m))*sig*dn
321 tt = sthresh(2,
i)/(1.d0-sthresh(2,
i))*tau*dt
326 tx2 = tn*xnormal + tt*xtangent_2
327 ty2 = tn*ynormal + tt*ytangent_2
328 tz2 = tn*znormal + tt*ztangent_2
330 dt = g2*dt1 + g2*dt2 + g1*dt3
331 dn = g2*dn1 + g2*dn2 + g1*dn3
332 x = 1.d0 -
sqrt( dn*dn + dt*dt )
335 ELSEIF (
x.LE.sthresh(3,
i))
THEN
339 tn = sthresh(3,
i)/(1.d0-sthresh(3,
i))*sig*dn
341 tn = sinit(
m)/(1.d0-sinit(
m))*sig*dn
343 tt = sthresh(3,
i)/(1.d0-sthresh(3,
i))*tau*dt
349 tx3 = tn*xnormal + tt*xtangent_3
350 ty3 = tn*ynormal + tt*ytangent_3
351 tz3 = tn*znormal + tt*ztangent_3
358 rx1 = area*w1*(g1*tx1+g2*tx2+g2*tx3)
359 ry1 = area*w1*(g1*ty1+g2*ty2+g2*ty3)
360 rz1 = area*w1*(g1*tz1+g2*tz2+g2*tz3)
361 rx2 = area*w1*(g2*tx1+g1*tx2+g2*tx3)
362 ry2 = area*w1*(g2*ty1+g1*ty2+g2*ty3)
363 rz2 = area*w1*(g2*tz1+g1*tz2+g2*tz3)
364 rx3 = area*w1*(g2*tx1+g2*tx2+g1*tx3)
365 ry3 = area*w1*(g2*ty1+g2*ty2+g1*ty3)
366 rz3 = area*w1*(g2*tz1+g2*tz2+g1*tz3)
368 r_co(n1-2) = r_co(n1-2) + rx1
369 r_co(n1-1) = r_co(n1-1) + ry1
370 r_co(n1) = r_co(n1) + rz1
371 r_co(n5-2) = r_co(n5-2) - rx1
372 r_co(n5-1) = r_co(n5-1) - ry1
373 r_co(n5) = r_co(n5) - rz1
374 r_co(n2-2) = r_co(n2-2) + rx2
375 r_co(n2-1) = r_co(n2-1) + ry2
376 r_co(n2) = r_co(n2) + rz2
377 r_co(n6-2) = r_co(n6-2) - rx2
378 r_co(n6-1) = r_co(n6-1) - ry2
379 r_co(n6) = r_co(n6) - rz2
380 r_co(n3-2) = r_co(n3-2) + rx3
381 r_co(n3-1) = r_co(n3-1) + ry3
382 r_co(n3) = r_co(n3) + rz3
383 r_co(n4-2) = r_co(n4-2) - rx3
384 r_co(n4-1) = r_co(n4-1) - ry3
385 r_co(n4) = r_co(n4) - rz3
391 IF ((sthresh(1,
i) .le. 1.0e-3) .AND.&
392 (sthresh(2,
i) .le. 1.0e-3) .AND.&
393 (sthresh(3,
i) .le. 1.0e-3) )
Then
395 IF (index_fail_coh(
i) .eq. 0)
then
396 num_fail_coh = num_fail_coh + 1
397 index_fail_coh(
i) = 1
399 print *,
' cohesive element ',
i,
' failed'
400 print *,
' total number of failed coh elems ',&
404 numploadelem = numploadelem + 1
405 idpressload(1,numploadelem) = ielem_coh(1,
i)
406 idpressload(2,numploadelem) = iface_coh(1,
i)
407 idpressload(3,numploadelem) = lmc(1,
i)
408 idpressload(4,numploadelem) = lmc(2,
i)
409 idpressload(5,numploadelem) = lmc(3,
i)
410 pressload(1,numploadelem) = 1.0d0
411 pressload(2,numploadelem) = 1.0d0
412 pressload(3,numploadelem) = 1.0d0
415 numploadelem = numploadelem + 1
417 idpressload(1,numploadelem) = ielem_coh(2,
i)
418 idpressload(2,numploadelem) = iface_coh(2,
i)
419 idpressload(3,numploadelem) = lmc(5,
i)
420 idpressload(4,numploadelem) = lmc(4,
i)
421 idpressload(5,numploadelem) = lmc(6,
i)
422 pressload(1,numploadelem) = 1.0d0
423 pressload(2,numploadelem) = 1.0d0
424 pressload(3,numploadelem) = 1.0d0
429 numboundmesh = numboundmesh + 1
430 idmesh(1,numboundmesh) = lmc(
j,
i)
431 if(nboundtype(lmc(
j,
i)) .eq. 8)
then
432 idmesh(2,numboundmesh) = 0
433 idmesh(3,numboundmesh) = 0
434 idmesh(4,numboundmesh) = 1
435 rmesh( 1,numboundmesh) = 1.0d0
436 rmesh( 2,numboundmesh) = -1.0d0
437 rmesh( 3,numboundmesh) = 0.0d0
439 idmesh(2,numboundmesh) = 1
440 idmesh(3,numboundmesh) = 0
441 idmesh(4,numboundmesh) = 1
442 rmesh( 1,numboundmesh) = 0.0d0
443 rmesh( 2,numboundmesh) = -1.0d0
444 rmesh( 3,numboundmesh) = 0.0d0
454 print *,
' total number of failed coh elems ',num_fail_coh
subroutine cst_coh(coor, lmc, matc, R_co, d, deltan, deltat, sigmax, taumax, Sinit, Sthresh, nstep, numnp, numco, numat_coh, delta, numploadelem, idpressload, pressload, numboundmesh, idmesh, rmesh, nboundtype, num_fail_coh, index_fail_coh, npress, nmesh, ielem_coh, iface_coh)