43 1 X ,IRECT ,STF ,IXS ,PM ,
44 2 GEO ,NRT ,IXC ,NINTR ,SLSFAC ,
45 3 NTY ,GAPMAX ,NOINT ,GAP_SM ,
46 4 MS ,IXTG ,IXT ,IXP ,IXR ,
47 5 IGAP ,GAPMIN ,GAP0 ,GAPINF ,IPARTC ,
48 6 IPARTTG ,THK ,THK_PART ,PERCENT_SIZE ,GAP_L ,
49 7 NOD2EL1D ,KNOD2EL1D ,ITAB ,IXS10 ,ID,TITR ,
50 8 KXX ,IXX ,IGEO ,KNOD2ELS ,KNOD2ELC,
51 9 KNOD2ELTG,NOD2ELS ,NOD2ELC ,NOD2ELTG ,LELX ,
52 A FILLSOL ,INTTH ,DRAD ,AREA ,IELEC ,
53 B PM_STACK ,IWORKSH ,IT19 ,BGAPSMX ,INTFRIC ,
54 C IPARTS ,TAGPRT_FRIC,IPARTFRIC,INTBUF_FRIC_TAB,
55 D IPARTT ,IPARTP ,IPARTX ,IPARTR ,IREM_GAP)
76#include
"implicit_f.inc"
90 INTEGER,
INTENT(IN) :: NRT, NINTR, NTY, NOINT,IGAP,INTTH,INTFRIC,
91 INTEGER,
INTENT(IN) :: IRECT(2,*), IXS(NIXS,NUMELS), IXC(NIXC,NUMELC),
92 . IXTG(NIXTG,NUMELTG),IXT(NIXT,NUMELT),IXP(NIXP,NUMELP),IXR(NIXR,NUMELR),
93 . IPARTC(NUMELC), IPARTTG(NUMELTG),NOD2EL1D(*),KNOD2EL1D(*),ITAB(NUMNOD),
94 . IXS10(6,*),KXX(NIXX,*),IXX(*),IGEO(NPROPGI,NUMGEO),
95 . KNOD2ELS(*), KNOD2ELC(*), KNOD2ELTG(*),
96 . NOD2ELS(*), NOD2ELC(*), NOD2ELTG(*),IWORKSH(3,*),
97 . TAGPRT_FRIC(*),IPARTS(*),
98 . IPARTT(*) ,IPARTP(*) ,(*) ,IPARTR(*)
99 INTEGER,
INTENT(INOUT) :: IPARTFRIC(*),IELEC(*)
100 INTEGER,
INTENT(IN) :: ID,IT19
101 my_real,
INTENT(IN) :: X(3,NUMNOD), PM(,NUMMAT), GEO(NPROPG,NUMGEO),
102 . MS(*),THK(*),THK_PART(*),
103 . lelx(*), fillsol(*),pm_stack(20,*)
104 my_real,
INTENT(IN) :: slsfac,gap0,percent_size
105 my_real,
INTENT(INOUT) :: gap_l(*),stf(*),gap_sm(*),
area(*),drad,gapinf,gapmax
106 CHARACTER(LEN=NCHARTITLE) ,
INTENT(IN) :: TITR
107 TYPE(INTBUF_FRIC_STRUCT_),
INTENT(IN) :: INTBUF_FRIC_TAB(*)
111 INTEGER NDX, I, INRT, NELS, MT, JJ, , NELC, J,
112 . mg, neltg,nelt,nelp,nelr,
113 . igtyp, ip,n1,n2,k,t,p,r,nelx,ipgmat,igmat,ie,
114 . jj1,jj2,iec,k1,k2,ipl,ipc,
115 . ie1(50,2),ie2(50,2),isubstack,ipg,n3,n4,n5,n6,n7,n8,icontr
116 my_real dxm, gapmx, gapmn, areass, vol, dx,gap1,gaps1,gaptmp,xl,
117 . sx1,sy1,sz1,sx2,sy2,sz2,sx3,sy3,sz3,
118 . x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,x5,y5,z5,x6,y6,z6,x7,y7,z7,x8,y8,z8,
119 . xx1(4),xx2(4), xx3(4) ,face(6),
120 . n_1, n_2, n_3,dx1,xl2,bulk
122 my_real,
EXTERNAL :: get_u_geo
142 CALL i11gmx3(x,irect,inrt,gapmx,xl2)
146 CALL i11sol(x,irect,ixs,nintr,nels,inrt,areass,noint,knod2els,nod2els,ixs10)
165 stf(i)=slsfac*fillsol(nels)*vol*bulk/xl2
171 CALL ancmsg(msgid=95,msgtype=msgwarning,anmode=aninfo_blind_2,
179 CALL ancmsg(msgid=96,msgtype=msgwarning,anmode=aninfo_blind_2,
191 ipg = tagprt_fric(ip)
194 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
195 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
196 ipartfric(inrt) = ipl
201 CALL i11coq(irect ,ixc ,ixtg ,nintr ,nelc ,
202 . neltg ,inrt ,geo ,pm ,thk ,
203 . igeo ,knod2elc,knod2eltg,nod2elc,nod2eltg,
211 IF ( thk_part(ip) /= zero
THEN
213 ELSEIF (thk(numelc+neltg) /= zero .AND. iintthick ==0)
THEN
215 ELSEIF(igtyp == 17 .OR. igtyp == 51 .OR. igtyp == 52)
THEN
221 gaps1=
max(gaps1,gap_sm(i))
222 gapmn =
min(gapmn,dx)
226 IF(igtyp == 11 .AND. igmat > 0)
THEN
227 stf(i)=slsfac*dx*geo(ipgmat + 2 ,mg)
228 ELSEIF(igtyp == 52 .OR. ((igtyp == 17 .OR. igtyp == 51) .AND. igmat > 0))
THEN
229 isubstack = iworksh(3,numelc+neltg)
230 stf(i)=slsfac*dx*pm_stack( 2 ,isubstack)
232 stf(i)=slsfac*dx*pm(20,mt)
236 CALL ancmsg(msgid=95,msgtype=msgwarning,anmode=aninfo_blind_2,
244 CALL ancmsg(msgid=96,msgtype=msgwarning,anmode=aninfo_blind_2,
257 ipg = tagprt_fric(ip)
260 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
261 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
262 ipartfric(inrt) = ipl
267 ELSEIF(nelc /= 0)
THEN
273 IF (thk_part(ip) /= zero .AND. iintthick == 0)
THEN
275 ELSEIF ( thk(nelc) /= zero .AND. iintthick == 0 )
THEN
277 ELSEIF(igtyp ==17 .OR. igtyp == 51 .OR. igtyp == 52)
THEN
283 gaps1=
max(gaps1,gap_sm(i))
284 gapmn =
min(gapmn,dx)
288 IF(igtyp == 11 .AND. igmat > 0)
THEN
289 stf(i)=slsfac*dx*geo(ipgmat + 2 ,mg)
290 ELSEIF(igtyp == 52 .OR. ((igtyp == 17 .OR. igtyp == 51) .AND. igmat > 0))
THEN
291 isubstack = iworksh(3,nelc)
292 stf(i)=slsfac*dx*pm_stack( 2 ,isubstack)
294 stf(i)=slsfac*dx*pm(20,mt)
298 CALL ancmsg(msgid=95,msgtype=msgwarning,anmode=aninfo_blind_2,
306 CALL ancmsg(msgid=96,msgtype=msgwarning, anmode=aninfo_blind_2,
319 ipg = tagprt_fric(ip)
322 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
323 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
324 ipartfric(inrt) = ipl
329 CALL i11fil(irect,ixt ,ixp,ixr,nintr,nelt ,
330 . nelp,nelr,nelx,inrt,nod2el1d,
336 IF (thk_part(ip) > zero )
THEN
342 gap_sm(i)=
max(gap_sm(i),half*dx1)
343 gaps1=
max(gaps1,gap_sm(i))
344 gapmn =
min(gapmn,dx1)
348 stf(i)=slsfac*dx*pm(20,mt)
349 IF (nsubdom>0) stf(i)=slsfac*dx*pm_r2r(mt)
352 CALL ancmsg(msgid=95,msgtype=msgwarning,anmode=aninfo_blind_2,
360 CALL ancmsg(msgid=96,msgtype=msgwarning,anmode=aninfo_blind_2,
371 ipg = tagprt_fric(ip)
374 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
375 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
376 ipartfric(inrt) = ipl
380 ELSEIF(nelp /= 0)
THEN
384 IF (thk_part(ip) > zero )
THEN
390 gap_sm(i)=
max(gap_sm(i),half*dx1)
391 gaps1=
max(gaps1,gap_sm(i))
392 gapmn =
min(gapmn,dx1)
396 stf(i)=slsfac*dx*pm(20,mt)
397 IF (nsubdom>0) stf(i)=slsfac*dx*pm_r2r(mt)
400 CALL ancmsg(msgid=95,msgtype=msgwarning,anmode=aninfo_blind_2,
408 CALL ancmsg(msgid=96,msgtype=msgwarning,anmode=aninfo_blind_2,
419 ipg = tagprt_fric(ip)
422 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
423 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
424 ipartfric(inrt) = ipl
428 ELSEIF(nelr /= 0)
THEN
433 IF (thk_part(ip) > zero )
THEN
435 gap_sm(i)=
max(gap_sm(i),half*dx1)
436 gaps1=
max(gaps1,gap_sm(i))
437 gapmn =
min(gapmn,dx1)
441 igtyp=nint(geo(12,mg))
442 IF(igtyp==4.OR.igtyp==12)
THEN
443 stf(i)=slsfac*geo(2,mg)
444 ELSEIF(igtyp==8.OR.igtyp==13)
THEN
445 stf(i)=slsfac*
max(geo(3,mg),geo(10,mg),geo(15,mg))
446 ELSEIF(igtyp == 23)
THEN
447 stf(i)=slsfac*
max(pm(191,mt),pm(192,mt),pm(193,mt))
448 ELSEIF(igtyp==25)
THEN
449 stf(i)=slsfac*geo(10,mg)
450 ELSEIF(igtyp>=29)
THEN
451 stf(i)=slsfac*geo(3,mg)
453 WRITE(6,
'(A)')
'INTERNAL ERROR 987'
458 CALL ancmsg(msgid=95,msgtype=msgwarning,anmode=aninfo_blind_2,
466 CALL ancmsg(msgid=96,msgtype=msgwarning,anmode=aninfo_blind_2,
477 ipg = tagprt_fric(ip)
480 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
481 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
482 ipartfric(inrt) = ipl
486 ELSEIF(nelx /= 0)
THEN
489 stf(i)=slsfac*get_u_geo(4,mg)*(kxx(3,nelx)-1)/lelx(nelx)
492 CALL ancmsg(msgid=95,msgtype=msgwarning,anmode=aninfo_blind_2,
500 CALL ancmsg(msgid=96,msgtype=msgwarning,anmode=aninfo_blind_2,
511 ipg = tagprt_fric(ip)
514 . ipg,intbuf_fric_tab(intfric)%S_TABPARTS_FRIC,
515 . intbuf_fric_tab(intfric)%TABPARTS_FRIC,ipl )
516 ipartfric(inrt) = ipl
522 IF(nels+nelc+neltg+nelt+nelp+nelr+numelx==0.)
THEN
524 CALL ancmsg(msgid=481,msgtype=msgerror,anmode=aninfo_blind_2,
530 CALL ancmsg(msgid=482,msgtype=msgerror,anmode=aninfo_blind_2,
546 IF(n1 /= n2 .AND. n1 /= 0)
547 . xl=
min(xl,sqrt((x(1,n1)-x(1,n2))**2+(x(2,n1)-x(2,n2))**2+
548 . (x(3,n1)-x(3,n2))**2))
552 DO k=knod2el1d(n1)+1,knod2el1d(n1+1)
553 IF (nod2el1d(k) <= numelt .AND. nod2el1d(k) /= zero)
THEN
555 xl=
min(xl,sqrt((x(1,ixt(2,t))-x(1,ixt(3,t)))**2+
556 . (x(2,ixt(2,t))-x(2,ixt(3,t)))**2+
557 . (x(3,ixt(2,t))-x(3,ixt(3,t)))**2))
558 ELSEIF (nod2el1d(k) <= numelt+numelp .AND. nod2el1d(k) /= zero)
THEN
559 p = nod2el1d(k) - numelt
560 xl=
min(xl,sqrt((x(1,ixp(2,p))-x(1,ixp(3,p)))**2+
561 . (x(2,ixp(2,p))-x(2,ixp(3,p)))**2+
564 r = nod2el1d(k) - numelt - numelp
565 xl=
min(xl,sqrt((x(1,ixr(2,r))-x(1,ixr(3,r)))**2+
566 . (x(2,ixr(2,r))-x(2,ixr(3,r)))**2+
567 . (x(3,ixr(2,r))-x(3,ixr(3,r)))**2))
572 gap_l(i) =
min(gap_l(i),percent_size*xl)
588 gap1 =
min(half*gapmx,dxm/ndx)
592 IF ((nintr<0).AND.(it19==0))
WRITE(iout,1300)half*(gapmin+gap1)
595 IF(nintr < 0) gap1 = half*(gapmin+gap1)
599 IF ((gap1 > half*gapmx) .AND. (irem_gap /= 2))
THEN
601 CALL ancmsg(msgid=94,msgtype=msgwarning,anmode=aninfo_blind_2,
616 gap1 =
min(half*gapmx,gapmn)
620 IF ((nintr<0) .AND. (it19==0))
WRITE(iout,1300)half*(gapmin+gap1)
627 gapmin = half*(gapmin+gap1)
628 gapmax =
max(gapmax+gaps1,gapmin)
629 bgapsmx =
max(bgapsmx,gaps1)
632 IF ((gapmax>half*gapmx) .AND. (igap/=3) .AND. (irem_gap/=2))
THEN
634 CALL ancmsg(msgid=94,msgtype=msgwarning,anmode=aninfo_blind_2,
644 IF(slsfac < zero)
THEN
655 ELSEIF(igap==1 .OR. igap==2)
THEN
657 gapinf =
min(gapinf,gap_sm(i))
661 gapinf =
min(gapinf,
min(gap_sm(i),gap_l(i)))
669 ELSEIF(drad < gap1)
THEN
677 CALL ancmsg(msgid=918, msgtype
688 IF(nelc /=0 .OR. neltg /= 0)
THEN
692 DO j=knod2elc(irect(1,i))+1,knod2elc(irect(1,i)+1)
694 ie1(jj1,1) = nod2elc(j)
697 DO j= knod2eltg(irect(1,i))+1,knod2eltg(irect(1,i)+1)
699 ie1(jj1,1) = nod2eltg
703 DO j=knod2elc(irect(2,i))+1,knod2elc(irect(2,i)+1)
705 ie2(jj2,1) = nod2elc(j)
708 DO j= knod2eltg(irect(2,i))+1,knod2eltg(irect(2,i)+1)
710 ie2(jj2,1) = nod2eltg(j)
716 IF(ie1(j,1) == ie2(k,1))
THEN
720 sx1 = x(1,ixc(4,ie)) - x(1,ixc(2,ie))
721 sy1 = x(2,ixc(4,ie)) - x(2,ixc(2,ie))
722 sz1 = x(3,ixc(4,ie)) - x(3,ixc(2,ie))
723 sx2 = x(1,ixc(5,ie)) - x(1,ixc(3,ie))
724 sy2 = x(2,ixc(5,ie)) - x(2,ixc(3,ie))
725 sz2 = x(3,ixc(5,ie)) - x(3,ixc(3,ie))
726 sx3 = sy1*sz2 - sz1*sy2
727 sy3 = sz1*sx2 - sx1*sz2
728 sz3 = sx1*sy2 - sy1*sx2
733 IF(ie1(j,2) == 3)
THEN
734 sx1 = x(1,ixtg(3,ie)) - x(1,ixtg(2,ie))
735 sy1 = x(2,ixtg(3,ie)) - x(2,ixtg
736 sz1 = x(3,ixtg(3,ie)) - x(3,ixtg(2,ie))
737 sx2 = x(1,ixtg(4,ie)) - x(1,ixtg(2,ie))
738 sy2 = x(2,ixtg(4,ie)) - x(2,ixtg(2,ie))
740 sx3 = sy1*sz2 - sz1*sy2
741 sy3 = sz1*sx2 - sx1*sz2
743 area(i) =
area(i) + one_over_6*sqrt(sx3*sx3+sy3*sy3+sz3*sz3)
744 ielec(i) = ixtg(1,ie)
757 ELSEIF(nels /= 0)
THEN
761 DO j=knod2els(irect(1,i))+1,knod2els(irect(1,i)+1)
763 ie1(jj1,1) = nod2els(j)
766 DO j=knod2els(irect(2,i))
768 ie2(jj2,1) = nod2els(j)
773 IF(ie1(j,1) == ie2(k,1))
THEN
825 CALL norma1(n_1,n_2,n_3,face(1),xx1,xx2,xx3)
830 face(1) = fourth*face(1)
832 face(1) = third*face(1)
847 CALL norma1(n_1,n_2,n_3,face(2),xx1,xx2,xx3)
852 face(2) = fourth*face(2)
854 face(2) = third*face(2)
869 CALL norma1(n_1,n_2,n_3,face(3),xx1,xx2,xx3)
874 face(3) = fourth*face(3)
876 face(3) = third*face(3)
891 CALL norma1(n_1,n_2,n_3,face(4),xx1,xx2,xx3
896 face(4) = fourth*face(4)
898 face(4) = third*face(4)
913 CALL norma1(n_1,n_2,n_3,face(5),xx1,xx2,xx3)
918 face(5) = fourth*face(5)
920 face(5) = third*face(5)
935 CALL norma1(n_1,n_2,n_3,face(6),xx1,xx2,xx3)
940 face(6) = fourth*face(6)
942 face(6) = third*face(6)
947 IF (n1 == irect(1,i).AND.n2 == irect(2,i))
THEN
950 IF (k1 == 1 .AND. k2 == 2)
THEN
951 area(i) =
area(i) + (face(1)+face(5))
952 ELSEIF (k1 == 1 .AND. k2 == 4)
THEN
953 area(i) =
area(i) + (face(1)+face(4))
954 ELSEIF (k1 == 1 .AND. k2 == 5)
THEN
955 area(i) =
area(i) + (face(4)+face(5))
956 ELSEIF (k1 == 2 .AND. k2 == 3)
THEN
957 area(i) =
area(i) + (face(1)+face(3))
958 ELSEIF (k1 == 2 .AND. k2 == 6)
THEN
960 ELSEIF (k1 == 3 .AND. k2 == 4)
THEN
961 area(i) =
area(i) + (face(1)+face(6))
962 ELSEIF (k1 == 3 .AND. k2 == 7)
THEN
963 area(i) =
area(i) + (face(3)+face(6))
964 ELSEIF (k1 == 4 .AND. k2 == 1)
THEN
965 area(i) =
area(i) + (face(1)+face(4))
966 ELSEIF (k1 == 4 .AND. k2 == 8)
THEN
967 area(i) =
area(i) + (face(6)+face(4))
968 ELSEIF (k1 == 5 .AND. k2 == 6)
THEN
969 area(i) =
area(i) + (face(2)+face(5))
970 ELSEIF (k1 == 6 .AND. k2 == 7)
THEN
972 ELSEIF (k1 == 7 .AND. k2 == 8)
THEN
973 area(i) =
area(i) + (face(2)+face(6))
974 ELSEIF (k1 == 8.AND. k2 == 5)
THEN
975 area(i) =
area(i) + (face(2)+face(4))
984 ELSEIF(nelp /= 0)
THEN
988 DO j=knod2el1d(irect(1,i))+1,knod2el1d(irect(1,i)+1)
996 DO j=knod2el1d(irect(2,i))+1,knod2el1d(irect(2,i)+1)
1000 dx = sqrt(geo(1,mg))
1005 ELSEIF(nelt /= 0)
THEN
1009 DO j=knod2el1d(irect(1,i))+1,knod2el1d(irect(1,i)+1)
1015 ielec(i) = ixt(1,ie)
1017 DO j=knod2el1d(irect(2,i))+1,knod2el1d(irect(2,i)+1)
1021 dx = sqrt(geo(1,mg))
1034 1300
FORMAT(2x,
'COMPUTED GAP = ',1pg20.13)
1035 2001
FORMAT(2x,
'Maximum distance for radiation computation = ',1pg20.13)