OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
alefvm_epsdot.F File Reference
#include "implicit_f.inc"
#include "mvsiz_p.inc"
#include "vect01_c.inc"
#include "com01_c.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine alefvm_epsdot (ixs, vol, n1x, n2x, n3x, n4x, n5x, n6x, n1y, n2y, n3y, n4y, n5y, n6y, n1z, n2z, n3z, n4z, n5z, n6z, dxx, dyy, dzz, x, ipm, nel)

Function/Subroutine Documentation

◆ alefvm_epsdot()

subroutine alefvm_epsdot ( integer, dimension(nixs,*) ixs,
vol,
n1x,
n2x,
n3x,
n4x,
n5x,
n6x,
n1y,
n2y,
n3y,
n4y,
n5y,
n6y,
n1z,
n2z,
n3z,
n4z,
n5z,
n6z,
dxx,
dyy,
dzz,
x,
integer, dimension(npropmi,*) ipm,
integer nel )

Definition at line 31 of file alefvm_epsdot.F.

37C-----------------------------------------------
38C D e s c r i p t i o n
39C-----------------------------------------------
40C 'alefvm' is related to a collocated scheme (based on Godunov scheme)
41C which was temporarily introduced for experimental option /INTER/TYPE22 (FSI coupling with cut cell method)
42C This cut cell method is not completed, abandoned, and is not an official option.
43C There is no other use for this scheme which is automatically enabled when /INTER/TYPE22 is defined (INT22>0 => IALEFVM=1).
44C
45C This subroutine is treating an uncut cell.
46C-----------------------------------------------
47C M o d u l e s
48C-----------------------------------------------
49 USE alefvm_mod
50 use element_mod , only : nixs
51C-----------------------------------------------
52C I m p l i c i t T y p e s
53C-----------------------------------------------
54#include "implicit_f.inc"
55C-----------------------------------------------
56C G l o b a l P a r a m e t e r s
57C-----------------------------------------------
58#include "mvsiz_p.inc"
59C-----------------------------------------------
60C C o m m o n B l o c k s
61C-----------------------------------------------
62#include "vect01_c.inc"
63#include "com01_c.inc"
64#include "param_c.inc"
65C-----------------------------------------------
66C D e s c r i p t i o n
67C-----------------------------------------------
68C This subroutines computes strain rate tensor
69C
70C If option is not detected in input file then
71C subroutine is unplugged
72C-----------------------------------------------
73C D u m m y A r g u m e n t s
74C-----------------------------------------------
75 INTEGER :: IXS(NIXS,*),IPM(NPROPMI,*),NEL
76 my_real :: vol(mvsiz),dxx(mvsiz),dyy(mvsiz), dzz(mvsiz),x(3,*)
77 my_real :: n1x(*), n2x(*), n3x(*), n4x(*), n5x(*), n6x(*),
78 . n1y(*), n2y(*), n3y(*), n4y(*), n5y(*), n6y(*),
79 . n1z(*), n2z(*), n3z(*), n4z(*), n5z(*), n6z(*)
80C-----------------------------------------------
81C L o c a l V a r i a b l e s
82C-----------------------------------------------
83 INTEGER :: I, II, MT, IALEFVM_FLG
84 my_real :: vface(3,6), gradv(3,3), epsdot(6)
85 INTEGER :: NC1(MVSIZ),NC2(MVSIZ),NC3(MVSIZ),NC4(MVSIZ),NC5(MVSIZ),NC6(MVSIZ),NC7(MVSIZ),NC8(MVSIZ)
86 my_real :: x1(mvsiz), x2(mvsiz), x3(mvsiz), x4(mvsiz), x5(mvsiz), x6(mvsiz), x7(mvsiz), x8(mvsiz),
87 . y1(mvsiz), y2(mvsiz), y3(mvsiz), y4(mvsiz), y5(mvsiz), y6(mvsiz), y7(mvsiz), y8(mvsiz),
88 . z1(mvsiz), z2(mvsiz), z3(mvsiz), z4(mvsiz), z5(mvsiz), z6(mvsiz), z7(mvsiz), z8(mvsiz)
89
90 LOGICAL :: debug_outp
91 INTEGER :: idbf,idbl
92C-----------------------------------------------
93C P r e - C o n d i t i o n s
94C-----------------------------------------------
95 IF(alefvm_param%IEnabled==0)RETURN
96 mt = ixs(1,nft+1)
97 ialefvm_flg = ipm(251,mt)
98 IF(ialefvm_flg <= 1)RETURN
99 epsdot(1:6) = zero
100C-----------------------------------------------
101C S o u r c e L i n e s
102C-----------------------------------------------
103
104 !-------------------------------------------------------------!
105 ! NORMAL VECTOR FOR ALE !
106 !-------------------------------------------------------------!
107 IF(jale==1)THEN
108 DO i=1,nel
109 ii = i + nft
110 !---8 local node numbers NC1 TO NC8 for solid element I ---!
111 nc1(i)=ixs(2,ii)
112 nc2(i)=ixs(3,ii)
113 nc3(i)=ixs(4,ii)
114 nc4(i)=ixs(5,ii)
115 nc5(i)=ixs(6,ii)
116 nc6(i)=ixs(7,ii)
117 nc7(i)=ixs(8,ii)
118 nc8(i)=ixs(9,ii)
119 !
120 !---Coordinates of the 8 nodes
121 x1(i)=x(1,nc1(i))
122 y1(i)=x(2,nc1(i))
123 z1(i)=x(3,nc1(i))
124 !
125 x2(i)=x(1,nc2(i))
126 y2(i)=x(2,nc2(i))
127 z2(i)=x(3,nc2(i))
128 !
129 x3(i)=x(1,nc3(i))
130 y3(i)=x(2,nc3(i))
131 z3(i)=x(3,nc3(i))
132 !
133 x4(i)=x(1,nc4(i))
134 y4(i)=x(2,nc4(i))
135 z4(i)=x(3,nc4(i))
136 !
137 x5(i)=x(1,nc5(i))
138 y5(i)=x(2,nc5(i))
139 z5(i)=x(3,nc5(i))
140 !
141 x6(i)=x(1,nc6(i))
142 y6(i)=x(2,nc6(i))
143 z6(i)=x(3,nc6(i))
144 !
145 x7(i)=x(1,nc7(i))
146 y7(i)=x(2,nc7(i))
147 z7(i)=x(3,nc7(i))
148 !
149 x8(i)=x(1,nc8(i))
150 y8(i)=x(2,nc8(i))
151 z8(i)=x(3,nc8(i))
152 ENDDO
153 DO i=1,nel
154 ! Face-1
155 n1x(i)=(y3(i)-y1(i))*(z2(i)-z4(i)) - (z3(i)-z1(i))*(y2(i)-y4(i))
156 n1y(i)=(z3(i)-z1(i))*(x2(i)-x4(i)) - (x3(i)-x1(i))*(z2(i)-z4(i))
157 n1z(i)=(x3(i)-x1(i))*(y2(i)-y4(i)) - (y3(i)-y1(i))*(x2(i)-x4(i))
158 ! Face-2
159 n2x(i)=(y7(i)-y4(i))*(z3(i)-z8(i)) - (z7(i)-z4(i))*(y3(i)-y8(i))
160 n2y(i)=(z7(i)-z4(i))*(x3(i)-x8(i)) - (x7(i)-x4(i))*(z3(i)-z8(i))
161 n2z(i)=(x7(i)-x4(i))*(y3(i)-y8(i)) - (y7(i)-y4(i))*(x3(i)-x8(i))
162 ! Face-3
163 n3x(i)=(y6(i)-y8(i))*(z7(i)-z5(i)) - (z6(i)-z8(i))*(y7(i)-y5(i))
164 n3y(i)=(z6(i)-z8(i))*(x7(i)-x5(i)) - (x6(i)-x8(i))*(z7(i)-z5(i))
165 n3z(i)=(x6(i)-x8(i))*(y7(i)-y5(i)) - (y6(i)-y8(i))*(x7(i)-x5(i))
166 ! Face-4
167 n4x(i)=(y2(i)-y5(i))*(z6(i)-z1(i)) - (z2(i)-z5(i))*(y6(i)-y1(i))
168 n4y(i)=(z2(i)-z5(i))*(x6(i)-x1(i)) - (x2(i)-x5(i))*(z6(i)-z1(i))
169 n4z(i)=(x2(i)-x5(i))*(y6(i)-y1(i)) - (y2(i)-y5(i))*(x6(i)-x1(i))
170 ! Face-5
171 n5x(i)=(y7(i)-y2(i))*(z6(i)-z3(i)) - (z7(i)-z2(i))*(y6(i)-y3(i))
172 n5y(i)=(z7(i)-z2(i))*(x6(i)-x3(i)) - (x7(i)-x2(i))*(z6(i)-z3(i))
173 n5z(i)=(x7(i)-x2(i))*(y6(i)-y3(i)) - (y7(i)-y2(i))*(x6(i)-x3(i))
174 ! Face-6
175 n6x(i)=(y8(i)-y1(i))*(z4(i)-z5(i)) - (z8(i)-z1(i))*(y4(i)-y5(i))
176 n6y(i)=(z8(i)-z1(i))*(x4(i)-x5(i)) - (x8(i)-x1(i))*(z4(i)-z5(i))
177 n6z(i)=(x8(i)-x1(i))*(y4(i)-y5(i)) - (y8(i)-y1(i))*(x4(i)-x5(i))
178 ENDDO
179 ENDIF
180
181 !-------------------------------------------------------------!
182 ! TOTAL TENSOR !
183 !-------------------------------------------------------------!
184 DO i=1,nel
185 ii = i + nft
186 vface(1:3,1) = alefvm_buffer%F_FACE(1:3,1,ii)
187 vface(1:3,2) = alefvm_buffer%F_FACE(1:3,2,ii)
188 vface(1:3,3) = alefvm_buffer%F_FACE(1:3,3,ii)
189 vface(1:3,4) = alefvm_buffer%F_FACE(1:3,4,ii)
190 vface(1:3,5) = alefvm_buffer%F_FACE(1:3,5,ii)
191 vface(1:3,6) = alefvm_buffer%F_FACE(1:3,6,ii)
192 ENDDO
193
194 !-------------------------------------------------------------!
195 ! VELOCITY GRADIENT : Grad(v(1:3)) \in Matrix(3,3) !
196 !-------------------------------------------------------------!
197 ![EPSDOT]=1/2 (grad V + t{gradV} ) -> EPSDOT_if = 1/2 (dvi/dxj + dvj/dxi )
198 ! mean (grad V) = 1/V * Integral (grad V, dV) = 1/V * Integral (V (*) n , dS) where (*) is tensorial product
199 ! = 1/V * SUM( Vf (*) nf . Sf )
200 ! = 1/2/V * SUM ( Vf (*) Nf ) where Nf=2Sf.n
201
202 ! WARNING : Tangentiel velocity is here missing since F_FACE is godunov normal velocity
203
204 DO i=1,nel
205 ii=i+nft
206 gradv(1,1) = half/vol(i) * ( vface(1,1)*n1x(i) + vface(1,2)*n2x(i) + vface(1,3)*n3x(i)
207 . + vface(1,4)*n4x(i) + vface(1,5)*n5x(i) + vface(1,6)*n6x(i) )
208 gradv(1,2) = half/vol(i) * ( vface(1,1)*n1y(i) + vface(1,2)*n2y(i) + vface(1,3)*n3y(i)
209 . + vface(1,4)*n4y(i) + vface(1,5)*n5y(i) + vface(1,6)*n6y(i) )
210 gradv(1,3) = half/vol(i) * ( vface(1,1)*n1z(i) + vface(1,2)*n2z(i) + vface(1,3)*n3z(i)
211 . + vface(1,4)*n4z(i) + vface(1,5)*n5z(i) + vface(1,6)*n6z(i) )
212
213 gradv(2,1) = half/vol(i) * ( vface(2,1)*n1x(i) + vface(2,2)*n2x(i) + vface(2,3)*n3x(i)
214 . + vface(2,4)*n4x(i) + vface(2,5)*n5x(i) + vface(2,6)*n6x(i) )
215 gradv(2,2) = half/vol(i) * ( vface(2,1)*n1y(i) + vface(2,2)*n2y(i) + vface(2,3)*n3y(i)
216 . + vface(2,4)*n4y(i) + vface(2,5)*n5y(i) + vface(2,6)*n6y(i) )
217 gradv(2,3) = half/vol(i) * ( vface(2,1)*n1z(i) + vface(2,2)*n2z(i) + vface(2,3)*n3z(i)
218 . + vface(2,4)*n4z(i) + vface(2,5)*n5z(i) + vface(2,6)*n6z(i) )
219
220 gradv(3,1) = half/vol(i) * ( vface(3,1)*n1x(i) + vface(3,2)*n2x(i) + vface(3,3)*n3x(i)
221 . + vface(3,4)*n4x(i) + vface(3,5)*n5x(i) + vface(3,6)*n6x(i) )
222 gradv(3,2) = half/vol(i) * ( vface(3,1)*n1y(i) + vface(3,2)*n2y(i) + vface(3,3)*n3y(i)
223 . + vface(3,4)*n4y(i) + vface(3,5)*n5y(i) + vface(3,6)*n6y(i) )
224 gradv(3,3) = half/vol(i) * ( vface(3,1)*n1z(i) + vface(3,2)*n2z(i) + vface(3,3)*n3z(i)
225 . + vface(3,4)*n4z(i) + vface(3,5)*n5z(i) + vface(3,6)*n6z(i) )
226
227 epsdot(1) = gradv(1,1)
228 epsdot(2) = gradv(2,2)
229 epsdot(3) = gradv(3,3)
230 epsdot(4) = half*(gradv(1,2)+gradv(2,1))
231 epsdot(5) = half*(gradv(2,3)+gradv(3,2))
232 epsdot(6) = half*(gradv(1,3)+gradv(3,1))
233
234 dxx(i) = epsdot(1)
235 dyy(i) = epsdot(2)
236 dzz(i) = epsdot(3)
237
238 !14.0.220 : strain rate not yet validated. Set to zero while waiting for specification validation
239 dxx(i) = zero
240 dyy(i) = zero
241 dzz(i) = zero
242
243 ENDDO
244
245
246 !DEBUG-OUTPUT---------------!
247 if(alefvm_param%IOUTP_EPSDOT /= 0)then
248 debug_outp = .false.
249 if(alefvm_param%IOUTP_EPSDOT>0)then
250 do i=lft,llt
251 ii = nft + i
252 if(ixs(11,ii)==alefvm_param%IOUTP_EPSDOT)THEN
253 debug_outp = .true.
254 idbf = i
255 idbl = i
256 EXIT
257 endif
258 enddo
259 elseif(alefvm_param%IOUTP_EPSDOT==-1)then
260 debug_outp=.true.
261 idbf = lft
262 idbl = llt
263 endif
264 if(debug_outp)then
265!#!include "lockon.inc"
266 print *, " |----alefvm_stress.F-----|"
267 print *, " | THREAD INFORMATION |"
268 print *, " |------------------------|"
269 print *, " NCYCLE =", ncycle
270 do i=idbf,idbl
271 ii = nft + i
272 print *, " brique=", ixs(11,nft+i)
273 write(*,fmt='(A24,1A26)') " ",
274 . "#-stress Tensor (P+VIS+Q)#"
275
276!! write (*,FMT='(A,3E26.14,A)') " | ", GradV(1,1),GradV(1,2),GradV(1,3), " |"
277!! write (*,FMT='(A,3E26.14,A)') " GradV =| ", GradV(2,1),GradV(2,2),GradV(2,3), " |"
278!! write (*,FMT='(A,3E26.14,A)') " |_", GradV(3,1),GradV(3,2),GradV(3,3), "_|"
279
280! write (*,FMT='(A,3E26.14,A)') " | ", EPSDOT(1),EPSDOT(4),EPSDOT(6), " |"
281! write (*,FMT='(A,3E26.14,A)') " Eps_dot =| ", EPSDOT(4),EPSDOT(2),EPSDOT(5), " |"
282! write (*,FMT='(A,3E26.14,A)') " |_", EPSDOT(6),EPSDOT(5),EPSDOT(3), "_|"
283 write (*,fmt='(A,1E26.14 )') " tr(Eps_dot)/3. = ", third*(epsdot(1)+epsdot(2)+epsdot(3))
284
285 enddo
286!#!include "lockoff.inc"
287 endif
288 endif
289 !-----------------------------------------!
290
291 RETURN
#define my_real
Definition cppsort.cpp:32
type(alefvm_buffer_), target alefvm_buffer
Definition alefvm_mod.F:120
type(alefvm_param_), target alefvm_param
Definition alefvm_mod.F:121