CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
calcbody.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine calcbody (nef, body, ipobody, ibody, xbody, coel, vel, lakon, nactdohinv)
 

Function/Subroutine Documentation

◆ calcbody()

subroutine calcbody ( integer  nef,
real*8, dimension(0:3,*)  body,
integer, dimension(2,*)  ipobody,
integer, dimension(3,*)  ibody,
real*8, dimension(7,*)  xbody,
real*8, dimension(3,*)  coel,
real*8, dimension(nef,0:7)  vel,
character*8, dimension(*)  lakon,
integer, dimension(*)  nactdohinv 
)
21 !
22 ! calculation of the actual body force in each element. The body
23 ! force is the sum of gravity and centrifugal/Coriolis forces
24 !
25  implicit none
26 !
27  character*8 lakon(*)
28 !
29  integer i,j,nef,index,ipobody(2,*),ibody(3,*),nactdohinv(*)
30 !
31  real*8 om,body(0:3,*),p1(3),p2(3),xbody(7,*),omcor,q(3),coel(3,*),
32  & vel(nef,0:7),const,corio(3)
33 !
34  do i=1,nef
35  om=0.d0
36  do j=1,3
37  body(j,i)=0.d0
38  enddo
39 !
40  index=nactdohinv(i)
41 !
42  do
43  j=ipobody(1,index)
44  if(j.eq.0) exit
45  if(ibody(1,j).eq.1) then
46  om=xbody(1,j)
47  p1(1)=xbody(2,j)
48  p1(2)=xbody(3,j)
49  p1(3)=xbody(4,j)
50  p2(1)=xbody(5,j)
51  p2(2)=xbody(6,j)
52  p2(3)=xbody(7,j)
53 !
54 ! assigning gravity forces
55 !
56  elseif(ibody(1,j).eq.2) then
57  body(1,i)=body(1,i)+xbody(1,j)*xbody(2,j)
58  body(2,i)=body(2,i)+xbody(1,j)*xbody(3,j)
59  body(3,i)=body(3,i)+xbody(1,j)*xbody(4,j)
60  endif
61  index=ipobody(2,index)
62  if(index.eq.0) exit
63  enddo
64 !
65 ! adding the centrifugal/Coriolis force (if any) to the
66 ! gravity loading
67 !
68  if(om.gt.0.d0) then
69  omcor=2.d0*dsqrt(om)
70  do j=1,3
71  q(j)=coel(j,i)-p1(j)
72  enddo
73  const=q(1)*p2(1)+q(2)*p2(2)+q(3)*p2(3)
74 !
75 ! Coriolis forces
76 !
77  corio(1)=vel(i,2)*p2(3)-vel(i,3)*p2(2)
78  corio(2)=vel(i,3)*p2(1)-vel(i,1)*p2(3)
79  corio(3)=vel(i,1)*p2(2)-vel(i,2)*p2(1)
80 !
81 ! inclusion of the centrifugal force into the body force
82 !
83  do j=1,3
84  body(j,i)=body(j,i)+(q(j)-const*p2(j))*om+
85  & corio(j)*omcor
86  enddo
87  endif
88 !
89  enddo
90 !
91  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)