程序结构力学大作业结 81 孙玉进该程序可计算任意平面结构任意阶频率(包括重频),以及任意阶振型(包括重频对应正交振型)。计算时,振型不包括不包括单元固端型振型。!****************************module NumKind!***************implicit noneinteger (kind(1)),parameter :: ikind = kind(1), rkind = kind()real (rkind),parameter :: Zero = , One = , Two = , &Three= , Four = , Five = , &Six = , Seven= , Eight = , &Nine = , Ten =, Twelve= module NumKind!**************module TypeDef!**************use NumKindimplicit ype :: typ_Jointreal (rkind) :: x,yinteger (ikind) :: GDOF(3)end type typ_Jointtype :: typ_Elementinteger (ikind) :: JointNo(2),GlbDOF(6)real (rkind) :: Length,CosA,SinA,EI,EA,massend type typ_Elementtype :: typ_JointLoadinteger (ikind) :: JointNo,LodDOFreal (rkind) :: LodValend type typ_JointLoadtype :: typ_ElemLoadinteger (ikind) ::ElemNo,Indxreal (rkind) :: Pos,LodValend type typ_ElemLoadcontains!===================================subroutine SetElemProp (Elem, Joint)!===================================type (typ_Element),intent(in out) :: Elem(:)type (typ_Joint),intent(in) :: Joint(:)integer(ikind)::ie,NElemreal(rkind)::x1,x2,y1,y2NElem=size(Elem,dim=1)do ie=1,NElemx1=Joint(Elem(ie)%JointNo(1))%xy1=Joint(Elem(ie)%JointNo(1))%yx2=Joint(Elem(ie)%JointNo(2))%xy2=Joint(Elem(ie)%JointNo(2))%yElem(ie)%Length=sqrt((x1-x2)**2+(y1-y2)**2)Elem(ie)%CosA=(x2-x1)/Elem(ie)%LengthElem(ie)%SinA=(y2-y1)/Elem(ie)%LengthElem(ie)%GlbDOF(1:3)=Joint(Elem(ie)%JointNo(1))%GDOF(:)Elem(ie)%GlbDOF(4:6)=Joint(Elem(ie)%JointNo(2))%GDOF(:)end doreturnend subroutine SetElemProp!======================================subroutine TransMatrix (ET, CosA,SinA)!======================================real(rkind),intent(out) :: ET(:,:)real(rkind),intent(in) :: CosA,SinA! ET could be 2x2, 3x3 or 6x6 depending size(ET)ET = ZeroET(1,1:2) = (/ CosA, SinA /)ET(2,1:2) = (/-SinA, CosA /)if (size(ET,1) > 2) ET(3,3) = Oneif (size(ET,1) > 3) ET(4:6,4:6) = ET(1:3,1:3)returnend subroutine TransMat
程序结构力学大作业 来自淘豆网www.taodocs.com转载请标明出处.