Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- subroutine MESH_FINE01(D_PIPE,T_PIPE,T_SLEEVE,GAP,WELDAREA,
- 1 ANGLE_W,VL_PIPE,NNODE,NELEM,INODE,
- 2 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.
- pi=acos(-1.0d0)
- to_rad = pi/180.d0
- ang_set = 30.d0*to_rad
- angle_w = angle_w*to_rad
- weldxx=sqrt(2.0*weldarea)
- if (weldxx .gt. (gap+7.*t_sleeve/8.)) then
- weldxx=t_sleeve+gap
- endif
- weldyy=2.0*weldarea/weldxx
- r_cc=0.5*sqrt(weldxx*weldxx+weldyy*weldyy)
- CALL INITMESH(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1, COORD_TEMP1, & 10000,10000)
- ZLEG = 2.0D0*WELDAREA**0.5D0
- CALL KEYPOINTS_SLEEVE(D_PIPE,T_PIPE,T_SLEEVE,GAP,ZLEG,
- 1 ANGLE_W,VL_PIPE,POINTS,50)
- ELLP_X1 = DLENGTH1
- ELLP_Y1 = DHAZ
- NNUM_HAZ = ELLP_X1/DMESHSIZE
- NNUM_HAZ_T = DHAZ/DMESHSIZE
- NNUM_WELD_PIPE = 0.3D0*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
- 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,10)
- CORNERS(2,1) = POINTS(2,10)
- CORNERS(1,2) = POINTS(1,8)
- CORNERS(2,2) = POINTS(2,8)
- CORNERS(1,3) = POINTS(1,7)
- CORNERS(2,3) = POINTS(2,7)
- CORNERS(1,4) = POINTS(1,6)
- CORNERS(2,4) = POINTS(2,6)
- CALL TRANSFORMNODES(COORD_TEMP1,CORNERS,ITOTALNODES,1.0D0,1.0D0)
- 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)
- CORNERS(1,1) = POINTS(1,8)
- CORNERS(2,1) = POINTS(2,8)
- CORNERS(1,2) = POINTS(1,1)
- CORNERS(2,2) = POINTS(2,1)
- CORNERS(1,3) = POINTS(1,3)
- CORNERS(2,3) = POINTS(2,3)
- CORNERS(1,4) = POINTS(1,7)
- CORNERS(2,4) = POINTS(2,7)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES,1.0D0,1.0D0)
- CALL MERGEBLOCKMESHES(INODE_TEMP1, IELEM_TEMP1, INELEM_TEMP1, & ITOTALNODES,ITOTAlelems,COORD_TEMP1, INODE_TEMP2, IELEM_TEMP2, & INELEM_TEMP2, ITOTALNODES, ITOTALELEMS, COORD_TEMP2)
- CALL GETNODENUMBER(INODE_TEMP1, 10000,ITOTALNODES)
- CALL GETELEMNUMBER(IELEM_TEMP1, 10000,ITOTALELEMS)
- 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,8)
- CORNERS(2,1) = POINTS(2,8)
- 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,9)
- CORNERS(2,4) = POINTS(2,9)
- 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)
- 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,1)
- CORNERS(2,1) = POINTS(2,1)
- CORNERS(1,2) = POINTS(1,8)
- CORNERS(2,2) = POINTS(2,8)
- CORNERS(1,3) = POINTS(1,9)
- CORNERS(2,3) = POINTS(2,9)
- CORNERS(1,4) = POINTS(1,2)
- CORNERS(2,4) = POINTS(2,2)
- 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.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.
- DTEMP1 = DSQRT((POINTS(1,9)-POINTS(1,11))*(POINTS(1,9)& -POINTS(1,11))& + (POINTS(2,9)-POINTS(2,11))*(POINTS(2,9)-POINTS(2,11)))
- DTEMP2 = DSQRT((POINTS(1,14)-POINTS(1,11))*(POINTS(1,14)& -POINTS(1,11))& + (POINTS(2,14)-POINTS(2,11))*(POINTS(2,14)-POINTS(2,11)))
- ISIDE = 0.5D0*IFINESIDE*DTEMP2/DTEMP1
- IF ( ISIDE .LT. 2 ) ISIDE = 2
- 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,9)
- CORNERS(2,1) = POINTS(2,9)
- 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,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,3,2)!!THIS SAYS: SET FACE 3 TO 2,FORCED
- CORNERS(1,1) = POINTS(1,2)
- CORNERS(2,1) = POINTS(2,2)
- CORNERS(1,2) = POINTS(1,9)
- CORNERS(2,2) = POINTS(2,9)
- CORNERS(1,3) = POINTS(1,15)
- CORNERS(2,3) = POINTS(2,15)
- CORNERS(1,4) = POINTS(1,16)
- CORNERS(2,4) = POINTS(2,16)
- 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 3 TO 1,FREE
- CORNERS(1,1) = POINTS(1,10)
- CORNERS(2,1) = POINTS(2,10)
- CORNERS(1,2) = POINTS(1,6)
- CORNERS(2,2) = POINTS(2,6)
- CORNERS(1,3) = POINTS(1,12)
- CORNERS(2,3) = POINTS(2,12)
- CORNERS(1,4) = POINTS(1,11)
- CORNERS(2,4) = POINTS(2,11)
- 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,3)
- CORNERS(2,1) = POINTS(2,3)
- CORNERS(1,2) = POINTS(1,1)
- CORNERS(2,2) = POINTS(2,1)
- CORNERS(1,3) = POINTS(1,2)
- CORNERS(2,3) = POINTS(2,2)
- CORNERS(1,4) = POINTS(1,17)
- CORNERS(2,4) = POINTS(2,17)
- 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,11)
- CORNERS(2,1) = POINTS(2,11)
- CORNERS(1,2) = POINTS(1,12)
- CORNERS(2,2) = POINTS(2,12)
- CORNERS(1,3) = POINTS(1,13)
- CORNERS(2,3) = POINTS(2,13)
- CORNERS(1,4) = POINTS(1,14)
- CORNERS(2,4) = POINTS(2,14)
- 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,17)
- CORNERS(2,1) = POINTS(2,17)
- CORNERS(1,2) = POINTS(1,2)
- CORNERS(2,2) = POINTS(2,2)
- CORNERS(1,3) = POINTS(1,16)
- CORNERS(2,3) = POINTS(2,16)
- CORNERS(1,4) = POINTS(1,18)
- CORNERS(2,4) = POINTS(2,18)
- 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,12)-POINTS(1,13))*(POINTS(1,12)& -POINTS(1,13))& + (POINTS(2,19)-POINTS(2,13))*(POINTS(2,19)-POINTS(2,13)))
- DTEMP2 = DSQRT((POINTS(1,19)-POINTS(1,13))*(POINTS(1,19)& -POINTS(1,13))& + (POINTS(2,19)-POINTS(2,13))*(POINTS(2,19)-POINTS(2,13)))
- NDEN9 = 0.6D0*NDEN6
- IF ( NDEN9 .LT.3 ) NDEN9 =3
- 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,14)
- CORNERS(2,1) = POINTS(2,14)
- CORNERS(1,2) = POINTS(1,13)
- CORNERS(2,2) = POINTS(2,13)
- CORNERS(1,3) = POINTS(1,19)
- CORNERS(2,3) = POINTS(2,19)
- CORNERS(1,4) = POINTS(1,20)
- CORNERS(2,4) = POINTS(2,20)
- 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_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,18)
- CORNERS(2,1) = POINTS(2,18)
- CORNERS(1,2) = POINTS(1,16)
- CORNERS(2,2) = POINTS(2,16)
- CORNERS(1,3) = POINTS(1,22)
- CORNERS(2,3) = POINTS(2,22)
- CORNERS(1,4) = POINTS(1,21)
- CORNERS(2,4) = POINTS(2,21)
- 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 = DABS(POINTS(2,19)-POINTS(2,23))
- DTEMP2 = T_PIPE
- NDEN11 = 0.1D0*NDEN9*DTEMP1/DTEMP2
- IF ( NDEN11 .LT. 2 ) NDEN11 = 2
- IFINESIDE = NDEN10+1
- ISIDE = NDEN11 +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 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,20)
- CORNERS(2,1) = POINTS(2,20)
- CORNERS(1,2) = POINTS(1,19)
- CORNERS(2,2) = POINTS(2,19)
- CORNERS(1,3) = POINTS(1,23)
- CORNERS(2,3) = POINTS(2,23)
- CORNERS(1,4) = POINTS(1,24)
- CORNERS(2,4) = POINTS(2,24)
- 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(IFINESIDE, ISIDE, INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- 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,21)
- CORNERS(2,1) = POINTS(2,21)
- CORNERS(1,2) = POINTS(1,22)
- CORNERS(2,2) = POINTS(2,22)
- CORNERS(1,3) = POINTS(1,26)
- CORNERS(2,3) = POINTS(2,26)
- CORNERS(1,4) = POINTS(1,25)
- CORNERS(2,4) = 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 MARKELEMENTS(IELEM_TEMP1, ITOTALELEMS, 2,1)
- IFINESIDE = NDEN12+1
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2,& 10000,10000)
- CALL MESHRECTANGLE(IFINESIDE, IFINESIDE, 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 TO 1, FREE
- CORNERS(1,1) = POINTS(1,6)
- CORNERS(2,1) = POINTS(2,6)
- CORNERS(1,2) = POINTS(1,7)
- CORNERS(2,2) = POINTS(2,7)
- CORNERS(1,3) = POINTS(1,29)
- CORNERS(2,3) = POINTS(2,29)
- CORNERS(1,4) = POINTS(1,27)
- CORNERS(2,4) = POINTS(2,27)
- 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)
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2,& 10000,10000)
- CALL MESHRECTANGLE(IFINESIDE, IFINESIDE, 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)
- CORNERS(1,1) = POINTS(1,7)
- CORNERS(2,1) = POINTS(2,7)
- CORNERS(1,2) = POINTS(1,3)
- CORNERS(2,2) = POINTS(2,3)
- CORNERS(1,3) = POINTS(1,28)
- CORNERS(2,3) = POINTS(2,28)
- CORNERS(1,4) = POINTS(1,29)
- CORNERS(2,4) = POINTS(2,29)
- 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)
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2, & 10000,10000)
- CALL MESHRECTANGLE(IFINESIDE, IFINESIDE, 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,3,1)!!THIS SAYS: SET FACE 3 TO 1,FREE
- CORNERS(1,1) = POINTS(1,29)
- CORNERS(2,1) = POINTS(2,29)
- CORNERS(1,2) = POINTS(1,28)
- CORNERS(2,2) = POINTS(2,28)
- CORNERS(1,3) = POINTS(1,5)
- CORNERS(2,3) = POINTS(2,5)
- CORNERS(1,4) = POINTS(1,27)
- CORNERS(2,4) = POINTS(2,27)
- 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)
- NDEN13 = 2*NDEN12
- NDEN16 = (DABS(POINTS(1,33) - POINTS(1,31)))/DMESHSIZE
- NRESIDUAL = NDEN16 - NDEN13
- IF ( MOD(NRESIDUAL, 2) .NE. 0 ) THEN
- NDEN16 = NDEN16 +1
- END IF
- IFINESIDE = NDEN16 + 1
- ICOARSESIDE = NDEN13 +1
- NDEN15 = NDEN2
- ISIDE = NDEN15 +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)
- 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,33)
- CORNERS(2,1) = POINTS(2,33)
- CORNERS(1,2) = POINTS(1,32)
- CORNERS(2,2) = POINTS(2,32)
- CORNERS(1,3) = POINTS(1,5)
- CORNERS(2,3) = POINTS(2,5)
- CORNERS(1,4) = POINTS(1,3)
- CORNERS(2,4) = POINTS(2,3)
- 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)
- NDEN18 = NDEN3
- NDEN19 = 0.3D0*NDEN16
- NRESIDUAL = NDEN16-NDEN19
- IF ( MOD(NRESIDUAL, 2) .NE. 0) THEN
- NDEN19 = NDEN19 +1
- END IF
- IFINESIDE = NDEN16 +1
- ISIDE = NDEN18+1
- ICOARSESIDE = NDEN19+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)
- CALL MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,2)
- 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,32)
- CORNERS(2,1) = POINTS(2,32)
- CORNERS(1,2) = POINTS(1,33)
- CORNERS(2,2) = POINTS(2,33)
- CORNERS(1,3) = POINTS(1,36)
- CORNERS(2,3) = POINTS(2,36)
- CORNERS(1,4) = POINTS(1,35)
- CORNERS(2,4) = POINTS(2,35)
- 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)
- NDEN21 = NDEN9
- NDEN22 = 0.2D0*NDEN19
- IF ( NDEN22 .EQ. 0 ) NDEN22 =1
- NRESIDUAL = NDEN19-NDEN22
- IF ( MOD(NRESIDUAL, 2) .NE. 0) THEN
- NDEN22 = NDEN22 +1
- END IF
- IFINESIDE = NDEN19 +1
- ISIDE = NDEN21+1
- ICOARSESIDE = NDEN22+1
- BTRAN = .TRUE.
- IF ( (IFINESIDE - ICOARSESIDE ) .LT. 2) BTRAN = .FALSE.
- IF ( BTRAN ) THEN
- ELSE
- NDEN22 = 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 MARKELEMENTS(IELEM_TEMP2,ITOTALELEMS2,2,2)
- CALL MARKBCFACE(INODE_TEMP2, COORD_TEMP2,IELEM_TEMP2,INELEM_TEMP2,& ITOTALELEMS2,2,1)!!THIS SAYS: SET FACE TO 1,FREE
- CORNERS(1,1) = POINTS(1,35)
- CORNERS(2,1) = POINTS(2,35)
- CORNERS(1,2) = POINTS(1,36)
- CORNERS(2,2) = POINTS(2,36)
- CORNERS(1,3) = POINTS(1,39)
- CORNERS(2,3) = POINTS(2,39)
- CORNERS(1,4) = POINTS(1,38)
- CORNERS(2,4) = POINTS(2,38)
- 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)
- NDEN24 = NDEN11
- IFINESIDE = NDEN22 +1
- ISIDE = NDEN24+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,2)
- 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,38)
- CORNERS(2,1) = POINTS(2,38)
- CORNERS(1,2) = POINTS(1,39)
- CORNERS(2,2) = POINTS(2,39)
- CORNERS(1,3) = POINTS(1,42)
- CORNERS(2,3) = POINTS(2,42)
- CORNERS(1,4) = POINTS(1,41)
- CORNERS(2,4) = POINTS(2,41)
- 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)
- IF ( DABS(POINTS(1,5) - POINTS(1,30)) .GT. 5.0D-1) THEN
- DRATIO = DABS(POINTS(1,5)-POINTS(1,30))/DBAND
- IF ( DRATIO .GT. 1.0D0 ) THEN
- NDEN14 = NDEN2
- ELSE
- NDEN14 = DRATIO*NDEN2
- DRATIO = 1.0D0
- END IF
- NDEN14 = 0.5D0*NDEN14
- IF ( NDEN14 .GT. 8 ) THEN
- IF ( MOD( NDEN14-6, 2) .EQ. 0) NDEN17 = 6
- IF ( MOD( NDEN14-5, 2) .EQ. 0) NDEN17 = 5
- IFINIESIDE = NDEN14+1
- ICOARSESIDE = NDEN17+1
- ISIDE = NDEN15+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)
- ELSE IF ( NDEN14 .LE.8 .AND. NDEN14 .GE.3 ) THEN
- NDEN17 = NDEN14-2
- IFINESIDE = NDEN14 +1
- ISIDE = NDEN15 +2
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2& , COORD_TEMP2,& 10000,10000)
- CALL MESHRECTANGLE_TRANSITION(IFINESIDE,ISIDE& , INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- NDEN17 = NDEN14
- IFINESIDE = NDEN14+1
- ISIDE = NDEN15+1
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2& , COORD_TEMP2, & 10000,10000)
- IF( IFINESIDE .LT. 2 ) IFINESIDE = 2
- IF( ISIDE .LT. 2 ) ISIDE = 2
- 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 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,30)
- CORNERS(2,1) = POINTS(2,30)
- CORNERS(1,2) = POINTS(1,5)
- CORNERS(2,2) = POINTS(2,5)
- CORNERS(1,3) = POINTS(1,32)
- CORNERS(2,3) = POINTS(2,32)
- CORNERS(1,4) = POINTS(1,31)
- CORNERS(2,4) = POINTS(2,31)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,0.5D0& ,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 (NDEN17 .GT. 3) THEN
- NDEN20 = NDEN17-2
- IFINESIDE = NDEN17+1
- ISIDE = NDEN18+1
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2& , COORD_TEMP2,& 10000,10000)
- CALL MESHRECTANGLE_TRANSITION(IFINESIDE,ISIDE& , INODE_TEMP2,& IELEM_TEMP2,INELEM_TEMP2, COORD_TEMP2)
- ELSE
- NDEN20 = NDEN17
- IFINESIDE = NDEN17 +1
- ISIDE = NDEN18+1
- IF( IFINESIDE .LT. 2 ) IFINESIDE = 2
- IF( ISIDE .LT. 2 ) ISIDE = 2
- CALL INITMESH(INODE_TEMP2,IELEM_TEMP2,INELEM_TEMP2 &, COORD_TEMP2,& 10000,10000)
- 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 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,31)
- CORNERS(2,1) = POINTS(2,31)
- CORNERS(1,2) = POINTS(1,32)
- CORNERS(2,2) = POINTS(2,32)
- CORNERS(1,3) = POINTS(1,35)
- CORNERS(2,3) = POINTS(2,35)
- CORNERS(1,4) = POINTS(1,34)
- CORNERS(2,4) = POINTS(2,34)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,0.5D0 & ,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)
- NDEN23 = NDEN20
- IFINESIDE = NDEN20+1
- ISIDE = NDEN21+1
- IF( IFINESIDE .LT. 2 ) IFINESIDE = 2
- IF( ISIDE .LT. 2 ) ISIDE = 2
- 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,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,34)
- CORNERS(2,1) = POINTS(2,34)
- CORNERS(1,2) = POINTS(1,35)
- CORNERS(2,2) = POINTS(2,35)
- CORNERS(1,3) = POINTS(1,38)
- CORNERS(2,3) = POINTS(2,38)
- CORNERS(1,4) = POINTS(1,37)
- CORNERS(2,4) = POINTS(2,37)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,0.5D0& ,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)
- ISIDE = NDEN24+1
- IF( ISIDE .LT. 2 ) ISIDE = 2
- 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,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,37)
- CORNERS(2,1) = POINTS(2,37)
- CORNERS(1,2) = POINTS(1,38)
- CORNERS(2,2) = POINTS(2,38)
- CORNERS(1,3) = POINTS(1,41)
- CORNERS(2,3) = POINTS(2,41)
- CORNERS(1,4) = POINTS(1,40)
- CORNERS(2,4) = POINTS(2,40)
- CALL TRANSFORMNODES(COORD_TEMP2,CORNERS,ITOTALNODES2,0.5D0& ,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)
- END IF
- XX = POINTS(1,5)
- YY = POINTS(2,5)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,XX,YY& ,KEY_POINT(1))
- XX = POINTS(1,27)
- YY = POINTS(2,27)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,XX,YY& ,KEY_POINT(2))
- XX = POINTS(1,6)
- YY = POINTS(2,6)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,XX,YY & ,KEY_POINT(3))
- XX = POINTS(1,3)
- YY = POINTS(2,3)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,XX,YY& ,KEY_POINT(4))
- KEY_POINT(5) = KEY_POINT(4)
- XX = POINTS(1,14)
- YY = POINTS(2,14)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,XX,YY & ,KEY_POINT(9))
- XX = POINTS(1,15)
- YY = POINTS(2,15)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,XX,YY & ,KEY_POINT(10))
- XX = POINTS(1,16)
- YY = POINTS(2,16)
- CALL FINDNODE(INODE_TEMP1,ITOTALNODES,COORD_TEMP1,XX,YY& ,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
- 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), & COORD_TEMP1(2,I), 0.0D0
- 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
- 900 FORMAT(1X, I8, ", ", F12.4, ", ", F12.4, ", ", F12.4)
- 901 FORMAT(1X, I8, ", ", I8, ", ", I8, ", ", I8, ", ", I8)
- CLOSE (81)
- CLOSE (82)
- END
- SUBROUTINE GETMESHNUMBERS_TRANSITION(IFINESIDE, ISIDE, NNODE & , NELEM)
- IMPLICIT REAL*8 ( A-H, O-Z)
- INTEGER IFINESIDE, ISIDE, NNODE,NELEM
- NNODE = (ISIDE-2)*IFINESIDE + 2*(IFINESIDE-2)
- NELEM = (ISIDE-3)*(IFINESIDE-1) + 2*(IFINESIDE-3)+2
- RETURN
- END
- SUBROUTINE MESHRECTANGLE_TRANSITION(IFINESIDE, ISIDE, & INODE, IELEM, INELEM, COORD)
- IMPLICIT REAL*8 (A-H,O-Z)
- INTEGER INODE(*), IELEM(4,*), INELEM(4,*)
- REAL*8 COORD(2,*)
- REAL*8 DXH, DYH
- INTEGER ILABLE,NNODE, NELEM, INODE1, INODE2, INODE3, INODE4,& IENDLABEL, ICURRENTLABEL, IELAB
- CALL GETMESHNUMBERS_TRANSITION(IFINESIDE, ISIDE, NNODE, NELEM)
- DO 10 I =1,NNODE
- INODE(I) = I
- 10 END DO
- DXH = 1.0D0/(IFINESIDE-1)
- DYH = 1.0D0/(ISIDE-1)
- DO 30 I = 1, IFINESIDE
- DO 20 J = 1,ISIDE-2
- COORD(1,(J-1)*IFINESIDE + I ) = (I-1)*DXH
- COORD(2,(J-1)*IFINESIDE + I ) = (J-1)*DYH
- 20 END DO
- 30 END DO
- IENDLABEL = (ISIDE-2)*IFINESIDE
- DO 50 I = 2, IFINESIDE -1
- DO 40 J = ISIDE-1, ISIDE
- ICURRENTLABEL = IENDLABEL + (J-ISIDE+1)*(IFINESIDE-2)+I-1
- COORD(1,ICURRENTLABEL ) = (I-1)*DXH
- COORD(2,ICURRENTLABEL ) = (J-1)*DYH
- 40 END DO
- 50 END DO
- IENDLABEL = IENDLABEL + IFINESIDE -2
- DXH = 1.0D0/(IFINESIDE-3)
- DO I = IENDLABEL + 1, IENDLABEL + IFINESIDE-2
- COORD(1,I) = (I-IENDLABEL - 1)*DXH;
- END DO
- ILASTROWFIRST = IENDLABEL + 1
- ILASTROWLAST = IENDLABEL + IFINESIDE-2
- DYH = 1.0D0/(ISIDE-2)
- DO I = 2, ISIDE-2
- INODE1 = (I - 1)*IFINESIDE+ 1
- INODE2 = I*IFINESIDE
- COORD(2,INODE1) = (I-1)*DYH
- COORD(2,INODE2) = (I-1)*DYH
- END DO
- DO I = 1, IFINESIDE-1
- DO J = 1, ISIDE-3
- INODE1 = (J-1)*IFINESIDE + I
- INODE2 = INODE1 + 1
- INODE3 = INODE2 + IFINESIDE
- INODE4 = INODE3 -1
- IELELABEL = (J-1)*(IFINESIDE-1) + I
- IELEM(1,IELELABEL) = IELELABEL
- INELEM(1,IELELABEL) = INODE1
- INELEM(2,IELELABEL) = INODE2
- INELEM(3,IELELABEL) = INODE3
- INELEM(4,IELELABEL) = INODE4
- END DO
- END DO
- J = ISIDE-3
- DO I = 1, IFINESIDE-1
- INODE1 = J*IFINESIDE+I
- INODE2 = INODE1 + 1
- INODE3 = INODE2 + IFINESIDE - 1
- INODE4 = INODE3 - 1
- IF ( I .EQ. 1 ) THEN
- INODE4 = ILASTROWFIRST
- END IF
- IF ( I .EQ. IFINESIDE - 1 ) THEN
- INODE3 = ILASTROWLAST
- END IF
- IELELABEL = (ISIDE-3)*(IFINESIDE-1) + I
- IELEM(1,IELELABEL) = IELELABEL
- INELEM(1,IELELABEL) = INODE1
- INELEM(2,IELELABEL) = INODE2
- INELEM(3,IELELABEL) = INODE3
- INELEM(4,IELELABEL) = INODE4
- END DO
- J = ISIDE-2
- DO I = 1, IFINESIDE-3
- INODE1 = J*IFINESIDE+I
- INODE2 = INODE1 + 1
- INODE3 = INODE2 + IFINESIDE-2
- INODE4 = INODE3 -1
- IELELABEL = (ISIDE-2)*(IFINESIDE-1) + I
- IELEM(1,IELELABEL) = IELELABEL
- INELEM(1,IELELABEL) = INODE1
- INELEM(2,IELELABEL) = INODE2
- INELEM(3,IELELABEL) = INODE3
- INELEM(4,IELELABEL) = INODE4
- END DO
- END
- SUBROUTINE MESHRECTANGLE(IFINESIDE, ISIDE, & INODE, IELEM, INELEM, COORD)
- IMPLICIT REAL*8 (A-H,O-Z)
- INTEGER INODE(*), IELEM(4,*), INELEM(4,*)
- INTEGER IFRONTSIDE, ISIDE
- REAL*8 COORD(2,*)
- REAL*8 DXH, DYH
- INTEGER ILABLE,NNODE, NELEM, INODE1, INODE2, INODE3, INODE4,& IENDLABEL, ICURRENTLABEL
- NELEM = (ISIDE-1)*(IFINESIDE-1)
- NNODE = ISIDE*IFINESIDE
- DO 10 I =1,NNODE
- INODE(I) = I
- 10 END DO
- DXH = 1.0D0/(IFINESIDE-1)
- DYH = 1.0D0/(ISIDE-1)
- DO 30 I = 1, IFINESIDE
- DO 20 J = 1,ISIDE
- COORD(1,(J-1)*IFINESIDE + I ) = (I-1)*DXH
- COORD(2,(J-1)*IFINESIDE + I ) = (J-1)*DYH
- 20 END DO
- 30 END DO
- DO 70 I = 1, IFINESIDE-1
- DO 60 J = 1, ISIDE-1
- INODE1 = (J-1)*IFINESIDE + I
- INODE2 = INODE1 + 1
- INODE3 = INODE2 + IFINESIDE
- INODE4 = INODE3 -1
- IELELABEL = (J-1)*(IFINESIDE-1) + I
- IELEM(1,IELELABEL) = IELELABEL
- INELEM(1,IELELABEL) = INODE1
- INELEM(2,IELELABEL) = INODE2
- INELEM(3,IELELABEL) = INODE3
- INELEM(4,IELELABEL) = INODE4
- 60 END DO
- 70 END DO
- RETURN
- END
- SUBROUTINE MERGEBLOCKMESHES(INODE1, IELEM1, INELEM1, NNODE1,NELEM1&,COORD1, INODE2, IELEM2, INELEM2, NNODE2, NELEM2, COORD2)
- parameter (nnmax=2000,nemax=1000)
- IMPLICIT REAL*8 ( A-H, O-Z )
- INTEGER INODE1(*), IELEM1(4,*), INELEM1(4,*), NNODE1, NELEM1,& INODE2(*), IELEM2(4,*), INELEM2(4,*), NNODE2, NELEM2
- INTEGER INODE3(10000,2), IELEM3(4,10000), INELEM3(4,10000)
- INTEGER INPOINTER, IEPOINTER
- REAL*8 COORD1(2, *), COORD2(2,*)
- INPOINTER = 0
- IEPOINTER = 0
- DO I =1,10000
- IF ( INODE1(I) .LE. 0 ) THEN
- INPOINTER = I-1
- GOTO 10
- END IF
- END DO
- 10 CONTINUE
- DO I =1,10000
- IF ( IELEM1(1,I) .LE. 0 ) THEN
- IEPOINTER = I-1
- GOTO 20
- END IF
- END DO
- 20 CONTINUE
- DO I = 1, NNODE2
- INODE3(I,1) = INODE2(I)
- INODE3(I,2) = 0 !! NO CHANGE
- DO J = 1, 4
- IELEM3(J,I) = IELEM2(J,I)
- INELEM3(J,I) = INELEM2(J,I)
- END DO
- END DO
- INPOINTER_OLD = INPOINTER
- DO I = 1, NNODE2
- X = COORD2(1,I)
- Y = COORD2(2,I)
- INODEINDEX = -1
- DO J = 1, INPOINTER_OLD
- X1 = COORD1(1,J)
- Y1 = COORD1(2,J)
- DISTANCE = (X-X1)*(X-X1) + (Y-Y1)*(Y-Y1)
- IF ( DISTANCE .LT. 1.0D-12 ) THEN
- INODEINDEX = J
- GO TO 30
- END IF
- END DO
- 30 CONTINUE
- IF ( INODEINDEX .NE. -1 ) THEN
- INODE3(I,2) = INODE1(INODEINDEX) !! CHANGED
- ELSE !! ADD THE NODE TO MASTER
- INPOINTER = INPOINTER +1
- INODE1(INPOINTER) = INPOINTER
- COORD1(1,INPOINTER) = COORD2(1,I)
- COORD1(2,INPOINTER) = COORD2(2,I)
- INODE3(I,2) = INPOINTER
- END IF
- END DO
- DO I = 1, NELEM2
- IEPOINTER = IEPOINTER + 1
- IELEM1(1,IEPOINTER) = IEPOINTER
- IELEM1(2,IEPOINTER) = IELEM3(2,I)
- IELEM1(3,IEPOINTER) = IELEM3(3,I)
- IELEM1(4,IEPOINTER) = IELEM3(4,I)
- INELEM1(1,IEPOINTER) = INODE3(INELEM2(1,I),2)
- INELEM1(2,IEPOINTER) = INODE3(INELEM2(2,I),2)
- INELEM1(3,IEPOINTER) = INODE3(INELEM2(3,I),2)
- INELEM1(4,IEPOINTER) = INODE3(INELEM2(4,I),2)
- END DO
- RETURN
- END
- SUBROUTINE INITMESH(INODE, IELEM, INELEM,COORD,NNODE,NELEM)
- IMPLICIT REAL*8 ( A-H, O-Z)
- INTEGER INODE(*), IELEM(4,*), INELEM(4,*)
- REAL*8 COORD(2,*)
- DO I = 1, NNODE
- INODE(I) = -1
- COORD(1,I) = 0.0D0
- COORD(2,I) = 0.0D0
- END DO
- DO I =1, NELEM
- DO J = 1,4
- IELEM(J,I) = -1
- INELEM(J,I) = -1
- END DO
- END DO
- RETURN
- END
- REAL*8 FUNCTION TOTALNODES(INODE, SIZEOFARRAY)
- INTEGER INODE(*), SIZEOFARRAY
- DO I = 1, SIZEOFARRAY
- IF ( INODE(I) .EQ. -1 ) GOTO 10
- END DO
- 10 CONTINUE
- TOTALNODES = I -1
- RETURN
- END
- REAL*8 FUNCTION TOTALELEMS(IELEM, SIZEOFARRAY)
- INTEGER IELEM(4,*), SIZEOFARRAY
- DO I = 1, SIZEOFARRAY
- IF ( IELEM(1,I) .EQ. -1 ) GOTO 10
- END DO
- 10 CONTINUE
- TOTALELEMS = I - 1
- RETURN
- END
- SUBROUTINE MARKELEMENTS(IELEM, NELEMS, IPROPINDEX, IVAL)
- IMPLICIT REAL*8 ( A-H,O-Z)
- INTEGER IELEM(4,*), IVAL, IPROPINDEX, NELEMS
- DO I = 1, NELEMS
- IF ( IELEM(1,I) .GT. 0 ) THEN
- IELEM(IPROPINDEX,I) = IVAL
- END IF
- END DO
- RETURN
- END
- SUBROUTINE MARKBCFACE(INODE, COORD_NODES, IELEM, INELEM& , NELEMS,& ITYPE, IVAL)
- IMPLICIT REAL*8 ( A-H,O-Z)
- INTEGER IELEM(4,*), IVAL, NELEMS,INODE(*), INELEM(4,*)
- REAL*8 DIST, DCOORD, COORD_NODES(2,*)
- INTEGER INDEX, ISUM
- IF ( ITYPE .EQ. 1) THEN
- DIST =0.0D0
- INDEX = 2
- ELSE IF ( ITYPE .EQ. 2 ) THEN
- DIST = 1.0D0
- INDEX = 1
- ELSE IF ( ITYPE .EQ. 3 ) THEN
- DIST = 1.0D0
- INDEX = 2
- ELSE
- DIST = 0.0D0
- INDEX = 1
- END IF
- DO I = 1, NELEMS
- IF ( IELEM(1,I) .GT. 0 ) THEN
- ISUM =0
- DO J = 1, 4
- NODE = INELEM(J,I)
- X = COORD_NODES(INDEX,NODE)
- IF ( DABS(X-DIST) .LT. 1.0D-8) THEN
- ISUM = ISUM +1
- END IF
- END DO
- IF ( ISUM .EQ. 2 ) THEN
- IELEM(3,I) = IVAL
- IELEM(4,I) = ITYPE
- END IF
- END IF
- END DO
- 905 FORMAT(1X,5I8)
- 906 FORMAT(1X,I10, 2F15.5)
- RETURN
- END
- SUBROUTINE FINDNODE(INODE, NNODES, COORDNODES, XX,YY,INDEX)
- IMPLICIT REAL*8 ( A-H, O-Z)
- INTEGER INODE(*), NNODES, INDEX
- REAL*8 COORDNODES(2,10000), XXX,YYY
- INDEX = -1
- DO I = 1, NNODES
- XXX = COORDNODES(1,I)
- YYY = COORDNODES(2,I)
- DISTANCE = (XXX-XX)*(XXX-XX) + (YYY-YY)*(YYY-YY)
- IF ( DISTANCE .LT. 1.0D-12 ) THEN
- INDEX = I
- GOTO 10
- END IF
- END DO
- 10 CONTINUE
- RETURN
- END
- SUBROUTINE FINDCLOSESTNODE(INODE, NNODES, COORDNODES, X,Y,INDEX)
- IMPLICIT REAL*8 ( A-H, O-Z)
- INTEGER INODE(*), NNODES, INDEX
- REAL*8 COORDNODES(2,*), X,Y
- REAL*8 DMAX, DISTANCE
- DMIN = 1.0D24
- INDEX = -1
- DO I = 1, NNODES
- XX = COORDNODES(1,I)
- YY = COORDNODES(2,I)
- DISTANCE = (XX-X)*(XX-X) + (YY-Y)*(YY-Y)
- IF ( DISTANCE .LT. DMIN ) THEN
- DMIN = DISTANCE
- INDEX = I
- END IF
- END DO
- RETURN
- END
- SUBROUTINE KEYPOINTS_SLEEVE(D_PIPE,T_PIPE,T_SLEEVE,GAP,WELDLEG,
- 1 ANGLE_W,VL_PIPE,POINTS, NPTS)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 D_PIPE, T_PIPE, T_SLEEVE, GAP, WELDLEG, ANGLE_W, VL_PIPE, & POINTS(2,*)
- INTEGER NPTS
- REAL*8 FEATURE_ANGLE, FTV
- LOGICAL P5ANDP30
- COMMON /MESHING/DLENGTH1, DHAZ, DLENGTH2, DBAND, DMESHSIZE
- WELDLEG2 = WELDLEG/DSQRT(2.0D0)
- FEATURE_ANGLE = 30.0D0
- DPI = DASIN(1.0D0)*2.0D0
- FTV = DTAN(FEATURE_ANGLE*DPI/180.0D0)
- DLENGTH1 = WELDLEG2
- DLENGTH2 = DLENGTH1
- DHAZ = 0.3D0* WELDLEG2 ! 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(2,3) = 0.0D0
- POINTS(1,3) = 0.5D0*D_PIPE
- POINTS(1,1) = POINTS(1,3)-DHAZ
- POINTS(2,1) = POINTS(2,3) + FTV*DHAZ
- POINTS(1,6) = POINTS(1,3)
- POINTS(2,6) = WELDLEG2
- POINTS(1,7) = POINTS(1,3)
- POINTS(2,7) = 0.5D0*POINTS(2,6)
- POINTS(1,8) = POINTS(1,7) - DHAZ
- POINTS(2,8) = POINTS(2,7)
- POINTS(1,9) = POINTS(1,8) - DBAND
- POINTS(2,9) = POINTS(2,8)
- POINTS(1,15) = POINTS(1,7) - T_PIPE
- POINTS(2,15) = POINTS(2,7)
- POINTS(1,10) = POINTS(1,1)
- POINTS(2,10) = POINTS(2,6) - FTV*DHAZ
- POINTS(1,2) = POINTS(1,9)
- POINTS(2,2) = POINTS(2,1) - FTV*DBAND
- POINTS(1,11) = POINTS(1,9)
- POINTS(2,11) = POINTS(2,10)+ FTV*DBAND
- POINTS(1,12) = POINTS(1,3)
- POINTS(2,12) = POINTS(2,11) + FTV*(DHAZ+DBAND)
- POINTS(1,14) = POINTS(1,15)
- POINTS(2,14) = POINTS(2,11) + (T_PIPE-DHAZ-DBAND)*FTV
- POINTS(1,13) = POINTS(1,3)
- POINTS(2,13) = POINTS(2,14) + T_PIPE*FTV
- POINTS(1,16) = POINTS(1,15)
- POINTS(2,16) = POINTS(2,2) - (T_PIPE-DHAZ-DBAND)*FTV
- POINTS(1,17) = POINTS(1,7)
- POINTS(2,17) = POINTS(2,2)- FTV*(DHAZ+DBAND)
- POINTS(1,18) = POINTS(1,3)
- POINTS(2,18) = POINTS(2,16)-T_PIPE*FTV
- DDIST = DABS(POINTS(2,6)-POINTS(2,13))
- DDIST = 2.0D0*DDIST
- POINTS(1,19) = POINTS(1,3)
- POINTS(2,19) = POINTS(2,13) + DDIST
- POINTS(1,20) = POINTS(1,15)
- POINTS(2,20) = POINTS(2,19)
- POINTS(1,21) = POINTS(1,3)
- POINTS(2,21) = POINTS(2,18) - DDIST
- POINTS(1,22) = POINTS(1,15)
- POINTS(2,22) = POINTS(2,21)
- POINTS(1,23) = POINTS(1,3)
- POINTS(2,23) = 0.5D0*VL_PIPE
- POINTS(1,24) = POINTS(1,15)
- POINTS(2,24) = POINTS(2,23)
- POINTS(1,25) = POINTS(1,3)
- POINTS(2,25) = -0.5D0*VL_PIPE
- POINTS(1,26) = POINTS(1,15)
- POINTS(2,26) = POINTS(2,25)
- POINTS(1,4) = POINTS(1,3) + GAP
- POINTS(2,4) = 0.0D0
- POINTS(1,5) = POINTS(1,3) + WELDLEG2
- POINTS(2,5) = 0.0D0
- POINTS(1,27) = 0.5D0*(POINTS(1,5) + POINTS(1,6))
- POINTS(2,27) = 0.5D0*(POINTS(2,5) + POINTS(2,6))
- POINTS(1,28) = 0.5D0*(POINTS(1,3) + POINTS(1,5))
- POINTS(2,28) = 0.5D0*(POINTS(2,3) + POINTS(2,5))
- POINTS(1,29) = POINTS(1,3) + 2.0D0*(POINTS(1,27)& -POINTS(1,3))/3.0D0
- POINTS(2,29) = POINTS(2,3) + 2.0D0*(POINTS(2,27)& -POINTS(2,3))/3.0D0
- P5ANDP30 = .FALSE.
- POINTS(1,30) = POINTS(1,4) + T_SLEEVE
- POINTS(2,30) = 0.0D0
- IF ( DABS(POINTS(1,5)-POINTS(1,30)) .LT. 0.5D0 ) P5ANDP30 = .TRUE.
- IF ( P5ANDP30 .EQ. .TRUE. ) THEN
- POINTS(1,30) = POINTS(1,5)
- END IF
- POINTS(1,31) = POINTS(1,30)
- POINTS(2,31) = -DHAZ
- POINTS(1,32) = POINTS(1,5)
- POINTS(2,32) = POINTS(2,31)
- POINTS(1,33) = POINTS(1,4)
- POINTS(2,33) = POINTS(2,31)
- POINTS(1,34) = POINTS(1,30)
- POINTS(2,34) = -DHAZ-DBAND
- POINTS(1,35) = POINTS(1,5)
- POINTS(2,35) = POINTS(2,34)
- POINTS(1,36) = POINTS(1,4)
- POINTS(2,36) = POINTS(2,34)
- POINTS(1,37) = POINTS(1,30)
- POINTS(2,37) = POINTS(2,34) - 3.0D0*DBAND
- POINTS(1,38) = POINTS(1,5)
- POINTS(2,38) = POINTS(2,37)
- POINTS(1,39) = POINTS(1,4)
- POINTS(2,39) = POINTS(2,37)
- POINTS(1,40) = POINTS(1,30)
- POINTS(2,40) = -0.5D0*VL_PIPE
- POINTS(1,41) = POINTS(1,5)
- POINTS(2,41) = POINTS(2,40)
- POINTS(1,42) = POINTS(1,4)
- POINTS(2,42) = POINTS(2,40)
- RETURN
- END
- SUBROUTINE TRANSFORMNODES(COORDS, CORNERS, NUM, GRADE1, GRADE2)
- IMPLICIT REAL*8 (A-H,O-Z)
- REAL*8 COORDS(2,*), CORNERS(2,*), GRADE1, GRADE2
- INTEGER NUM
- REAL*8 X1,X2,X3,X4,Y1,Y2,Y3,Y4,X,Y,DX,DY,DX1,DX2,DY1,DY2
- X1 = CORNERS(1,1)
- Y1 = CORNERS(2,1)
- X2 = CORNERS(1,2)
- Y2 = CORNERS(2,2)
- X3 = CORNERS(1,3)
- Y3 = CORNERS(2,3)
- X4 = CORNERS(1,4)
- Y4 = CORNERS(2,4)
- DO I = 1, NUM
- X = COORDS(1,I)
- Y = COORDS(2,I)
- DX1 = X1+X**GRADE1*(X2-X1)
- DX2 = X4+X**GRADE1*(X3-X4)
- DX = DX1 + Y**GRADE2*(DX2-DX1)
- DY1 = Y1+X**GRADE1*(Y2-Y1)
- DY2 = Y4+X**GRADE1*(Y3-Y4)
- DY = DY1 + Y**GRADE2*(DY2-DY1)
- COORDS(1,I) = DX
- COORDS(2,I) = DY
- END DO
- RETURN
- END
- SUBROUTINE GETNODENUMBER(INODE,IMAX, INUM)
- INTEGER INODE(*), IMAX
- DO I = 1, IMAX
- IF ( INODE(I) .LE. 0 ) GOTO 10
- END DO
- 10 INUM = I-1
- RETURN
- END
- SUBROUTINE GETELEMNUMBER(IELEM,IMAX, INUM)
- INTEGER IELEM(4,*), IMAX
- DO I = 1, IMAX
- IF ( IELEM(1,I) .LE. 0 ) GOTO 10
- END DO
- 10 INUM = I-1
- RETURN
- END
- SUBROUTINE MESHRECTANGLE_TRANSITION2(IFINESIDE, ICOARSESIDE, ISIDE, & INODE, IELEM, INELEM, COORD)
- IMPLICIT REAL*8 (A-H,O-Z)
- INTEGER INODE(*), IELEM(4,*), INELEM(4,*), IFINESIDE, ICOARSESIDE
- INTEGER ISIDE
- REAL*8 COORD(2,*)
- REAL*8 DXH, DYH, CORNERS(2,4)
- INTEGER ILABLE,NNODE, NELEM, INODE1, INODE2, INODE3, INODE4,& IENDLABEL, ICURRENTLABEL, IELAB
- REAL*8 COORD_TEMP(2,10000)
- INTEGER INODE_TEMP(10000), IELEM_TEMP(4,10000)&, INELEM_TEMP(4,10000)
- N1 = IFINESIDE-1
- N2 = ICOARSESIDE -1
- N3 = ISIDE-1
- NEACHSIDE = (N1-N2)/2
- X1 = 1.0D0*NEACHSIDE/N1
- X2 = 1.0D0*(NEACHSIDE+N2)/N1
- Y1 = 1.0D0*N3/(N3+NEACHSIDE)
- NTOTALNODES = ISIDE*(NEACHSIDE+1)
- NTOTALELEMS = (ISIDE-1)*NEACHSIDE
- CALL MESHRECTANGLE(NEACHSIDE+1,ISIDE,INODE,IELEM, & INELEM, COORD)
- CORNERS(1,1) = 0.0D0
- CORNERS(2,1) = 0.0D0
- CORNERS(1,2) = X1
- CORNERS(2,2) = 0.0D0
- CORNERS(1,3) = X1
- CORNERS(2,3) = Y1
- CORNERS(1,4) = 0.0D0
- CORNERS(2,4) = 1.0D0
- CALL TRANSFORMNODES(COORD,CORNERS,NTOTALNODES,1.0D0,1.0D0)
- CALL GETNODENUMBER(INODE,10000,NTOTALNODES)
- CALL GETELEMNUMBER(IELEM,10000,NTOTALELEMS)
- CALL INITMESH(INODE_TEMP,IELEM_TEMP,INELEM_TEMP,COORD_TEMP& , 10000,10000)
- CALL MESHRECTANGLE(ICOARSESIDE,ISIDE,INODE_TEMP,IELEM_TEMP,& INELEM_TEMP, COORD_TEMP)
- CORNERS(1,1) = X1
- CORNERS(2,1) = 0.0D0
- CORNERS(1,2) = X2
- CORNERS(2,2) = 0.0D0
- CORNERS(1,3) = X2
- CORNERS(2,3) = Y1
- CORNERS(1,4) = X1
- CORNERS(2,4) = Y1
- CALL TRANSFORMNODES(COORD_TEMP,CORNERS,ISIDE*ICOARSESIDE,1.0D0& ,1.0D0)
- CALL MERGEBLOCKMESHES(INODE, IELEM, INELEM, NTOTALNODES& ,NTOTALELEMS &,COORD, INODE_TEMP, IELEM_TEMP, INELEM_TEMP, ISIDE*ICOARSESIDE,& (ISIDE-1)*(ICOARSESIDE-1), COORD_TEMP)
- CALL GETNODENUMBER(INODE,10000,NTOTALNODES)
- CALL GETELEMNUMBER(IELEM,10000,NTOTALELEMS)
- CALL INITMESH(INODE_TEMP,IELEM_TEMP,INELEM_TEMP,COORD_TEMP, 10000& ,10000)
- CALL MESHRECTANGLE(NEACHSIDE+1,ISIDE,INODE_TEMP,IELEM_TEMP,& INELEM_TEMP, COORD_TEMP)
- CORNERS(1,1) = X2
- CORNERS(2,1) = 0.0D0
- CORNERS(1,2) = 1.0D0
- CORNERS(2,2) = 0.0D0
- CORNERS(1,3) = 1.0D0
- CORNERS(2,3) = 1.0D0
- CORNERS(1,4) = X2
- CORNERS(2,4) = Y1
- CALL TRANSFORMNODES(COORD_TEMP,CORNERS,ISIDE*(NEACHSIDE+1),1.0D0 & ,1.0D0)
- CALL GETNODENUMBER(INODE,10000,NTOTALNODES)
- CALL GETELEMNUMBER(IELEM,10000,NTOTALELEMS)
- CALL MERGEBLOCKMESHES(INODE, IELEM, INELEM, NTOTALNODES&,NTOTALELEMS &,COORD, INODE_TEMP, IELEM_TEMP, INELEM_TEMP&, ISIDE*(NEACHSIDE+1), & (ISIDE-1)*NEACHSIDE, COORD_TEMP)
- CALL GETNODENUMBER(INODE,10000,NTOTALNODES)
- CALL GETELEMNUMBER(IELEM,10000,NTOTALELEMS)
- CALL INITMESH(INODE_TEMP,IELEM_TEMP,INELEM_TEMP,COORD_TEMP, 10000& ,10000)
- CALL GETNODENUMBER(INODE,10000,NTOTALNODES)
- CALL GETELEMNUMBER(IELEM,10000,NTOTALELEMS)
- CALL MESHRECTANGLE(ICOARSESIDE,NEACHSIDE+1,INODE_TEMP,IELEM_TEMP,& INELEM_TEMP, COORD_TEMP)
- CORNERS(1,1) = X1
- CORNERS(2,1) = Y1
- CORNERS(1,2) = X2
- CORNERS(2,2) = Y1
- CORNERS(1,3) = 1.0D0
- CORNERS(2,3) = 1.0D0
- CORNERS(1,4) = 0.0D0
- CORNERS(2,4) = 1.0D0
- CALL TRANSFORMNODES(COORD_TEMP,CORNERS,ICOARSESIDE*(NEACHSIDE+1) & ,1.0D0,1.0D0)
- CALL MERGEBLOCKMESHES(INODE, IELEM, INELEM, NTOTALNODES,NTOTALELEMS&,COORD, INODE_TEMP, IELEM_TEMP, INELEM_TEMP&, ICOARSESIDE*(NEACHSIDE+1),& (ICOARSESIDE-1)*NEACHSIDE, COORD_TEMP)
- CALL GETNODENUMBER(INODE,10000,NTOTALNODES)
- CALL GETELEMNUMBER(IELEM,10000,NTOTALELEMS)
- RETURN
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement