C This subroutine is to transform the global stresses and strains to polar C coordinates. Axial (z) components are unchanged. C post code -1 Radial stress C post code -2 Tangential stress C post code -3 Shear stress (rt) C post code -11 Radial strain C post code -12 Tangential strain C post code -13 Shear strain (rt) C post codes 21-23 Plastic strain C post codes 31-33 Creep strain C The coordinates of the origin for polar coordinate system should be C specified by the user in the subroutine. C oc(1) is x-coordinate C oc(2) is y-coordinate C oc(3) is z-coordinate C subroutine plotv(v,s,sp,etot,eplas,ecreep,t,m,nn,layer,ndi, * nshear,jpltcd) c* * * * * * c c select a variable contour plotting (user subroutine). c c v variable c s (idss) stress array c sp stresses in preferred direction c etot total strain (generalized) c eplas total plastic strain c ecreep total creep strain c t current temperature c m element number c nn integration point number c layer layer number c ndi (3) number of direct stress components c nshear (3) number of shear stress components c c* * * * * * c c c----- stresses and strains in cartesian components c----- 8-node plane plane c----- brick strain stress c----- c----- s(1)=xx s(1)=xx s(1)=xx c----- s(2)=yy s(2)=yy s(2)=yy c----- s(3)=zz s(3)=zz s(3)=xy c----- s(4)=xy s(4)=xy c----- s(5)=yz c----- s(6)=xz c implicit real*8 (a-h,o-z) dp include '../common/concom' parameter (LDBG = 0) c dimension s(1),etot(1),eplas(1),ecreep(1),sp(1),ccint(12) dimension oc(3),t(3) dimension temp(6) c C Read the origin of cylindrical coordinate system oc(1) = 0. oc(2) = 0. oc(3) = 0. C compute the angle between r and x axes call icoord(ccint) distx = ccint(1) - oc(1) disty = ccint(2) - oc(2) dist = sqrt(distx*distx + disty*disty) sth = disty/dist cth = distx/dist theta = atan((ccint(2)-oc(2))/(ccint(1)-oc(1))) C Transform the stress tensor if(jpltcd.ge.1 .and. jpltcd.le.3) then do 20 i=1,ndi+nshear 20 temp(i)=s(i) temp(ndi+1)=2.*s(ndi+1) elseif(jpltcd.ge.11 .and. jpltcd.le.13) then do 30 i=1,ndi+nshear 30 temp(i)=etot(i) elseif(jpltcd.ge.21 .and. jpltcd.le.23) then do 40 i=1,ndi+nshear 40 temp(i)=eplas(i) elseif(jpltcd.ge.31 .and. jpltcd.le.33) then do 50 i=1,ndi+nshear 50 temp(i)=ecreep(i) endif goto(100,200,300) mod(jpltcd,10) 100 v = temp(1)*cth*cth + temp(2)*sth*sth + temp(ndi+1)*cth*sth go to 101 200 v = temp(1)*sth*sth + temp(2)*cth*cth - temp(ndi+1)*cth*sth go to 101 300 v=(temp(2)-temp(1))*cth*sth+0.5*temp(ndi+1)*(cth*cth-sth*sth) 101 continue if (LDBG) then write(6,199) m,nn,v,temp(1),temp(2),temp(3) if (v.ne.0.d0) then write(6,198) ccint(1),ccint(2),distx,disty,dist,cth,sth endif endif 198 format("ccint(1&2),distx&y,dist,cth,sth",7(f15.3)) 199 format("el,int pt.,v,temp", 2(i5),4(f15.3)) return end c c subroutine icoord(ccint) implicit real*8 (a-h,o-z) dp include '../common/lass' include '../common/dimen' include '../common/space' include '../common/arrays' include '../common/array4' include '../common/heat' dimension ccint(12) la1 = (n-1)*nelstr + icrxpt + (nn-1)*ncrd do 1 ii=1,ncrd ccint(ii) = vars(la1) la1 = la1 + 1 1 continue return end c c This routine puts nodal quantities into polar coordinates. c Current coordinates and displacements will be converted c from (x,y) to (r,theta). The z values should be obtained c from the standard cartesian output. The marc dat file should c set column 10 of the POST dataline to 2 (number of user-defined c post vectors) to get both coordinates & displacements in c polar coordinates. c subroutine upostv(n,ndeg,ncrd,numnp,iantyp,jnode,iuid,upost, * xord,vector,inc,cptim) implicit real*8 (a-h,o-z) c user subroutine to define nodal post variables c n user node number c ndeg number of degrees of freedom per node c ncrd number of coordinates per node c iantyp analysis type - see PLDUMP in volume D c jnode number of vector quantities already defined - see PLDUMP in vol D c iuid user vector number c upost user defined components of vector for this node c xord coordinates of this node c vector displacement, etc of this node. c see iantyp/jnode table in PLDUMP section in volume D c inc increment number c cptim total time c include '../common/pival' parameter (LDBG = 0) dimension upost(ndeg),xord(ncrd),vector(ndeg,jnode) c c fill upost with R,Theta coordinates c theta is in degrees, between -180 & 180 with c theta=0 aligned with x-axis c for now assume center is at 0,0 c c iuid=1 will be current coordinates in polar coords c if(iuid.eq.1) then upost(1) = 0.d0 do 10 i=1,2 upost(1)=upost(1) + (xord(i)+vector(i,1))**2 10 continue upost(1) = sqrt(upost(1)) upost(2)=(atan2((xord(2)+vector(2,1)),(xord(1)+vector(1,1))))* 1 180.d0/pi endif c c iuid=2 will be displacements in polar coords c if(iuid.eq.2) then upost(1) = 0.d0 do 20 i=1,2 upost(1)=upost(1) + vector(i,1)**2 20 continue upost(1) = sqrt(upost(1)) upost(2)=(atan2(vector(2,1),vector(1,1)))*180.d0/pi endif if (LDBG) then if(n.eq.1.and.iuid.eq.1) write(6,101) if(n.ge.1.and.n.le.10) then write(6,102) n,iuid,upost(1),upost(2),vector(1,1),vector(2,1) endif endif 101 format(" node iuid upost(1) upost(2)") 102 format("",2(i10),4(1f15.3)) return end