📄 shape.f90
字号:
xjaxm( 2, 2 ) * xjaxm( 3, 1 )
!.......计算Jacobi行列式的值
xjaco = 0.0D0
DO idime = 1, 3
xjaco = xjaco + xjaxm( 1, idime ) * xjaxi( idime, 1 )
END DO
IF( xjaco .LE. 1.0D-8 ) THEN
WRITE( 12, 2200 ) ielem
nerrc = 158436
RETURN
END IF
!.......计算Jacobi矩阵的逆矩阵
xjaxi( 1, 2 ) = xjaxm( 3, 2 ) * xjaxm( 1, 3 ) - &
xjaxm( 3, 3 ) * xjaxm( 1, 2 )
xjaxi( 2, 2 ) = xjaxm( 3, 3 ) * xjaxm( 1, 1 ) - &
xjaxm( 3, 1 ) * xjaxm( 1, 3 )
xjaxi( 3, 2 ) = xjaxm( 3, 1 ) * xjaxm( 1, 2 ) - &
xjaxm( 3, 2 ) * xjaxm( 1, 1 )
xjaxi( 1, 3 ) = xjaxm( 1, 2 ) * xjaxm( 2, 3 ) - &
xjaxm( 1, 3 ) * xjaxm( 2, 2 )
xjaxi( 2, 3 ) = xjaxm( 1, 3 ) * xjaxm( 2, 1 ) - &
xjaxm( 1, 1 ) * xjaxm( 2, 3 )
xjaxi( 3, 3 ) = xjaxm( 1, 1 ) * xjaxm( 2, 2 ) - &
xjaxm( 1, 2 ) * xjaxm( 2, 1 )
DO idime = 1, 3
DO jdime = 1, 3
xjaxi( idime, jdime ) = xjaxi( idime, jdime ) / xjaco
END DO
END DO
!.......计算形函数对整体坐标的导数
DO inode = 1, nnode
xtemp = 0.0D0
ytemp = 0.0D0
ztemp = 0.0D0
DO idime = 1, 3
xtemp = xtemp + xjaxi( 1, idime ) * shape( idime, inode )
ytemp = ytemp + xjaxi( 2, idime ) * shape( idime, inode )
ztemp = ztemp + xjaxi( 3, idime ) * shape( idime, inode )
END DO
shape( 1, inode ) = xtemp
shape( 2, inode ) = ytemp
shape( 3, inode ) = ztemp
END DO
2000 FORMAT( 2x, '错误:TCShap3D只适用于六节点单元。' )
2200 FORMAT( 2x, '错误:Jacobi行列式的值非正。', I5 )
RETURN
END
SUBROUTINE NodShap1D( coren, shape, xcoor, inode, ndime, &
nnode, nordr, nerrc )
IMPLICIT DOUBLE PRECISION( a-h, o-z )
DIMENSION coren( ndime, nnode ), shape( 2, 4 )
xtemp = xcoor - coren( 1, inode )
IF( nordr .LT. 0 .OR. nordr .GT. 3 ) THEN
WRITE( 12, 2000 )
nerrc = 436547
RETURN
END IF
shape( 1, 1 ) = 0.0D0
shape( 2, 1 ) = 1.0D0
IF( nordr .GE. 1 ) THEN
shape( 1, 2 ) = 1.0D0
shape( 2, 2 ) = xtemp
END IF
IF( nordr .GE. 2 ) THEN
shape( 1, 3 ) = xtemp * 2.0D0
shape( 2, 3 ) = xtemp * xtemp
END IF
IF( nordr .GE. 3 ) THEN
shape( 1, 4 ) = xtemp * xtemp * 3.0D0
shape( 2, 4 ) = xtemp * xtemp * xtemp
END IF
2000 FORMAT( 2x, '错误:节点位移形函数阶的有效范围为0-3' )
RETURN
END
SUBROUTINE NodShap2D( coren, shape, xcoor, ycoor, inode, &
ndime, nnode, nordr, nerrc )
IMPLICIT DOUBLE PRECISION( a-h, o-z )
DIMENSION coren( ndime, nnode ), shape( 3, 10 )
IF( nordr .LT. 0 .OR. nordr .GT. 3 ) THEN
WRITE( 12, 2000 )
nerrc = 436547
RETURN
END IF
xtemp = xcoor - coren( 1, inode )
ytemp = ycoor - coren( 2, inode )
shape( 1, 1 ) = 0.0D0
shape( 2, 1 ) = 0.0D0
shape( 3, 1 ) = 1.0D0
IF( nordr .GE. 1 ) THEN
shape( 1, 2 ) = 1.0D0
shape( 2, 2 ) = 0.0D0
shape( 3, 2 ) = xtemp
shape( 1, 3 ) = 0.0D0
shape( 2, 3 ) = 1.0D0
shape( 3, 3 ) = ytemp
END IF
IF( nordr .GE. 2 ) THEN
shape( 1, 4 ) = 2.0D0 * xtemp
shape( 2, 4 ) = 0.0D0
shape( 3, 4 ) = xtemp * xtemp
shape( 1, 5 ) = ytemp
shape( 2, 5 ) = xtemp
shape( 3, 5 ) = xtemp * ytemp
shape( 1, 6 ) = 0.0D0
shape( 2, 6 ) = 2.0D0 * ytemp
shape( 3, 6 ) = ytemp * ytemp
END IF
IF( nordr .GE. 3 ) THEN
shape( 1, 7 ) = 3.0D0 * xtemp * xtemp
shape( 2, 7 ) = 0.0D0
shape( 3, 7 ) = xtemp * xtemp * xtemp
shape( 1, 8 ) = 2.0D0 * xtemp * ytemp
shape( 2, 8 ) = xtemp * xtemp
shape( 3, 8 ) = xtemp * xtemp * ytemp
shape( 1, 9 ) = ytemp * ytemp
shape( 2, 9 ) = 2.0D0 * xtemp * ytemp
shape( 3, 9 ) = xtemp * ytemp * ytemp
shape( 1, 10 ) = 0.0D0
shape( 2, 10 ) = 3.0D0 * ytemp * ytemp
shape( 3, 10 ) = ytemp * ytemp * ytemp
END IF
2000 FORMAT( 2x, '错误:节点位移形函数阶的有效范围为0-3' )
END
SUBROUTINE NodShap3D( coren, shape, xcoor, ycoor, zcoor, &
inode, ndime, nnode, nordr, nerrc )
IMPLICIT DOUBLE PRECISION( a-h, o-z )
DIMENSION coren( ndime, nnode ), shape( 4, 20 )
IF( nordr .LT. 0 .OR. nordr .GT. 3 ) THEN
WRITE( 12, 2000 )
nerrc = 436547
RETURN
END IF
!.......
xtemp = xcoor - coren( 1, inode )
ytemp = ycoor - coren( 2, inode )
ztemp = zcoor - coren( 3, inode )
!.......
shape( 1, 1 ) = 0.0D0
shape( 2, 1 ) = 0.0D0
shape( 3, 1 ) = 0.0D0
shape( 4, 1 ) = 1.0D0
IF( nordr .GE. 1 ) THEN
shape( 1, 2 ) = 1.0D0 !x-xi
shape( 2, 2 ) = 0.0D0
shape( 3, 2 ) = 0.0D0
shape( 4, 2 ) = xtemp
shape( 1, 3 ) = 0.0D0 !y-yi
shape( 2, 3 ) = 1.0D0
shape( 3, 3 ) = 0.0D0
shape( 4, 3 ) = ytemp
shape( 1, 4 ) = 0.0D0 !z-zi
shape( 2, 4 ) = 0.0D0
shape( 3, 4 ) = 1.0D0
shape( 4, 4 ) = ztemp
END IF
IF( nordr .GE. 2 ) THEN
shape( 1, 5 ) = 2.0D0 * xtemp !(x-xi)(x-xi)
shape( 2, 5 ) = 0.0D0
shape( 3, 5 ) = 0.0D0
shape( 4, 5 ) = xtemp * xtemp
shape( 1, 6 ) = ytemp !(x-xi)(y-yi)
shape( 2, 6 ) = xtemp
shape( 3, 6 ) = 0.0D0
shape( 4, 6 ) = xtemp * ytemp
shape( 1, 7 ) = ztemp !(x-xi)(z-zi)
shape( 2, 7 ) = 0.0D0
shape( 3, 7 ) = xtemp
shape( 4, 7 ) = xtemp * ztemp
shape( 1, 8 ) = 0.0D0 !(y-yi)(y-yi)
shape( 2, 8 ) = 2.0D0 * ytemp
shape( 3, 8 ) = 0.0D0
shape( 4, 8 ) = ytemp * ytemp
shape( 1, 9 ) = 0.0D0 !(y-yi)(z-zi)
shape( 2, 9 ) = ztemp
shape( 3, 9 ) = ytemp
shape( 4, 9 ) = ytemp * ztemp
shape( 1, 10 ) = 0.0D0 !(z-zi)(z-zi)
shape( 2, 10 ) = 0.0D0
shape( 3, 10 ) = 2.0D0 * ztemp
shape( 4, 10 ) = ztemp * ztemp
END IF
IF( nordr .GE. 3 ) THEN
shape( 1, 11 ) = 3.0D0 * xtemp * xtemp !(x-xi)(x-xi)(x-xi)
shape( 2, 11 ) = 0.0D0
shape( 3, 11 ) = 0.0D0
shape( 4, 11 ) = xtemp * xtemp * xtemp
shape( 1, 12 ) = 2.0D0 * xtemp * ytemp !(x-xi)(x-xi)(y-yi)
shape( 2, 12 ) = xtemp * xtemp
shape( 3, 12 ) = 0.0D0
shape( 4, 12 ) = xtemp * xtemp * ytemp
shape( 1, 13 ) = 2.0D0 * xtemp * ztemp !(x-xi)(x-xi)(z-zi)
shape( 2, 13 ) = 0.0D0
shape( 3, 13 ) = xtemp * xtemp
shape( 4, 13 ) = xtemp * xtemp * ztemp
shape( 1, 14 ) = ytemp * ytemp !(x-xi)(y-yi)(y-yi)
shape( 2, 14 ) = 2.0D0 * xtemp * ytemp
shape( 3, 14 ) = 0.0D0
shape( 4, 14 ) = xtemp * ytemp * ytemp
shape( 1, 15 ) = ztemp * ztemp !(x-xi)(z-zi)(z-zi)
shape( 2, 15 ) = 0.0D0
shape( 3, 15 ) = 2.0D0 * xtemp * ztemp
shape( 4, 15 ) = xtemp * ztemp * ztemp
shape( 1, 16 ) = ytemp * ztemp !(x-xi)(y-yi)(z-zi)
shape( 2, 16 ) = xtemp * ztemp
shape( 3, 16 ) = xtemp * ytemp
shape( 4, 16 ) = xtemp * ytemp * ztemp
shape( 1, 17 ) = 0.0D0 !(y-yi)(y-yi)(y-yi)
shape( 2, 17 ) = 3.0D0 * ytemp * ytemp
shape( 3, 17 ) = 0.0D0
shape( 4, 17 ) = ytemp * ytemp * ytemp
shape( 1, 18 ) = 0.0D0 !(y-yi)(y-yi)(z-zi)
shape( 2, 18 ) = 2.0D0 * ytemp * ztemp
shape( 3, 18 ) = ytemp * ytemp
shape( 4, 18 ) = ytemp * ytemp * ztemp
shape( 1, 19 ) = 0.0D0 !(y-yi)(z-zi)(z-zi)
shape( 2, 19 ) = ztemp * ztemp
shape( 3, 19 ) = 2.0D0 * ytemp * ztemp
shape( 4, 19 ) = ytemp * ztemp * ztemp
shape( 1, 20 ) = 0.0D0 !(z-zi)(z-zi)(z-zi)
shape( 2, 20 ) = 0.0D0
shape( 3, 20 ) = 3.0D0 * ztemp * ztemp
shape( 4, 20 ) = ztemp * ztemp * ztemp
END IF
2000 FORMAT( 2x, '错误:节点位移形函数阶的有效范围为0-3' )
END
SUBROUTINE TransCover2D( trans, xtrns, ytrns, nordr )
IMPLICIT DOUBLE PRECISION( a-h, o-z )
DIMENSION trans( 10, 10 )
IF( nordr .LT. 0 .OR. nordr .GT. 3 ) THEN
WRITE( 12, 2000 )
nerrc = 436547
RETURN
END IF
trans = 0.0D0
trans( 1, 1 ) = 1.0D0
IF( nordr .GE. 1 ) THEN
trans( 2, 2 ) = 1.0D0
trans( 3, 3 ) = 1.0D0
trans( 1, 2 ) = xtrns
trans( 1, 3 ) = ytrns
END IF
IF( nordr .GE. 2 ) THEN
trans( 4, 4 ) = 1.0D0
trans( 5, 5 ) = 1.0D0
trans( 6, 6 ) = 1.0D0
trans( 1, 4 ) = xtrns * xtrns
trans( 1, 5 ) = xtrns * ytrns
trans( 1, 6 ) = ytrns * ytrns
trans( 2, 4 ) = 2.0D0 * xtrns
trans( 2, 5 ) = ytrns
trans( 3, 5 ) = xtrns
trans( 3, 6 ) = 2.0D0 * ytrns
END IF
IF( nordr .GE. 3 ) THEN
trans( 7, 7 ) = 1.0D0
trans( 8, 8 ) = 1.0D0
trans( 9, 9 ) = 1.0D0
trans( 10, 10 ) = 1.0D0
trans( 1, 7 ) = xtrns * xtrns * xtrns
trans( 2, 7 ) = 3.0D0 * xtrns * xtrns
trans( 4, 7 ) = 3.0D0 * xtrns
trans( 1, 8 ) = xtrns * xtrns * ytrns
trans( 2, 8 ) = 2.0D0 * xtrns * ytrns
trans( 3, 8 ) = xtrns * xtrns
trans( 4, 8 ) = ytrns
trans( 5, 8 ) = 2.0D0 * xtrns
trans( 1, 9 ) = xtrns * ytrns * ytrns
trans( 2, 9 ) = ytrns * ytrns
trans( 3, 9 ) = 2.0D0 * xtrns * ytrns
trans( 5, 9 ) = 2.0D0 * ytrns
trans( 6, 9 ) = xtrns
trans( 1, 10 ) = ytrns * ytrns * ytrns
trans( 3, 10 ) = 3.0D0 * ytrns * ytrns
trans( 6, 10 ) = 3.0D0 * ytrns
END IF
2000 FORMAT( 2x, '错误:节点位移形函数阶的有效范围为0-3' )
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -