28 integer(kind=kint) :: iter
29 integer(kind=kint) :: nnode
30 integer(kind=kint) :: i, j
31 real(kind=kreal) :: normal(3)
33 real(kind=kreal) :: fcoeff, tpenalty
34 real(kind=kreal) :: lagrange
35 real(kind=kreal) :: tf_trial(3), length_tft
36 real(kind=kreal) :: tangent(3)
37 real(kind=kreal) :: stiffness(:,:)
40 real(kind=kreal) :: dot_tn
41 integer(kind=kint),
optional :: smoothing_type
43 nnode =
size(tsurf%nodes)
48 call computetm_tt(ctstate, tsurf, fcoeff, tm, tt, smoothing_type)
50 normal(1:3) = ctstate%direction(1:3)
53 ntm(1:(nnode+1)*3) = matmul(transpose(tm(1:3, 1:3*(nnode+1))), normal)
57 stiffness(i,j) = ntm(j); stiffness(j,i) = ntm(j)
60 if( fcoeff /= 0.0d0 )
then
61 if( lagrange>0.0d0 .or. iter==1 )
then
66 stiffness(i,j) = stiffness(i,j) + tpenalty * dot_product(tt(1:3,i), tt(1:3,j))
69 stiffness(j,i) = stiffness(i,j)
76 tf_trial(1:3) = ctstate%tangentForce_trial(1:3)
77 length_tft = dsqrt(dot_product(tf_trial,tf_trial))
78 tangent(1:3) = tf_trial(1:3)/length_tft
81 q(1:(nnode+1)*3) = matmul(transpose(tm(1:3, 1:3*(nnode+1))), tangent)
84 dot_tn = dot_product(tangent, normal)
88 stiffness(i,j) = stiffness(i,j) + tpenalty * (-q(i)*q(j) + q(i)*ntm(j)*dot_tn)
90 stiffness(j,i) = stiffness(i,j)
96 stiffness(1:(nnode+1)*3,1:(nnode+1)*3) = (fcoeff*lagrange/length_tft) * stiffness(1:(nnode+1)*3,1:(nnode+1)*3)
99 stiffness(1:(nnode+1)*3, (nnode+1)*3+1) = stiffness(1:(nnode+1)*3, (nnode+1)*3+1) + fcoeff * q(1:(nnode+1)*3)
107 subroutine getcontactnodalforce_slag(ctState,tSurf,ndCoord,ndDu,tPenalty,fcoeff,lagrange,ctNForce,ctTForce,cflag,smoothing_type)
112 integer(kind=kint) :: nnode
113 integer(kind=kint),
optional :: smoothing_type
114 integer(kind=kint) :: j
115 real(kind=kreal) :: fcoeff, tpenalty
116 real(kind=kreal) :: lagrange
117 real(kind=kreal) :: ndcoord(:), nddu(:)
118 real(kind=kreal) :: normal(3)
120 real(kind=kreal) :: tf_trial(3), length_tft, tangent(3), tf_final(3)
121 real(kind=kreal) :: ctnforce(:)
122 real(kind=kreal) :: cttforce(:)
127 ctstate%multiplier(1) = lagrange
129 nnode =
size(tsurf%nodes)
135 call computetm_tt(ctstate, tsurf, fcoeff, tm, tt, smoothing_type)
137 normal(1:3) = ctstate%direction(1:3)
140 ntm(1:(nnode+1)*3) = -matmul(transpose(tm(1:3, 1:3*(nnode+1))), normal)
142 do j = 1, (nnode+1)*3
143 ctnforce(j) = lagrange*ntm(j)
146 ctnforce(j) = dot_product(ntm(1:(nnode+1)*3),ndcoord(1:(nnode+1)*3))
148 if(fcoeff /= 0.0d0 .and. lagrange > 0.0d0)
then
151 ctstate%reldisp(1:3) = matmul(tt(1:3,1:3*(nnode+1)), nddu(1:3*(nnode+1)))
156 tf_final(1:3) = ctstate%tangentForce_trial(1:3)
158 tf_trial(1:3) = ctstate%tangentForce_trial(1:3)
159 length_tft = dsqrt(dot_product(tf_trial,tf_trial))
160 tangent(1:3) = tf_trial(1:3)/length_tft
161 tf_final(1:3) = fcoeff*dabs(lagrange)*tangent(1:3)
163 ctstate%tangentForce_final(1:3) = tf_final(1:3)
165 tf_final(1:3) = ctstate%tangentForce_final(1:3)
169 cttforce(1:(nnode+1)*3) = -matmul(transpose(tm(1:3, 1:3*(nnode+1))), tf_final)
179 integer(kind=kint) :: nnode
180 integer(kind=kint) :: idof
181 real(kind=kreal) :: stiffness(:,:)
182 integer(kind=kint),
optional :: smoothing_type
184 integer(kind=kint) :: i, j
187 real(kind=kreal) :: e_idof(3)
189 nnode =
size(tsurf%nodes)
193 call computetm_tt(ctstate, tsurf, 0.0d0, tm, tt, smoothing_type)
201 ntm(1:(nnode+1)*3) = matmul(transpose(tm(1:3, 1:3*(nnode+1))), e_idof)
204 do j = 1, (nnode+1)*3
205 stiffness(i,j) = ntm(j); stiffness(j,i) = ntm(j)
214 integer(kind=kint) :: nnode
215 integer(kind=kint) :: idof
216 real(kind=kreal) :: ndu(:)
217 real(kind=kreal) :: lagrange
218 real(kind=kreal) :: ctnforce(:)
219 real(kind=kreal) :: cttforce(:)
220 integer(kind=kint),
optional :: smoothing_type
222 integer(kind=kint) :: j
223 real(kind=kreal) :: normal(3)
227 real(kind=kreal) :: e_idof(3), e_normal(3), e_tangent(3)
229 nnode =
size(tsurf%nodes)
235 call computetm_tt(ctstate, tsurf, 0.0d0, tm, tt, smoothing_type)
237 normal(1:3) = ctstate%direction(1:3)
244 e_normal = -normal(idof) * normal
247 e_tangent = -e_idof - e_normal
250 ntm(1:(nnode+1)*3) = matmul(transpose(tm(1:3, 1:3*(nnode+1))), e_normal)
251 ttm(1:(nnode+1)*3) = matmul(transpose(tm(1:3, 1:3*(nnode+1))), e_tangent)
253 do j = 1, (nnode+1)*3
254 ctnforce(j) = lagrange*ntm(j)
255 cttforce(j) = lagrange*ttm(j)
258 ctnforce(j) = dot_product(ntm(1:(nnode+1)*3),ndu(1:(nnode+1)*3))
259 cttforce(j) = dot_product(ttm(1:(nnode+1)*3),ndu(1:(nnode+1)*3))
This module encapsulate the basic functions of all elements provide by this software.
This module manages surface elements in 3D It provides basic definition of surface elements (triangla...
integer(kind=kint), parameter l_max_surface_node
Structure to define surface group.