声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2401|回复: 0

[Fortran] 平面刚架的计算源程序(wilson法)

[复制链接]
发表于 2006-11-21 10:37 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
下面给出求平面刚架的计算源程序,程序中的变量及数组说明如下:
NN――结点总数
NE――单元总数
NC――支撑约束数
M1――要计算的振型数
NM――集中质量数
N3――结点位移总数,N3=3*NN
N――自由位移数,N=N3-NF
X――一维数组,存放结点的X坐标值
Y――一维数组,存放结点的Y坐标值
NS――一维数组,存放位移约束信息
E――材料弹性模量
RH――材料密度
JOD――有集中质量的结点号
MAS1――集中质量值
MAS2――集中转动惯量值
I9――一维数组,存放单元始端结点号
J9――一维数组,存放单元终端结点号
S9――一维数组,存放单元截面惯性矩
A9――一维数组,存放单元截面面积
A――二维数组,存放整体刚度矩阵
SSM――二维数组,存放单元质量矩阵
XX――二维数组,存放整体质量矩阵
AM――一维数组,存放频率值
VC――二维数组,存放特征向量
DC――二维数组,存放坐标转换矩阵
ST――二维数组,存放单元刚度矩阵
ND――体系自由度数
THETA――θ值
DT――积分时间步长Δt
TMAX――最大积分时间
NEQ(L)――定义动力荷载的关键点数目
TC(I)――动力作用时刻
P(I)――对应于TC(I)时刻的动力值
UD(I)――位移
VA(I)――加速度

程序名:DFRAM.FOR
  1. c  平面刚架的振动
  2. IMPLICIT INTEGER*2 (I-N)
  3. C   CHARACTER CH(80)*1,DFALE*12,OFALE*12,YN*1
  4.         INTEGER*2 LI(1000)
  5.         REAL*4 A(10000)
  6.   DIMENSION RH(10000)
  7.    OPEN(11,FILE='DFRAM.OUT')
  8.     OPEN(7,FILE='DFRAM.IN')
  9.   READ(7,*)NN,MS,NF,M1,NC
  10.   WRITE(11,'(/2X,A//2X,A)')'输出数据如下:','一.输入数据部分:'
  11.         WRITE(11,'(/2X,5A12/I10,4I12)')'结点数','杆件数',
  12.      1   '支撑约束数','计算振型数','集中质量数',NN,MS,NF,M1,NC
  13.   NJ=NN
  14.   N3=NN*3
  15.   NP=N3+1
  16.   N=N3-NF
  17.   ia=1
  18.   ixx=ia+n3*n3
  19.   iam=ixx+n3*np
  20.   ivc=iam+m1
  21.   ivtl=ivc+n*m1
  22.   ix=ivtl+n3
  23.   ive=ix+n3
  24.   iz=ive+n
  25.   iy=iz+n
  26.   i1ma=iy+nn
  27.   i2ma=i1ma+nc
  28.   ia9=i2ma+nc
  29.   is9=ia9+ms
  30.   mal=is9+ms
  31.    jns=1
  32.    jig=jns+nf
  33.    jjod=jig+n
  34.    ji9=jjod+nc
  35.    jj9=ji9+ms
  36.    nal=jj9+ms
  37.   if (mal.gt.10000-80.or.nal.gt.1000-80)
  38.      1 stop '数组越界'
  39.   READ (7,*)(A(IX+I),A(IY+I),I=0,NN-1)
  40.   READ (7,*)(LI(I),I=1,NF),E
  41. WRITE (11,'(/2X,A/A8,2A16)')'结点坐标:','结点号',
  42.      1  'x方向坐标','y方向坐标'
  43. WRITE (11,'(/2X,A,I3,A,F14.3,F16.3)')
  44.      1   ('(',I+1,')',A(IX+I),A(IY+I),I=0,NN-1)
  45. WRITE (11,'(1X,2A)')'约束自由度号(X方向位移号=3X结点号-2;',
  46.      1    'y方向位移号=3X结点号-1;转角位移号=3X结点号)'
  47. WRITE (11,'(I4,9I6)')(li(i),i=1,NF)
  48. WRITE(11,'(/2X,A/A10)')'材料常数:','弹性模量'
  49. WRITE (11,'(E10.4)')E
  50. C
  51.      READ(7,*)(LI(JI9+I),LI(JJ9+I),A(IS9+I),A(IA9+I),RH(I+1),I=0,MS-1)
  52. IF (NC.GT.0)READ (7,*)(LI(JJOD+I),A(I1MA+I),A(I2MA+I),I=0,NC-1)
  53. WRITE(11,'(/2X,A/A8,6A12)')'各杆件单元信息:',
  54.      1 '单元号','左端结点号','右端结点号','惯性','截面积','密度'
  55. WRITE(11,'(2X,A,I3,A,I9,I12,E15.5,E12.5,E16.5)')('(',I+1,')',
  56.      1    LI(JI9+I),LI(JJ9+I),A(IS9+I),A(IA9+I),RH(I+1),I=0,MS-1)
  57. IF (NC.GT.0)THEN
  58.     WRITE(11,'(/2X,A)')'集中质量和转动惯量:'
  59.           WRITE(11,'(A16,2A12)')'质量所在结点号','质量','转动惯量'
  60.     WRITE(11,'(I10,F17.0,F12.3)')
  61.      1    (LI(JJOD+I),A(I1MA+I),A(I2MA+I),I=0,NC-1)
  62.   ENDIF
  63. C

  64.       CALL DFRAM(A(IA),A(IXX),A(IAM),A(IVC),A(IVTL),A(IX),A(IVE),
  65.      1  A(IZ),A(IY),A(I1MA),A(I2MA),A(IA9),A(IS9),E,RH,LI(JNS),
  66. 2  LI(JIG),LI(JJOD),LI(JI9),LI(JJ9),NN,MS,NF,M1,NC,NJ,N3,NP,N)
  67. CLOSE(7)
  68. CLOSE(11)
  69. STOP
  70. END
  71. C
  72.       SUBROUTINE DFRAM(A,XX,AM,VC,VTL,X,VE,Z,Y,MAS1,MAS2,A9,S9,
  73.      1  E,RH,NS,IG,JOD,I9,J9,NN,MS,NF,M1,NC,NJ,N3,NP,N)
  74. IMPLICIT INTEGER*2 (I-N)
  75. INTEGER*2 NS(NF),IG(N)
  76. INTEGER*2 JOD(NC),I9(MS),J9(MS),PO
  77. REAL*4 A(N3,N3),XX(N3,NP),AM(M1),VC(N,M1),VTL(N3),X(N3),
  78.      1 DC(6,6),SSM(6,6),S2(6,6),VE(N),Z(N),Y(NN),SC(N3,NP)
  79. REAL*4 MAS1(NC),MAS2(NC),A9(MS),S9(MS),L
  80. N2=N3

  81. C
  82.       DO 3530 ME=1,MS
  83.    I=I9(ME)
  84.    J=J9(ME)
  85.    SA=S9(ME)
  86.    CA=A9(ME)
  87. L=SQRT((X(J)-X(I))**2+(Y(J)-Y(I))**2)

  88. C
  89.          C=(X(J)-X(I))/L
  90.    S=(Y(J)-Y(I))/L
  91.       DO 2370 II=1,6
  92.          DO 2370 JJ=1,6
  93.                 DC(II,JJ)=0.0
  94. 2370            SSM(II,JJ)=0.0
  95.            DC(1,1)=C
  96.      DC(2,2)=C
  97. DC(4,4)=C
  98. DC(5,5)=C
  99. DC(1,2)=S
  100. DC(4,5)=S
  101. DC(2,1)=-S
  102. DC(5,4)=-S
  103. DC(3,3)=1.0
  104. DC(6,6)=1.0
  105. C
  106.       I3=3*I
  107. I2=I3-1
  108. I1=I3-2
  109. J3=J*3
  110. J2=J3-1
  111. J1=J3-2
  112. C1=12.0*E*SA*S*S/L**3+C*C*CA*E/L
  113. C2=12.0*E*SA*C*S/L**3-C*S*CA*E/L
  114. C3=12.0*E*SA*C*C/L**3+S*S*CA*E/L
  115. C4=6.0*E*SA*S/L**2
  116. C5=6.0*E*SA*C/L**2
  117. C6=4.0*E*SA/L
  118. A(I1,I1)=A(I1,I1)+C1
  119. A(I2,I1)=A(I2,I1)-C2
  120. A(I1,I2)=A(I1,I2)-C2
  121. A(I3,I1)=A(I3,I1)+C4
  122. A(I1,I3)=A(I1,I3)+C4
  123. A(J1,I1)=A(J1,I1)-C1
  124. A(I1,J1)=A(I1,J1)-C1
  125. A(J2,I1)=A(J2,I1)+C2
  126. A(I1,J2)=A(I1,J2)+C2
  127. A(J3,I1)=A(J3,I1)+C4
  128. A(I1,J3)=A(I1,J3)+C4
  129. A(I2,I2)=A(I2,I2)+C3
  130. A(I3,I2)=A(I3,I2)-C5
  131. A(I2,I3)=A(I2,I3)-C5
  132. A(J1,I2)=A(J1,I2)+C2
  133. A(I2,J1)=A(I2,J1)+C2
  134. A(J2,I2)=A(J2,I2)-C3
  135. A(I2,J2)=A(I2,J2)-C3
  136. A(J3,I2)=A(J3,I2)-C5
  137. A(I2,J3)=A(I2,J3)-C5
  138. A(I3,I3)=A(I3,I3)+C6
  139. A(J1,I3)=A(J1,I3)-C4
  140. A(I3,J1)=A(I3,J1)-C4
  141. A(J2,I3)=A(J2,I3)+C5
  142. A(I3,J2)=A(I3,J2)+C5
  143. A(J3,I3)=A(J3,I3)+.5*C6
  144. A(I3,J3)=A(I3,J3)+.5*C6
  145. A(J1,J1)=A(J1,J1)+C1
  146. A(J2,J1)=A(J2,J1)-C2
  147. A(J1,J2)=A(J1,J2)-C2
  148. A(J3,J1)=A(J3,J1)-C4
  149. A(J1,J3)=A(J1,J3)-C4
  150. A(J2,J2)=A(J2,J2)+C3
  151. A(J3,J2)=A(J3,J2)+C5
  152. A(J2,J3)=A(J2,J3)+C5
  153. A(J3,J3)=A(J3,J3)+C6
  154. C   
  155.       C1=RH*CA*L/6
  156. C2=RH*CA*L/420
  157. SSM(1,1)=2.0*C1
  158. SSM(4,1)=C1
  159. SSM(2,2)=156.0*C2
  160. SSM(3,2)=-22.0*L*C2
  161. SSM(5,2)=54.0*C2
  162. SSM(6,2)=13.0*L*C2
  163. SSM(2,3)=-22.0*L*C2
  164. SSM(3,3)=4.0*L*L*C2
  165. SSM(5,3)=-13.0*L*C2
  166. SSM(6,3)=-3.0*L**2*C2
  167. SSM(1,4)=C1
  168. SSM(4,4)=2.0*C1
  169. SSM(2,5)=54.0*C2
  170. SSM(3,5)=-13.0*L*C2
  171. SSM(5,5)=156.0*C2
  172. SSM(6,5)=22.0*L*C2
  173. SSM(2,6)=13.0*L*C2
  174. SSM(3,6)=-3.0*L**2*C2
  175. SSM(5,6)=22.0*L*C2
  176. SSM(6,6)=4.0*L**2*C2
  177. C
  178.       DO 3190 II=1,6
  179.    DO 3190 JJ=1,6
  180. 3190        S2(II,JJ)=0.0
  181.       DO 3230 II=1,6
  182.    DO 3230 JJ=1,6
  183.       DO 3230 KK=1,6
  184. 3230  S2(II,JJ)=S2(II,JJ)
  185.      1     +SSM(II,KK)*DC(KK,JJ)
  186. DO 3290 II=1,6
  187.     DO 3290 JJ=1,6
  188. 3290  SSM(II,JJ)=0.0
  189.       DO 3350 II=1,6
  190.     DO 3350 JJ=1,6
  191.         DO 3350 KK=1,6
  192. 3350    SSM(II,JJ)=SSM(II,JJ)+DC(KK,II)*S2(KK,JJ)
  193. C
  194.       I1=3*I-3
  195. J1=3*J-3
  196.   DO 3520 II=1,3
  197.        DO 3520 JJ=1,3
  198.        MG=I1+II
  199.    ITR=I1+JJ
  200.    IAC=J1+II
  201.    IXK=J1+JJ
  202. XX(MG,ITR)=XX(MG,ITR)+SSM(II,JJ)
  203.       XX(IAC,ITR)=XX(IAC,ITR)+SSM(II+3,JJ)
  204. XX(MG,IXK)=XX(MG,IXK)+SSM(II,JJ+3)
  205. XX(IAC,IXK)=XX(IAC,IXK)+SSM(II+3,JJ+3)
  206. 3520      CONTINUE
  207. 3530  CONTINUE
  208. C
  209.       IF(NC.EQ.0) GOTO 3660
  210. DO 3650 II=1,NC
  211.    PO=JOD(II)
  212. GMS=MAS1(II)
  213. MI=MAS2(II)
  214. K1=3*PO
  215. J1=K1-1
  216. I1=K1-2
  217. XX(I1,I1)=XX(I1,I1)+GMS
  218. XX(J1,J1)=XX(J1,J1)+GMS
  219. XX(K1,K1)=XX(K1,K1)+MI
  220. 3650  CONTINUE
  221. C
  222. 3660  MM=0
  223.       DO 3880 I=1,NF
  224. NA=NS(I)
  225. MM=MM+1
  226. NA=NA-MM+1
  227. NB=N3-MM
  228. IF (NB.LT.NA) GOTO 3790
  229.   DO 3760 II=NA,NB
  230.      DO 3760 JJ=NA,NB
  231.       A(II,JJ)=A(II+1,JJ+1)
  232. 3760  XX(II,JJ)=XX(II+1,JJ+1)
  233. 3790  IF (NA.EQ.1) GOTO 3880
  234.          DO 3850 II=1,NA-1
  235.      DO 3850 JJ=NA,NB
  236.             A(II,JJ)=A(II,JJ+1)
  237. XX(II,JJ)=XX(II,JJ+1)
  238. A(JJ,II)=A(JJ+1,II)
  239. 3850 XX(JJ,II)=A(JJ+1,II)
  240. 3880  CONTINUE
  241. C
  242. 1640 N9=N-1
  243. DO 1830 IX=1,N
  244. DI=A(IX,1)
  245. DII=0.0
  246. IF (ABS(DI).GT.1.0E-16)DII=1.0/DI
  247. IF (ABS(DI).LT.1.0E-16)WRITE(11,'(A)')
  248.      1   'MATRIX IS SINGULAR'
  249. DO 1700 IY=1,N9
  250. IY9=IY+1
  251. 1700 A(IX,IY)=A(IX,IY9)/DI
  252.       A(IX,N)=1.0/DI
  253. DO 1820 IZ=1,N
  254. IF (IZ.EQ.IX)GO TO 1820
  255. O=A(IZ,1)
  256. DO 1790 IY=1,N9
  257. IY9=IY+1
  258. 1790 A(IZ,IY)=A(IZ,IY9)-A(IX,IY)*O
  259. A(IZ,N)=-A(IX,N)*O
  260. 1820  CONTINUE
  261. 1830 CONTINUE
  262. C
  263. 3900 DO 4000 I=1,N
  264. DO 3960 J=1,N
  265. VE(J)=0.0
  266.   DO 3940 II=1,N
  267. 3940   VE(J)=VE(J)+A(I,II)*XX(II,J)
  268. 3960 CONTINUE
  269. DO 3980 J=1,N
  270. 3980 A(I,J)= VE(J)
  271. 4000 CONTINUE
  272. C
  273. 500 MN=N
  274. NN=N
  275. CALL EIG1(A,X,Z,NN,N2,0.0001,XM,NKK)
  276. 530 M=1
  277. DO 560 I=1,NN
  278. VC(I,M)=X(I)
  279. 560 XX(I,M)=VC(I,M)
  280. AM(M)=XM
  281. C
  282. IF (M1.LT.2) GOTO 220
  283. DO 1410 M=2,M1
  284. DO 630 I=1,NN
  285. GK4=ABS(XX(I,M-1)-1.)
  286. IF (GK4.LT.0.001)IR=I
  287. 630 CONTINUE
  288. IG(M-1)=IR
  289. DO 680 I=1,NN
  290. 680 XX(MN-I+1,MN-M+3)=A(IR,I)
  291. DO 730 I=1,NN
  292. DO 730 J=1,NN
  293. J1=MN-J+1
  294. J2=MN-M+3
  295. 730 A(I,J)=A(I,J)-XX(I,M-1)*XX(J1,J2)
  296. DO 910 I =1,NN
  297. IF (I.EQ.IR)GOTO 910
  298. IF (I.GT.IR)K1=I-1
  299. IF (I.LE.IR)K1=I
  300. DO 900 J=1,NN
  301. IF (J.EQ.IR)GOTO 900
  302. IF (J.GT.IR)K2=J-1
  303. IF (J.LE.IR)K2=J
  304. A(K1,K2)=A(I,J)
  305. 900 CONTINUE
  306. 910 CONTINUE
  307. NN=NN-1
  308. M3=NN
  309. IF (M.NE.MN) GOTO 980
  310. XM=A(1,1)
  311. X(1)=1
  312. 970 GOTO 990
  313. 980 L1500=2
  314. CALL EIG1(A,X,Z,NN,N2,0.0001,XM,NKK)
  315. 990 DO 1000 I=1,NN
  316. 1000 XX(I,M)=X(I)
  317. AM(M)=XM
  318. M4=M-1
  319. M5=1000-M4
  320. DO 1400 M8=M5,999
  321. M6=M3+1
  322. M2=1000-M8
  323. M7=IG(M2)+1
  324. IF(M6.LT.M7)GOTO 1150
  325. N9=1000-M7
  326. N8=1000-M6
  327. DO 1130 I3=N8,N9
  328. II=1000-I3
  329. 1130 X(II)=X(II-1)
  330. 1150 JJ=IG(M2)
  331. X(JJ)=0.0
  332. GSM=0.0
  333. DO 1210 I=1,M6
  334. J3=MN-I+1
  335. J4=MN-M2+2
  336. 1210 GSM=GSM+XX(J3,J4)*X(I)
  337. XK=(AM(M2)-XM)/GSM
  338. DO 1250 I=1,M6
  339. 1250 X(I)=XX(I,M2)-XK*X(I)
  340. GSM=0.0
  341. DO 1300 I=1,M6
  342. IF (ABS(GSM).LT.ABS(X(I)))GSM=X(I)
  343. 1300 CONTINUE
  344. DO 1330 I=1,M6
  345. 1330 X(I)=X(I)/GSM
  346. M3=M3+1
  347. IF (M2.NE.1)GOTO 1400
  348. DO 1380 I=1,M3
  349. 1380 VC(I,M)=X(I)
  350. 1400 CONTINUE
  351. 1410 CONTINUE
  352. C
  353. 220 WRITE(11,'(/2X,A)')'计算结果部分:'
  354. WRITE(11,'(/2X,A)')'输出各振型频率和振型'
  355. DO 360 I=1,M1
  356. TT=0.0
  357. IF (AM(I).GT.1E-8)TT=SQRT(1.0/AM(I))/(2.0*3.14159)
  358. WRITE(11,'(/2(2X,A,I2,A,F9.4))')'第',I,'振型频率:',TT,'振型:'
  359. J=1
  360. J0=1
  361. DO 330 IT=1,N3
  362. IF (J0.GT.NF)GOTO 320
  363. DO 300 JS=J0,NF
  364. IF(IT.EQ.NS(JS))GOTO 325
  365. 300 CONTINUE
  366. 320 VTL(IT)=VC(J,I)
  367. J=J+1
  368. GO TO 330
  369. 325 VTL(IT)=0.0
  370. J0=J0+1
  371. 330 CONTINUE
  372. WRITE(11,'(A8,A18,2A18/(I6,2E18.6,E20.6))')
  373.      1 '结点号','水平方向位移','垂直方向位移','转角',
  374.      2 (J,VTL(3*J-2),VTL(3*J-1),VTL(3*J),J=1,NJ)
  375. 360 CONTINUE
  376. C
  377. ND=(N3-NF)/3
  378. DO 1500 ME=1,MS
  379. I=I9(ME)
  380. J=J9(ME)
  381. IF(Y(I).EQ.Y(J))ND=ND-1
  382. 1500 CONTINUE
  383. WRITE(11,*)'ND=',ND
  384. DO 1510 I=1,ND
  385. DO 1510 J=1,ND
  386. AX=0.0
  387. BX=0.0
  388. SC(I,J)=AX*A(I,J)+BX*XX(I,J)
  389. 1510 CONTINUE
  390. CALL STEPM(A,XX,SC,ND,N3)
  391. RETURN
  392. END
  393. C        SUBROUTINE EIG1(A,X,Z,NN,N2,D,XM,NKK)
  394. IMPLICIT INTEGER*2 (I-N)
  395. DIMENSION A(N2,N2),X(NN),Z(NN)
  396. Y1=100000.0
  397. NKK=1
  398. DO 1320 I=1,NN
  399. 1320 X(I)=1.0
  400. XM=-100000.0
  401. 1340 DO 1400 I=1,NN
  402. SG=0.0
  403. DO 1380 J=1,NN
  404. 1380 SG=SG+A(I,J)*X(J)
  405. 1400 Z(I)=SG
  406. XM=0.0
  407. DO 1450 I=1,NN
  408. IF (ABS(XM).LT.ABS(Z(I)))XM=Z(I)
  409. 1450 CONTINUE
  410. DO 1500 I=1,NN
  411. 1500 X(I)=Z(I)/XM
  412. IF (ABS(Y1-XM)/XM.GT.D)GOTO 1530
  413. GOTO 1550
  414. 1530 Y1=XM
  415. NKK=NKK+1
  416. IF (NKK.GT.200)GOTO 1623
  417. GOTO 1340
  418. 1550 X3=0.0
  419. DO 1580 I=1,NN
  420. IF (ABS(X3).LT.ABS(X(I)))X3=X(I)
  421. 1580 CONTINUE
  422. DO 1610 I=1,NN
  423. 1610 X(I)=X(I)/X3
  424. RETURN
  425. 1623 WRITE(*)'NUMBER OF ITERATION NKK=',NKK
  426. 1630 FORMAT(A30,I2)
  427. STOP
  428. END
  429. C
  430. SUBROUTINE STEPM(SK,SM,SC,ND,N3)
  431. IMPLICIT REAL*8(A-H,O-Z)
  432. DIMENSION SK(N3,N3),SM(N3,N3),SC(N3,N3),F(N3,N3),X(N3,N3),
  433.      1 DUA(N3),UD(N3),UV(N3),UA(N3),TC(N3),P(N3),NEQ(N3)
  434. ND1=ND+1
  435. DO 10 I=1,N3
  436. UD(I)=0.0
  437. UV(I)=0.0
  438. DO 10 J=1,N3
  439. 10 F(I,J)=0.0
  440. WRITE(11,'(/1X,A)')'TIME PARA FOR ITEGRATION'
  441. READ(7,*)THETA,DT,TMAX
  442. WRITE(11,'(4X,3A6/4X,3F7.4)')
  443.      1 'THETA','DT','TMAX',THETA,DT,TMAX
  444. WRITE(11,'(/1X,A)')'NO.OF LOAD DATA POINTS'
  445. READ(7,*)(NEQ(L),L=1,ND)
  446. WRITE(11,'(4X,A6,I2,A3,I5)')('NEQ(',L,')=',NEQ(L),L=1,ND)
  447. ANN=0.0
  448. II=1
  449. DO 60 ID=1,ND
  450. NE=NEQ(ID)
  451. IF (NE.EQ.0) GOTO 60
  452. IF(NE.GT.TMAX/DT)NE=TMAX/DT+0.5
  453. READ(7,*)(TC(J),P(J),J=1,NE)
  454. WRITE(11,'(/1X,A)')'DYNAMIC LOAD ON STRUCTURE'
  455. WRITE(11,'(4X,A12,A15)')'TC(I)','P(I)'
  456. WRITE(11,'(4X,F12.5,E15.6)')(TC(J),P(J),J=1,NE)
  457. NT=TC(NE)/DT+0.5
  458. NT1=NT+1
  459. NT2=NT+2
  460. F(ID,1)=P(1)
  461. ANN=0.0
  462. II=1
  463. DO 50 I=2,NT2
  464. AI=I-1
  465. T=AI*DT
  466. IF(T.GT.TC(NE))GOTO 60
  467. IF(T.LE.TC(II+1))GOTO 40
  468. ANN=-TC(II+1)+T-DT
  469. II=II+1
  470. 40 ANN=ANN+DT
  471. F(ID,I)=P(II)+(P(II+1)-P(II))*ANN/(TC(II+1)-TC(II))
  472. 50 CONTINUE
  473. 60 CONTINUE
  474. NT=TMAX/DT+0.5
  475. NT1=NT+1
  476. DO 70 I=1,ND
  477. X(I,ND1)=F(I,J)
  478. DO 70 J=1,ND
  479. 70 X(I,J)=SM(I,J)
  480. DO 80 I=1,ND
  481. DO 80 J=1,ND
  482. 80 X(I,ND1)=X(I,ND1)-SC(I,J)*UV(J)-SK(I,J)*UD(J)
  483. CALL SOLVE(ND,X,N3)
  484. DO 90 I=1,ND
  485. 90 UA(I)=X(I,ND1)
  486. WRITE(11,'(/1X,A)')'RESPONSE OF STRUCTURE'
  487. WRITE(11,'(/3X,2A5,3A11)')'COR. ','TIME','DISPL.','VEL.','ACC.'
  488. TU=THETA*DT
  489. A1=3.0/TU
  490. A2=6.0/TU
  491. A3=TU/2.0
  492. A4=A2/TU
  493. DO 190 L=1,NT1
  494. DO 110 I=1,ND
  495. DO 110 J=1,ND
  496. 110 X(I,J)=SK(I,J)+A4*SM(I,J)+A1*SC(I,J)
  497. AL=L
  498. T=AL*DT
  499. DO 130 I=1,ND
  500. X(I,ND1)=(F(I,L+1)+F(I,L+2)-F(I,L+1))*(THETA-1.0)-F(I,L)
  501. DO 120 J=1,ND
  502. 120 X(I,ND1)=X(I,ND1)+(SM(I,J)*A2+SC(I,J)*3.0)*UV(J)+(SM(I,J)*3.0
  503.      2 +A3*SC(I,J))*UA(J)
  504. 130 CONTINUE
  505. CALL SOLVE(ND,X,N3)
  506. DO 140 I=1,ND
  507. DUA(I)=A4*X(I,ND1)-A2*UV(I)-3.0*UA(I)
  508. DUA(I)=DUA(I)/THETA
  509. DUV=DT*UA(I)+DT*DUA(I)/2.0
  510. UD(I)=UD(I)+DT*UV(I)+DT*DT*UA(I)/2.0+DT*DT*DUA(I)/6.0
  511. UV(I)=UV(I)+DUV
  512. 140 CONTINUE
  513. DO 160 I=1,ND
  514. X(I,ND1)=F(I,L+1)
  515. DO 150 J=1,ND
  516. X(I,ND1)=X(I,ND1)-SK(I,J)*UD(J)-SC(I,J)*UV(J)
  517. 150 X(I,J)=SM(I,J)
  518. 160 CONTINUE
  519. CALL SOLVE(ND,X,N3)
  520. DO 170 I=1,ND
  521. UA(I)=X(I,ND1)
  522. 170 WRITE(11,'(1X,I3,1X,F8.6,3E12.4)')I,T,UD(I),
  523.      1 UV(I),UA(I)
  524. 190 CONTINUE
  525. RETURN
  526. END
  527. C
  528. SUBROUTINE SOLVE(N,A,N3)
  529. IMPLICIT REAL*8(A-H,O-Z)
  530. DIMENSION A(N3,N3+1)
  531. M=1
  532. EPS=1.0E-10
  533. NPLUSM=N+M
  534. DET=1.0
  535. DO 40 K=1,N
  536. DET=DET*A(K,K)
  537. IF(DABS(A(K,K)).GT.EPS)GOTO 10
  538. GOTO 60
  539. 10 KP1=K+1
  540. DO 20 J=KP1,NPLUSM
  541. 20 A(K,J)=A(K,J)/A(K,K)
  542. A(K,K)=1.0
  543. DO 40 I=1,N
  544. IF (I.EQ.K.OR.A(I,K).EQ.0)GOTO 40
  545. DO 30 J=KP1,NPLUSM
  546. 30 A(I,J)=A(I,J)-A(I,K)*A(K,J)
  547. A(I,K)=0.0
  548. 40 CONTINUE
  549. 60 RETURN
  550. END
复制代码
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-17 22:45 , Processed in 0.054609 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表