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

Go to the source code of this file.

Functions/Subroutines

subroutine frictionheating (ne0, ne, ipkon, lakon, ielmat, mi, elcon, ncmat_, ntmat_, kon, islavsurf, pmastsurf, springarea, co, vold, veold, pslavsurf, xloadact, nload, nload_, nelemload, iamload, idefload, sideload, stx, nam)
 

Function/Subroutine Documentation

◆ frictionheating()

subroutine frictionheating ( integer  ne0,
integer  ne,
integer, dimension(*)  ipkon,
character*8, dimension(*)  lakon,
integer, dimension(mi(3),*)  ielmat,
integer, dimension(*)  mi,
real*8, dimension(0:ncmat_,ntmat_,*)  elcon,
integer  ncmat_,
integer  ntmat_,
integer, dimension(*)  kon,
integer, dimension(2,*)  islavsurf,
real*8, dimension(6,*)  pmastsurf,
real*8, dimension(2,*)  springarea,
real*8, dimension(3,*)  co,
real*8, dimension(0:mi(2),*)  vold,
real*8, dimension(0:mi(2),*)  veold,
real*8, dimension(3,*)  pslavsurf,
real*8, dimension(2,*)  xloadact,
integer  nload,
integer  nload_,
integer, dimension(2,*)  nelemload,
integer, dimension(2,*)  iamload,
integer, dimension(*)  idefload,
character*20, dimension(*)  sideload,
real*8, dimension(6,mi(1),*)  stx,
integer  nam 
)
23 !
24 ! determines the effect of friction heating
25 !
26  implicit none
27 !
28  character*8 lakon(*),lakonl
29  character*20 label,sideload(*)
30 !
31  integer i,j,k,ne0,ne,indexe,ipkon(*),imat,mi(*),ielmat(mi(3),*),
32  & ncmat_,ntmat_,kon(*),nope,iloc,jfaces,ifaces,nelems,ifacem,
33  & nelemm,jfacem,islavsurf(2,*),nopes,nopem,konl(20),iflag,
34  & mint2d,iamplitude,isector,nload,nload_,nelemload(2,*),nam,
35  & iamload(2,*),idefload(*)
36 !
37  real*8 elcon(0:ncmat_,ntmat_,*),pressure,stx(6,mi(1),*),
38  & pmastsurf(6,*),area,springarea(2,*),pl(3,20),co(3,*),
39  & vold(0:mi(2),*),areaslav,xi,et,vels(3),veold(0:mi(2),*),
40  & xsj2m(3),xs2m(3,7),shp2m(7,9),xsj2s(3),xs2s(3,7),shp2s(7,9),
41  & areamast,pslavsurf(3,*),value,velm(3),um,xloadact(2,*),weight,
42  & shear,vnorm,f,eta
43 !
44  include "gauss.f"
45 !
46 ! mortar=1 is assumed (face-to-face penalty contact)
47 ! ithermal=3 is assumed
48 !
49  iamplitude=0
50  isector=0
51 !
52  do i=ne0+1,ne
53  imat=ielmat(1,i)
54 !
55 ! heat conversion factor
56 !
57  eta=elcon(9,1,imat)
58 !
59 ! surface weighting factor
60 !
61  f=elcon(10,1,imat)
62 !
63 ! velocity
64 !
65  vnorm=elcon(11,1,imat)
66 !
67 ! friction coefficient
68 !
69  um=elcon(6,1,imat)
70 !
71  pressure=stx(4,1,i)
72  shear=dsqrt(stx(5,1,i)**2+stx(6,1,i)**2)
73  if(vnorm.lt.0.d0) then
74 !
75 ! if ||v||<0 => take differential velocity from the results
76 ! no heat generation if no slip
77 !
78  if(shear.lt.um*pressure*0.95) cycle
79  endif
80 !
81  indexe=ipkon(i)
82  lakonl=lakon(i)
83 !
84  nope=kon(ipkon(i))
85  nopem=ichar(lakonl(8:8))-48
86  nopes=nope-nopem
87 !
88  iloc=kon(indexe+nope+1)
89  jfaces=kon(indexe+nope+2)
90 !
91 ! slave face
92 !
93  ifaces=islavsurf(1,jfaces)
94  nelems=int(ifaces/10.d0)
95  jfaces=ifaces-10*nelems
96 !
97 ! master face
98 !
99  ifacem=int(pmastsurf(3,iloc))
100  nelemm=int(ifacem/10.d0)
101  jfacem=ifacem-10*nelemm
102 !
103 ! contact area
104 !
105  area=springarea(1,iloc)
106 !
107 ! slave and master nodes
108 !
109  do j=1,nope
110  konl(j)=kon(indexe+j)
111  do k=1,3
112  pl(k,j)=co(k,konl(j))+vold(k,konl(j))
113  enddo
114  enddo
115 !
116 ! heat flux into the slave face
117 !
118  if(nopes.eq.8) then
119  mint2d=9
120  elseif(nopes.eq.6) then
121  mint2d=3
122  elseif(nopes.eq.4) then
123  mint2d=4
124  else
125  mint2d=1
126  endif
127 !
128 ! calculating the area of the slave face
129 !
130  areaslav=0.d0
131 !
132  do j=1,mint2d
133  if(nopes.eq.8) then
134  xi=gauss2d3(1,j)
135  et=gauss2d3(2,j)
136  weight=weight2d3(j)
137  elseif(nopes.eq.6) then
138  xi=gauss2d5(1,j)
139  et=gauss2d5(2,j)
140  weight=weight2d5(j)
141  elseif(nopes.eq.4) then
142  xi=gauss2d2(1,j)
143  et=gauss2d2(2,j)
144  weight=weight2d2(j)
145  else
146  xi=gauss2d4(1,j)
147  et=gauss2d4(2,j)
148  weight=weight2d4(j)
149  endif
150 !
151  iflag=2
152  if(nopes.eq.8) then
153  call shape8q(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
154  elseif(nopes.eq.4) then
155  call shape4q(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
156  elseif(nopes.eq.6) then
157  call shape6tri(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,
158  &iflag)
159  else
160  call shape3tri(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,
161  &iflag)
162  endif
163 !
164  areaslav=areaslav+dsqrt(xsj2s(1)**2+
165  & xsj2s(2)**2+
166  & xsj2s(3)**2)
167  enddo
168 !
169  label(1:20)='S '
170  write(label(2:2),'(i1)') jfaces
171 !
172  if(vnorm.gt.0.d0) then
173  value=um*pressure*vnorm*eta*f*area/areaslav
174  call loadadd(nelems,label,value,nelemload,sideload,xloadact,
175  & nload,nload_,iamload,iamplitude,nam,isector,
176  & idefload)
177  else
178 !
179 ! calculate the differential velocity
180 !
181 ! determining the slave velocity
182 !
183  xi=pslavsurf(1,iloc)
184  et=pslavsurf(2,iloc)
185  iflag=1
186  if(nopes.eq.8) then
187  call shape8q(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
188  elseif(nopes.eq.4) then
189  call shape4q(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,iflag)
190  elseif(nopes.eq.6) then
191  call shape6tri(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,
192  &iflag)
193  else
194  call shape3tri(xi,et,pl(1,nopem+1),xsj2s,xs2s,shp2s,
195  &iflag)
196  endif
197 !
198  do k=1,3
199  vels(k)=0.d0
200  do j=1,nopes
201  vels(k)=vels(k)+shp2s(4,j)*
202  & veold(k,konl(nope+j))
203  enddo
204  enddo
205 !
206 ! determining the master velocity
207 !
208  xi=pmastsurf(1,iloc)
209  et=pmastsurf(2,iloc)
210  iflag=1
211  if(nopem.eq.8) then
212  call shape8q(xi,et,pl,xsj2m,xs2m,shp2m,iflag)
213  elseif(nopem.eq.4) then
214  call shape4q(xi,et,pl,xsj2m,xs2m,shp2m,iflag)
215  elseif(nopem.eq.6) then
216  call shape6tri(xi,et,pl,xsj2m,xs2m,shp2m,iflag)
217  else
218  call shape3tri(xi,et,pl,xsj2m,xs2m,shp2m,iflag)
219  endif
220 !
221  do k=1,3
222  velm(k)=0.d0
223  do j=1,nopem
224  velm(k)=velm(k)+shp2m(4,j)*
225  & veold(k,konl(j))
226  enddo
227  enddo
228 !
229  vnorm=dsqrt((vels(1)-velm(1))**2+
230  & (vels(2)-velm(2))**2+
231  & (vels(3)-velm(3))**2)
232  value=um*pressure*vnorm*eta*f*area/areaslav
233  call loadadd(nelems,label,value,nelemload,sideload,xloadact,
234  & nload,nload_,iamload,iamplitude,nam,isector,
235  & idefload)
236  endif
237 !
238 ! heat flux into the master face
239 !
240  if(nopem.eq.8) then
241  mint2d=9
242  elseif(nopem.eq.6) then
243  mint2d=3
244  elseif(nopem.eq.4) then
245  mint2d=4
246  else
247  mint2d=1
248  endif
249 !
250 ! calculating the area of the slave face
251 !
252  areamast=0.d0
253 !
254  do j=1,mint2d
255  if(nopem.eq.8) then
256  xi=gauss2d3(1,j)
257  et=gauss2d3(2,j)
258  weight=weight2d3(j)
259  elseif(nopem.eq.6) then
260  xi=gauss2d5(1,j)
261  et=gauss2d5(2,j)
262  weight=weight2d5(j)
263  elseif(nopem.eq.4) then
264  xi=gauss2d2(1,j)
265  et=gauss2d2(2,j)
266  weight=weight2d2(j)
267  else
268  xi=gauss2d4(1,j)
269  et=gauss2d4(2,j)
270  weight=weight2d4(j)
271  endif
272 !
273  iflag=2
274  if(nopem.eq.8) then
275  call shape8q(xi,et,pl,xsj2m,xs2m,shp2m,iflag)
276  elseif(nopem.eq.4) then
277  call shape4q(xi,et,pl,xsj2m,xs2m,shp2m,iflag)
278  elseif(nopem.eq.6) then
279  call shape6tri(xi,et,pl,xsj2m,xs2m,shp2m,iflag)
280  else
281  call shape3tri(xi,et,pl,xsj2m,xs2m,shp2m,iflag)
282  endif
283 !
284  areamast=areamast+dsqrt(xsj2m(1)**2+
285  & xsj2m(2)**2+
286  & xsj2m(3)**2)
287  enddo
288 !
289  label(1:20)='S '
290  write(label(2:2),'(i1)') jfacem
291 !
292 ! at this point vnorm was either given by the user or
293 ! calculated for the slave surface (differential velocity)
294 !
295  value=um*pressure*vnorm*eta*(1.d0-f)*area/areamast
296  call loadadd(nelemm,label,value,nelemload,sideload,xloadact,
297  & nload,nload_,iamload,iamplitude,nam,isector,
298  & idefload)
299  enddo
300 !
301  return
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 loadadd(nelement, label, value, nelemload, sideload, xload, nload, nload_, iamload, iamplitude, nam, isector, idefload)
Definition: loadadd.f:21
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)