word文档fortran梯形法和三角法计算截面特性

内容

梯形分块法与三角形分块法计算梯形分块法:SUBROUTINEFSJ1(NS,BS,HS,FT,JO,Y1,W1,W2)REALJO,JTDIMENSIONBS(NS),HS(NS)F1=0.0S1=0.0JT=0.0DO10I=2,NSB=BS(I)-BS(I-1)D=HS(I)-HS(I-1)FT=F1+D*(BS(I)+BS(I-1))/2.0ST=S1+D*F1+(BS(I-1)+B/3.0)*D*D/2.0JT=JT+2.0*D*S1+D*D*F1+(BS(I-1)+B/4.0)*D**3/3.0F1=FTS1=ST10CONTINUEY2=ST/FTY1=HS(NS)-Y2JO=JT-FT*Y2*Y2W1=JO/Y1W2=JO/Y2RETURNENDREALJDIMENSIONBS(50),HS(50)READ(*,100)NS100FORMAT(I5)READ(*,101)(BS(I),HS(I),I=1,NS)101FORMAT(2F10.4)CALLFSJ1(NS,BS,HS,F,J,Y,W1,W2)WRITE(*,200)F,J,Y,W1,W2200FORMAT(7X,'F',13X,'J',13X,'Y',12X,'W1',12X,'W2'/1X,5E14.7)STOPEND三角形分块法SUBROUTINEYFJ(N,X,Y,YY,FF,JJ)REALJJ,JCDIMENSIONX(N),Y(N)F(X1,X2,Y1,Y2)=(X1*Y2-Y1*X2)/2.0YF(Y1,Y2)=(Y1+Y2)/3.0JC(X1,X2,Y1,Y2)=F(X1,X2,Y1,Y2)*(Y1*Y1+Y2*(Y1+Y2))/6.0TF=0.0TYF=0.0TJ=0.0DO10J=2,NX(J)=X(J)-X(1)10Y(J)=Y(J)-Y(1)N1=N-1DO20J=2,N1TF=F(X(J),X(J+1),Y(J),Y(J+1))+TFTYF=YF(Y(J),Y(J+1))*F(X(J),X(J+1),Y(J),Y(J+1))+TYF20TJ=TJ+JC(X(J),X(J+1),Y(J),Y(J+1))YY=TYF/TFFF=TFJJ=TJ-FF*YY*YYYY=YY+Y(1)RETURNENDREALJDIMENSIONX(50),Y(50)READ(*,100)NREAD(*,101)(X(I),Y(I),I=1,N)CALLYFJ(N,X,Y,B,A,J)100FORMAT(I5)101FORMAT(2F10.4)WRITE(*,200)B,A,J200FORMAT(7X,'Y',13X,'F',13X,'J',3E14.7)STOPEND梯形法输入:9↙642.4,0.0↙642.4,20.0↙470.0,28.0↙280.0,28.0↙40.0,68.0↙40.0,300.0↙60.0,320.0↙350.0,320.0↙350.0,340.0↙输出结果:面积F=0.81955E5,惯性矩J=0.1321E10,Y1=0.118E3截面抵抗矩W1=0.11190E8,截面抵抗矩W1=0.59523E7三角形法输入:22↙0.0,0.0↙350.0,0.0↙350.0,272.0↙470.0,312.0↙642.4,320.0↙642.4,340.0↙-642.4,340.0↙-642.4,320.0↙-470.0,312.0↙-350.0,272.0↙-350.0,0.0↙0.0,0.0↙0.0,20.0↙-290.0,20.0↙-310.0,40.0↙-310.0,272.0↙-190.0,312.0↙190.0,312.0↙310.0,272.0↙310.0,40.0↙290.0,20.0↙0.0,20.0↙输出结果:yy=0.22194E3,ff=0.81955E5,jj=0.1321E10Cad绘图计算结果验证:----------------面域----------------面积:81955.2000质心:X:702.2830Y:122.1595主力矩与质心的X-Y方向:I:1321072060.4175沿[1.00000.0000]J:8717623773.9520沿[0.00001.0000]

浏览:12
下载量:-
下载币:30
日期:2021-04-30
3
收藏
         投诉 / 报错