33 character*20 labmpc(*)
34 character*81 surface,set(*)
35 character*132 textpart(16)
37 integer ipompc(*),nodempc(3,*),nmpc,nmpc_,mpcfree,istep,istat,
38 & n,i,j,key,nk,node,ifacequad(3,4),ifacetria(3,3),npt,
39 & mpcfreeold,ikmpc(*),ilmpc(*),id,idof,iline,ipol,inl,
40 & ipoinp(2,*),inp(3,*),ipoinpc(0:*),irefnode,lathyp(3,6),inum,
41 & jn,jt,jd,iside,nelem,jface,nopes,nface,nodef(8),nodel(8),
42 & ifaceq(8,6),ifacet(6,4),ifacew1(4,5),ifacew2(8,5),indexpret,
43 & k,ipos,nkold,nope,m,kon(*),ipkon(*),indexe,iset,nset,idir,
44 & istartset(*),iendset(*),ialset(*),index1,ics(2,*),mpcpret,
45 & mint,iflag,ithermal(2),ielem,three,in(3),node1,node2,isign,
46 & ndep,nind,kflag,ne,nkref,noderef
48 real*8 coefmpc(*),xn(3),xt(3),xd(3),dd,co(3,*),dcs(*),area,
49 & areanodal(8),xl2(3,8),xi,et,weight,shp2(7,8),t0(*),
50 & xs2(3,2),xsj2(3),xsj,yn(3),r
56 data lathyp /1,2,3,1,3,2,2,1,3,2,3,1,3,1,2,3,2,1/
60 data ifaceq /4,3,2,1,11,10,9,12,
61 & 5,6,7,8,13,14,15,16,
63 & 2,3,7,6,10,19,14,18,
64 & 3,4,8,7,11,20,15,19,
65 & 4,1,5,8,12,17,16,20/
69 data ifacet /1,3,2,7,6,5,
76 data ifacew1 /1,3,2,0,
84 data ifacew2 /1,3,2,9,8,7,0,0,
92 data ifacequad /1,5,2,
99 data ifacetria /1,4,2,
109 &
'*ERROR reading *PRE-TENSION SECTION: *EQUATION should' 110 write(*,*)
' be placed before all step definitions' 120 if(textpart(i)(1:8).eq.
'SURFACE=')
then 122 write(*,*)
'*ERROR reading PRE-TENSION SECTION:' 123 write(*,*)
' ELEMENT and SURFACE are' 124 write(*,*)
' mutually exclusive' 126 &
"*PRE-TENSION SECTION%")
128 surface=textpart(i)(9:88)
129 ipos=index(surface,
' ')
130 surface(ipos:ipos)=
'T' 131 elseif(textpart(i)(1:5).eq.
'NODE=')
then 132 read(textpart(i)(6:15),
'(i10)',iostat=istat) irefnode
133 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
134 &
"*PRE-TENSION SECTION%")
135 if((irefnode.gt.nk).or.(irefnode.le.0))
then 136 write(*,*)
'*ERROR reading *PRE-TENSION SECTION:' 137 write(*,*)
' node ',irefnode,
' is not defined' 140 elseif(textpart(i)(1:8).eq.
'ELEMENT=')
then 141 if(surface(1:1).ne.
' ')
then 142 write(*,*)
'*ERROR reading PRE-TENSION SECTION:' 143 write(*,*)
' ELEMENT and SURFACE are' 144 write(*,*)
' mutually exclusive' 146 &
"*PRE-TENSION SECTION%")
148 read(textpart(i)(9:18),
'(i10)',iostat=istat) ielem
150 write(*,*)
'*ERROR reading PRE-TENSION SECTION:' 151 write(*,*)
' cannot read element number' 153 &
"*PRE-TENSION SECTION%")
155 if((ielem.gt.ne).or.(ielem.le.0))
then 156 write(*,*)
'*ERROR reading PRE-TENSION SECTION:' 157 write(*,*)
' element',ielem,
'is not defined' 159 &
"*PRE-TENSION SECTION%")
163 &
'*WARNING reading *PRE-TENSION SECTION: parameter not recog 166 & textpart(i)(1:index(textpart(i),
' ')-1)
168 &
"*PRE-TENSION SECTION%")
175 if(surface(1:1).ne.
' ')
then 178 if(set(i).eq.surface)
then 185 &
'*ERROR reading *PRE-TENSION SECTION: nonexistent surface' 186 write(*,*)
' or surface consists of nodes' 188 &
"*PRE-TENSION SECTION%")
190 elseif(ielem.gt.0)
then 191 if(lakon(ielem)(1:3).ne.
'B31')
then 192 write(*,*)
'*ERROR reading PRE-TENSION SECTION:' 193 write(*,*)
' element',ielem,
' is not a linear' 194 write(*,*)
' beam element' 198 write(*,*)
'*ERROR reading PRE-TENSION SECTION:' 199 write(*,*)
' either the parameter SURFACE or the' 200 write(*,*)
' parameter ELEMENT must be used' 202 &
"*PRE-TENSION SECTION%")
207 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
208 & ipoinp,inp,ipoinpc)
211 read(textpart(i)(1:20),
'(f20.0)',iostat=istat) xn(i)
212 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
213 &
"*PRE-TENSION SECTION%")
215 dd=dsqrt(xn(1)*xn(1)+xn(2)*xn(2)+xn(3)*xn(3))
244 call dsort(yn,in,three,kflag)
251 if(yn(i).lt.1.d-10) cycle
259 idof=8*(node2-1)+in(i)
260 call nident(ikmpc,idof,nmpc,id)
262 if(ikmpc(id).eq.idof)
then 263 idof=8*(node1-1)+in(i)
264 call nident(ikmpc,idof,nmpc,id)
266 if(ikmpc(id).eq.idof)
then 277 if(nmpc.gt.nmpc_)
then 278 write(*,*)
'*ERROR in equations: increase nmpc_' 281 labmpc(nmpc)=
'PRETENSION ' 296 if(dabs(xn(idir)).gt.1.d-10)
then 297 nodempc(1,mpcfree)=ndep
298 nodempc(2,mpcfree)=idir
299 coefmpc(mpcfree)=isign*xn(idir)
300 mpcfree=nodempc(3,mpcfree)
302 nodempc(1,mpcfree)=nind
303 nodempc(2,mpcfree)=idir
304 coefmpc(mpcfree)=-isign*xn(idir)
305 mpcfree=nodempc(3,mpcfree)
310 if(dabs(xn(idir)).gt.1.d-10)
then 311 nodempc(1,mpcfree)=ndep
312 nodempc(2,mpcfree)=idir
313 coefmpc(mpcfree)=isign*xn(idir)
314 mpcfree=nodempc(3,mpcfree)
316 nodempc(1,mpcfree)=nind
317 nodempc(2,mpcfree)=idir
318 coefmpc(mpcfree)=-isign*xn(idir)
319 mpcfree=nodempc(3,mpcfree)
324 if(dabs(xn(idir)).gt.1.d-10)
then 325 nodempc(1,mpcfree)=ndep
326 nodempc(2,mpcfree)=idir
327 coefmpc(mpcfree)=isign*xn(idir)
328 mpcfree=nodempc(3,mpcfree)
330 nodempc(1,mpcfree)=nind
331 nodempc(2,mpcfree)=idir
332 coefmpc(mpcfree)=-isign*xn(idir)
333 mpcfree=nodempc(3,mpcfree)
338 nodempc(1,mpcfree)=irefnode
340 coefmpc(mpcfree)=1.d0
342 mpcfree=nodempc(3,mpcfree)
343 nodempc(3,mpcfreeold)=0
345 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
346 & ipoinp,inp,ipoinpc)
350 write(*,*)
'*ERROR reading *PRE-TENSION SECTION' 351 write(*,*)
' all DOFS of the beam elements' 352 write(*,*)
' have been used previously' 359 if(dabs(xn(1)).lt.0.95d0)
then 360 xt(1)=1.d0-xn(1)*xn(1)
365 xt(2)=1.d0-xn(2)*xn(2)
368 dd=dsqrt(xt(1)*xt(1)+xt(2)*xt(2)+xt(3)*xt(3))
375 xd(1)=xn(2)*xt(3)-xn(3)*xt(2)
376 xd(2)=xn(3)*xt(1)-xn(1)*xt(3)
377 xd(3)=xn(1)*xt(2)-xn(2)*xt(1)
383 if((dabs(xn(lathyp(1,inum))).gt.1.d-3).and.
384 & (dabs(xt(lathyp(2,inum))).gt.1.d-3).and.
385 & (dabs(xd(lathyp(3,inum))).gt.1.d-3))
exit 395 m=iendset(iset)-istartset(iset)+1
406 iside=ialset(istartset(iset)+k-1)
407 nelem=int(iside/10.d0)
414 if(lakon(nelem)(4:4).eq.
'2')
then 417 elseif(lakon(nelem)(3:4).eq.
'D8')
then 420 elseif(lakon(nelem)(4:5).eq.
'10')
then 424 elseif(lakon(nelem)(4:4).eq.
'4')
then 428 elseif(lakon(nelem)(4:5).eq.
'15')
then 436 elseif(lakon(nelem)(3:4).eq.
'D6')
then 444 elseif((lakon(nelem)(2:2).eq.
'8').or.
445 & (lakon(nelem)(4:4).eq.
'8'))
then 452 if(lakon(nelem)(4:4).eq.
'8')
then 456 elseif((lakon(nelem)(2:2).eq.
'6').or.
457 & (lakon(nelem)(4:4).eq.
'6'))
then 463 if(lakon(nelem)(4:4).eq.
'6')
then 475 nodef(i)=kon(indexe+ifacetria(i,jface))
476 nodel(i)=ifacetria(i,jface)
478 elseif(nface.eq.4)
then 481 nodef(i)=kon(indexe+ifacequad(i,jface))
482 nodel(i)=ifacequad(i,jface)
486 nodef(i)=kon(indexe+ifacet(i,jface))
487 nodel(i)=ifacet(i,jface)
490 elseif(nface.eq.5)
then 493 nodef(i)=kon(indexe+ifacew1(i,jface))
494 nodel(i)=ifacew1(i,jface)
496 elseif(nope.eq.15)
then 498 nodef(i)=kon(indexe+ifacew2(i,jface))
499 nodel(i)=ifacew2(i,jface)
502 elseif(nface.eq.6)
then 504 nodef(i)=kon(indexe+ifaceq(i,jface))
505 nodel(i)=ifaceq(i,jface)
518 if(ics(1,id).eq.node)
then 523 kon(indexe+nodel(i))=ics(2,id)
540 kon(indexe+nodel(i))=nk
557 call nident(ikmpc,idof,nmpc,id)
560 if(nmpc.gt.nmpc_)
then 561 write(*,*)
'*ERROR in equations: increase nmpc_' 577 if(dabs(xt(idir)).gt.1.d-10)
then 578 nodempc(1,mpcfree)=nk
579 nodempc(2,mpcfree)=idir
580 coefmpc(mpcfree)=-xt(idir)
582 mpcfree=nodempc(3,mpcfree)
587 if(dabs(xt(idir)).gt.1.d-10)
then 588 nodempc(1,mpcfree)=nk
589 nodempc(2,mpcfree)=idir
590 coefmpc(mpcfree)=-xt(idir)
592 mpcfree=nodempc(3,mpcfree)
597 if(dabs(xt(idir)).gt.1.d-10)
then 598 nodempc(1,mpcfree)=nk
599 nodempc(2,mpcfree)=idir
600 coefmpc(mpcfree)=-xt(idir)
602 mpcfree=nodempc(3,mpcfree)
606 if(dabs(xt(idir)).gt.1.d-10)
then 607 nodempc(1,mpcfree)=node
608 nodempc(2,mpcfree)=jt
609 coefmpc(mpcfree)=xt(idir)
611 mpcfree=nodempc(3,mpcfree)
616 if(dabs(xt(idir)).gt.1.d-10)
then 617 nodempc(1,mpcfree)=node
618 nodempc(2,mpcfree)=idir
619 coefmpc(mpcfree)=xt(idir)
621 mpcfree=nodempc(3,mpcfree)
626 if(dabs(xt(idir)).gt.1.d-10)
then 627 nodempc(1,mpcfree)=node
628 nodempc(2,mpcfree)=idir
629 coefmpc(mpcfree)=xt(idir)
631 mpcfree=nodempc(3,mpcfree)
633 nodempc(3,mpcfreeold)=0
639 call nident(ikmpc,idof,nmpc,id)
642 if(nmpc.gt.nmpc_)
then 643 write(*,*)
'*ERROR in equations: increase nmpc_' 659 if(dabs(xd(idir)).gt.1.d-10)
then 660 nodempc(1,mpcfree)=nk
661 nodempc(2,mpcfree)=idir
662 coefmpc(mpcfree)=-xd(idir)
664 mpcfree=nodempc(3,mpcfree)
669 if(dabs(xd(idir)).gt.1.d-10)
then 670 nodempc(1,mpcfree)=nk
671 nodempc(2,mpcfree)=idir
672 coefmpc(mpcfree)=-xd(idir)
674 mpcfree=nodempc(3,mpcfree)
679 if(dabs(xd(idir)).gt.1.d-10)
then 680 nodempc(1,mpcfree)=nk
681 nodempc(2,mpcfree)=idir
682 coefmpc(mpcfree)=-xd(idir)
684 mpcfree=nodempc(3,mpcfree)
688 if(dabs(xd(idir)).gt.1.d-10)
then 689 nodempc(1,mpcfree)=node
690 nodempc(2,mpcfree)=idir
691 coefmpc(mpcfree)=xd(idir)
693 mpcfree=nodempc(3,mpcfree)
698 if(dabs(xd(idir)).gt.1.d-10)
then 699 nodempc(1,mpcfree)=node
700 nodempc(2,mpcfree)=idir
701 coefmpc(mpcfree)=xd(idir)
703 mpcfree=nodempc(3,mpcfree)
708 if(dabs(xd(idir)).gt.1.d-10)
then 709 nodempc(1,mpcfree)=node
710 nodempc(2,mpcfree)=idir
711 coefmpc(mpcfree)=xd(idir)
713 mpcfree=nodempc(3,mpcfree)
715 nodempc(3,mpcfreeold)=0
722 if(indexpret.eq.0)
then 724 call nident(ikmpc,idof,nmpc,id)
727 if(nmpc.gt.nmpc_)
then 728 write(*,*)
'*ERROR in equations: increase nmpc_' 731 labmpc(nmpc)=
'PRETENSION ' 758 if(indexpret.ne.0)
then 760 call nident(ikmpc,idof,nmpc,id)
763 if(nmpc.gt.nmpc_)
then 764 write(*,*)
'*ERROR in equations: increase nmpc_' 780 if(dabs(xn(idir)).gt.1.d-10)
then 781 nodempc(1,mpcfree)=nk
782 nodempc(2,mpcfree)=idir
783 coefmpc(mpcfree)=-xn(idir)
785 mpcfree=nodempc(3,mpcfree)
790 if(dabs(xn(idir)).gt.1.d-10)
then 791 nodempc(1,mpcfree)=nk
792 nodempc(2,mpcfree)=idir
793 coefmpc(mpcfree)=-xn(idir)
795 mpcfree=nodempc(3,mpcfree)
800 if(dabs(xn(idir)).gt.1.d-10)
then 801 nodempc(1,mpcfree)=nk
802 nodempc(2,mpcfree)=idir
803 coefmpc(mpcfree)=-xn(idir)
805 mpcfree=nodempc(3,mpcfree)
809 if(dabs(xn(idir)).gt.1.d-10)
then 810 nodempc(1,mpcfree)=node
811 nodempc(2,mpcfree)=idir
812 coefmpc(mpcfree)=xn(idir)
814 mpcfree=nodempc(3,mpcfree)
819 if(dabs(xn(idir)).gt.1.d-10)
then 820 nodempc(1,mpcfree)=node
821 nodempc(2,mpcfree)=idir
822 coefmpc(mpcfree)=xn(idir)
824 mpcfree=nodempc(3,mpcfree)
829 if(dabs(xn(idir)).gt.1.d-10)
then 830 nodempc(1,mpcfree)=node
831 nodempc(2,mpcfree)=idir
832 coefmpc(mpcfree)=xn(idir)
834 mpcfree=nodempc(3,mpcfree)
840 if(dabs(xn(idir)).gt.1.d-10)
then 841 nodempc(1,mpcfree)=nkref
842 nodempc(2,mpcfree)=idir
843 coefmpc(mpcfree)=xn(idir)
845 mpcfree=nodempc(3,mpcfree)
850 if(dabs(xn(idir)).gt.1.d-10)
then 851 nodempc(1,mpcfree)=nkref
852 nodempc(2,mpcfree)=idir
853 coefmpc(mpcfree)=xn(idir)
855 mpcfree=nodempc(3,mpcfree)
860 if(dabs(xn(idir)).gt.1.d-10)
then 861 nodempc(1,mpcfree)=nkref
862 nodempc(2,mpcfree)=idir
863 coefmpc(mpcfree)=xn(idir)
865 mpcfree=nodempc(3,mpcfree)
869 if(dabs(xn(idir)).gt.1.d-10)
then 870 nodempc(1,mpcfree)=noderef
871 nodempc(2,mpcfree)=idir
872 coefmpc(mpcfree)=-xn(idir)
874 mpcfree=nodempc(3,mpcfree)
879 if(dabs(xn(idir)).gt.1.d-10)
then 880 nodempc(1,mpcfree)=noderef
881 nodempc(2,mpcfree)=idir
882 coefmpc(mpcfree)=-xn(idir)
884 mpcfree=nodempc(3,mpcfree)
889 if(dabs(xn(idir)).gt.1.d-10)
then 890 nodempc(1,mpcfree)=noderef
891 nodempc(2,mpcfree)=idir
892 coefmpc(mpcfree)=-xn(idir)
894 mpcfree=nodempc(3,mpcfree)
896 nodempc(3,mpcfreeold)=0
898 nodempc(3,indexpret)=mpcfree
905 if(dabs(xn(idir)).gt.1.d-10)
then 906 nodempc(1,mpcfree)=nk
907 nodempc(2,mpcfree)=idir
908 coefmpc(mpcfree)=-xn(idir)
910 mpcfree=nodempc(3,mpcfree)
912 nodempc(1,mpcfree)=node
913 nodempc(2,mpcfree)=idir
914 coefmpc(mpcfree)=xn(idir)
916 mpcfree=nodempc(3,mpcfree)
921 if(dabs(xn(idir)).gt.1.d-10)
then 922 nodempc(1,mpcfree)=nk
923 nodempc(2,mpcfree)=idir
924 coefmpc(mpcfree)=-xn(idir)
926 mpcfree=nodempc(3,mpcfree)
928 nodempc(1,mpcfree)=node
929 nodempc(2,mpcfree)=idir
930 coefmpc(mpcfree)=xn(idir)
932 mpcfree=nodempc(3,mpcfree)
937 if(dabs(xn(idir)).gt.1.d-10)
then 938 nodempc(1,mpcfree)=nk
939 nodempc(2,mpcfree)=idir
940 coefmpc(mpcfree)=-xn(idir)
942 mpcfree=nodempc(3,mpcfree)
944 nodempc(1,mpcfree)=node
945 nodempc(2,mpcfree)=idir
946 coefmpc(mpcfree)=xn(idir)
948 mpcfree=nodempc(3,mpcfree)
954 if(ithermal(2).gt.0)
then 956 call nident(ikmpc,idof,nmpc,id)
959 if(nmpc.gt.nmpc_)
then 960 write(*,*)
'*ERROR in equations: increase nmpc_' 968 if(ithermal(2).gt.1)
then 971 labmpc(nmpc)=
'THERMALPRET ' 985 nodempc(1,mpcfree)=nk
987 coefmpc(mpcfree)=1.d0
988 mpcfree=nodempc(3,mpcfree)
990 nodempc(1,mpcfree)=node
992 coefmpc(mpcfree)=-1.d0
995 mpcfree=nodempc(3,mpcfree)
996 nodempc(3,mpcfreeold)=0
1001 if(ithermal(1).gt.0)
then 1012 if(lakon(nelem)(3:5).eq.
'D8R')
then 1014 elseif(lakon(nelem)(3:4).eq.
'D8')
then 1016 elseif(lakon(nelem)(4:6).eq.
'20R')
then 1018 elseif(lakon(nelem)(4:4).eq.
'2')
then 1020 elseif(lakon(nelem)(4:5).eq.
'10')
then 1022 elseif(lakon(nelem)(4:4).eq.
'4')
then 1024 elseif(lakon(nelem)(3:4).eq.
'D6')
then 1026 elseif(lakon(nelem)(4:5).eq.
'15')
then 1035 elseif((lakon(nelem)(3:3).eq.
'R').or.
1036 & (lakon(nelem)(5:5).eq.
'R'))
then 1045 xl2(j,i)=co(j,nodef(i))
1050 if((lakon(nelem)(3:5).eq.
'D8R').or.
1051 & ((lakon(nelem)(3:4).eq.
'D6').and.(nopes.eq.4)))
then 1055 elseif((lakon(nelem)(3:4).eq.
'D8').or.
1056 & (lakon(nelem)(4:6).eq.
'20R').or.
1057 & ((lakon(nelem)(4:5).eq.
'15').and.
1058 & (nopes.eq.8)))
then 1062 elseif(lakon(nelem)(4:4).eq.
'2')
then 1066 elseif((lakon(nelem)(4:5).eq.
'10').or.
1067 & ((lakon(nelem)(4:5).eq.
'15').and.
1068 & (nopes.eq.6)))
then 1072 elseif((lakon(nelem)(4:4).eq.
'4').or.
1073 & ((lakon(nelem)(3:4).eq.
'D6').and.
1074 & (nopes.eq.3)))
then 1081 elseif((lakon(nelem)(3:3).eq.
'R').or.
1082 & (lakon(nelem)(5:5).eq.
'R'))
then 1091 call shape8q(xi,et,xl2,xsj2,xs2,shp2,iflag)
1092 elseif(nopes.eq.4)
then 1093 call shape4q(xi,et,xl2,xsj2,xs2,shp2,iflag)
1094 elseif(nopes.eq.6)
then 1095 call shape6tri(xi,et,xl2,xsj2,xs2,shp2,iflag)
1096 elseif((nopes.eq.3).and.(.not.twod))
then 1097 call shape3tri(xi,et,xl2,xsj2,xs2,shp2,iflag)
1102 call shape3l(xi,xl2,xsj2,xs2,shp2,iflag)
1108 xsj=weight*dsqrt(xsj2(1)**2+xsj2(2)**2+xsj2(3)**2)
1109 elseif(lakon(nelem)(1:3).eq.
'CAX')
then 1115 r=r+shp2(4,i)*xl2(1,i)
1117 xsj=weight*xsj2(1)*r
1123 areanodal(i)=areanodal(i)+xsj*shp2(4,i)
1133 dcs(id)=dcs(id)+areanodal(i)
1138 nodempc(3,indexpret)=mpcfree
1139 nodempc(1,mpcfree)=irefnode
1140 nodempc(2,mpcfree)=1
1141 coefmpc(mpcfree)=area
1143 mpcfree=nodempc(3,mpcfree)
1144 nodempc(3,mpcfreeold)=0
1148 index1=ipompc(mpcpret)
1150 node=nodempc(1,nodempc(3,index1))
1154 coefmpc(index1)=coefmpc(index1)*area
1155 index1=nodempc(3,index1)
1157 if(nodempc(1,index1).eq.irefnode)
exit 1160 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
1161 & ipoinp,inp,ipoinpc)
subroutine shape8q(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape8q.f:20
subroutine shape3l(xi, xl, xsj, xs, shp, iflag)
Definition: shape3l.f:20
subroutine shape3tri(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape3tri.f:20
subroutine nident2(x, px, n, id)
Definition: nident2.f:27
subroutine shape4q(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape4q.f:20
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
subroutine nident(x, px, n, id)
Definition: nident.f:26
subroutine dsort(dx, iy, n, kflag)
Definition: dsort.f:6
subroutine shape6tri(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape6tri.f:20