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

Go to the source code of this file.

Functions/Subroutines

subroutine storecontactprop (ne, ne0, lakon, kon, ipkon, mi, ielmat, elcon, mortar, adb, nactdof, springarea, ncmat_, ntmat_, stx, temax)
 

Function/Subroutine Documentation

◆ storecontactprop()

subroutine storecontactprop ( integer, intent(in)  ne,
integer, intent(in)  ne0,
character*8, dimension(*), intent(in)  lakon,
integer, dimension(*), intent(in)  kon,
integer, dimension(*), intent(in)  ipkon,
integer, dimension(*), intent(in)  mi,
integer, dimension(mi(3),*), intent(in)  ielmat,
real*8, dimension(0:ncmat_,ntmat_,*), intent(in)  elcon,
integer, intent(in)  mortar,
real*8, dimension(*), intent(in)  adb,
integer, dimension(0:mi(2),*), intent(in)  nactdof,
real*8, dimension(2,*), intent(in)  springarea,
integer, intent(in)  ncmat_,
integer, intent(in)  ntmat_,
real*8, dimension(6,mi(1),ne), intent(in)  stx,
real*8, intent(out)  temax 
)
22 !
23 ! # # # # # # # # # # # # # # # # # # # # # # # # # # # #
24 ! Routine that computes the natural period of oscillation
25 ! of the contact elements. A simplified two-dofs model
26 ! has been used to compute the natural frequencies due
27 ! to the relative motion between slave and master surf-
28 ! ace.
29 !
30 ! Main variables and meaning
31 !
32 ! temax : max. natural period of oscillation
33 ! stx : vector containig results (from results.c)
34 ! springmm : average mass of master surface
35 ! springms : average mass of slave surface
36 ! xk : spring stiffness between the surfaces
37 ! xmacont : mass of the actual node of the element
38 ! areaslav : area of the slave surface (stiffness comp)
39 !
40 ! Proposed by Matteo Pacher
41 !
42 ! # # # # # # # # # # # # # # # # # # # # # # # # # # # #
43 !
44  implicit none
45 !
46  character*8 lakonl,lakon(*)
47 !
48  integer mi(*),ne,ne0,kon(*),ipkon(*),nactdof(0:mi(2),*),
49  & indexe,j,nope,ielmat(mi(3),*),imat,mortar,nopem,
50  & indexn,nelem,ncmat_,ntmat_
51 !
52  real*8 adb(*),springarea(2,*),pi,te,stx(6,mi(1),ne),
53  & springmm,springms,elcon(0:ncmat_,ntmat_,*),springfac,
54  & xmacont,areaslav,xk,temax
55 !
56  intent(in) ne,ne0,lakon,kon,ipkon,mi,ielmat,elcon,mortar,
57  & adb,nactdof,springarea,ncmat_,ntmat_,stx
58 
59  intent(out) temax
60 !
61 ! Initialization
62 !
63  temax=0.d0
64  pi=4.d0*datan(1.d0)
65 
66 ! Loop over the contact elements
67  do nelem=ne0+1,ne
68  indexe=ipkon(nelem)
69  lakonl=lakon(nelem)
70  imat=ielmat(1,nelem)
71 
72  xk=elcon(2,1,imat) ! element stiffness
73  springmm=0.0d0 ! mass master surface
74  springms=0.0d0 ! mass slave node/surface
75 
76  if(mortar.eq.0) then
77 !
78 ! Contact node to face
79 !
80 ! nope = number of master nodes + 1 (1 slave node)
81 !
82  nope=ichar(lakonl(8:8))-47
83  springfac=1.0
84 !
85  do indexn=1,nope
86  xmacont=0.0d0
87 
88  do j=1,3
89  if(nactdof(j,kon(indexe+indexn)).gt.0)then
90  xmacont=max(xmacont,
91  & adb(nactdof(j,kon(indexe+indexn))))
92  endif
93  enddo
94 ! mass accumulation
95  if(indexn.eq.nope)then
96  springms=springms+xmacont
97 !
98 ! mean mass at master nodes
99 !
100  springmm=springmm/(nope-1.0d0)
101  else
102  springmm=springmm+xmacont
103  endif
104  enddo
105 !
106  areaslav=springarea(1,kon(indexe+nope+1))
107  xk=xk*areaslav
108 !
109 ! checking whether mass or slave side is constrained
110 !
111  if((springmm.le.0.d0).and.(springms.le.0.d0)) then
112  cycle
113  elseif(springmm.le.0.d0) then
114  springmm=springms
115  elseif(springms.le.0.d0) then
116  springms=springmm
117  endif
118 !
119  elseif(mortar.eq.1) then
120 !
121 ! Contact face to face
122 !
123 ! nopem = number of master nodes
124 !
125  nopem=ichar(lakonl(8:8))-48
126  springfac=0.1d0
127 !
128  do indexn=1,kon(indexe)
129 !
130  xmacont=0.0d0
131  do j=1,3
132  if(nactdof(j,kon(indexe+indexn)).gt.0)then
133  xmacont=max(xmacont,
134  & adb(nactdof(j,kon(indexe+indexn))))
135  endif
136  enddo
137 !
138  if(indexn.gt.nopem)then !slave
139  springms=springms+xmacont
140  else !master
141  springmm=springmm+xmacont
142  endif
143  enddo
144 !
145 ! mean mass at slave and master nodes
146 !
147  springms=springms/(kon(indexe)-nopem)
148  springmm=springmm/nopem
149 !
150  areaslav=springarea(1,kon(1+indexe+kon(indexe)))
151  xk=xk*areaslav*springfac
152 !
153 ! checking whether mass or slave side is constrained
154 !
155  if((springmm.le.0.d0).and.(springms.le.0.d0)) then
156  cycle
157  elseif(springmm.le.0.d0) then
158  springmm=springms
159  elseif(springms.le.0.d0) then
160  springms=springmm
161  endif
162  endif ! face-to-face
163 !
164 ! Calculation of the natural period according to the 2-dof model
165 !
166  te=0.d0
167  if(xk.ne.0.d0)then
168  te=2.d0*pi*dsqrt((springmm*springms)/
169  & ((springmm+springms)*xk))
170 !
171 ! exponential pressure-overclosure behavior
172 !
173  if(int(elcon(3,1,imat)).eq.1) then
174  te=te/10.d0
175  endif
176  endif
177 !
178  if(stx(4,1,nelem).gt.0.d0) temax=max(te,temax)
179 !
180  enddo ! loop over the contact elements
181 !
182  return
#define max(a, b)
Definition: cascade.c:32
Hosted by OpenAircraft.com, (Michigan UAV, LLC)