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

Go to the source code of this file.

Functions/Subroutines

subroutine calcstabletimeincvol (ne0, lakon, co, kon, ipkon, mi, ielmat, dtvol, alpha, wavespeed)
 

Function/Subroutine Documentation

◆ calcstabletimeincvol()

subroutine calcstabletimeincvol ( integer  ne0,
character*8, dimension(*)  lakon,
real*8, dimension(3,*)  co,
integer, dimension(*)  kon,
integer, dimension(*)  ipkon,
integer, dimension(*)  mi,
integer, dimension(mi(3),*)  ielmat,
real*8  dtvol,
real*8  alpha,
real*8, dimension(*)  wavespeed 
)
21 !
22 ! Calculates the critical time increment (CTI) based on the Courant
23 ! Criterion for Explicit Dynamics calculations. Temperature is
24 ! assumed averaged from the centroid of the element and material
25 ! wave propagation speeds must be calculated before.
26 !
27  implicit none
28 !
29  character*8 lakon(*),lakonl
30 !
31  integer i,j,ne0,nope,kon(*),ipkon(*),indexe,konl(26),nelem,
32  & iflag,nopes,nfaces,ig,ifaceq(8,6),ifacet(6,4),ifacew(8,5),
33  & mi(*),ielmat(mi(3),*),imat,elemmin
34 !
35  real*8 xi,et,ze,weight,co(3,*),xl(3,26),xsj,shp(4,26),xl2(3,9),
36  & xsj2(3),xs2(3,7),shp2(7,9),hmin,area,volume,
37  & wavspd,dtvol,safefac,alpha,bet,gam,critom,damping,
38  & wavespeed(*),geomfac,quadfac
39 !
40  data ifaceq /4,3,2,1,11,10,9,12,
41  & 5,6,7,8,13,14,15,16,
42  & 1,2,6,5,9,18,13,17,
43  & 2,3,7,6,10,19,14,18,
44  & 3,4,8,7,11,20,15,19,
45  & 4,1,5,8,12,17,16,20/
46  data ifacet /1,3,2,7,6,5,
47  & 1,2,4,5,9,8,
48  & 2,3,4,6,10,9,
49  & 1,4,3,8,10,7/
50  data ifacew /1,3,2,9,8,7,0,0,
51  & 4,5,6,10,11,12,0,0,
52  & 1,2,5,4,7,14,10,13,
53  & 2,3,6,5,8,15,11,14,
54  & 4,6,3,1,12,15,9,13/
55 !
56  include "gauss.f"
57 !
58  iflag=2
59  dtvol=1.d30
60  safefac=0.80d0
61  quadfac=0.3d0
62 !
63  damping=0
64 !
65  bet=(1.d0-alpha)*(1.d0-alpha)/4.d0
66  gam=0.5d0-alpha
67 !
68 ! Omega Critical
69 ! Om_cr=dt*freq_max
70 !
71  critom=dsqrt(damping*damping*(1+2*alpha*(1-gam))
72  & *(1+2*alpha*(1-gam))
73  & +2*(gam+2*alpha*(gam-bet)) )
74  critom=0.98*(-damping*(1+2*alpha*(1-gam))+critom)
75  & /(gam+2*alpha*(gam-bet)) !eq 25 miranda
76 !
77 ! ** DO per element
78  do nelem=1,ne0
79  if(ipkon(nelem).lt.0) cycle
80  indexe=ipkon(nelem)
81 !
82  lakonl=lakon(nelem)
83  imat=ielmat(1,nelem)
84 !
85  geomfac=1.d0
86 !
87  if(lakon(nelem)(4:5).eq.'20')then
88 !
89  nope=20
90  nopes=8
91  nfaces=6
92  geomfac=quadfac
93  elseif(lakon(nelem)(4:4).eq.'8') then
94  nope=8
95  nopes=4
96  nfaces=6
97  elseif(lakon(nelem)(4:5).eq.'10')then
98  nope=10
99  nopes=6
100  nfaces=4
101  geomfac=quadfac
102  elseif(lakon(nelem)(4:4).eq.'4') then
103  nope=4
104  nopes=3
105  nfaces=4
106  elseif(lakon(nelem)(4:5).eq.'15')then
107  nope=15
108  nfaces=5
109  geomfac=quadfac
110  elseif(lakon(nelem)(4:4).eq.'6') then
111  nope=6
112  nfaces=5
113  else
114  cycle
115  endif
116 !
117 ! Find center of the element for avg temp value on the element to
118 ! get properties later
119 ! if HEX
120  if((lakon(nelem)(4:5).eq.'20').or.
121  & (lakon(nelem)(4:4).eq.'8')) then
122  xi=0.d0
123  et=0.d0
124  ze=0.d0
125  weight=8.d0
126 ! if TET
127  elseif((lakon(nelem)(4:5).eq.'10').or.
128  & (lakon(nelem)(4:4).eq.'4')) then
129  xi=gauss3d4(1,1)
130  et=gauss3d4(2,1)
131  ze=gauss3d4(3,1)
132  weight=weight3d4(1)
133 ! elseif WEDGES
134  elseif((lakonl(4:5).eq.'15').or.
135  & (lakonl(4:4).eq.'6'))then
136  xi=1.d0/3.d0
137  et=1.d0/3.d0
138  ze=0.d0
139  weight=1.d0
140  endif
141 !
142  do i=1,nope
143  konl(i)=kon(indexe+i)
144  do j=1,3
145  xl(j,i)=co(j,konl(i))
146  enddo
147  enddo
148 !
149  if (nope.eq.20)then
150  call shape20h(xi,et,ze,xl,xsj,shp,iflag)
151  elseif(nope.eq.8) then
152  call shape8h(xi,et,ze,xl,xsj,shp,iflag)
153  elseif(nope.eq.10)then
154  call shape10tet(xi,et,ze,xl,xsj,shp,iflag)
155  elseif(nope.eq.4) then
156  call shape4tet (xi,et,ze,xl,xsj,shp,iflag)
157  elseif(nope.eq.15)then
158  call shape15w(xi,et,ze,xl,xsj,shp,iflag)
159  else
160  call shape6w(xi,et,ze,xl,xsj,shp,iflag)
161  endif
162 !
163  wavspd=wavespeed(imat)
164 !
165 ! Divides volume accordingly per geometry of element
166 ! Carlo MT proposal
167 ! if HEX
168  if((lakon(nelem)(4:5).eq.'20').or.
169  & (lakon(nelem)(4:4).eq.'8')) then
170  volume=weight*xsj
171 ! if TET
172  elseif((lakon(nelem)(4:5).eq.'10').or.
173  & (lakon(nelem)(4:4).eq.'4')) then
174  volume=weight*xsj/3.d0
175 ! if WEDGES
176  elseif ( (lakonl(4:5).eq.'15').or.
177  & (lakonl(4:4).eq.'6'))then
178  volume=weight*xsj/2.d0
179  endif
180 !
181  hmin=1.d30
182 !
183 ! DO over sides
184  do ig=1,nfaces
185  if(lakon(nelem)(4:4).eq.'6')then
186  if(ig.le.2)then
187  nopes=3
188  else
189  nopes=4
190  endif
191  elseif(lakon(nelem)(4:5).eq.'15')then
192  if(ig.le.2)then
193  nopes=6
194  else
195  nopes=8
196  endif
197  endif
198 !
199  if((nope.eq.20).or.(nope.eq.8))then
200  do i=1,nopes
201  do j=1,3
202  xl2(j,i)=co(j,konl(ifaceq(i,ig)))
203  enddo
204  enddo
205  elseif((nope.eq.10).or.(nope.eq.4))then
206  do i=1,nopes
207  do j=1,3
208  xl2(j,i)=co(j,konl(ifacet(i,ig)))
209  enddo
210  enddo
211  else
212  do i=1,nopes
213  do j=1,3
214  xl2(j,i)=co(j,konl(ifacew(i,ig)))
215  enddo
216  enddo
217  endif
218 !
219  if((nopes.eq.4).or.(nopes.eq.8))then
220  xi=0.d0
221  et=0.d0
222  weight=4.d0
223  else
224  xi=1.d0/3.d0
225  et=1.d0/3.d0
226  weight=0.5d0
227  endif
228 !
229  if (nopes.eq.8) then
230  call shape8q(xi,et,xl2,xsj2,xs2,shp2,iflag)
231  elseif(nopes.eq.4) then
232  call shape4q(xi,et,xl2,xsj2,xs2,shp2,iflag)
233  elseif(nopes.eq.6) then
234  call shape6tri(xi,et,xl2,xsj2,xs2,shp2,iflag)
235  elseif(nopes.eq.7) then
236  call shape7tri(xi,et,xl2,xsj2,xs2,shp2,iflag)
237  else
238  call shape3tri(xi,et,xl2,xsj2,xs2,shp2,iflag)
239  endif
240 !
241  area=weight*dsqrt(xsj2(1)*xsj2(1)+xsj2(2)*xsj2(2)+
242  & xsj2(3)*xsj2(3))
243  hmin=min(hmin,(volume/area))
244 !
245  enddo
246 ! ENDDO over sides
247 !
248  if(critom/2*hmin/wavspd*geomfac.lt.dtvol)then
249  elemmin=nelem
250  endif
251 
252  dtvol=min(dtvol,critom/2* hmin/wavspd*geomfac)
253  enddo
254 ! ** ENDDO per element
255 !
256  dtvol=dtvol* safefac
257 !
258  return
subroutine shape6w(xi, et, ze, xl, xsj, shp, iflag)
Definition: shape6w.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 shape10tet(xi, et, ze, xl, xsj, shp, iflag)
Definition: shape10tet.f:20
#define min(a, b)
Definition: cascade.c:31
subroutine shape8h(xi, et, ze, xl, xsj, shp, iflag)
Definition: shape8h.f:20
subroutine shape15w(xi, et, ze, xl, xsj, shp, iflag)
Definition: shape15w.f:20
subroutine shape4q(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape4q.f:20
subroutine shape20h(xi, et, ze, xl, xsj, shp, iflag)
Definition: shape20h.f:20
subroutine shape4tet(xi, et, ze, xl, xsj, shp, iflag)
Definition: shape4tet.f:20
subroutine shape6tri(xi, et, xl, xsj, xs, shp, iflag)
Definition: shape6tri.f:20
Hosted by OpenAircraft.com, (Michigan UAV, LLC)