FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
fstr_contact_assembly.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
8  use hecmw
9  use m_fstr
10  use mcontactdef
15  implicit none
16 
18 
19 contains
20 
22  subroutine calc_contact_pair_refstiff(contact, diag, ndof, hecMESH)
23  type(tcontact), intent(inout) :: contact
24  real(kind=kreal), intent(in) :: diag(:)
25  integer(kind=kint), intent(in) :: ndof
26  type(hecmwst_local_mesh), intent(in) :: hecmesh
27 
28  integer(kind=kint) :: j, slave_node, master_node, nnode, ctsurf
29  integer(kind=kint) :: idx_start, idx_end
30  real(kind=kreal) :: maxv
31 
32  maxv = 0.0d0
33 
34  ! Loop over slave nodes
35  do j = 1, size(contact%slave)
36  slave_node = contact%slave(j)
37  idx_start = ndof * (slave_node - 1) + 1
38  idx_end = ndof * slave_node
39  maxv = max(maxv, maxval(diag(idx_start:idx_end)))
40  enddo
41 
42  ! Loop over master surfaces and nodes
43  do ctsurf = 1, size(contact%master)
44  nnode = size(contact%master(ctsurf)%nodes)
45  do j = 1, nnode
46  master_node = contact%master(ctsurf)%nodes(j)
47  idx_start = ndof * (master_node - 1) + 1
48  idx_end = ndof * master_node
49  maxv = max(maxv, maxval(diag(idx_start:idx_end)))
50  enddo
51  enddo
52 
53  ! Parallel reduction
54  call hecmw_allreduce_r1(hecmesh, maxv, hecmw_max)
55 
56  ! Set reference stiffness for this contact pair
57  contact%refStiff = maxv
58 
59  ! Report penalty settings
60  if (hecmw_comm_get_rank() == 0) then
61  write(*,'(A,A,A,1pE12.3,A,1pE12.3,A,1pE12.3)') " Contact [", &
62  trim(contact%pair_name), "] set penalty: normal & tied ", &
63  contact%nPenalty * contact%refStiff, ", tangential ", &
64  contact%tPenalty * contact%refStiff, ", refStiff ", contact%refStiff
65  endif
66 
67  end subroutine calc_contact_pair_refstiff
68 
70  subroutine assemble_contact_force_residual(nnode,ndLocal,id_lagrange,ctNForce,ctTForce,conMAT)
71  integer(kind=kint), intent(in) :: nnode
72  integer(kind=kint), intent(in) :: ndLocal(nnode + 1)
73  integer(kind=kint), intent(in) :: id_lagrange
74  real(kind=kreal), intent(in) :: ctnforce((nnode+1)*3+1)
75  real(kind=kreal), intent(in) :: cttforce((nnode+1)*3+1)
76  type(hecmwst_matrix), intent(inout) :: conmat
77 
78  integer(kind=kint) :: i, inod, idx
79 
80  do i = 1, nnode + 1
81  inod = ndlocal(i)
82  idx = (inod-1)*3+1
83  conmat%B(idx:idx+2) = conmat%B(idx:idx+2) + ctnforce((i-1)*3+1:(i-1)*3+3) + cttforce((i-1)*3+1:(i-1)*3+3)
84  enddo
85 
86  if( id_lagrange > 0 ) then
87  conmat%B(conmat%NP*conmat%NDOF+id_lagrange) = ctnforce((nnode+1)*3+1) + cttforce((nnode+1)*3+1)
88  endif
89 
90  end subroutine assemble_contact_force_residual
91 
93  subroutine assemble_contact_force_output(nnode,ndLocal,ctNForce,ctTForce,cont_nforce,cont_fric)
94  integer(kind=kint), intent(in) :: nnode
95  integer(kind=kint), intent(in) :: ndlocal(nnode + 1)
96  real(kind=kreal), intent(in) :: ctnforce((nnode+1)*3+1)
97  real(kind=kreal), intent(in) :: cttforce((nnode+1)*3+1)
98  real(kind=kreal), pointer, intent(inout) :: cont_nforce(:)
99  real(kind=kreal), pointer, optional, intent(inout) :: cont_fric(:)
100 
101  integer(kind=kint) :: i, inod, idx
102 
103  do i = 1, nnode + 1
104  inod = ndlocal(i)
105  idx = (inod-1)*3+1
106  cont_nforce(idx:idx+2) = cont_nforce(idx:idx+2) + ctnforce((i-1)*3+1:(i-1)*3+3)
107  if( present(cont_fric) ) cont_fric(idx:idx+2) = cont_fric(idx:idx+2) + cttforce((i-1)*3+1:(i-1)*3+3)
108  enddo
109 
110  end subroutine assemble_contact_force_output
111 
114  subroutine update_contact_multiplier( ctAlgo, contact, coord, disp, ddisp, fcoeff, &
115  hecMESH, hecLagMAT, gnt, ctchanged )
116  integer(kind=kint), intent(in) :: ctAlgo
117  type( tcontact ), intent(inout) :: contact
118  real(kind=kreal), intent(in) :: coord(:)
119  real(kind=kreal), intent(in) :: disp(:)
120  real(kind=kreal), intent(in) :: ddisp(:)
121  real(kind=kreal), intent(in) :: fcoeff
122  type(hecmwst_local_mesh), intent(in) :: hecmesh
123  type(hecmwst_matrix_lagrange), intent(in) :: hecLagMAT
124  real(kind=kreal), intent(out) :: gnt(2)
125  logical, intent(inout) :: ctchanged
126 
127  integer(kind=kint) :: slave, etype, master
128  integer(kind=kint) :: nn, i, cnt
129  real(kind=kreal) :: lgnt(2)
130  integer(kind=kint) :: ndLocal(l_max_elem_node+1)
131  real(kind=kreal) :: ctnforce(l_max_elem_node*3+3)
132  real(kind=kreal) :: cttforce(l_max_elem_node*3+3)
133  real(kind=kreal) :: max_jump_ratio, jump_ratio_local
134  real(kind=kreal) :: mut_old, mut_new, threthold
135 
136  cnt = 0
137  lgnt(:) = 0.d0
138  max_jump_ratio = 0.0d0
139 
140  do i = 1, size(contact%slave)
141  if(.not. is_contact_active(contact%states(i)%state)) cycle ! only STICK/SLIP
142 
143  slave = contact%slave(i)
144  master = contact%states(i)%surface
145  nn = size(contact%master(master)%nodes)
146  etype = contact%master(master)%etype
147 
148  ndlocal(1) = slave
149  ndlocal(2:nn+1) = contact%master(master)%nodes(1:nn)
150 
151  ! Update multiplier and calculate forces
152  call updatecontactmultiplier_alag(contact%states(i), ndlocal(1:nn+1), coord, disp, ddisp, &
153  contact%nPenalty * contact%refStiff, contact%tPenalty * contact%refStiff, &
154  fcoeff, contact%master(master), lgnt, ctchanged, ctnforce, cttforce, jump_ratio_local, contact%smoothing)
155 
156  ! Track maximum jump ratio
157  max_jump_ratio = max(max_jump_ratio, jump_ratio_local)
158 
159  cnt = cnt + 1
160  enddo
161 
162  if(cnt > 0) lgnt(:) = lgnt(:) / cnt
163  gnt = gnt + lgnt
164 
165  call hecmw_allreduce_r1(hecmesh, max_jump_ratio, hecmw_max)
166 
167  ! Adjust tPenalty
168  threthold = 100.d0
169  if (max_jump_ratio > threthold) then
170  mut_old = contact%tPenalty * contact%refStiff
171  contact%tPenalty = contact%tPenalty * max(1.d0/dsqrt(threthold), 1.0d0/dsqrt(max_jump_ratio))
172  mut_new = contact%tPenalty * contact%refStiff
173  if (hecmw_comm_get_rank() == 0) then
174  write(*,'(A,A,A,1pE12.3,A,1pE12.3,A)') " Contact [", trim(contact%pair_name), &
175  "] tangential penalty adjusted: ", mut_old, " -> ", mut_new, " (friction jump)"
176  endif
177  endif
178 
179  end subroutine update_contact_multiplier
180 
183  subroutine update_tied_multiplier( contact, disp, ddisp, ctchanged )
184  type( tcontact ), intent(inout) :: contact
185  real(kind=kreal), intent(in) :: disp(:)
186  real(kind=kreal), intent(in) :: ddisp(:)
187  logical, intent(inout) :: ctchanged
188 
189  integer(kind=kint) :: slave, etype, master
190  integer(kind=kint) :: nn, i, j, iss
191  real(kind=kreal) :: dg(3), dgmax
192  real(kind=kreal) :: shapefunc(l_max_surface_node)
193  real(kind=kreal) :: edisp(3*l_max_elem_node+3)
194  real(kind=kreal) :: mu
195 
196  ! Calculate penalty from contact structure
197  mu = contact%nPenalty * contact%refStiff
198 
199  do i= 1, size(contact%slave)
200  if( .not. is_contact_active(contact%states(i)%state) ) cycle ! only STICK/SLIP
201  slave = contact%slave(i)
202  edisp(1:3) = disp(3*slave-2:3*slave)+ddisp(3*slave-2:3*slave)
203  master = contact%states(i)%surface
204 
205  nn = size( contact%master(master)%nodes )
206  etype = contact%master(master)%etype
207  do j=1,nn
208  iss = contact%master(master)%nodes(j)
209  edisp(3*j+1:3*j+3) = disp(3*iss-2:3*iss)+ddisp(3*iss-2:3*iss)
210  enddo
211  call getshapefunc( etype, contact%states(i)%lpos(1:2), shapefunc )
212 
213  ! normal component
214  dg(1:3) = edisp(1:3)
215  do j=1,nn
216  dg(1:3) = dg(1:3)-shapefunc(j)*edisp(3*j+1:3*j+3)
217  enddo
218 
219  contact%states(i)%multiplier(1:3) = contact%states(i)%multiplier(1:3) + mu*dg(1:3)
220 
221  ! check if tied constraint converged
222  dgmax = 0.d0
223  do j=1,(nn+1)*3
224  dgmax = dgmax + dabs(edisp(j))
225  enddo
226  dgmax = dgmax/dble((nn+1)*3)
227  do j=1,3
228  if( dabs(dg(j))/dmax1(1.d0,dgmax) > 1.d-3 ) ctchanged = .true.
229  enddo
230 
231  enddo
232  end subroutine
233 
234  subroutine update_contact_tangentforce( contact )
235  type( tcontact ), intent(inout) :: contact
236 
237  integer(kind=kint) :: i
238 
239  do i= 1, size(contact%slave)
240  if( .not. is_contact_active(contact%states(i)%state) ) then
241  contact%states(i)%tangentForce(1:3) = 0.d0
242  contact%states(i)%tangentForce_trial(1:3) = 0.d0
243  contact%states(i)%tangentForce_final(1:3) = 0.d0
244  else
245  contact%states(i)%tangentForce(1:3) = contact%states(i)%tangentForce_final(1:3)
246  end if
247  contact%states(i)%tangentForce1(1:3) = contact%states(i)%tangentForce(1:3)
248  enddo
249  end subroutine update_contact_tangentforce
250 
253  subroutine calcu_contact_stiffness_nodesurf( ctAlgo, contact, coord, disp, ddisp, iter, lagrange_array, &
254  conMAT, hecLagMAT)
255  integer(kind=kint), intent(in) :: ctalgo
256  type(tcontact), intent(inout) :: contact
257  real(kind=kreal), intent(in) :: coord(:)
258  real(kind=kreal), intent(in) :: disp(:)
259  real(kind=kreal), intent(in) :: ddisp(:)
260  integer(kind=kint), intent(in) :: iter
261  real(kind=kreal), intent(in) :: lagrange_array(:)
262  type(hecmwst_matrix), intent(inout) :: conmat
263  type(hecmwst_matrix_lagrange), intent(inout) :: hecLagMAT
264 
265  integer(kind=kint) :: ctsurf, nnode, ndLocal(21), etype
266  integer(kind=kint) :: j, k, algtype, id_lagrange
267  real(kind=kreal) :: lagrange
268  real(kind=kreal) :: stiffness((l_max_surface_node+1)*3+1, (l_max_surface_node+1)*3+1)
269  real(kind=kreal) :: elecoord(3, l_max_surface_node)
270  real(kind=kreal) :: eledisp(l_max_surface_node*3+3)
271  real(kind=kreal) :: force(l_max_surface_node*3+3)
272  logical :: is_contact_active_flag, is_damping_active_flag
273 
274  algtype = contact%algtype
275 
276  do j = 1, size(contact%slave)
277 
278  ! stick or sliding contact is active
279  is_contact_active_flag = is_contact_active(contact%states(j)%state)
280  ! damping is active
281  is_damping_active_flag = contact%states(j)%state == contactnear .and. &
282  & is_damping_enabled(contact)
283 
284  if( .not. is_contact_active_flag .and. .not. is_damping_active_flag ) cycle
285 
286  ctsurf = contact%states(j)%surface
287  etype = contact%master(ctsurf)%etype
288  nnode = size(contact%master(ctsurf)%nodes)
289  ndlocal(1) = contact%slave(j)
290  ndlocal(2:nnode+1) = contact%master(ctsurf)%nodes(1:nnode)
291 
292  ! Prepare master node coordinates for ALagrange (deformed configuration)
293  do k = 1, nnode
294  elecoord(1:3, k) = coord(3*ndlocal(k+1)-2:3*ndlocal(k+1)) + disp(3*ndlocal(k+1)-2:3*ndlocal(k+1))
295  enddo
296 
297  if( is_contact_active_flag ) then
298 
299  if( algtype == contactsslid .or. algtype == contactfslid ) then
300 
301  if( ctalgo == kcaslagrange ) then
302  id_lagrange = heclagmat%lag_node_table(ndlocal(1)) - 1
303  id_lagrange = id_lagrange + 1
304  lagrange = lagrange_array(id_lagrange)
305  call getcontactstiffness_slag(contact%states(j), contact%master(ctsurf), iter, &
306  contact%tPenalty, contact%fcoeff, lagrange, stiffness, smoothing_type=contact%smoothing)
307 
308  ! Assemble contact stiffness matrix of contact pair into global stiffness matrix
309  call hecmw_mat_ass_contactlag(nnode, ndlocal, id_lagrange, contact%fcoeff, stiffness, conmat, heclagmat)
310 
311  else if( ctalgo == kcaalagrange ) then
312  ! Build element displacement increment for consistent tangent evaluation
313  eledisp(1:3) = ddisp(3*ndlocal(1)-2:3*ndlocal(1))
314  do k = 1, nnode
315  eledisp(k*3+1:k*3+3) = ddisp(3*ndlocal(k+1)-2:3*ndlocal(k+1))
316  enddo
317  call getcontactstiffness_alag(contact%states(j), contact%master(ctsurf), elecoord(:,1:nnode), &
318  contact%nPenalty * contact%refStiff, contact%tPenalty * contact%refStiff, &
319  contact%fcoeff, contact%symmetric, stiffness, force, &
320  smoothing_type=contact%smoothing, edisp=eledisp(1:nnode*3+3), iter=iter)
321 
322  ! Assemble contact stiffness matrix into global stiffness matrix
323  call hecmw_mat_ass_elem(conmat, nnode+1, ndlocal, stiffness)
324 
325  end if
326 
327  else if( algtype == contacttied ) then
328 
329  if( ctalgo == kcaslagrange ) then
330  id_lagrange = heclagmat%lag_node_table(ndlocal(1)) - 1
331  do k = 1, 3
332  id_lagrange = id_lagrange + 1
333  lagrange = lagrange_array(id_lagrange)
334 
335  call gettiedstiffness_slag(contact%states(j), contact%master(ctsurf), k, stiffness, &
336  contact%smoothing)
337  ! Assemble contact stiffness matrix of contact pair into global stiffness matrix
338  call hecmw_mat_ass_contactlag(nnode, ndlocal, id_lagrange, 0.d0, stiffness, conmat, heclagmat)
339  enddo
340 
341  else if( ctalgo == kcaalagrange ) then
342  call gettiedstiffness_alag(contact%states(j), contact%master(ctsurf), &
343  contact%nPenalty * contact%refStiff, stiffness, force)
344 
345  ! Assemble contact stiffness matrix into global stiffness matrix
346  call hecmw_mat_ass_elem(conmat, nnode+1, ndlocal, stiffness)
347 
348  end if
349 
350  endif
351 
352  else if( is_damping_active_flag ) then
353  call getdampingstiffness(contact%states(j), contact%master(ctsurf), &
354  contact%damp_alpha * contact%refStiff, contact%damp_gact, &
355  stiffness, smoothing_type=contact%smoothing)
356 
357  ! Assemble full damping stiffness for slave+master contact element
358  call hecmw_mat_ass_elem(conmat, nnode+1, ndlocal, stiffness)
359 
360  endif
361 
362  enddo
363 
364  end subroutine calcu_contact_stiffness_nodesurf
365 
370  subroutine calcu_contact_ndforce_nodesurf( purpose, ctAlgo, contact, coord, disp, ddisp, lagrange_array, &
371  conMAT, CONT_NFORCE, CONT_FRIC, hecLagMAT )
372  integer(kind=kint), intent(in) :: purpose
373  integer(kind=kint), intent(in) :: ctAlgo
374  type( tcontact ), intent(inout) :: contact
375  real(kind=kreal), intent(in) :: coord(:)
376  real(kind=kreal), intent(in) :: disp(:)
377  real(kind=kreal), intent(in) :: ddisp(:)
378  real(kind=kreal), intent(in) :: lagrange_array(:)
379  type(hecmwst_matrix), intent(inout) :: conmat
380  real(kind=kreal), pointer :: cont_nforce(:)
381  real(kind=kreal), pointer :: cont_fric(:)
382  type(hecmwst_matrix_lagrange), intent(in) :: heclagmat
383 
384  integer(kind=kint) :: ctsurf, nnode, ndlocal(21)
385  integer(kind=kint) :: j, k, algtype, id_lagrange
386  real(kind=kreal) :: ndcoord(21*3)
387  real(kind=kreal) :: ndu(21*3), nddu(21*3)
388  real(kind=kreal) :: lagrange
389  real(kind=kreal) :: ctnforce(21*3+1)
390  real(kind=kreal) :: cttforce(21*3+1)
391  real(kind=kreal) :: mu_n, mu_t
392  logical :: if_flag
393  logical :: is_contact_active_flag, is_damping_active_flag
394  real(kind=kreal) :: ctime, etime
395  integer(kind=kint) :: if_type
396 
397  algtype = contact%algtype
398  if_flag = (contact%if_type /= 0)
399  if(if_flag)then
400  ctime = contact%ctime
401  etime = contact%if_etime
402  if_type = contact%if_type
403  end if
404 
405  do j = 1, size(contact%slave)
406 
407  ! stick or sliding contact is active
408  is_contact_active_flag = is_contact_active(contact%states(j)%state)
409  ! damping is active (residual only)
410  is_damping_active_flag = (purpose == kctforresidual) .and. &
411  contact%states(j)%state == contactnear .and. is_damping_enabled(contact)
412 
413  if( .not. is_contact_active_flag .and. .not. is_damping_active_flag ) cycle
414 
415  ctsurf = contact%states(j)%surface
416  nnode = size(contact%master(ctsurf)%nodes)
417  ndlocal(1) = contact%slave(j)
418  ndlocal(2:nnode+1) = contact%master(ctsurf)%nodes(1:nnode)
419  do k = 1, nnode+1
420  nddu((k-1)*3+1:(k-1)*3+3) = ddisp((ndlocal(k)-1)*3+1:(ndlocal(k)-1)*3+3)
421  ndu((k-1)*3+1:(k-1)*3+3) = disp((ndlocal(k)-1)*3+1:(ndlocal(k)-1)*3+3) + nddu((k-1)*3+1:(k-1)*3+3)
422  ndcoord((k-1)*3+1:(k-1)*3+3) = coord((ndlocal(k)-1)*3+1:(ndlocal(k)-1)*3+3) + ndu((k-1)*3+1:(k-1)*3+3)
423  enddo
424 
425  if( is_contact_active_flag ) then
426 
427  if(if_flag) call set_shrink_factor(ctime, contact%states(j), etime, if_type)
428 
429  ! --- Determine penalty parameters: zero for output (multiplier-only)
430  if( ctalgo == kcaalagrange .and. purpose == kctforoutput ) then
431  mu_n = 0.0d0
432  mu_t = 0.0d0
433  else
434  mu_n = contact%nPenalty * contact%refStiff
435  mu_t = contact%tPenalty * contact%refStiff
436  endif
437 
438  if( algtype == contactsslid .or. algtype == contactfslid ) then
439  ! Obtain contact nodal force vector of contact pair
440  if(if_flag) call get_shrink_elemact_surf(contact%states(j),ndcoord, nnode)
441 
442  if( ctalgo == kcaslagrange ) then
443  id_lagrange = heclagmat%lag_node_table(ndlocal(1)) - 1
444  id_lagrange = id_lagrange + 1
445  lagrange = lagrange_array(id_lagrange)
446  call getcontactnodalforce_slag(contact%states(j),contact%master(ctsurf),ndcoord,nddu, &
447  contact%tPenalty,contact%fcoeff,lagrange,ctnforce,cttforce,.true.,contact%smoothing)
448 
449  else if( ctalgo == kcaalagrange ) then
450  id_lagrange = 0
451  lagrange = 0.d0
452  call getcontactnodalforce_alag(contact%states(j),contact%master(ctsurf),ndcoord,nddu, &
453  mu_n, mu_t, contact%fcoeff,lagrange,ctnforce,cttforce,.true.,contact%smoothing)
454 
455  end if
456 
457  ! Assemble contact force
458  if( purpose == kctforresidual ) then
459  call assemble_contact_force_residual(nnode,ndlocal,id_lagrange,ctnforce,cttforce,conmat)
460  else
461  call assemble_contact_force_output(nnode,ndlocal,ctnforce,cttforce,cont_nforce,cont_fric)
462  endif
463 
464  else if( algtype == contacttied ) then
465 
466  if( ctalgo == kcaslagrange ) then
467  id_lagrange = heclagmat%lag_node_table(ndlocal(1)) - 1
468  do k=1,3
469  id_lagrange = id_lagrange + 1
470  lagrange = lagrange_array(id_lagrange)
471  contact%states(j)%multiplier(k) = lagrange
472 
473  call gettiednodalforce_slag(contact%states(j),contact%master(ctsurf),k,ndu, &
474  & lagrange,ctnforce,cttforce,contact%smoothing)
475  if( purpose == kctforresidual ) then
476  call assemble_contact_force_residual(nnode,ndlocal,id_lagrange,ctnforce,cttforce,conmat)
477  else
478  call assemble_contact_force_output(nnode,ndlocal,ctnforce,cttforce,cont_nforce)
479  endif
480  end do
481 
482  else if( ctalgo == kcaalagrange ) then
483  id_lagrange = 0
484  call gettiednodalforce_alag(contact%states(j),contact%master(ctsurf),ndu, &
485  mu_n, ctnforce,cttforce)
486  if( purpose == kctforresidual ) then
487  call assemble_contact_force_residual(nnode,ndlocal,id_lagrange,ctnforce,cttforce,conmat)
488  else
489  call assemble_contact_force_output(nnode,ndlocal,ctnforce,cttforce,cont_nforce)
490  endif
491 
492  end if
493 
494  endif
495 
496  else if( is_damping_active_flag ) then
497 
498  call getdampingnodalforce(contact%states(j), contact%master(ctsurf), nddu, &
499  contact%damp_alpha * contact%refStiff, contact%damp_gact, &
500  ctnforce, cttforce, smoothing_type=contact%smoothing)
501 
502  ! Assemble damping force for slave+master contact element
503  call assemble_contact_force_residual(nnode,ndlocal,0,ctnforce,cttforce,conmat)
504 
505  endif
506 
507  enddo
508 
509  end subroutine calcu_contact_ndforce_nodesurf
510 
511 end module m_fstr_contact_assembly
Definition: hecmw.f90:6
Contact processing at assembly level (all pairs in one tContact object)
subroutine calcu_contact_ndforce_nodesurf(purpose, ctAlgo, contact, coord, disp, ddisp, lagrange_array, conMAT, CONT_NFORCE, CONT_FRIC, hecLagMAT)
This subroutine calculates contact nodal force for each contact pair and assembles it into contact ma...
subroutine, public calc_contact_pair_refstiff(contact, diag, ndof, hecMESH)
Calculate reference stiffness for one contact pair.
subroutine assemble_contact_force_residual(nnode, ndLocal, id_lagrange, ctNForce, ctTForce, conMAT)
Assemble contact nodal force into residual vector (conMATB).
subroutine update_contact_multiplier(ctAlgo, contact, coord, disp, ddisp, fcoeff, hecMESH, hecLagMAT, gnt, ctchanged)
This subroutine update lagrangian multiplier and the distance between contacting nodes.
subroutine calcu_contact_stiffness_nodesurf(ctAlgo, contact, coord, disp, ddisp, iter, lagrange_array, conMAT, hecLagMAT)
This subroutine calculates contact stiffness for each contact pair and assembles it into global stiff...
subroutine assemble_contact_force_output(nnode, ndLocal, ctNForce, ctTForce, cont_nforce, cont_fric)
Accumulate contact nodal force into output arrays (CONT_NFORCE/CONT_FRIC).
subroutine update_contact_tangentforce(contact)
subroutine update_tied_multiplier(contact, disp, ddisp, ctchanged)
This subroutine update lagrangian multiplier and the distance between contacting nodes.
Contact damping module for CONTACTNEAR state.
subroutine, public getdampingstiffness(cstate, surf, alpha, gact, stiff, smoothing_type)
Compute damping stiffness matrix K_damp = alpha * w(g) * Bn (x) Bn.
subroutine, public getdampingnodalforce(cstate, surf, ndDu, alpha, gact, ctNForce, ctTForce, smoothing_type)
Compute damping nodal force vector f_damp = alpha * w(g) * (Bn^T * ddu) * Bn.
pure logical function, public is_damping_enabled(contact)
Check if damping is enabled for a contact pair.
Alag method implementations for contact element calculations.
subroutine, public updatecontactmultiplier_alag(ctState, ndLocal, coord, disp, ddisp, mu, mut, fcoeff, tSurf, lgnt, ctchanged, ctNForce, ctTForce, jump_ratio, smoothing_type)
subroutine, public gettiedstiffness_alag(cstate, tSurf, mu, stiff, force)
subroutine, public getcontactstiffness_alag(cstate, tSurf, ele, mu, mut, fcoeff, symm, stiff, force, smoothing_type, edisp, iter)
subroutine, public gettiednodalforce_alag(ctState, tSurf, ndu, mu, ctNForce, ctTForce)
subroutine, public getcontactnodalforce_alag(ctState, tSurf, ndCoord, ndDu, mu, mut, fcoeff, lagrange, ctNForce, ctTForce, cflag, smoothing_type)
Contact mechanics calculations at element level (single contact pair)
This module provides interference fit (shrink) functions for contact.
subroutine get_shrink_elemact_surf(cstate, coords, nnode)
subroutine, public set_shrink_factor(ctime, cstate, etime, if_type)
This module defines common data and basic structures for analysis.
Definition: m_fstr.F90:15
real(kind=kreal) etime
Definition: m_fstr.F90:142
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
Definition: m_fstr.F90:61
integer(kind=kint), parameter kcaalagrange
Definition: m_fstr.F90:62
This module manages the data structure for contact calculation.
integer, parameter contactsslid
integer, parameter kctforresidual
purpose flag for contact force calculation
integer, parameter contactnear
near contact: projection info available, no LM constraint
real(kind=kreal), dimension(2), save gnt
1:current average penetration; 2:current relative tangent displacement
integer, parameter contacttied
contact type or algorithm definition
integer, parameter kctforoutput
compute contact force for output (CONT_NFORCE/CONT_FRIC)
pure logical function is_contact_active(state)
Whether the contact state has active LM constraint (STICK or SLIP)
integer, parameter contactfslid
Structure to includes all info needed by contact calculation.