编辑: 阿拉蕾 | 2017-09-16 |
TempDOF=TempDOF+3;
!总体自由度增加了
3 个end if if(Node(i)%EleTyp==2) then !如果节点从属与壳单元 Node(i)%GDOF(1)=TempDOF+1;
Node(i)%GDOF(2)=TempDOF+2;
Node(i)%GDOF(3)=TempDOF+3;
Node(i)%GDOF(4)=TempDOF+4;
Node(i)%GDOF(5)=TempDOF+5;
Node(i)%GDOF(6)=TempDOF+6;
TempDOF=TempDOF+6;
!总体自由度增加了
6 个end if end do !for i NGlbDOF=TempDOF return end subroutine TypDef_DOFCount end module TypDef module SolidDef use Lxz_Tools use TypDef contains ! 得到形函数 SUBROUTINE Solid_SHAP3(U,V,W,XQ,XJAC,XVJ,DETJ,SHP) ! ! COMPUTE SHAPE FUNCTION AND DERIVATIVES FOR 3D 8-NODE ELEMENT IMPLICIT REAL*8(A-H,O-Z) DIMENSION SHP(3,8),XQ(3,8),XJAC(3,3),XVJ(3,3),&
UI(8),VI(8),WI(8),IT2(3),IT3(3) DATA UI/-0.5D0,0.5D0,0.5D0,-0.5D0,-0.5D0,0.5D0,0.5D0,-0.5D0/ DATA VI/-0.5D0,-0.5D0,0.5D0,0.5D0,-0.5D0,-0.5D0,0.5D0,0.5D0/ DATA WI/-0.5D0,-0.5D0,-0.5D0,-0.5D0,0.5D0,0.5D0,0.5D0,0.5D0/ DATA IT2/2,3,1/, IT3/3,1,2/ ! 变量说明 ! U,V,W 为高斯积分点坐标 ! SHP(1:3,:) 先存放 Ni 对U,V, W 取偏导,后存放对 X,Y,Z 的偏导 ! SHP(4,:) 为Ni ! XQ(:,8) 为节点坐标 ! XJAC 为雅可比矩阵,XVJ 为雅可比逆矩阵 ! 求Ni 及Ni 对U,V,W 的偏导 DO
10 I=1,8 ! SHP(4,I)=(0.5D0+UI(I)*U)*(0.5D0+VI(I)*V)*(0.5D0+WI(I)*W) SHP(1,I)=UI(I)*(0.5D0+VI(I)*V)*(0.5D0+WI(I)*W) SHP(2,I)=VI(I)*(0.5D0+UI(I)*U)*(0.5D0+WI(I)*W) SHP(3,I)=WI(I)*(0.5D0+UI(I)*U)*(0.5D0+VI(I)*V)
10 CONTINUE ! 求雅可比矩阵 DO
20 I=1,3 DO
20 J=1,3 XJAC(I,J)=0.0D0 DO
20 K=1,8
20 XJAC(I,J)=XJAC(I,J)+XQ(I,K)*SHP(J,K) ! 求雅可比矩阵行列式 WJ1=XJAC(1,1)*XJAC(2,2)*XJAC(3,3)+XJAC(3,1)*XJAC(1,2)*&
XJAC(2,3)+XJAC(1,3)*XJAC(2,1)*XJAC(3,2) WJ2=XJAC(1,3)*XJAC(3,1)*XJAC(2,2)+XJAC(1,2)*XJAC(2,1)*&
XJAC(3,3)+XJAC(2,3)*XJAC(3,2)*XJAC(1,1) DETJ=WJ1-WJ2 ! 得到雅可比逆矩阵 DO
25 I=1,3 DO
25 J=1,3 M2=IT2(I) M3=IT3(I) N2=IT2(J) N3=IT3(J)
25 XVJ(I,J)=(XJAC(M2,N2)*XJAC(M3,N3)-XJAC(M2,N3)&
*XJAC(M3,N2))/DETJ ! W1, W2, W3 为临时变量,存放 Ni 对X,Y,Z 的偏导 DO
30 I=1,8 W1=0.0D0 W2=0.0D0 W3=0.0D0 DO
35 K=1,3 W1=W1+XVJ(1,K)*SHP(K,I) W2=W2+XVJ(2,K)*SHP(K,I)
35 W3=W3+XVJ(3,K)*SHP(K,I) ! 把Ni 对X,Y,Z,的偏导存入 SHP SHP(1,I)=W1 SHP(2,I)=W2 SHP(3,I)=W3
30 CONTINUE RETURN END subroutine ! ! 得到矩阵 B(6,24) Subroutine Solid_GETB(B,SHP) implicit real*8(A-H,O-Z) dimension B(6,24),SHP(3,8) integer i,j do
10 i=1,8 j=(i-1)*3+1 b(1,j)=SHP(1,I) B(1,J+1)=0.0d0 B(1,J+2)=0.0D0 B(2,J)=0.0d0 B(2,J+1)=SHP(2,I) B(2,J+2)=0.0D0 B(3,J)=0.0d0 B(3,J+1)=0.0d0 B(3,J+2)=SHP(3,I) B(4,J)=SHP(2,I) B(4,J+1)=SHP(1,I) B(4,J+2)=0.0D0 B(5,J)=0.0d0 B(5,J+1)=SHP(3,I) B(5,J+2)=SHP(2,I) B(6,J)=SHP(3,I) B(6,J+1)=0.0d0 B(6,J+2)=SHP(1,I)
10 continue return end subroutine subroutine Solid_MutBAB(M,N,A,B,C) implicit real*8 (A-H,O-Z) Dimension A(N,N),C(M,M),B(N,M),AB(N,M) ! do
12 I=1,N do
12 J=1,M W1=0.0d0 DO
14 K=1,N
14 W1=W1+A(I,K)*B(K,J)
12 AB(I,J)=W1 DO
16 I=1,M Do
16 J........