67 TYPE(t_region
) :: region
73 CHARACTER(CHRLEN) :: rcsidentstring
74 INTEGER :: ibv,ipatch,ivg,speedsign
75 REAL(RFREAL) :: nx,ny,nz,ps,ps1,ps2,
x,x1,x2,
y,
z
77 TYPE(t_patch),
POINTER :: ppatch
83 rcsidentstring =
'$RCSfile: RFLU_USER_GetDeformation.F90,v $ $Revision: 1.18 $'
85 global => region%global
88 'RFLU_USER_GetDeformation.F90')
90 IF ( global%myProcid == masterproc .AND. &
91 global%verbLevel > verbose_low )
THEN
92 WRITE(stdout,
'(A,1X,A,1X,I3)') solver_name,
'Getting deformation...'
99 SELECT CASE ( trim(global%casename) )
106 DO ipatch=1,region%grid%nPatches
107 ppatch => region%patches(ipatch)
109 IF ( ppatch%iPatchGlobal == 6 )
THEN
110 DO ibv = 1,ppatch%nBVert
111 ppatch%dXyz(xcoord,ibv) = 8.0_rfreal*global%dtMin
112 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
113 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal*global%dtMin
116 DO ibv = 1,ppatch%nBVert
117 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
118 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
119 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
129 DO ipatch=1,region%grid%nPatches
130 ppatch => region%patches(ipatch)
132 IF ( ppatch%iPatchGlobal == 1 )
THEN
133 DO ibv = 1,ppatch%nBVert
134 nx = ppatch%bvn(xcoord,ibv)
135 ny = ppatch%bvn(ycoord,ibv)
136 nz = ppatch%bvn(zcoord,ibv)
140 x = region%grid%xyz(xcoord,ivg)
141 y = region%grid%xyz(ycoord,ivg)
142 z = region%grid%xyz(zcoord,ivg)
149 ps = (ps2 - ps1)/(x2 - x1)*
x - (x1*ps2 - x2*ps1)/(x2 - x1)
151 ppatch%dXyz(xcoord,ibv) = ps*global%dtMin*nx
152 ppatch%dXyz(ycoord,ibv) = ps*global%dtMin*ny
153 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
155 ELSE IF ( ppatch%iPatchGlobal == 4 )
THEN
156 DO ibv = 1,ppatch%nBVert
157 nx = ppatch%bvn(xcoord,ibv)
158 ny = ppatch%bvn(ycoord,ibv)
159 nz = ppatch%bvn(zcoord,ibv)
161 ppatch%dXyz(xcoord,ibv) = 5.0_rfreal*global%dtMin
162 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
163 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
166 DO ibv = 1,ppatch%nBVert
167 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
168 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
169 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
179 DO ipatch=1,region%grid%nPatches
180 ppatch => region%patches(ipatch)
182 IF ( ppatch%iPatchGlobal == 2 .OR. &
183 ppatch%iPatchGlobal == 5 .OR. &
184 ppatch%iPatchGlobal == 6 )
THEN
185 DO ibv = 1,ppatch%nBVert
188 z = region%grid%xyz(zcoord,ivg)
190 ps = 100.0_rfreal*
z/0.1_rfreal
192 ppatch%dXyz(xcoord,ibv) = ps*global%dtMin
193 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
194 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
197 DO ibv = 1,ppatch%nBVert
198 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
199 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
200 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
209 CASE (
"cube2pt",
"cube3pt",
"cube11pt",
"cube21pt" )
210 DO ipatch=1,region%grid%nPatches
211 ppatch => region%patches(ipatch)
213 IF ( ppatch%iPatchGlobal == 5 )
THEN
214 DO ibv = 1,ppatch%nBVert
215 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
216 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
217 ppatch%dXyz(zcoord,ibv) = 8.0_rfreal*global%dtMin
220 DO ibv = 1,ppatch%nBVert
221 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
222 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
223 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
229 DO ipatch=1,region%grid%nPatches
230 ppatch => region%patches(ipatch)
232 IF ( ppatch%iPatchGlobal == 4 )
THEN
233 DO ibv = 1,ppatch%nBVert
234 ppatch%dXyz(xcoord,ibv) = -100.0_rfreal*global%dtMin
235 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
236 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
239 DO ibv = 1,ppatch%nBVert
240 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
241 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
242 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
251 CASE (
"endburner3pt",
"endburner5pt",
"endburner9pt" )
252 DO ipatch=1,region%grid%nPatches
253 ppatch => region%patches(ipatch)
255 IF ( ppatch%iPatchGlobal == 5 )
THEN
256 DO ibv = 1,ppatch%nBVert
257 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
258 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
259 ppatch%dXyz(zcoord,ibv) = 8.0_rfreal*global%dtMin
262 DO ibv = 1,ppatch%nBVert
263 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
264 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
265 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
274 CASE (
"endburner3ptnew",
"endburner5ptnew",
"endburner9ptnew" )
275 DO ipatch=1,region%grid%nPatches
276 ppatch => region%patches(ipatch)
278 IF ( ppatch%iPatchGlobal == 6 )
THEN
279 DO ibv = 1,ppatch%nBVert
280 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
281 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
282 ppatch%dXyz(zcoord,ibv) = 8.0_rfreal*global%dtMin
285 DO ibv = 1,ppatch%nBVert
286 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
287 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
288 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
297 CASE (
"endburner3pt_angled" )
298 DO ipatch=1,region%grid%nPatches
299 ppatch => region%patches(ipatch)
301 IF ( ppatch%iPatchGlobal == 5 )
THEN
302 DO ibv = 1,ppatch%nBVert
303 nx = ppatch%bvn(xcoord,ibv)
304 ny = ppatch%bvn(ycoord,ibv)
305 nz = ppatch%bvn(zcoord,ibv)
307 ppatch%dXyz(xcoord,ibv) = 8.0_rfreal*global%dtMin*nx
308 ppatch%dXyz(ycoord,ibv) = 8.0_rfreal*global%dtMin*ny
309 ppatch%dXyz(zcoord,ibv) = 8.0_rfreal*global%dtMin*nz
312 DO ibv = 1,ppatch%nBVert
313 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
314 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
315 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
324 CASE (
"piston_exp",
"piston_comp" )
325 IF ( trim(global%casename) ==
"piston_exp" )
THEN
331 DO ipatch=1,region%grid%nPatches
332 ppatch => region%patches(ipatch)
334 IF ( ppatch%iPatchGlobal == 3 )
THEN
335 DO ibv = 1,ppatch%nBVert
336 ppatch%dXyz(xcoord,ibv) = 10.0_rfreal*global%dtMin*speedsign
337 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
338 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
341 DO ibv = 1,ppatch%nBVert
342 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
343 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
344 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
353 CASE (
"scalability" )
354 DO ipatch=1,region%grid%nPatches
355 ppatch => region%patches(ipatch)
357 IF ( ppatch%iPatchGlobal == 1 )
THEN
358 DO ibv = 1,ppatch%nBVert
359 nx = ppatch%bvn(xcoord,ibv)
360 ny = ppatch%bvn(ycoord,ibv)
361 nz = ppatch%bvn(zcoord,ibv)
363 ppatch%dXyz(xcoord,ibv) = 1.0_rfreal*global%dtMin*nx
364 ppatch%dXyz(ycoord,ibv) = 1.0_rfreal*global%dtMin*ny
365 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
368 DO ibv = 1,ppatch%nBVert
369 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
370 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
371 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
381 DO ipatch=1,region%grid%nPatches
382 ppatch => region%patches(ipatch)
384 IF ( ppatch%iPatchGlobal == 1 )
THEN
385 DO ibv = 1,ppatch%nBVert
386 nx = ppatch%bvn(xcoord,ibv)
387 ny = ppatch%bvn(ycoord,ibv)
388 nz = ppatch%bvn(zcoord,ibv)
390 ppatch%dXyz(xcoord,ibv) = 10.0_rfreal*global%dtMin*nx
391 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
392 ppatch%dXyz(zcoord,ibv) = 10.0_rfreal*global%dtMin*nz
402 global%warnCounter = global%warnCounter + 1
404 IF ( global%myProcid == masterproc .AND. &
405 global%verbLevel > verbose_low )
THEN
406 WRITE(stdout,
'(A,3(1X,A))') solver_name,
'*** WARNING ***', &
407 'No displacements specified.', &
408 'Setting displacements to zero.'
411 DO ipatch=1,region%grid%nPatches
412 ppatch => region%patches(ipatch)
414 DO ibv = 1,ppatch%nBVert
415 ppatch%dXyz(xcoord,ibv) = 0.0_rfreal
416 ppatch%dXyz(ycoord,ibv) = 0.0_rfreal
417 ppatch%dXyz(zcoord,ibv) = 0.0_rfreal
427 IF ( global%myProcid == masterproc .AND. &
428 global%verbLevel > verbose_low .AND. &
429 region%grid%nPatches > 0 )
THEN
430 WRITE(stdout,
'(A,3X,A)') solver_name,
'Deformation extrema:'
431 WRITE(stdout,
'(A,5X,A)') solver_name,
'Written only for patches '// &
432 'with non-zero actual vertices.'
434 DO ipatch=1,region%grid%nPatches
435 ppatch => region%patches(ipatch)
437 IF ( ppatch%nBVert > 0 )
THEN
438 WRITE(stdout,
'(A,5X,A,1X,I3)') solver_name,
'Patch:',ipatch
440 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'dXyz.x:', &
441 minval(ppatch%dXyz(xcoord,1:ppatch%nBVert)), &
442 maxval(ppatch%dXyz(xcoord,1:ppatch%nBVert))
443 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'dXyz.y:', &
444 minval(ppatch%dXyz(ycoord,1:ppatch%nBVert)), &
445 maxval(ppatch%dXyz(ycoord,1:ppatch%nBVert))
446 WRITE(stdout,
'(A,7X,A,2(1X,E15.8))') solver_name,
'dXyz.z:', &
447 minval(ppatch%dXyz(zcoord,1:ppatch%nBVert)), &
448 maxval(ppatch%dXyz(zcoord,1:ppatch%nBVert))
457 IF ( global%myProcid == masterproc .AND. &
458 global%verbLevel > verbose_low )
THEN
459 WRITE(stdout,
'(A,1X,A,1X,I3)') solver_name,
'Getting deformation done.'
void int int REAL REAL * y
subroutine registerfunction(global, funName, fileName)
void int int int REAL REAL REAL * z
subroutine deregisterfunction(global)