2楼
/TITLE,EARTH-DAM SEEPAGE
/PLOPTS,DATE,0
*DIM,TPRE,TABLE,11,1,1,PRESS,KKPE
*SET,TPRE(1),-4.0E+00,-3.6E+00,-3.2E+00,-2.8E+00,-2.4E+00,-2.0E+00,-1.6E+00,-1.2E+00,-8.0E-01,-4.0E-01
*SET,TPRE(11),0.0E+00
*SET,TPRE(1,0),-10.00,-9.00,-8.00,-7.00,-6.00,-5.00,-4.00,-3.00,-2.00,-1.00,0.00
*DIM,NCON,ARRAY,4
/PREP7
SMRT,OFF
ANTYPE,STATIC
ET,1,PLANE55
MP,KXX,1,1
MP,KXX,2,1E-4
K,1,24,12
K,2,24,0
K,3,0,0
K,4,28,12
K,5,28,0
K,6,52,0
L,1,3
L,3,2
L,1,2
L,4,5
L,5,6
L,4,6
LESIZE,ALL,,,24
A,1,3,2
A,1,2,5,4
A,4,5,6
/REPLOT,RESIZE
MSHK,2 ! MAPPED AREA MESH IF POSSIBLE
MSHA,0,2D ! USING QUADS
AMESH,ALL ! MESH AREAS
NUMMRG,NODE ! MERGE NODES AT BOTTOM OF CAISSON
*GET,N_MAX,NODE,,NUM,MAX !
*GET,E_MAX,ELEM,,NUM,MAX !
*DIM,N_TEMP,ARRAY,N_MAX ! 定义节点温度变量-
*DIM,N_PRE,ARRAY,N_MAX !
!
LSEL,S,LINE,,1
NSLL,S,1
NSEL,R,LOC,Y,0,8
D,ALL,TEMP,8 !
!
LSEL,S,LINE,,6
NSLL,S,1
*GET,N_NUM2,NODE,,COUNT
*DIM,N_NO2,ARRAY,N_NUM2
*SET,II,0
*DO,I,1,N_MAX
*IF,NSEL(I),EQ,1,THEN !
*SET,II,II+1
*SET,N_NO2(II),I !
*ENDIF
*ENDDO
NSEL,R,LOC,Y,0,8 ! 第一次计算,仅假设浸润线出口在8M高位置,
*GET,N_NUM,NODE,,COUNT !
*DIM,N_NO,ARRAY,N_NUM ! 定义变量,
*SET,II,0
*DO,I,1,N_MAX
*IF,NSEL(I),EQ,1,THEN !
*SET,II,II+1
*SET,N_NO(II),I !
*ENDIF
*ENDDO
*DO,I,1,N_NUM
D,N_NO(I),TEMP,NY(N_NO(I)) !
*ENDDO
ALLSEL,ALL
FINISH
/SOLU
SOLVE
FINISH
*SET,CONUTT,20 !
*SET,DD_HEAT,0.001 !
*SET,CHUK_ST,3 !
*SET,CHUK_MAXY2,10E5 !
*DO,COM_NUM,1,CONUTT
*SET,DD_H,0
/POST1
SET,1
*DO,I,1,N_MAX
*IF,COM_NUM,GT,CHUK_ST+1,THEN
*SET,DD1,N_TEMP(I)
*IF,ABS(DD1-TEMP(I)),GT,DD_H,THEN
*SET,DD_H,ABS(DD1-TEMP(I))
*ENDIF
*ENDIF
*SET,N_TEMP(I),TEMP(I) !
*SET,N_PRE(I),N_TEMP(I)-NY(I) ! 计算节点压力,总水头-Y
*ENDDO
*IF,COM_NUM,GT,CHUK_ST+1,THEN
*IF,DD_H,LE,DD_HEAT,THEN
*EXIT
*ENDIF
*ENDIF
FINISH
/PREP7
!
*SET,MATNUM,2
*DO,I,1,E_MAX
*DO,KK,1,4
*GET,NCON(KK),ELEM,I,NODE,KK !
*ENDDO
*SET,TEMP_Y,(N_TEMP(NCON(1))+N_TEMP(NCON(2))+N_TEMP(NCON(3))+N_TEMP(NCON(4)))/4 !
*SET,PRESS_T,TEMP_Y-CENTRY(I)
*IF,PRESS_T,GT,0,THEN
*SET,PRESS_T,0
MPCHG,1,I
*ELSEIF,PRESS_T,LT,-10,THEN
*SET,PRESS_T,-10
MPCHG,2,I
*ELSE
MP,KXX,MATNUM+1,10**TPRE(PRESS_T)
MPCHG,MATNUM+1,I
*SET,MATNUM,MATNUM+1
*ENDIF
*ENDDO
*IF,CONUTT,GT,CHUK_ST,THEN !前CHUK_ST
LSEL,S,LINE,,6
NSLL,S,1
DDELE,ALL,TEMP !
*SET,II,0
*SET,CHUK_MAXY,0
*DO,JJ,1,N_NUM2
*IF,N_TEMP(N_NO2(JJ)),GE,NY(N_NO2(JJ)),THEN
D,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