Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- subroutine MESH02_FINE(d_branch,thickness_p,thickness_b,& gap,gap2,area_w,angle_wrtb,vl_runpipe,& vl_branch,size_w,nnode,nelem,INODE,coord,&larray_ele,key_point,r_cc,iabaqus)
- parameter (nnmax=2000,nemax=1000)
- IMPLICIT REAL*8 (A-H, O-Z)
- DIMENSION :: KEY_POINT(*),LARRAY_ELE(8,*)
- DIMENSION INODE(*),COORD(2,*)
- DIMENSION :: x(1000),y(1000),n_repeat(10,2)
- DIMENSION :: co_f(2),co_l(2),dist(4),larray2D(1000,5)
- DIMENSION :: INODE_TEMP1(10000), IELEM_TEMP1(4,10000)& , INELEM_TEMP1(4,10000)
- DIMENSION :: INODE_TEMP2(10000), IELEM_TEMP2(4,10000)& , INELEM_TEMP2(4,10000)
- REAL*8 COORD_TEMP1(2,10000),COORD_TEMP2(2,10000)
- INTEGER NDEN1, NDEN2,NDEN3,NDEN4,NDEN5,NDEN6,NDEN7,NDEN8,NDEN9& ,NDEN10
- INTEGER NDEN11, NDEN12,NDEN13,NDEN14,NDEN15,NDEN16,NDEN17,NDEN18&,NDEN19,NDEN20
- common /coord/x,y
- COMMON /MESHING/DLENGTH1, DHAZ, DLENGTH2, DBAND, DMESHSIZE
- INTEGER NNUM_HAZ, NNUM_WELD, NNUM_PIPE, NNUM_SLEEVE
- REAL*8 ELEMSIZE, ELLP_X1, ELLP_X2, ELLP_Y1, ELLP_Y2
- REAL*8 POINTS(2,50),CORNERS(2,4)
- INTEGER ITOTALNODES, ITOTALELEMS, ITOTALNODES2, ITOTALELEMS2&, NRESIDUAL&, NCOARSESIDE
- REAL*8 DTEMP1, DTEMP2
- LOGICAL BTRAN
- INTEGER NNUM_HAZ_H, NNUM_HAZ_V, NNUM_BAND, NNUM_PIPE_TRAN& , NNUM_PIPE_END
- BTRAN = .TRUE.
- zero=0.0d0
- DPI = DASIN(1.0D0)*2.0D0
- electro_ang = angle_wrtb*DPI/180.0D0
- wprep_ang = 0.5 * electro_ang
- write(*,3) "Estimated cross-sectional area ", & "of the weld deposit =", weldarea,"mm^2."
- 3 format(1x,A,A,ES9.2,1x,A,A)
- angle1=electro_ang
- angle2=wprep_ang
- ROOTGAP = GAP
- VLAND = GAP2
- if (rootgap .lt. 0.5*vland) rootgap=0.5*vland
- vxmin=0.3*vland
- vymin=vxmin*tan(angle2)
- weldmin=rootgap*(vland+vxmin) & +0.5d0*vxmin*vymin& +0.5d0*(vymin+rootgap)**2/tan(angle1)
- if (area_W.le. weldmin) then
- vx=zero
- vy=zero
- rootgap=sqrt(AREA_W)
- vland=rootgap
- size_w=zero
- r_cc=0.5*rootgap
- else
- a=0.5*tan(angle2)*(1.+tan(angle2)/tan(angle1))
- b=rootgap*(1.+tan(angle2)/tan(angle1))
- c=rootgap*vland+0.5*rootgap*rootgap/tan(angle1)-AREA_W
- vx=0.5*(-b+sqrt(b*b-4.*a*c))/a
- if (vland+vx .gt. THICKNESS_B-0.1D0) then
- vx=THICKNESS_B-vland
- vy=vx*tan(angle2)
- area3=AREA_W-rootgap*vland-0.5*vx*(2.*rootgap+vy)
- weldsize=vx+2.*area3/(vy+rootgap)
- electro_ang=atan((vy+rootgap)/(weldsize-vx))
- else
- vy=vx*tan(angle2)
- weldsize=vx+(vy+rootgap)/tan(angle1)
- endif
- size_w=(vy+rootgap)/sin(electro_ang)
- r_cc=0.5*size_w
- endif
- CALL INITMESH(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1, COORD_TEMP1 & , 10000,10000)
- CALL KEYPOINTS_BRANCH(D_BRANCH-2*THICKNESS_B,THICKNESS_P& ,THICKNESS_B, ROOTGAP,VLAND,
- 1 VX,WELDSIZE,ANGLE1,VL_RUNPIPE,VL_BRANCH,POINTS,50)
- ELLP_X1 = DLENGTH1
- ELLP_Y1 = DHAZ
- NNUM_HAZ = ELLP_X1/DMESHSIZE
- NNUM_HAZ_T = DHAZ/DMESHSIZE
- NNUM_WELD_PIPE = 0.75D0*NNUM_HAZ ! REDUCE THE NUMBER BY HALF
- NRESIDUAL = NNUM_HAZ-NNUM_WELD_PIPE
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NNUM_WELD_PIPE = NNUM_WELD_PIPE + 1
- END IF
- IF ( NNUM_WELD_PIPE .EQ. NNUM_HAZ ) NNUM_WELD_PIPE = NNUM_HAZ-2
- IF ( NNUM_WELD_PIPE .LT.2 ) THEN
- NNUM_WELD_PIPE = 2
- NNUM_HAZ = 4
- END IF
- IFINESIDE = NNUM_HAZ+1 !THESE ARE THE DEFINING NUMBERS FOR THE MESH
- ISIDE = NNUM_HAZ_T+1
- ICOARSESIDE = NNUM_WELD_PIPE +1
- NDEN1 = NNUM_HAZ
- NDEN2 = NNUM_HAZ_T
- NDEN12 = NNUM_WELD_PIPE
- ITOTALNODES = 0
- ITOTALELEMS = 0
- CALL INITMESH(INODE_TEMP1,IELEM_TEMP1,INELEM_TEMP1, COORD_TEMP1& , 10000,10000)
- CALL MESHRECTANGLE_TRANSITION2(IFINESIDE,ICOARSESIDE, ISIDE& , INODE_TEMP1, & IELEM_TEMP1,INELEM_TEMP1, COORD_TEMP1)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- CORNERS(1,1) = POINTS(1,3)
- CORNERS(2,1) = POINTS(2,3)
- CORNERS(1,2) = POINTS(1,4)
- CORNERS(2,2) = POINTS(2,4)
- CORNERS(1,3) = POINTS(1,2)
- CORNERS(2,3) = POINTS(2,2)
- CORNERS(1,4) = POINTS(1,1)
- CORNERS(2,4) = POINTS(2,1)
- CALL TRANSFORMNODES(COORD_TEMP1,CORNERS,ITOTALNODES,1.0D0,1.0D0)
- ISIDE = DHAZ*ISIDE*0.75D0/DBAND
- NCOARSESIDE = 0.4D0*(IFINESIDE-1)
- NRESIDUAL = NNUM_HAZ-NCOARSESIDE
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NCOARSESIDE = NCOARSESIDE +1
- END IF
- ICOARSESIDE = NCOARSESIDE +1
- NDEN4 = NCOARSESIDE
- NDEN3 = ISIDE-1
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- CALL MESHRECTANGLE_TRANSITION2(IFINESIDE,ICOARSESIDE, ISIDE & , INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CORNERS(1,1) = POINTS(1,4)
- CORNERS(2,1) = POINTS(2,4)
- CORNERS(1,2) = POINTS(1,3)
- CORNERS(2,2) = POINTS(2,3)
- CORNERS(1,3) = POINTS(1,5)
- CORNERS(2,3) = POINTS(2,5)
- CORNERS(1,4) = POINTS(1,6)
- CORNERS(2,4) = POINTS(2,6)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.2D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1, & ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- IFINESIDE = ICOARSESIDE
- NCOARSESIDE = 0.33D0*(IFINESIDE-1)
- IF ( NCOARSESIDE .LT. 5 ) NCOARSESIDE = 5
- NRESIDUAL = (IFINESIDE-1)-NCOARSESIDE
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NCOARSESIDE = NCOARSESIDE +1
- END IF
- ICOARSESIDE = NCOARSESIDE +1
- IF ( (IFINESIDE - ICOARSESIDE).LT. 2 ) BTRAN = .FALSE.
- DTEMP1 = DSQRT((POINTS(1,6)-POINTS(1,5))*(POINTS(1,6)-POINTS(1,5)) & + (POINTS(2,6)-POINTS(2,5))*(POINTS(2,6)-POINTS(2,5)))
- DTEMP2 = DSQRT((POINTS(1,7)-POINTS(1,5))*(POINTS(1,7)-POINTS(1,5))& + (POINTS(2,7)-POINTS(2,5))*(POINTS(2,7)-POINTS(2,5)))
- ISIDE = 0.5D0*IFINESIDE*DTEMP2/DTEMP1
- IF ( ISIDE .LT. 3 ) ISIDE = 3
- NDEN5 = NCOARSESIDE
- NDEN6 = ISIDE -1
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- IF ( BTRAN ) THEN
- CALL MESHRECTANGLE_TRANSITION2(IFINESIDE,ICOARSESIDE, ISIDE& , INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- CALL MESHRECTANGLE(IFINESIDE, ISIDE, INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- END IF
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2,& ITOTALELEMS2,3,2)!!THIS SAYS: SET FACE 3 TO FORCED 2
- CORNERS(1,1) = POINTS(1,6)
- CORNERS(2,1) = POINTS(2,6)
- CORNERS(1,2) = POINTS(1,5)
- CORNERS(2,2) = POINTS(2,5)
- CORNERS(1,3) = POINTS(1,7)
- CORNERS(2,3) = POINTS(2,7)
- CORNERS(1,4) = POINTS(1,8)
- CORNERS(2,4) = POINTS(2,8)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.5D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- BTRAN = .TRUE.
- IFINESIDE = NDEN2+1
- ISIDE = NDEN3+1
- NCOARSESIDE = 0.75D0*(IFINESIDE-1)
- NRESIDUAL = (IFINESIDE-1)-NCOARSESIDE
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NCOARSESIDE = NCOARSESIDE +1
- END IF
- ICOARSESIDE = NCOARSESIDE +1
- IF ( (IFINESIDE - ICOARSESIDE).LT. 2 ) BTRAN = .FALSE.
- IF ( BTRAN ) THEN
- NDEN7 = NCOARSESIDE
- ELSE
- NDEN7 = IFINESIDE - 1
- END IF
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- IF ( BTRAN ) THEN
- CALL MESHRECTANGLE_TRANSITION2(IFINESIDE,ICOARSESIDE, ISIDE & , INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- CALL MESHRECTANGLE(IFINESIDE, ISIDE, INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- END IF
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2,& ITOTALELEMS2,2,1)!!THIS SAYS: SET FACE 2 TO 1,FREE
- CORNERS(1,1) = POINTS(1,3)
- CORNERS(2,1) = POINTS(2,3)
- CORNERS(1,2) = POINTS(1,1)
- CORNERS(2,2) = POINTS(2,1)
- CORNERS(1,3) = POINTS(1,10)
- CORNERS(2,3) = POINTS(2,10)
- CORNERS(1,4) = POINTS(1,5)
- CORNERS(2,4) = POINTS(2,5)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.2D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- IF ( BTRAN ) THEN
- CALL MESHRECTANGLE_TRANSITION2(IFINESIDE,ICOARSESIDE, ISIDE & , INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- CALL MESHRECTANGLE(IFINESIDE, ISIDE, INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- END IF
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2, & ITOTALELEMS2,4,1)!!THIS SAYS: SET FACE 4 TO 1, FREE CONVECTION
- CORNERS(1,1) = POINTS(1,2)
- CORNERS(2,1) = POINTS(2,2)
- CORNERS(1,2) = POINTS(1,4)
- CORNERS(2,2) = POINTS(2,4)
- CORNERS(1,3) = POINTS(1,6)
- CORNERS(2,3) = POINTS(2,6)
- CORNERS(1,4) = POINTS(1,12)
- CORNERS(2,4) = POINTS(2,12)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.2D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- BTRAN = .TRUE.
- IFINESIDE = NDEN7+1
- ISIDE = NDEN6+1
- NCOARSESIDE = 0.2D0*(IFINESIDE-1)
- IF ( NCOARSESIDE .LT. 5 ) NCOARSESIDE = 5
- NRESIDUAL = (IFINESIDE-1)-NCOARSESIDE
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NCOARSESIDE = NCOARSESIDE +1
- END IF
- ICOARSESIDE = NCOARSESIDE +1
- IF ( (IFINESIDE - ICOARSESIDE).LT. 2 ) BTRAN = .FALSE.
- IF ( BTRAN ) THEN
- NDEN8 = NCOARSESIDE
- ELSE
- NDEN8 = IFINESIDE - 1
- END IF
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- IF ( BTRAN ) THEN
- CALL MESHRECTANGLE_TRANSITION2(IFINESIDE,ICOARSESIDE, ISIDE& , INODE_TEMP2, & IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- CALL MESHRECTANGLE(IFINESIDE, ISIDE, INODE_TEMP2, & IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- END IF
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2,& ITOTALELEMS2,2,1)!!THIS SAYS: SET 2 TO 1, FREE CONVECTION
- CORNERS(1,1) = POINTS(1,5)
- CORNERS(2,1) = POINTS(2,5)
- CORNERS(1,2) = POINTS(1,10)
- CORNERS(2,2) = POINTS(2,10)
- CORNERS(1,3) = POINTS(1,11)
- CORNERS(2,3) = POINTS(2,11)
- CORNERS(1,4) = POINTS(1,7)
- CORNERS(2,4) = POINTS(2,7)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.5D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- IF ( BTRAN ) THEN
- CALL MESHRECTANGLE_TRANSITION2(IFINESIDE,ICOARSESIDE, ISIDE &, INODE_TEMP2, & IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- CALL MESHRECTANGLE(IFINESIDE, ISIDE, INODE_TEMP2, & IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- END IF
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2,& ITOTALELEMS2,4,1)!!THIS SAYS: SET FACE 1 TO 1, FREE CONVECTION
- CORNERS(1,1) = POINTS(1,12)
- CORNERS(2,1) = POINTS(2,12)
- CORNERS(1,2) = POINTS(1,6)
- CORNERS(2,2) = POINTS(2,6)
- CORNERS(1,3) = POINTS(1,8)
- CORNERS(2,3) = POINTS(2,8)
- CORNERS(1,4) = POINTS(1,13)
- CORNERS(2,4) = POINTS(2,13)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.5D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- DTEMP1 = DSQRT((POINTS(1,11)-POINTS(1,10))*(POINTS(1,11)& -POINTS(1,10))& + (POINTS(2,11)-POINTS(2,10))*(POINTS(2,11)-POINTS(2,10)))
- DTEMP2 = DSQRT((POINTS(1,11)-POINTS(1,14))*(POINTS(1,11)&-POINTS(1,14))& + (POINTS(2,11)-POINTS(2,14))*(POINTS(2,11)-POINTS(2,14)))
- NDEN9 = 0.6D0*NDEN6*DTEMP2/DTEMP1
- DGRADE = 1.0D0
- IF ( NDEN9 .LT.3 ) THEN
- NDEN9 =3
- ELSE IF ( NDEN9/NDEN6 .GT. 10 ) THEN
- NDEN9 = NDEN9/2
- DGRADE = 1.5d0
- END IF
- NDEN10 = NDEN8-2
- BTRAN = .TRUE.
- IFINESIDE = NDEN8+1
- IF ( IFINESIDE .LE. 3 ) BTRAN = .FALSE.
- ISIDE = NDEN9+1
- IF ( BTRAN ) THEN
- ELSE
- NDEN10 = IFINESIDE -1
- END IF
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- IF ( BTRAN ) THEN
- CALL MESHRECTANGLE_TRANSITION(IFINESIDE, ISIDE, INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- CALL MESHRECTANGLE(IFINESIDE, ISIDE, INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- END IF
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2,& ITOTALELEMS2,4,2)!!THIS SAYS: SET FACE 4 TO 2, FORCED
- CORNERS(1,1) = POINTS(1,7)
- CORNERS(2,1) = POINTS(2,7)
- CORNERS(1,2) = POINTS(1,11)
- CORNERS(2,2) = POINTS(2,11)
- CORNERS(1,3) = POINTS(1,14)
- CORNERS(2,3) = POINTS(2,14)
- CORNERS(1,4) = POINTS(1,15)
- CORNERS(2,4) = POINTS(2,15)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,DGRADE)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1, & ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2 & , 10000,10000)
- IF ( BTRAN ) THEN
- CALL MESHRECTANGLE_TRANSITION(IFINESIDE, ISIDE, INODE_TEMP2, & IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- CALL MESHRECTANGLE(IFINESIDE, ISIDE, INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- END IF
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2, &ITOTALELEMS2,2,2)!!THIS SAYS: SET FACE 2 TO 2, FORCED
- CORNERS(1,1) = POINTS(1,13)
- CORNERS(2,1) = POINTS(2,13)
- CORNERS(1,2) = POINTS(1,8)
- CORNERS(2,2) = POINTS(2,8)
- CORNERS(1,3) = POINTS(1,17)
- CORNERS(2,3) = POINTS(2,17)
- CORNERS(1,4) = POINTS(1,16)
- CORNERS(2,4) = POINTS(2,16)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,DGRADE)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- CALL MARKELEMENTS(IELEM_TEMP1, ITOTALELEMS, 2,1)
- DIST1 = DSQRT((POINTS(1,21)-POINTS(1,22))*(POINTS(1,21)&-POINTS(1,22)) & + (POINTS(2,21)-POINTS(2,22))*(POINTS(2,21)-POINTS(2,22)))
- DIST1 = ( DIST1 + WELDSIZE)*0.5D0
- DIST2 = VLAND
- NDEN11 = NDEN12*(DIST1)/(DIST1+VLAND)
- IF ( NDEN11 .LT. 3 .AND. DIST1 .GT. 1.0D-2) THEN
- NDEN11 = 3
- ELSE IF ( DIST1 .LE. 1.0D-2 ) THEN
- NDEN11 = 0
- END IF
- NDEN13 = NDEN12-NDEN11
- IF ( NDEN13 .EQ. 0 ) THEN
- NDEN13 = 1
- NDEN11 = NDEN12 - NDEN13
- END IF
- NDEN14 = NDEN13*ROOTGAP/VLAND
- IFINESIDE = NDEN13+1
- ISIDE = NDEN14+1
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- CALL MESHRECTANGLE(IFINESIDE, ISIDE, INODE_TEMP2, & IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,3)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2,& ITOTALELEMS2,4,1)!!THIS SAYS: SET FACE 4 TO 1, FREE
- CORNERS(1,1) = POINTS(1,1)
- CORNERS(2,1) = POINTS(2,1)
- CORNERS(1,2) = POINTS(1,9)
- CORNERS(2,2) = POINTS(2,9)
- IF ( NDEN11 .GT. 0 ) THEN
- CORNERS(1,2) = POINTS(1,1) + NDEN13*(VLAND+WELDSIZE)/NDEN12
- END IF
- CORNERS(1,3) = POINTS(1,21)
- CORNERS(2,3) = POINTS(2,21)
- CORNERS(1,4) = POINTS(1,20)
- CORNERS(2,4) = POINTS(2,20)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.0D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- IF ( NDEN11 .GT. 0 ) THEN
- ICOARSESIDE = NDEN14+1
- DIST1 = DSQRT((POINTS(1,2)-POINTS(1,22))*(POINTS(1,2)& -POINTS(1,22))& + (POINTS(2,2)-POINTS(2,22))*(POINTS(2,2)-POINTS(2,22)))
- NFINESIDE = NDEN14*DIST1/ROOTGAP
- NRESIDUAL = NFINESIDE-NDEN14
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NFINESIDE = NFINESIDE +1
- END IF
- IF ( (NFINESIDE - NDEN14) .LT. 2 ) NFINESIDE = NDEN14+2
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2& , COORD_TEMP2,& 10000,10000)
- CALL MESHRECTANGLE_TRANSITION2(NFINESIDE+1,NDEN14+1, NDEN11+1, & INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,3)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2& ,INELEM_TEMP2,& ITOTALELEMS2,2,1)!!THIS SAYS: SET FACE TO 1, FREE
- CORNERS(1,4) = POINTS(1,1) + NDEN13*(WELDSIZE+VLAND)/NDEN12
- CORNERS(2,4) = POINTS(2,9)
- CORNERS(1,1) = POINTS(1,2)
- CORNERS(2,1) = POINTS(2,2)
- CORNERS(1,2) = POINTS(1,22)
- CORNERS(2,2) = POINTS(2,22)
- CORNERS(1,3) = POINTS(1,21)
- CORNERS(2,3) = POINTS(2,21)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0& ,1.0D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- END IF
- IF ( NDEN11 > 0 ) THEN
- DIST1 = DSQRT((POINTS(1,23)-POINTS(1,22))*(POINTS(1,23) & -POINTS(1,22))& + (POINTS(2,23)-POINTS(2,22))*(POINTS(2,23)-POINTS(2,22)))
- IF ( DIST1 .LT. 1.0D-6 ) THEN
- DSIZE = ROOTGAP/NDEN13
- NDEN17 = THICKNESS_B/DSIZE
- NRESIDUAL = NDEN17-NDEN13
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NDEN17 = NDEN17 +1
- END IF
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2& , COORD_TEMP2& , 10000,10000)
- CALL MESHRECTANGLE_TRANSITION2(NDEN17+1, NDEN13+1& , NDEN11+1& ,INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2 & ,INELEM_TEMP2,& ITOTALELEMS2,2,1)!!THIS SAYS: SET FACE 3 TO 1,FREE
- CORNERS(1,1) = POINTS(1,23)
- CORNERS(2,1) = POINTS(2,23)
- CORNERS(1,2) = POINTS(1,25)
- CORNERS(2,2) = POINTS(2,25)
- CORNERS(1,3) = POINTS(1,20)
- CORNERS(2,3) = POINTS(2,20)
- CORNERS(1,4) = POINTS(1,21)
- CORNERS(2,4) = POINTS(2,21)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0& ,1.0D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1& , INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2& , IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- ELSE
- DIST1 = DSQRT((POINTS(1,24)-POINTS(1,22))*(POINTS(1,24)-&POINTS(1,22)) &+ (POINTS(2,24)-POINTS(2,22))*(POINTS(2,24)& -POINTS(2,22)))
- NDEN15 = NDEN13*DIST1/VLAND
- NRESIDUAL = NDEN15-NDEN13
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NDEN15 = NDEN15 +1
- END IF
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2& , COORD_TEMP2& , 10000,10000)
- CALL MESHRECTANGLE_TRANSITION2(NDEN15+1, NDEN13+1& , NDEN11+1& ,INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2& ,INELEM_TEMP2,& ITOTALELEMS2,4,1)!!THIS SAYS: SET FACE 4 TO 1,FREE
- CORNERS(1,1) = POINTS(1,22)
- CORNERS(2,1) = POINTS(2,22)
- CORNERS(1,2) = POINTS(1,24)
- CORNERS(2,2) = POINTS(2,24)
- CORNERS(1,3) = POINTS(1,20)
- CORNERS(2,3) = POINTS(2,20)
- CORNERS(1,4) = POINTS(1,21)
- CORNERS(2,4) = POINTS(2,21)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0&,1.0D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1& , INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2& , IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- NDEN17 = 0.5D0*NDEN15
- NRESIDUAL = NDEN15-NDEN17
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NDEN17 = NDEN17 + 1
- END IF
- NDEN16 = NDEN11*(POINTS(2,25)-POINTS(2,24))/(POINTS(2,24)-& POINTS(2,20))
- IF ( NDEN16 .EQ. 0 ) NDEN16 = 1
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2& , COORD_TEMP2& , 10000,10000)
- CALL MESHRECTANGLE_TRANSITION2(NDEN15+1, NDEN17+1 & , NDEN16+1& ,INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2 & ,INELEM_TEMP2,& ITOTALELEMS2,2,1)!!THIS SAYS: SET FACE 4 TO 1,FREE
- CORNERS(1,1) = POINTS(1,24)
- CORNERS(2,1) = POINTS(2,24)
- CORNERS(1,2) = POINTS(1,22)
- CORNERS(2,2) = POINTS(2,22)
- CORNERS(1,3) = POINTS(1,23)
- CORNERS(2,3) = POINTS(2,23)
- CORNERS(1,4) = POINTS(1,25)
- CORNERS(2,4) = POINTS(2,25)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0 & ,1.0D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1& , INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2& , IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- END IF
- ELSE
- DIST1 = POINTS(1,23)-POINTS(1,25)
- DIST2 = POINTS(1,21)-POINTS(1,20)
- DIST3 = POINTS(2,20)-POINTS(2,1)
- DIST4 = POINTS(2,25)-POINTS(2,20)
- NDEN17 = 0.75D0*DIST1*NDEN13/DIST2
- ISIDE = 0.75D0*NDEN14*DIST4/DIST3+1
- NRESIDUAL = NDEN17-NDEN13
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NDEN17 = NDEN17 +1
- END IF
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2 & , COORD_TEMP2& , 10000,10000)
- CALL MESHRECTANGLE_TRANSITION2(NDEN17+1, NDEN13+1, ISIDE& ,INODE_TEMP2, & IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2& ,INELEM_TEMP2,& ITOTALELEMS2,2,1)!!THIS SAYS: SET FACE 3 TO 1,FREE
- CORNERS(1,1) = POINTS(1,20)
- CORNERS(2,1) = POINTS(2,20)
- CORNERS(1,2) = POINTS(1,21)
- CORNERS(2,2) = POINTS(2,21)
- CORNERS(1,3) = POINTS(1,23)
- CORNERS(2,3) = POINTS(2,23)
- CORNERS(1,4) = POINTS(1,25)
- CORNERS(2,4) = POINTS(2,25)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0& ,1.0D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- END IF
- NDEN18 = 0.5D0*NDEN17
- NRESIDUAL = NDEN17-NDEN18
- IF ( MOD(NRESIDUAL,2) .NE.0 ) THEN
- NDEN18 = NDEN18 +1
- END IF
- DSIZE = 5.0D0*DSIZE
- ISIDE = 0.25D0*(POINTS(2,26)-POINTS(2,25))/DSIZE
- IF ( ISIDE .LT. 3 ) ISIDE = 3
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000 & ,10000)
- IF ( NDEN17 .GE. 3 ) THEN
- CALL MESHRECTANGLE_TRANSITION2(NDEN17+1, NDEN18+1, ISIDE & ,INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- NDEN18 = NDEN17
- CALL MESHRECTANGLE(NDEN17+1, ISIDE, INODE_TEMP2, & IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- END IF
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2, & ITOTALELEMS2,2,1)!!THIS SAYS: SET FACE 3 TO 1,FREE
- CORNERS(1,1) = POINTS(1,25)
- CORNERS(2,1) = POINTS(2,25)
- CORNERS(1,2) = POINTS(1,23)
- CORNERS(2,2) = POINTS(2,23)
- CORNERS(1,3) = POINTS(1,23)
- CORNERS(2,3) = POINTS(2,23)+0.25D0*(POINTS(2,27)-POINTS(2,23))
- CORNERS(1,4) = POINTS(1,25)
- CORNERS(2,4) = POINTS(2,25)+0.25D0*(POINTS(2,26)-POINTS(2,25))
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.5D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2& , 10000,10000)
- CALL MESHRECTANGLE(NDEN18+1, 5,INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP2, 10000,ITOTALNODES2)
- CALL GETELEMNUMBER(IELEM_TEMP2, 10000,ITOTALELEMS2)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2,& ITOTALELEMS2,2,1)!!THIS SAYS: SET FACE 3 TO 1,FREE
- CORNERS(1,1) = POINTS(1,25)
- CORNERS(2,1) = POINTS(2,25)+0.25D0*(POINTS(2,26)-POINTS(2,25))
- CORNERS(1,2) = POINTS(1,23)
- CORNERS(2,2) = POINTS(2,23)+0.25D0*(POINTS(2,27)-POINTS(2,23))
- CORNERS(1,3) = POINTS(1,27)
- CORNERS(2,3) = POINTS(2,27)
- CORNERS(1,4) = POINTS(1,26)
- CORNERS(2,4) = POINTS(2,26)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,1.0D0,1.5D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1,& ITOTALNODES,ITOTALELEMS,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES2, ITOTALELEMS2, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- X = POINTS(1,2)
- Y = POINTS(2,2)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,X,Y& ,KEY_POINT(1))
- X = POINTS(1,22)
- Y = POINTS(2,22)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,X,Y & ,KEY_POINT(2))
- X = (POINTS(1,2)+ POINTS(1,22))*0.5D0
- Y = (POINTS(2,2)+ POINTS(2,22))*0.5D0
- CALL FINDCLOSESTNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,X,Y & ,KEY_POINT(3))
- X = POINTS(1,1)
- Y = POINTS(2,1)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,X,Y& ,KEY_POINT(4))
- X = POINTS(1,20)
- Y = POINTS(2,20)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,X,Y& ,KEY_POINT(5))
- X = POINTS(1,7)
- Y = POINTS(2,7)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,X,Y& ,KEY_POINT(9))
- X = POINTS(1,8)
- Y = POINTS(2,8)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,X,Y & ,KEY_POINT(10))
- X = (POINTS(1,7)+ POINTS(1,8))*0.5D0
- Y = (POINTS(2,7)+ POINTS(2,8))*0.5D0
- CALL FINDCLOSESTNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,X,Y & ,KEY_POINT(11))
- KEY_POINT(6) = KEY_POINT(3)
- KEY_POINT(7) = KEY_POINT(3)
- KEY_POINT(8) = KEY_POINT(3)
- NNODE = ITOTALNODES
- NELEM = ITOTALELEMS
- DO I = 1, NNODE
- INODE(I) = INODE_TEMP1(I)
- COORD(1,I) = COORD_TEMP1(1,I)
- COORD(2,I) = COORD_TEMP1(2,I)
- END DO
- DO I =1, ITOTALELEMS
- LARRAY_ELE(1,I) = IELEM_TEMP1(1,I)
- LARRAY_ELE(2,I) = INELEM_TEMP1(1,I)
- LARRAY_ELE(3,I) = INELEM_TEMP1(2,I)
- LARRAY_ELE(4,I) = INELEM_TEMP1(3,I)
- LARRAY_ELE(5,I) = INELEM_TEMP1(4,I)
- LARRAY_ELE(6,I) = IELEM_TEMP1(2,I)
- LARRAY_ELE(7,I) = IELEM_TEMP1(3,I)
- LARRAY_ELE(8,I) = IELEM_TEMP1(4,I)
- END DO
- if ( iabaqus .eq. 1 ) then
- OPEN (81, FILE="NODE_TEST.INP")
- OPEN (82, FILE="ELEM_TEST.INP")
- WRITE(81,*) "*NODE, NSET=GLOBAL"
- WRITE(82,*) "*ELEMENT, TYPE=DCAX4, ELSET=EALL"
- DO I = 1, 10000
- IF ( INODE_TEMP1(I) .GT. 0 ) THEN
- WRITE(81,900) INODE_TEMP1(I), COORD_TEMP1(1,I)
- END IF
- END DO
- DO I = 1, 10000
- IF ( IELEM_TEMP1(1,I) .GT. 0 ) THEN
- WRITE(82,901) IELEM_TEMP1(1,I),INELEM_TEMP1(1,I) & , INELEM_TEMP1(2,I), INELEM_TEMP1(3,I), & INELEM_TEMP1(4,I)
- END IF
- END DO
- end if
- 900 FORMAT(1X, I8, ", ", F12.4, ", ", F12.4, ", ", F12.4)
- 901 FORMAT(1X, I8, ", ", I8, ", ", I8, ", ", I8, ", ", I8)
- CLOSE (81)
- CLOSE (82)
- RETURN
- END
- SUBROUTINE KEYPOINTS_BRANCH(D_BRANCH,T_PIPE,T_BRANCH, ROOTGAP& ,VLAND,
- 1 VX,WELDSIZE, ANGLE, VL_RUNPIPE,VL_BRANCH,POINTS,NPTS)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 T_PIPE,D_BRANCH,T_BRANCH, ROOTGAP,VLAND,
- 1 VX,WELDSIZE, VL_RUNPIPE,VL_BRANCH,& POINTS(2,*)
- INTEGER NPTS
- REAL*8 FEATURE_ANGLE, FTV, FCV
- LOGICAL P5ANDP30, NOFILLWELD
- REAL*8 WELDWIDTH, DBAND, DBOTTOM
- COMMON /MESHING/DLENGTH1, DHAZ, DLENGTH2, DBAND, DMESHSIZE
- IF ( VX .LT. 1.0D-8 ) THEN
- NOFILLWELD = .TRUE.
- ELSE
- NOFILLWEL = .FALSE.
- END IF
- WELDWIDTH = VLAND + WELDSIZE
- DPI = DASIN(1.0D0)*2.0D0
- FEATURE_ANGLE = 30.0D0*DPI/180.0D0
- FTV = DTAN(FEATURE_ANGLE) !! FEATURE-ANGLE'S TAN VALUE
- FCV = DCOS(FEATURE_ANGLE)
- DLENGTH1 = WELDWIDTH
- DLENGTH2 = DLENGTH1
- DHAZ = 0.3D0* WELDWIDTH ! 0.3 IS A HARD-CODED NUMBER FOR HAZ THICKNESS
- DBAND = 0.75D0*DHAZ ! 0.75 IS ANOTHER HARD-CODED NUMBER FOR BANDWITH
- DBOTTOM = DHAZ + DBAND
- IF ( DBOTTOM .GT. 0.75D0*T_PIPE ) THEN
- DHAZ = 0.75D0*T_PIPE/1.75D0
- DBAND = 0.75D0*DHAZ
- END IF
- POINTS(1,1) = 0.5D0*D_BRANCH
- POINTS(2,1) = 0.0D0
- POINTS(1,2) = POINTS(1,1) + WELDWIDTH
- POINTS(2,2) = POINTS(2,1)
- POINTS(1,3) = POINTS(1,1) + FTV*DHAZ;
- POINTS(2,3) = POINTS(2,1) - DHAZ
- POINTS(1,4) = POINTS(1,2) - FTV*DHAZ;
- POINTS(2,4) = POINTS(2,3)
- POINTS(1,5) = POINTS(1,3) - DBAND*FTV
- POINTS(2,5) = POINTS(2,3) - DBAND
- POINTS(1,6) = POINTS(1,4) + DBAND*FTV
- POINTS(2,6) = POINTS(2,5)
- POINTS(2,7) = POINTS(2,1) - T_PIPE
- POINTS(1,7) = POINTS(1,5) - (POINTS(2,5)-POINTS(2,7))*FTV
- POINTS(2,8) = POINTS(2,7)
- POINTS(1,8) = POINTS(1,6) + FTV*(POINTS(2,6)-POINTS(2,8))
- POINTS(1,9) = POINTS(1,1) + VLAND
- POINTS(2,9) = POINTS(2,1)
- POINTS(1,10) = POINTS(1,1) - DBAND/FCV/FCV
- POINTS(2,10) = POINTS(2,1)
- POINTS(1,11) = POINTS(1,10) - (T_PIPE-DBOTTOM)/FCV/FCV
- POINTS(2,11) = POINTS(2,10)
- POINTS(1,12) = POINTS(1,2) + DBAND/FCV/FCV
- POINTS(2,12) = POINTS(2,2)
- POINTS(1,13) = POINTS(1,12) + (T_PIPE-DBOTTOM)/FCV/FCV
- POINTS(2,13) = POINTS(2,12)
- POINTS(1,14) = 0.0D0
- POINTS(2,14) = POINTS(2,1)
- POINTS(1,15) = 0.0D0
- POINTS(2,15) = POINTS(2,7)
- IF ( D_BRANCH + T_BRANCH .GT. 10.0D0*T_PIPE ) THEN
- DLENGTH = 2*(D_BRANCH + T_BRANCH)
- ELSE
- DLENGTH = D_BRANCH + T_BRANCH + 10.0D0*T_BRANCH
- END IF
- POINTS(1,16) = 0.5D0*DLENGTH
- POINTS(2,16) = POINTS(2,2)
- POINTS(1,17) = POINTS(1,16)
- POINTS(2,17) = POINTS(2,8)
- POINTS(1,18) = -1.0D0 ! NEGACTIVE X MEANS INVALID POINT
- POINTS(2,18) = 0.0D0
- POINTS(1,19) = -1.0D0
- POINTS(2,19) = 0.0D0
- POINTS(1,20) = POINTS(1,1)
- POINTS(2,20) = POINTS(2,1) + ROOTGAP
- POINTS(1,21) = POINTS(1,9)
- POINTS(2,21) = POINTS(2,20)
- POINTS(1,22) = POINTS(1,21) + VX
- POINTS(2,22) = POINTS(2,21) + VX*DTAN(ANGLE*0.5D0)
- POINTS(1,23) = POINTS(1,1) + T_BRANCH
- POINTS(2,23) = POINTS(2,21) + (T_BRANCH-VLAND)*DTAN(ANGLE*0.5D0)
- POINTS(1,24) = POINTS(1,20)
- POINTS(2,24) = POINTS(2,22)
- POINTS(1,25) = POINTS(1,24)
- POINTS(2,25) = POINTS(2,23)
- POINTS(1,26) = POINTS(1,25)
- POINTS(2,26) = 0.5D0*VL_BRANCH
- POINTS(1,27) = POINTS(1,23)
- POINTS(2,27) = POINTS(2,26)
- OPEN (31, FILE="POINTS_BRANCH.TXT")
- DO I = 1,27
- WRITE(31,800) I, POINTS(1,I), POINTS(2,I)
- END DO
- 800 FORMAT(1X,I8, 2F15.5)
- CLOSE(31)
- RETURN
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement