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

Go to the source code of this file.

Functions/Subroutines

subroutine springdamp_f2f (xl, elas, voldl, s, imat, elcon, ncmat_, ntmat_, nope, lakonl, iperturb, springarea, nmethod, mi, reltime, nasym, jfaces, igauss, pslavsurf, pmastsurf, clearini)
 

Function/Subroutine Documentation

◆ springdamp_f2f()

subroutine springdamp_f2f ( real*8, dimension(3,19)  xl,
real*8, dimension(21)  elas,
real*8, dimension(0:mi(2),19)  voldl,
real*8, dimension(60,60)  s,
integer  imat,
real*8, dimension(0:ncmat_,ntmat_,*)  elcon,
integer  ncmat_,
integer  ntmat_,
integer  nope,
character*8  lakonl,
integer, dimension(*)  iperturb,
real*8, dimension(2)  springarea,
integer  nmethod,
integer, dimension(*)  mi,
real*8  reltime,
integer  nasym,
integer  jfaces,
integer  igauss,
real*8, dimension(3,*)  pslavsurf,
real*8, dimension(6,*)  pmastsurf,
real*8, dimension(3,9,*)  clearini 
)
22 !
23 ! calculates the contact damping matrix (face-to-face penalty)
24 !
25  implicit none
26 !
27  character*8 lakonl
28 !
29  integer i,j,imat,ncmat_,ntmat_,k,l,nope,iflag,iperturb(*),
30  & nmethod,mi(*),nasym,jfaces,igauss,nopem,nopes,nopep
31 !
32  real*8 xl(3,19),elas(21),pproj(3),shp2m(7,9),al(3),s(60,60),
33  & voldl(0:mi(2),19),pl(3,19),xn(3),c3,elcon(0:ncmat_,ntmat_,*),
34  & xm(3),dval(3,19),fpu(3,3,19),xi,et,dal(3,3,19),xs2(3,7),xk,
35  & stickslope,springarea(2),tu(3,3,19),clear,reltime,
36  & xsj2s(3),xs2s(3,7),shp2s(7,9),weight,pslavsurf(3,*),
37  & pmastsurf(6,*),clearini(3,9,*)
38 !
39  data iflag /1/
40 !
41 ! # of master nodes
42 !
43  read(lakonl(8:8),'(i1)') nopem
44 !
45 ! # of slave nodes
46 !
47  nopes=nope-nopem
48 !
49 ! actual positions of the nodes belonging to the contact spring
50 ! (otherwise no contact force)
51 !
52 ! master nodes
53 !
54  do i=1,nopem
55  do j=1,3
56  pl(j,i)=xl(j,i)+voldl(j,i)
57  enddo
58  enddo
59 !
60 ! slave nodes
61 !
62  do i=nopem+1,nope
63  do j=1,3
64  pl(j,i)=xl(j,i)+voldl(j,i)+clearini(j,i-nopem,jfaces)
65  & *reltime
66  enddo
67  enddo
68 !
69 ! contact springs
70 !
71  read(lakonl(8:8),'(i1)') nopem
72  nopes = nope - nopem
73 !
74  xi=pslavsurf(1,igauss)
75  et=pslavsurf(2,igauss)
76  weight=pslavsurf(3,igauss)
77 !
78  if(nopes.eq.9) then
79  call shape9q(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
80  elseif(nopes.eq.8) then
81  call shape8q(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
82  elseif(nopes.eq.4) then
83  call shape4q(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
84  elseif(nopes.eq.6) then
85  call shape6tri(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
86  elseif(nopes.eq.7) then
87  call shape7tri(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
88  else
89  call shape3tri(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
90  endif
91 !
92  nopep=nope+1
93 !
94 ! position and displacements of the integration point in the
95 ! slave face
96 !
97  do k=1,3
98  pl(k,nopep)=0.d0
99  voldl(k,nopep)=0.d0
100  do j=1,nopes
101  pl(k,nopep)=pl(k,nopep)+shp2s(4,j)*pl(k,nopem+j)
102  voldl(k,nopep)=voldl(k,nopep)+shp2s(4,j)*voldl(k,nopem+j)
103  enddo
104  enddo
105 !
106  xi=pmastsurf(1,igauss)
107  et=pmastsurf(2,igauss)
108 !
109 ! determining the jacobian vector on the surface
110 !
111  if(nopem.eq.9) then
112  call shape9q(xi,et,pl,xm,xs2,shp2m,iflag)
113  elseif(nopem.eq.8) then
114  call shape8q(xi,et,pl,xm,xs2,shp2m,iflag)
115  elseif(nopem.eq.4) then
116  call shape4q(xi,et,pl,xm,xs2,shp2m,iflag)
117  elseif(nopem.eq.6) then
118  call shape6tri(xi,et,pl,xm,xs2,shp2m,iflag)
119  elseif(nopem.eq.7) then
120  call shape7tri(xi,et,pl,xm,xs2,shp2m,iflag)
121  else
122  call shape3tri(xi,et,pl,xm,xs2,shp2m,iflag)
123  endif
124 !
125 ! position of the projection of the slave integration point
126 ! on the master faces (done at the start of the increment)
127 !
128  do i=1,3
129  pproj(i)=0.d0
130  do j=1,nopem
131  pproj(i)=pproj(i)+shp2m(4,j)*pl(i,j)
132  enddo
133  enddo
134 !
135 ! vector connecting the integration point with its projection
136 ! on the master face
137 !
138  do i=1,3
139  al(i)=pl(i,nopep)-pproj(i)
140  enddo
141 !
142 ! dal(i,j,k) is the derivative of al(i) w.r.t pl(j,k)
143 ! ( d al / d u_k)
144 !
145  do k=1,nopem
146  do i=1,3
147  do j=1,3
148  dal(i,j,k)=0.d0
149  enddo
150  enddo
151  enddo
152  do i=1,3
153  do j=1,3
154  dal(i,j,nopep)=0.d0
155  enddo
156  enddo
157 !
158  do i=1,nopem
159  do j=1,3
160  dal(j,j,i)=-shp2m(4,i)
161  enddo
162  enddo
163  do j=1,3
164  dal(j,j,nopep)=1.d0
165  enddo
166 !
167 ! normal vector on master face
168 !
169  xn(1)=pmastsurf(4,igauss)
170  xn(2)=pmastsurf(5,igauss)
171  xn(3)=pmastsurf(6,igauss)
172 !
173 ! distance from surface along normal (= clearance)
174 !
175  clear=al(1)*xn(1)+al(2)*xn(2)+al(3)*xn(3)
176  if(nmethod.eq.1) then
177  clear=clear-springarea(2)*(1.d0-reltime)
178  endif
179 !
180  elas(2)=-springarea(1)*elcon(5,1,imat)
181  elas(1)=elas(2)*clear
182 !
183 ! derivatives of the size of the jacobian vector w.r.t. the
184 ! displacement vectors (d ||m||/d u_k)
185 !
186  do k=1,nopem
187 !
188 ! auxiliary variable: (d clear d u_k)*||m||
189 !
190  do i=1,3
191  dval(i,k)=xn(1)*dal(1,i,k)+xn(2)*dal(2,i,k)+xn(3)*dal(3,i,k)
192  enddo
193 !
194  enddo
195  do i=1,3
196  dval(i,nopep)=xn(1)*dal(1,i,nopep)+xn(2)*dal(2,i,nopep)+
197  & xn(3)*dal(3,i,nopep)
198  enddo
199 !
200  c3=elas(2)
201 !
202 ! derivatives of the forces w.r.t. the displacement vectors
203 !
204  do k=1,nopem
205  do j=1,3
206  do i=1,3
207  fpu(i,j,k)=-c3*xn(i)*dval(j,k)
208  enddo
209  enddo
210  enddo
211  do j=1,3
212  do i=1,3
213  fpu(i,j,nopep)=-c3*xn(i)*dval(j,nopep)
214  enddo
215  enddo
216 !
217 ! tangential damping
218 !
219  if(elcon(8,1,imat).gt.0.d0) then
220 !
221  stickslope=elcon(8,1,imat)*elcon(5,1,imat)
222 !
223 ! stiffness of shear stress versus slip curve
224 !
225  xk=stickslope*springarea(1)
226 !
227 ! (d al/d u_k).||m|| -> (d al^*/d u_k).||m||
228 !
229  do k=1,nopem
230  do i=1,3
231  dval(i,k)=xn(1)*dal(1,i,k)+xn(2)*dal(2,i,k)
232  & +xn(3)*dal(3,i,k)
233  enddo
234  enddo
235  do i=1,3
236  dval(i,nopep)=xn(1)*dal(1,i,nopep)+xn(2)*dal(2,i,nopep)
237  & +xn(3)*dal(3,i,nopep)
238  enddo
239 !
240 ! d t/d u_k
241 !
242  do k=1,nopem
243  do j=1,3
244  do i=1,3
245  tu(i,j,k)=dal(i,j,k)-xn(i)*dval(j,k)
246  enddo
247  enddo
248  enddo
249  do j=1,3
250  do i=1,3
251  tu(i,j,nopep)=dal(i,j,nopep)-xn(i)*dval(j,nopep)
252  enddo
253  enddo
254 !
255 ! damping matrix
256 !
257  do k=1,nopem
258  do j=1,3
259  do i=1,3
260  fpu(i,j,k)=fpu(i,j,k)+xk*tu(i,j,k)
261  enddo
262  enddo
263  enddo
264  do j=1,3
265  do i=1,3
266  fpu(i,j,nopep)=fpu(i,j,nopep)+xk*tu(i,j,nopep)
267  enddo
268  enddo
269  endif
270 !
271 ! determining the stiffness matrix contributions
272 !
273 ! dFkm/dUlm
274 !
275  do k=1,nopem
276  do i=1,3
277  do l=1,nopem
278  do j=1,3
279  s(i+(k-1)*3,j+(l-1)*3)=-shp2m(4,k)*fpu(i,j,l)
280  enddo
281  enddo
282  enddo
283  enddo
284 !
285 ! dFks/dUls
286 !
287  do k=nopem+1,nopem+nopes
288  do i=1,3
289  do l=nopem+1,nopem+nopes
290  do j=1,3
291  s(i+(k-1)*3,j+(l-1)*3)=shp2s(4,k-nopem)*
292  & shp2s(4,l-nopem)*fpu(i,j,nopep)
293  enddo
294  enddo
295  enddo
296  enddo
297 !
298 ! dFkm/dUls
299 !
300  do k=1,nopem
301  do i=1,3
302  do l=nopem+1,nopem+nopes
303  do j=1,3
304  s(i+(k-1)*3,j+(l-1)*3)=-shp2s(4,l-nopem)*
305  & shp2m(4,k)*fpu(i,j,nopep)
306  enddo
307  enddo
308  enddo
309  enddo
310 !
311 ! dFks/dUlm
312 !
313  do k=nopem+1,nopem+nopes
314  do i=1,3
315  do l=1,nopem
316  do j=1,3
317  s(i+(k-1)*3,j+(l-1)*3)=shp2s(4,k-nopem)*fpu(i,j,l)
318  enddo
319  enddo
320  enddo
321  enddo
322 !
323 ! symmetrizing the matrix
324 ! this is done in the absence of friction or for modal dynamic
325 ! calculations
326 !
327  if((nasym.eq.0).or.((nmethod.eq.4).and.(iperturb(1).le.1))) then
328  do j=1,3*nope
329  do i=1,j-1
330  s(i,j)=(s(i,j)+s(j,i))/2.d0
331  enddo
332  enddo
333  endif
334 !
335  return
subroutine shape9q(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape9q.f:20
subroutine shape8q(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape8q.f:20
subroutine shape3tri(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape3tri.f:20
subroutine shape7tri(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape7tri.f:20
subroutine shape4q(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape4q.f:20
subroutine shape6tri(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape6tri.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)