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

Go to the source code of this file.

Functions/Subroutines

subroutine checkimpacts (ne, neini, temax, sizemaxinc, energyref, tmin, tper, idivergence, iforceincsize, istab, dtheta, r_abs, energy, energyini, allwk, allwkini, dampwk, dampwkini, emax, mortar, maxdecay, enetoll)
 

Function/Subroutine Documentation

◆ checkimpacts()

subroutine checkimpacts ( integer, intent(in)  ne,
integer, intent(in)  neini,
real*8, intent(in)  temax,
real*8, intent(out)  sizemaxinc,
real*8, intent(in)  energyref,
real*8, intent(in)  tmin,
real*8, intent(in)  tper,
integer, intent(out)  idivergence,
integer, intent(out)  iforceincsize,
integer, intent(out)  istab,
real*8, intent(in)  dtheta,
real*8  r_abs,
real*8, dimension(4), intent(in)  energy,
real*8, dimension(4), intent(in)  energyini,
real*8, intent(in)  allwk,
real*8, intent(in)  allwkini,
real*8, intent(in)  dampwk,
real*8, intent(in)  dampwkini,
real*8, intent(in)  emax,
integer, intent(in)  mortar,
real*8  maxdecay,
real*8  enetoll 
)
23 !
24 ! # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
25 ! Routine that contains the implementation of the logic to
26 ! rule the increment size during contact conditions.
27 ! The values of tolerances have been tested for the ball
28 ! model, the two sliding blades (simplified model of
29 ! blade from Mr. Wittig) and the real blade model.
30 ! Friction has not been tested deeply.
31 !
32 ! Main variables and meaning
33 !
34 ! sizemaxinc : maximum size of the current increment
35 ! iforceincsize : flag to set "dtheta=sizemaxinc" in
36 ! checkconvergence.
37 ! cstate : vector containing contact data
38 ! temax : max. natural period of oscillation
39 ! icase : flag to print debug informations
40 ! emax : maximum energy of the system over the ti-
41 ! me history
42 ! r : energy residual before contact (or re-
43 ! adapted)
44 ! delta : eneres normalized
45 ! fact : factor to set sizemaxinc according to the
46 ! contact formulation
47 ! stab_th : \hat{r}_{e}(t_n) -> mod belytschko before
48 ! contact (or initial value). This is the
49 ! stability threshold
50 ! delta_r_rel : \hat{r}_{e}(t) - \hat{r}_{e}(t-1) -> varia-
51 ! tion of the modified belitschko criterion
52 ! used to control jumps
53 ! r_rel : \hat{r}_{e}(t) actual value of the modified
54 ! belitschko criterion
55 !
56 ! Proposed by Matteo Pacher
57 !
58 ! # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
59 !
60  implicit none
61 !
62  integer idivergence,
63  & iforceincsize,ne,neini,istab,mortar
64 !
65  real*8 temax,energyref,sizemaxinc,tmin,tper,dtheta,
66  & delta_r_rel,r_rel,delta,allwk,allwkini,energy(4),
67  & energyini(4),dampwk,dampwkini,emax,fact,
68  & r_rel_bc,maxdecay,r_abs,enetoll,delta_r_abs
69 !
70  intent(in) ne,neini,tmin,tper,energyref,dtheta,
71  & temax,mortar,allwk,allwkini,energy,energyini,dampwk,
72  & dampwkini,emax
73 !
74  intent(out) sizemaxinc,idivergence,iforceincsize,
75  & istab
76 !
77 ! Initialization
78 !
79 c icase=0
80  iforceincsize=0
81 !
82 ! Adaption of the energy residual (absolute/relative check)
83 !
84  if(dabs(r_abs).lt.(enetoll/4.0))then
85  delta=r_abs*emax
86  else
87  delta=r_abs
88  endif
89 !
90  if(mortar.eq.0)then
91  fact=10.d0
92  elseif(mortar.eq.1) then
93  fact=1.d0
94  endif
95 !
96 ! Compute thresholds and energy values
97 !
98  delta_r_abs=energy(1)+energy(2)+energy(3)+energy(4)-allwk-
99  & dampwk-(energyini(1)+energyini(2)+energyini(3)+
100  & energyini(4)-allwkini-dampwkini)
101 !
102  if(emax.le.0.d0)then
103 !
104 ! No kinetic energy in the structure: energyref is the internal energy
105 ! this happens at the beginning of the calculation
106 !
107  r_rel=(energy(1)+energy(2)+energy(3)+energy(4)-allwk-
108  & dampwk-energyref)/energyref
109  delta_r_rel=delta_r_abs/energyref
110  r_rel_bc=delta/energyref
111  else
112  r_rel=(energy(1)+energy(2)+energy(3)+energy(4)-allwk-
113  & dampwk-energyref)/emax
114  delta_r_rel=delta_r_abs/emax
115  r_rel_bc=delta/emax
116  endif
117 !
118 ! Logic to adapt the increment size
119 !
120  if(mortar.eq.0)then
121 !
122 ! Energy conservation rules for NODE TO SURFACE penalty contact
123 !
124  if((delta_r_rel.lt.(-0.008d0)).and.(ne.ge.neini))then
125 !
126 ! Impact (or too high variation during pers. contact)
127 ! delta_r_rel = r_rel-r_rel_ini
128 !
129  idivergence=1
130  sizemaxinc=dtheta*0.25d0
131  iforceincsize=1
132 c icase=1
133  elseif((r_rel-r_rel_bc.gt.0.0025d0).and.(ne.le.neini))then
134 !
135 ! Rebound (or too high variation during pers. contact)
136 ! r_rel_bc is r_rel before contact
137 !
138  idivergence=1
139  sizemaxinc=dtheta*0.5d0
140  iforceincsize=1
141 c icase=3
142  else
143 !
144 ! Persistent Contact
145 !
146 c icase=2
147  if(r_rel.gt.(-0.9d0*maxdecay))then
148  sizemaxinc=max(fact*temax/tper,1.01d0*dtheta)
149  sizemaxinc=min(sizemaxinc,100.d0*temax/tper)
150  else
151  sizemaxinc=max(temax/tper/10.d0,0.5d0*dtheta)
152  istab=1
153  endif
154 
155  endif
156 !
157  elseif(mortar.eq.1)then
158 !
159 ! Energy conservation rules for SURFACE TO SURFACE penalty contact
160 !
161  if((delta_r_rel.lt.(-0.008d0)).and.(ne.ge.neini))then
162 !
163 ! Impact (or too high variation during pers. contact)
164 ! delta_r_rel = r_rel-r_rel_ini
165 !
166  idivergence=1
167  sizemaxinc=dtheta*0.25d0
168  iforceincsize=1
169 c icase=1
170 !
171  elseif((r_rel-r_rel_bc.gt.0.0025d0).and.(ne.le.neini))then
172 !
173 ! Rebound (or too high variation during pers. contact)
174 ! r_rel_bc is r_rel before contact
175 !
176  idivergence=1
177  sizemaxinc=dtheta*0.5d0
178  iforceincsize=1
179 c icase=3
180 !
181  else
182 !
183 ! Persistent Contact
184 !
185 c icase=2
186  if(r_rel.gt.(-0.9d0*maxdecay))then
187  sizemaxinc=min(fact*temax/tper,1.1*dtheta)
188  sizemaxinc=min(sizemaxinc,100.d0*temax/tper)
189  else
190  sizemaxinc=max(temax/tper/10.d0,0.5d0*dtheta)
191  istab=1
192  endif
193  endif
194  endif !(mortar)
195 !
196  if(sizemaxinc.lt.tmin)then
197  sizemaxinc=tmin
198  endif
199 !
200 ! Debug prints
201 !
202 c if(icase.eq.1)then
203 c write(*,*)"# # # # # # # # # # # # # # # # # # # # # # # # # #"
204 c write(*,*)"icase=1"
205 c write(*,*)"Impact detected, increment reattempted"
206 c elseif(icase.eq.2)then
207 c write(*,*)"# # # # # # # # # # # # # # # # # # # # # # # # # #"
208 c write(*,*)"icase=2"
209 c write(*,*)"Persistent Contact conditions"
210 c elseif(icase.eq.3)then
211 c write(*,*)"# # # # # # # # # # # # # # # # # # # # # # # # # #"
212 c write(*,*)"icase=3"
213 c write(*,*)"Rebound, the increment is reattempted (stability)"
214 c endif
215 !
216  return
#define max(a, b)
Definition: cascade.c:32
#define min(a, b)
Definition: cascade.c:31
Hosted by OpenAircraft.com, (Michigan UAV, LLC)