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

Go to the source code of this file.

Functions/Subroutines

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

Function/Subroutine Documentation

◆ inicalcbody()

subroutine inicalcbody ( 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,
integer  icent 
)
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(*),icent
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  icent=1
55 !
56 ! assigning gravity forces
57 !
58  elseif(ibody(1,j).eq.2) then
59  body(1,i)=body(1,i)+xbody(1,j)*xbody(2,j)
60  body(2,i)=body(2,i)+xbody(1,j)*xbody(3,j)
61  body(3,i)=body(3,i)+xbody(1,j)*xbody(4,j)
62  endif
63  index=ipobody(2,index)
64  if(index.eq.0) exit
65  enddo
66 !
67 ! adding the centrifugal/Coriolis force (if any) to the
68 ! gravity loading
69 !
70  if(om.gt.0.d0) then
71  omcor=2.d0*dsqrt(om)
72  do j=1,3
73  q(j)=coel(j,i)-p1(j)
74  enddo
75  const=q(1)*p2(1)+q(2)*p2(2)+q(3)*p2(3)
76 !
77 ! Coriolis forces
78 !
79  corio(1)=vel(i,2)*p2(3)-vel(i,3)*p2(2)
80  corio(2)=vel(i,3)*p2(1)-vel(i,1)*p2(3)
81  corio(3)=vel(i,1)*p2(2)-vel(i,2)*p2(1)
82 !
83 ! inclusion of the centrifugal force into the body force
84 !
85  do j=1,3
86  body(j,i)=body(j,i)+(q(j)-const*p2(j))*om+
87  & corio(j)*omcor
88  enddo
89  endif
90 !
91  enddo
92 !
93  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)