Dear,
Could you please let me know where I can find subroutine bm3trn.
It seems that it does not transform displacements ok, or I am doing something wrong?
I added this line in the user element code: call bm3trn(ul(1,1,1),t,6,6,2).
I am running an example of a horizontal Timoshenko beam with imposed rotational degree of freedom theta_z at second node, which should be ul(6,2,1). When I print this before transformation, I get ok. But after transformation, I get that the imposed rotation is in ul(5,2,1) and with minus sign.
After checking, it seems that it changes ul(2,j,1) with ul(3,j,1) and vice versa, and ul(5,j,1) with ul(6,j,1).
I also added this subroutine in my code to take only axial refrence vector:c-----------------------------------------------------------------------
subroutine framtr02(d,xl,ndm,le,t)
c-----[--.----+----.----+----.-----------------------------------------]
c Purpose: Three dimensional frame element
c Inputs:
c d(*) - Material parameters
c xl(ndm,*) - Element coordinates
c ndm - Dimension for 'xl'
c Outputs:
c le - Element length
c t(3,3) - Transformation array
c-----[--.----+----.----+----.-----------------------------------------]
implicit none
include 'debugs.h'
include 'eldata.h'
include 'iofile.h'
include 'refnd.h'
character wd(4)*6
integer ndm, nmax, nmin, nnint, i
real*8 d(*),xl(ndm,*), le, t(3,3), dl,theta, tol
t(1,1) = xl(1,2) - xl(1,1)
t(1,2) = xl(2,2) - xl(2,1)
t(1,3) = xl(3,2) - xl(3,1)
le = sqrt(t(1,1)*t(1,1)+t(1,2)*t(1,2)+t(1,3)*t(1,3))
dl = 1.0d0/le
t(1,1) = t(1,1)*dl
t(1,2) = t(1,2)*dl
t(1,3) = t(1,3)*dl
c Reference Node
! Axial reference vector
nmax = 1
nmin = 1
do i = 2,3
if(t(1,i).gt.t(1,nmax)) then
nmax = i
endif
if(t(1,i).lt.t(1,nmin)) then
nmin = i
endif
end do ! i
nnint = 6 - nmax - nmin
t(3,nmax) = -t(1,nmin)
t(3,nnint) = t(1,nnint)
t(3,nmin) = t(1,nmax)
t(2,1) = (t(3,2)*t(1,3) - t(3,3)*t(1,2))
t(2,2) = (t(3,3)*t(1,1) - t(3,1)*t(1,3))
t(2,3) = (t(3,1)*t(1,2) - t(3,2)*t(1,1))
dl = sqrt(t(2,1)*t(2,1)+t(2,2)*t(2,2)+t(2,3)*t(2,3))
dl = 1.0d0/dl
t(2,1) = t(2,1)*dl
t(2,2) = t(2,2)*dl
t(2,3) = t(2,3)*dl
t(3,1) = t(1,2)*t(2,3) - t(1,3)*t(2,2)
t(3,2) = t(1,3)*t(2,1) - t(1,1)*t(2,3)
t(3,3) = t(1,1)*t(2,2) - t(1,2)*t(2,1)
end subroutine framtr02
Thanks in advance.