Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLAG_InjcEjectParticle.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: inject particle based on pool volume
26 ! for the multiphase injection algorithm.
27 !
28 ! Description: none.
29 !
30 ! Input: region = current region
31 ! iReg = current region number.
32 !
33 ! Output: regions(iReg)%levels%plag = injected plag values for cv, aiv, arv
34 ! of current region.
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: PLAG_InjcEjectParticle.F90,v 1.8 2008/12/06 08:44:33 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2002 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE plag_injcejectparticle( region, iReg )
47 
48  USE moddatatypes
50  USE modbndpatch, ONLY : t_patch
51  USE moddatastruct, ONLY : t_region
52  USE modglobal, ONLY : t_global
53  USE modrandom, ONLY : rand1uniform
57  USE moderror
58  USE modparameters
61  IMPLICIT NONE
62 
63 #include "Indexing.h"
64 
65 ! ... parameters
66  TYPE(t_region) :: region
67 
68  INTEGER :: ireg
69 
70 ! ... loop variables
71  INTEGER :: i, icont, ipatch, j, k
72 
73 ! ... local variables
74  CHARACTER(CHRLEN) :: rcsidentstring
75 
76  INTEGER :: bctype, burnstat, ibeg, icoff, idir, iend, ijcoff, ijnoff, &
77  ijkc, ijkn,ilev, injcdiamdist, inode, inoff, ipcls, itile, &
78  jbeg, jdir, jend, jnode,kbeg, kdir, kend, knode, &
79  lbound, n1, n2, nextidnumber, ncont, npatches, noff
80 
81  INTEGER :: ifileplag
82  INTEGER :: itercelllocate
83  INTEGER :: ejecmodel
84  INTEGER :: npcls,npclsmax
85  INTEGER, PARAMETER :: iter_cell_locate_max = 20
86 
87  INTEGER, POINTER, DIMENSION(:) :: pcvplagmass, pcvtilemass
88  INTEGER, POINTER, DIMENSION(:,:) :: paiv, paivold
89 
90  LOGICAL :: injectq
91  LOGICAL :: celllocate
92 
93  REAL(RFREAL) :: area, cellheight, injcbeta, pi, plagvolratio, &
94  plagmomenrm, poolvolsum, sgn, sxn,syn,szn, &
95  tinjccoeff, tinjcsum, volmeanpart
96  REAL(RFREAL) :: meansuperparticlevolume, spload
97  REAL(RFREAL) :: injcbetafac, injcbetafacinv
98  REAL(RFREAL) :: poolvololdsum, poolvolfinal, remainingvolume
99  REAL(RFREAL) :: currentsuperparticlevolume, poolvolume
100  REAL(RFREAL) :: poolexcess, pexcesss, possibleexcess
101  REAL(RFREAL) :: countdown, countdownnext, deltavolume, randunif
102  REAL(RFREAL) :: currentparticlevolume
103  REAL(RFREAL) :: poolvolcurr
104 
105  REAL(RFREAL), DIMENSION(3) :: poolxyz, snormal
106 
107  REAL(RFREAL), POINTER, DIMENSION(:) :: pvol
108  REAL(RFREAL), POINTER, DIMENSION(:,:) :: sface, pxyz
109 
110  REAL(RFREAL), POINTER, DIMENSION(:,:) :: parv, pcvplag, pcvtile, &
111  pcvoldtile, pdvtile
112  REAL(RFREAL), POINTER, DIMENSION(:,:,:) :: pfc
113 
114  TYPE(t_patch), POINTER :: ppatch
115  TYPE(t_tile_plag), POINTER :: ptileplag
116  TYPE(t_plag), POINTER :: pplag
117  TYPE(t_global), POINTER :: global
118 
119 !******************************************************************************
120 
121  rcsidentstring = '$RCSfile: PLAG_InjcEjectParticle.F90,v $ $Revision: 1.8 $'
122 
123  global => region%global
124 
125  CALL registerfunction( global, 'PLAG_InjcEjectParticle',&
126  'PLAG_InjcEjectParticle.F90' )
127 
128 ! Get dimensions --------------------------------------------------------------
129 
130  ilev = region%currLevel
131  npatches = region%nPatches
132 
133  ncont = region%plagInput%nCont
134  pi = global%pi
135 
136  injcdiamdist = region%plagInput%injcDiamDist
137  injcbeta = region%plagInput%injcBeta
138 
139  volmeanpart = pi/6.0_rfreal * region%plagInput%injcDiamMean**3
140 
141  ejecmodel = region%plagInput%ejecModel
142  spload = region%plagInput%spLoad
143 
144  IF ( ejecmodel == plag_ejec_cre ) THEN
145  meansuperparticlevolume = volmeanpart *spload
146 
147  injcbetafac = 2.0_rfreal *injcbeta *meansuperparticlevolume**2
148  injcbetafacinv = 1.0_rfreal/injcbetafac
149  ENDIF ! ejecModel
150 
151 ! Set pointers ----------------------------------------------------------------
152 
153  pxyz => region%levels(ilev)%grid%xyz
154 
155  pplag => region%levels(ilev)%plag
156  pcvplag => pplag%cv
157  pcvplagmass => pplag%cvPlagMass
158  paiv => pplag%aiv
159  paivold => pplag%aivOld
160  parv => pplag%arv
161 
162  pvol => region%levels(ilev)%grid%vol
163  pfc => region%levels(ilev)%plag%fc
164 
165 ! ******************************************************************************
166 ! Trap error if nPcls exceeds maximum datastructure dimension, nPclsMax
167 ! ******************************************************************************
168 
169  npcls = pplag%nPcls
170  npclsmax = region%plagInput%nPclsMax
171 
172  IF ( npcls >= npclsmax ) THEN
173  WRITE(stdout,*) ' PLAG_InjcEjectParticle: Datastructure Dimension Exceeded ',&
174  npcls,npclsmax
175  CALL errorstop( global,err_plag_memoverflow,__line__ )
176 
177 #ifdef MPI
178  CALL mpi_barrier( global%mpiComm,global%mpierr )
179  IF ( global%mpierr /= err_none ) &
180  CALL errorstop( global,err_mpi_trouble,__line__ )
181 
182  CALL mpi_finalize(global%mpierr)
183  IF ( global%mpierr /= err_none ) &
184  CALL errorstop( global,err_mpi_trouble,__line__ )
185 #endif
186 
187  END IF ! nPcls
188 
189 ! Loop over patches -----------------------------------------------------------
190 
191  DO ipatch=1,npatches
192 
193  ppatch => region%levels(ilev)%patches(ipatch)
194 
195  bctype = ppatch%bcType
196 
197 ! - Select injection boundary condition ---------------------------------------
198 
199  IF (bctype>=bc_injection .AND. bctype<=bc_injection+bc_range) THEN
200 
201 ! - Get dimensions ------------------------------------------------------------
202 
203  lbound = ppatch%lbound
204 
205  CALL rflo_getpatchindices( region,ppatch,ilev, &
206  ibeg,iend,jbeg,jend,kbeg,kend )
207  CALL rflo_getpatchdirection( ppatch,idir,jdir,kdir )
208  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
209  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
210 
211  noff = abs(ppatch%l1end-ppatch%l1beg) + 1
212 
213 ! - Select right face vector and make it point inwards ------------------------
214 
215  sgn = -1._rfreal
216  inode = 0
217  jnode = 0
218  knode = 0
219  IF (lbound==2 .OR. lbound==4 .OR. lbound==6) THEN
220  sgn = +1._rfreal
221  inode = -idir
222  jnode = -jdir
223  knode = -kdir
224  ENDIF ! lbound
225 
226 ! - Get the appropriate face vector -------------------------------------------
227 
228  IF (lbound==1 .OR. lbound==2) sface => region%levels(ilev)%plag%si
229  IF (lbound==3 .OR. lbound==4) sface => region%levels(ilev)%plag%sj
230  IF (lbound==5 .OR. lbound==6) sface => region%levels(ilev)%plag%sk
231 
232 ! - Loop over patch -----------------------------------------------------------
233 
234  DO k=kbeg,kend
235  DO j=jbeg,jend
236  DO i=ibeg,iend
237  ijkc = indijk(i,j,k,icoff,ijcoff)
238  ijkn = indijk(i+inode,j+jnode,k+knode,inoff,ijnoff)
239 
240  area = sqrt(sface(xcoord,ijkn)*sface(xcoord,ijkn)+ &
241  sface(ycoord,ijkn)*sface(ycoord,ijkn)+ &
242  sface(zcoord,ijkn)*sface(zcoord,ijkn))
243 
244  sxn = sgn*sface(xcoord,ijkn)/area
245  syn = sgn*sface(ycoord,ijkn)/area
246  szn = sgn*sface(zcoord,ijkn)/area
247 
248  IF (lbound==1 .OR. lbound==2) THEN
249  n1 = j - jbeg + 1
250  n2 = k - kbeg + 1
251  ELSE IF (lbound==3 .OR. lbound==4) THEN
252  n1 = k - kbeg + 1
253  n2 = i - ibeg + 1
254  ELSE IF (lbound==5 .OR. lbound==6) THEN
255  n1 = i - ibeg + 1
256  n2 = j - jbeg + 1
257  ENDIF ! lbound
258 
259 ! -- Select tile pointers -----------------------------------------------------
260 
261  itile = indij(n1,n2,noff)
262  ptileplag => ppatch%tilePlag
263 
264  pcvtile => ptileplag%cv
265  pcvtilemass => ptileplag%cvTileMass
266  pdvtile => ptileplag%dv
267 
268  pcvoldtile => ptileplag%cvOld
269 
270 !------------------------------------------------------------------------------
271 ! Invoke ejection model
272 !------------------------------------------------------------------------------
273 
274  SELECT CASE(ejecmodel)
275 
276 !------------------------------------------------------------------------------
277 ! Ejection Model 1
278 !------------------------------------------------------------------------------
279 
280  CASE(plag_ejec_model1)
281  poolvolsum = sum( pcvtile( pcvtilemass(:),itile ) / &
282  region%plagInput%dens(:) )
283 
284  pdvtile(dv_tile_poolvold,itile) = poolvolsum
285 
286  tinjccoeff = injcbeta * volmeanpart
287 
288  tinjcsum = 0.0_rfreal
289 
290  CALL plag_injcsetinjection( region, ptileplag, itile, &
291  tinjccoeff, tinjcsum, poolvolsum, &
292  injectq, plagvolratio )
293 
294 ! -- If injectQ set to True, PLAG datastructure for new injected particle -----
295 
296  DO WHILE ( injectq )
297  CALL plag_rflo_ejectparticle( region,pplag,ptileplag,itile,&
298  lbound,inoff,ijnoff,i,j,k, &
299  sxn,syn,szn,area,plagvolratio )
300 
301 ! --- Update tile diameter and superparticle loading factor -------------------
302 
303  CALL plag_injcmakeparticle( region, injcdiamdist, &
304  pdvtile(dv_tile_diam, itile), &
305  pdvtile(dv_tile_spload,itile) )
306 
307 ! --- Check if another particle could be injected -----------------------------
308 
309  CALL plag_injcsetinjection( region, ptileplag, itile, &
310  tinjccoeff, tinjcsum, poolvolsum, &
311  injectq, plagvolratio )
312 
313  END DO ! injectQ
314 
315 !------------------------------------------------------------------------------
316 ! Ejection Model based on Conservative Random Ejection (CRE)
317 !------------------------------------------------------------------------------
318 
319  CASE(plag_ejec_cre)
320 
321 ! ------------- poolVolSum is the pool volume after the current timestep is finished
322  poolvolsum = sum( pcvtile( pcvtilemass(:),itile ) / &
323  region%plagInput%dens(:) )
324 ! ------------- poolVolOldSum is the pool volume before the current timestep began
325  poolvololdsum = sum( pcvoldtile( pcvtilemass(:),itile ) / &
326  region%plagInput%dens(:) )
327 
328 ! ------------- poolVolume is built up incrementally with volume injection,
329 ! ------------- and is decremented when (super)particles are ejected
330  poolvolume = poolvololdsum
331 
332 ! ------------- poolVolFinal starts with all volume injection having occurred,
333 ! ------------- and is decremented when (super)particles are ejected
334  poolvolfinal = poolvolsum
335 
336 ! ------------- poolVolCurr starts with all volume injection having occurred,
337 ! ------------- and is decremented when (super)particles are ejected
338  poolvolcurr = poolvolsum
339 
340 ! ------------- remainingVolume is the volume to be added to the pool over the
341 ! ------------- current time step: it decreases to 0 as all volume is added
342  remainingvolume = poolvolsum -poolvololdsum
343 
344  creejectloop: DO
345  currentsuperparticlevolume = pi/6.0_rfreal *spload &
346  * pdvtile(dv_tile_diam,itile)**3.0_rfreal
347 
348  currentparticlevolume = pi/6.0_rfreal &
349  * pdvtile(dv_tile_diam,itile)**3.0_rfreal
350 
351 ! --------------- poolExcess is the volume that would remain in the pool after ejection
352 ! poolExcess = poolVolume -currentSuperParticleVolume
353 
354 ! TEMPORARY
355  poolexcess = poolvolcurr -currentsuperparticlevolume
356 ! END TEMPORARY
357 
358 ! --------------- possibleExcess is the volume that would remain in the pool at the end of
359 ! --------------- the timestep after the current particle is (and no others are) ejected
360  possibleexcess = poolexcess + remainingvolume
361 
362 ! --------------- pExcessS is an auxiliary variable that occurs in a few formulas
363  IF ( poolexcess > 0.0_rfreal ) THEN
364  pexcesss = poolexcess**2
365  ELSE
366  pexcesss = 0.0_rfreal
367  ENDIF
368 
369 ! --------------- countdown is the internal ejection clock for the current particle: it
370 ! --------------- starts to tick down when pool volume > current (super)particle volume
371  countdown = pdvtile(dv_tile_countdown,itile)
372 
373 ! --------------- countdownNext is what the clock could tick down to within remainingVolume
374  IF ( possibleexcess > 0.0_rfreal ) THEN
375  countdownnext = countdown + injcbetafacinv &
376  * (pexcesss -possibleexcess**2.0_rfreal)
377  ELSE
378  countdownnext = countdown
379  ENDIF
380 
381 !------------------------------------------------------------------------------
382 ! Pool volume too small to eject particle
383 !------------------------------------------------------------------------------
384 
385 ! --------------- if the clock cannot tick down to zero within remainingVolume, no more
386 ! --------------- particles will be ejected in this timestep
387 
388  IF ( countdownnext> 0.0_rfreal ) THEN
389  poolvolume = poolvolume + remainingvolume ! not needed except as check
390  pdvtile(dv_tile_countdown,itile) = countdownnext
391  EXIT creejectloop
392 
393 !------------------------------------------------------------------------------
394 ! Pool volume big enough to eject particle
395 !------------------------------------------------------------------------------
396 
397 ! --------------- if the clock can tick down below zero, then we need to find when it
398 ! --------------- reaches zero, and then eject the particle
399  ELSE
400 
401 ! ----------------- deltaVolume is the volume that must be added to the pool (out of
402 ! ----------------- remainingVolume) in order to bring countdown exactly to zero
403  deltavolume = sqrt(injcbetafac*countdown +pexcesss) -poolexcess
404 
405 ! ----------------- therefore deltaVolume is added to the pool, the countdown hits zero,
406 ! ----------------- and the particle is ejected
407  poolvolume = poolvolume +deltavolume -currentsuperparticlevolume
408 
409 ! ----------------- the deltaVolume added to the pool is taken from remainingVolume
410  remainingvolume = remainingvolume - deltavolume
411 
412 ! ----------------- plagVolRatio must be in terms of poolVolFinal: the pool cv variables
413 ! ----------------- are expressed in terms of values at the end of the time step, not
414 ! ----------------- in terms of the intermediate values like poolVolume
415 
416  plagvolratio = currentparticlevolume / poolvolfinal
417 
418 ! ----------------- poolVolFinal, like the cv variables, is affected by particle ejection
419  poolvolfinal = poolvolfinal - currentsuperparticlevolume
420 
421 ! ----------------- eject particle
422 
423  CALL plag_rflo_ejectparticle( region,pplag,ptileplag,itile, &
424  lbound,inoff,ijnoff,i,j,k, &
425  sxn,syn,szn,area,plagvolratio )
426 
427 ! ----------------- make new particle diameter and superparticle loading factor
428  CALL plag_injcmakeparticle( region, injcdiamdist, &
429  pdvtile(dv_tile_diam, itile), &
430  pdvtile(dv_tile_spload,itile) )
431 
432 ! TEMPORARY
433 ! ----------------- Compute current pool volume after being decreased
434 ! ----------------- in PLAG_EjectParticle
435  poolvolcurr = sum( pcvtile( pcvtilemass(:),itile ) / &
436  region%plagInput%dens(:) )
437 
438 ! END TEMPORARY
439 
440 ! ----------------- set countdown for new particle
441  randunif = rand1uniform(region%randData)
442  IF ( randunif <= 0.0_rfreal) THEN
443 ! ------------------- treats randUnif as 1.9e-22
444  pdvtile(dv_tile_countdown,itile) = 50.0_rfreal
445  ELSE
446  pdvtile(dv_tile_countdown,itile) = -log(randunif)
447  END IF ! randUnif
448 
449  END IF ! countdownNext
450  END DO creejectloop
451 
452 ! ------------- Temporary check: poolVolume and poolVolFinal should now agree
453 
454 ! print *, 'CRE check: iTile ', iTile,&
455 ! (poolVolume - poolVolFinal) / poolVolFinal
456 
457  END SELECT ! ejecModel
458 
459  END DO ! i
460  END DO ! j
461  END DO ! k
462 
463  ifileplag = 200+ireg
464 
465 ! WRITE(STDOUT,'(A,I4,I8)') ' iReg: nPcls = ',iReg, pPlag%nPcls
466 ! WRITE(iFilePlag,'(1PE12.5,10(2X,I8))') global%currentTime+global%dtMin,iReg, &
467 ! pPlag%nPcls,&
468 ! pPatch%tilePlag%nPclsInjc(1),pPatch%tilePlag%nPclsInjc(10), &
469 !! pPatch%tilePlag%nPclsInjc(20),pPatch%tilePlag%nPclsInjc(50), &
470 ! SUM(pTilePlag%nPclsInjc(:))
471 
472 ! -- Reset injected particle size ---------------------------------------------
473 
474  ppatch%tilePlag%nPclsInjc(:) = 0
475 
476  ENDIF ! bcType
477 
478  ENDDO ! iPatch
479 
480 ! finalize --------------------------------------------------------------------
481 
482  CALL deregisterfunction( global )
483 
484 CONTAINS
485 
486 !******************************************************************************
487 
488  SUBROUTINE plag_rflo_ejectparticle(region,pPlag,pTilePlag,iTile,lbound, &
489  inoff,ijnoff,i,j,k,sxn,syn,szn,area, &
490  plagvolratio)
491 
492 !... parameters
493  INTEGER, INTENT(IN) :: lbound,inoff,ijnoff,itile,i,j,k
494 
495  REAL(RFREAL), INTENT(IN) :: sxn,syn,szn,area,plagvolratio
496 
497  TYPE(t_region) :: region
498  TYPE(t_tile_plag), POINTER :: ptileplag
499  TYPE(t_plag), POINTER :: pplag
500 
501 !... local variables
502 
503  INTEGER :: burnstat,icont,itercelllocate,ncont
504  INTEGER, POINTER, DIMENSION(:) :: pcvplagmass, pcvtilemass
505  INTEGER, POINTER, DIMENSION(:,:) :: paiv, paivold
506 
507  REAL(RFREAL) :: cellheight
508  REAL(RFREAL), DIMENSION(3) :: poolxyz,snormal
509  REAL(RFREAL), POINTER, DIMENSION(:,:) :: parv, pcvplag, pcvtile, &
510  pcvoldtile, pdvtile
511 
512 !------------------------------------------------------------------------------
513 ! Get dimensions and set pointers
514 !------------------------------------------------------------------------------
515 
516  ncont = region%plagInput%nCont
517 
518  pcvplag => pplag%cv
519  pcvplagmass => pplag%cvPlagMass
520  paiv => pplag%aiv
521  paivold => pplag%aivOld
522  parv => pplag%arv
523 
524  pcvtile => ptileplag%cv
525  pcvtilemass => ptileplag%cvTileMass
526  pdvtile => ptileplag%dv
527 
528  pcvoldtile => ptileplag%cvOld
529 
530 !------------------------------------------------------------------------------
531 ! Initial burning status of particles
532 !------------------------------------------------------------------------------
533 
534 ! Currently all particles start off burning if the burning interaction is used
535 
536  IF (region%inrtInput%inrts(inrt_type_burning)%used) THEN
537  burnstat = inrt_burnstat_on
538  ELSE
539  burnstat = inrt_burnstat_off
540  ENDIF
541 
542 !------------------------------------------------------------------------------
543 ! Increment PLAG datastructure for new injected particle
544 !------------------------------------------------------------------------------
545 
546  pplag%nPcls = pplag%nPcls + 1
547  ipcls = pplag%nPcls
548 
549  ptileplag%nPclsInjc(itile) = ptileplag%nPclsInjc(itile) + 1
550 
551 !------------------------------------------------------------------------------
552 ! Keep track of global count in particle ejected in region
553 !------------------------------------------------------------------------------
554 
555  pplag%nextIdNumber = pplag%nextIdNumber + 1
556  nextidnumber = pplag%nextIdNumber
557 
558 !------------------------------------------------------------------------------
559 ! Compute PLAG cv datastructure for new injected particle
560 !------------------------------------------------------------------------------
561 
562  DO icont = 1, ncont
563  pcvplag(pcvplagmass(icont),ipcls) = pcvtile(pcvtilemass(icont),itile) * &
564  plagvolratio
565  END DO ! iCont
566 
567  pcvplag(cv_plag_ener,ipcls) = pcvtile(cv_tile_ener, itile) *plagvolratio
568 
569  plagmomenrm = pcvtile(cv_tile_momnrm,itile) *plagvolratio
570  pcvplag(cv_plag_xmom,ipcls) = plagmomenrm*sxn
571  pcvplag(cv_plag_ymom,ipcls) = plagmomenrm*syn
572  pcvplag(cv_plag_zmom,ipcls) = plagmomenrm*szn
573 
574  pcvplag(cv_plag_enervapor,ipcls) = 0._rfreal
575 
576 !------------------------------------------------------------------------------
577 ! Determine particle position
578 ! include a test to insure particle is in Tile Cell
579 !------------------------------------------------------------------------------
580 
581  snormal(xcoord) = sxn
582  snormal(ycoord) = syn
583  snormal(zcoord) = szn
584  cellheight = pvol(ijkc)/area
585 
586  itercelllocate = 1
587 
588 199 CONTINUE
589  CALL plag_injcsetpositions( lbound,inoff,ijnoff,i,j,k, &
590  snormal,cellheight,poolxyz )
591 
592  CALL plag_injctestcell( region,inoff,ijnoff,i,j,k, &
593  poolxyz,celllocate )
594 
595  IF ( celllocate .EQV. .false. ) THEN
596  itercelllocate = itercelllocate+1
597  IF ( itercelllocate > iter_cell_locate_max ) THEN
598  WRITE(*,*) ' PLAG_InjcEjectParticle: Unable to create a particle after ',&
599  iter_cell_locate_max, ' iterations'
600 
601  CALL errorstop( global,err_plag_cellindex,__line__ )
602  END IF ! iterCellLocate
603  goto 199
604  ENDIF ! cellLocate
605 
606  pcvplag(cv_plag_xpos,ipcls) = poolxyz(xcoord)
607  pcvplag(cv_plag_ypos,ipcls) = poolxyz(ycoord)
608  pcvplag(cv_plag_zpos,ipcls) = poolxyz(zcoord)
609 
610 !------------------------------------------------------------------------------
611 ! Set aiv and arv
612 !------------------------------------------------------------------------------
613 
614  paiv(aiv_plag_pidini,ipcls) = nextidnumber
615  paiv(aiv_plag_regini,ipcls) = ireg
616  paiv(aiv_plag_regcrt,ipcls) = ireg
617  paiv(aiv_plag_icells,ipcls) = ijkc
618  paiv(aiv_plag_indexi,ipcls) = i
619  paiv(aiv_plag_indexj,ipcls) = j
620  paiv(aiv_plag_indexk,ipcls) = k
621  paiv(aiv_plag_burnstat,ipcls) = burnstat
622  paiv(aiv_plag_status,ipcls) = plag_status_keep
623 
624  parv(arv_plag_spload,ipcls) = pdvtile(dv_tile_spload,itile)
625 
626 !------------------------------------------------------------------------------
627 ! Load at injection aivOld array
628 !------------------------------------------------------------------------------
629 
630  paivold(:,ipcls) = paiv(:,ipcls)
631 
632 !------------------------------------------------------------------------------
633 ! Set time of particle injection
634 ! timeinjectPart = global%currentTime+tInjcSum*global%dtMin
635 !------------------------------------------------------------------------------
636 
637 !------------------------------------------------------------------------------
638 ! Decrease pool variables
639 !------------------------------------------------------------------------------
640 
641  DO icont = 1, ncont
642  pcvtile( pcvtilemass(icont),itile) = pcvtile(pcvtilemass(icont),itile) - &
643  pdvtile(dv_tile_spload, itile) * &
644  pcvplag(pcvplagmass(icont),ipcls)
645  END DO ! iCont
646 
647  pcvtile(cv_tile_momnrm,itile) = pcvtile(cv_tile_momnrm,itile) - &
648  pdvtile(dv_tile_spload,itile) * &
649  plagmomenrm
650 
651  pcvtile(cv_tile_ener ,itile) = pcvtile(cv_tile_ener ,itile) - &
652  pdvtile(dv_tile_spload,itile) * &
653  pcvplag(cv_plag_ener,ipcls)
654 
655 
656  END SUBROUTINE plag_rflo_ejectparticle
657 !******************************************************************************
658 
659 !******************************************************************************
660  SUBROUTINE plag_injcsetpositions( lbound,iNOff, ijNOff,i,j,k, &
661  snormal,cellheight,posplag )
662 
663 !... parameters
664  INTEGER, INTENT(IN) :: lbound,inoff,ijnoff,i,j,k
665 
666  REAL(RFREAL), INTENT(IN) :: cellheight
667  REAL(RFREAL), DIMENSION(3), INTENT(IN) :: snormal
668  REAL(RFREAL), DIMENSION(3), INTENT(OUT) :: posplag
669 
670 !... local variables
671  INTEGER, DIMENSION(4) :: corner
672 
673  LOGICAL :: usetriangle1
674 
675  REAL(RFREAL), PARAMETER :: height_fraction = 1.0e-3_rfreal
676  REAL(RFREAL) :: areatriangle1, areatriangle2, xrand, yrand, zrand
677 
678  REAL(RFREAL), DIMENSION(ZCOORD) :: facecentroid,v1,v2
679  REAL(RFREAL), DIMENSION(ZCOORD,4) :: pnode
680 
681 !******************************************************************************
682 
683 ! Select the coordinates of the four points on the injecting face -------------
684 ! Use unshifted indices to get correct extents
685 ! Note: pNode(1) = pNode00, pNode(2) = pNode10
686 ! pNode(3) = pNode01, pNode(4) = pNode11
687 
688  SELECT CASE (lbound)
689  CASE(1,2)
690  corner(1) = indijk(i+inode ,j+jnode ,k+knode ,inoff,ijnoff)
691  corner(2) = indijk(i+inode ,j+jnode+1,k+knode ,inoff,ijnoff)
692  corner(3) = indijk(i+inode ,j+jnode ,k+knode+1,inoff,ijnoff)
693  corner(4) = indijk(i+inode ,j+jnode+1,k+knode+1,inoff,ijnoff)
694 
695  pnode(xcoord:zcoord,1) = pxyz(xcoord:zcoord,corner(1))
696  pnode(xcoord:zcoord,2) = pxyz(xcoord:zcoord,corner(2))
697  pnode(xcoord:zcoord,3) = pxyz(xcoord:zcoord,corner(3))
698  pnode(xcoord:zcoord,4) = pxyz(xcoord:zcoord,corner(4))
699 
700  facecentroid(xcoord:zcoord) = (/pfc(xcoord,icoord,corner(1)), &
701  pfc(ycoord,icoord,corner(1)), &
702  pfc(zcoord,icoord,corner(1))/)
703 
704  CASE(3,4)
705  corner(1) = indijk(i+inode ,j+jnode ,k+knode ,inoff,ijnoff)
706  corner(2) = indijk(i+inode+1,j+jnode ,k+knode ,inoff,ijnoff)
707  corner(3) = indijk(i+inode ,j+jnode ,k+knode+1,inoff,ijnoff)
708  corner(4) = indijk(i+inode+1,j+jnode ,k+knode+1,inoff,ijnoff)
709 
710  pnode(xcoord:zcoord,1) = pxyz(xcoord:zcoord,corner(1))
711  pnode(xcoord:zcoord,2) = pxyz(xcoord:zcoord,corner(2))
712  pnode(xcoord:zcoord,3) = pxyz(xcoord:zcoord,corner(3))
713  pnode(xcoord:zcoord,4) = pxyz(xcoord:zcoord,corner(4))
714 
715  facecentroid(xcoord:zcoord) = (/pfc(xcoord,jcoord,corner(1)), &
716  pfc(ycoord,jcoord,corner(1)), &
717  pfc(zcoord,jcoord,corner(1))/)
718 
719  CASE(5,6)
720  corner(1) = indijk(i+inode ,j+jnode ,k+knode ,inoff,ijnoff)
721  corner(2) = indijk(i+inode+1,j+jnode ,k+knode ,inoff,ijnoff)
722  corner(3) = indijk(i+inode ,j+jnode+1,k+knode ,inoff,ijnoff)
723  corner(4) = indijk(i+inode+1,j+jnode+1,k+knode ,inoff,ijnoff)
724 
725  pnode(xcoord:zcoord,1) = pxyz(xcoord:zcoord,corner(1))
726  pnode(xcoord:zcoord,2) = pxyz(xcoord:zcoord,corner(2))
727  pnode(xcoord:zcoord,3) = pxyz(xcoord:zcoord,corner(3))
728  pnode(xcoord:zcoord,4) = pxyz(xcoord:zcoord,corner(4))
729 
730  facecentroid(xcoord:zcoord) = (/pfc(xcoord,kcoord,corner(1)), &
731  pfc(ycoord,kcoord,corner(1)), &
732  pfc(zcoord,kcoord,corner(1))/)
733 
734 
735  END SELECT ! lbound
736 
737 ! Partition the face into two triangles and compute the areas -----------------
738 ! of their projections normal to sNormal -------------------------------------
739 
740  v1(1:3) = pnode(xcoord:zcoord,2)-pnode(xcoord:zcoord,1)
741  v2(1:3) = pnode(xcoord:zcoord,3)-pnode(xcoord:zcoord,1)
742 
743  areatriangle1 = 0.5_rfreal*abs( snormal(xcoord)*(v1(2)*v2(3)-v1(3)*v2(2)) &
744  + snormal(ycoord)*(v1(3)*v2(1)-v1(1)*v2(3)) &
745  + snormal(zcoord)*(v1(1)*v2(2)-v1(2)*v2(1)) )
746 
747  v1(xcoord:zcoord) = pnode(xcoord:zcoord,2)-pnode(xcoord:zcoord,4)
748  v2(xcoord:zcoord) = pnode(xcoord:zcoord,3)-pnode(xcoord:zcoord,4)
749 
750  areatriangle2 = 0.5_rfreal*abs( snormal(xcoord)*(v1(2)*v2(3)-v1(3)*v2(2)) &
751  + snormal(ycoord)*(v1(3)*v2(1)-v1(1)*v2(3)) &
752  + snormal(zcoord)*(v1(1)*v2(2)-v1(2)*v2(1)) )
753 
754 ! Select which triangle to select a point in ----------------------------------
755 
756  xrand = rand1uniform(region%randData)
757  usetriangle1 = ( (areatriangle1+areatriangle2)*xrand < areatriangle1 )
758 
759 ! Select a random point within the appropriate triangle -----------------------
760 
761  xrand = rand1uniform(region%randData)
762  yrand = rand1uniform(region%randData)
763 
764 ! - reflect back into triangle ------------------------------------------------
765 
766  IF( xrand+yrand > 1.0_rfreal ) THEN
767  xrand = 1.0_rfreal-xrand
768  yrand = 1.0_rfreal-yrand
769  ENDIF ! xRand
770 
771  zrand = 1.0_rfreal -(xrand+yrand)
772 
773  IF ( usetriangle1 ) THEN
774  posplag(xcoord:zcoord) = xrand*pnode(xcoord:zcoord,1) &
775  + yrand*pnode(xcoord:zcoord,2) &
776  + zrand*pnode(xcoord:zcoord,3)
777  ELSE
778  posplag(xcoord:zcoord) = xrand*pnode(xcoord:zcoord,4) &
779  + yrand*pnode(xcoord:zcoord,2) &
780  + zrand*pnode(xcoord:zcoord,3)
781  ENDIF ! useTriangle1
782 
783 ! Adjust posPlag to be on tile surface ----------------------------------------
784 
785  posplag(xcoord:zcoord) = posplag(xcoord:zcoord) &
786  - dot_product( posplag(xcoord:zcoord)- &
787  facecentroid(xcoord:zcoord), &
788  snormal(xcoord:zcoord)) &
789  * snormal(xcoord:zcoord)
790 
791 ! Add tiny offset to put posPlag inside cell
792 
793  posplag(xcoord:zcoord) = posplag(xcoord:zcoord) &
794  + height_fraction*cellheight*snormal(xcoord:zcoord)
795 
796  END SUBROUTINE plag_injcsetpositions
797 !******************************************************************************
798 
799  SUBROUTINE plag_injctestcell( region,iNOff,ijNOff,i,j,k,posPlag,cellLocate )
800 
801 !... parameters
802  TYPE(t_region) :: region
803 
804  INTEGER, INTENT(IN) :: inoff,ijnoff,i,j,k
805 
806  LOGICAL, INTENT(OUT) :: celllocate
807 
808  REAL(RFREAL), DIMENSION(3), INTENT(IN) :: posplag
809 
810 ! ... loop variables
811  INTEGER :: mbound
812 
813 !... local variables
814  INTEGER :: ijknr,ijknri,ijknrj,ijknrk,nbound
815  INTEGER, DIMENSION(6) :: incellflag
816 
817  REAL(RFREAL) :: dpface, rsgn
818  REAL(RFREAL), DIMENSION(3) :: diffpos, facecentroid, psface
819  REAL(RFREAL), POINTER, DIMENSION(:,:) :: psnormal
820 
821 !******************************************************************************
822 
823 ! Get dimensions --------------------------------------------------------------
824 
825  nbound = 6
826  incellflag(:) = 0
827  celllocate = .false.
828 
829  ijknr = indijk(i ,j ,k ,inoff,ijnoff)
830  ijknri = indijk(i+1,j ,k ,inoff,ijnoff)
831  ijknrj = indijk(i ,j+1,k ,inoff,ijnoff)
832  ijknrk = indijk(i ,j ,k+1,inoff,ijnoff)
833 
834 ! Loop over all cell faces ----------------------------------------------------
835 
836  DO mbound = 1, nbound
837 
838  incellflag(mbound) = 0
839 
840  SELECT CASE (mbound)
841 
842 ! - i-face check --------------------------------------------------------------
843 
844  CASE(1)
845  psnormal => region%levels(ilev)%plag%si
846 
847  rsgn = -1._rfreal
848  psface(1:3) = (/rsgn*psnormal(xcoord,ijknr), &
849  rsgn*psnormal(ycoord,ijknr), &
850  rsgn*psnormal(zcoord,ijknr)/)
851  facecentroid(1:3) = (/pfc(xcoord,icoord,ijknr), &
852  pfc(ycoord,icoord,ijknr), &
853  pfc(zcoord,icoord,ijknr)/)
854  CASE(2)
855  psnormal => region%levels(ilev)%plag%si
856 
857  rsgn = +1._rfreal
858  psface(1:3) = (/rsgn*psnormal(xcoord,ijknri), &
859  rsgn*psnormal(ycoord,ijknri), &
860  rsgn*psnormal(zcoord,ijknri)/)
861  facecentroid(1:3) = (/pfc(xcoord,icoord,ijknri), &
862  pfc(ycoord,icoord,ijknri), &
863  pfc(zcoord,icoord,ijknri)/)
864 
865 ! - j-face check --------------------------------------------------------------
866 
867  CASE(3)
868  psnormal => region%levels(ilev)%plag%sj
869 
870  rsgn = -1._rfreal
871  psface(1:3) = (/rsgn*psnormal(xcoord,ijknr), &
872  rsgn*psnormal(ycoord,ijknr), &
873  rsgn*psnormal(zcoord,ijknr)/)
874  facecentroid(1:3) = (/pfc(xcoord,jcoord,ijknr), &
875  pfc(ycoord,jcoord,ijknr), &
876  pfc(zcoord,jcoord,ijknr)/)
877 
878  CASE(4)
879  psnormal => region%levels(ilev)%plag%sj
880 
881  rsgn = +1._rfreal
882  psface(1:3) = (/rsgn*psnormal(xcoord,ijknrj), &
883  rsgn*psnormal(ycoord,ijknrj), &
884  rsgn*psnormal(zcoord,ijknrj)/)
885  facecentroid(1:3) = (/pfc(xcoord,jcoord,ijknrj), &
886  pfc(ycoord,jcoord,ijknrj), &
887  pfc(zcoord,jcoord,ijknrj)/)
888 
889 ! - k-face check -------------------------------------------------------------
890 
891  CASE(5)
892  psnormal => region%levels(ilev)%plag%sk
893 
894  rsgn = -1._rfreal
895  psface(1:3) = (/rsgn*psnormal(xcoord,ijknr), &
896  rsgn*psnormal(ycoord,ijknr), &
897  rsgn*psnormal(zcoord,ijknr)/)
898  facecentroid(1:3) = (/pfc(xcoord,kcoord,ijknr), &
899  pfc(ycoord,kcoord,ijknr), &
900  pfc(zcoord,kcoord,ijknr)/)
901 
902  CASE(6)
903  psnormal => region%levels(ilev)%plag%sk
904 
905  rsgn = +1._rfreal
906  psface(1:3) = (/rsgn*psnormal(xcoord,ijknrk), &
907  rsgn*psnormal(ycoord,ijknrk), &
908  rsgn*psnormal(zcoord,ijknrk)/)
909  facecentroid(1:3) = (/pfc(xcoord,kcoord,ijknrk), &
910  pfc(ycoord,kcoord,ijknrk), &
911  pfc(zcoord,kcoord,ijknrk)/)
912 
913  END SELECT ! mbound
914 
915 ! - Compute position vector difference ----------------------------------------
916 ! and perform dot product with face vectors ---------------------------------
917 ! need to check (r_p - r_fc). n_fc > 0 --------------------------------------
918 
919  diffpos(1:3) = posplag(1:3)-facecentroid(1:3)
920  dpface = dot_product( psface,diffpos )
921 
922  IF ( dpface >= 0.0_rfreal ) incellflag(mbound) = 1
923 
924  ENDDO ! mbound
925 
926 ! Perform test for incell location --------------------------------------------
927 
928  IF ( sum( incellflag(1:6) ) == 6 ) celllocate = .true.
929 
930  END SUBROUTINE plag_injctestcell
931 !******************************************************************************
932 
933 
934 END SUBROUTINE plag_injcejectparticle
935 
936 !******************************************************************************
937 !
938 ! RCS Revision history:
939 !
940 ! $Log: PLAG_InjcEjectParticle.F90,v $
941 ! Revision 1.8 2008/12/06 08:44:33 mtcampbe
942 ! Updated license.
943 !
944 ! Revision 1.7 2008/11/19 22:17:46 mtcampbe
945 ! Added Illinois Open Source License/Copyright
946 !
947 ! Revision 1.6 2007/03/06 23:13:13 fnajjar
948 ! Renamed nPclsTot to nPclsMax
949 !
950 ! Revision 1.5 2006/04/07 15:19:23 haselbac
951 ! Removed tabs
952 !
953 ! Revision 1.4 2005/02/03 23:24:04 fnajjar
954 ! Added error trap if nPcls exceeds nPclsTot
955 !
956 ! Revision 1.3 2005/01/21 14:39:06 fnajjar
957 ! Bug fix to invoke region instead of pRegion
958 !
959 ! Revision 1.2 2005/01/20 15:36:19 fnajjar
960 ! Bug fix to properly bypass negative pool volume
961 !
962 ! Revision 1.1 2004/12/01 20:57:40 fnajjar
963 ! Initial revision after changing case
964 !
965 ! Revision 1.18 2004/07/23 22:43:17 jferry
966 ! Integrated rocspecies into rocinteract
967 !
968 ! Revision 1.17 2004/06/30 15:43:57 fnajjar
969 ! Included kernel for CRE model
970 !
971 ! Revision 1.16 2004/06/16 23:06:33 fnajjar
972 ! Renamed variabled for CRE kernel
973 !
974 ! Revision 1.15 2004/04/09 23:12:11 fnajjar
975 ! Added status to injected particle datastructure
976 !
977 ! Revision 1.14 2004/03/25 21:16:06 jferry
978 ! made initial BurnStatus depend on whether burning interaction is used
979 !
980 ! Revision 1.13 2004/03/02 21:47:30 jferry
981 ! Added After Update interactions
982 !
983 ! Revision 1.12 2003/11/21 22:35:51 fnajjar
984 ! Update Random Number Generator
985 !
986 ! Revision 1.11 2003/11/03 21:21:51 fnajjar
987 ! Changed definition of face vectors pointing to PLAG datastructure
988 !
989 ! Revision 1.10 2003/05/15 02:57:05 jblazek
990 ! Inlined index function.
991 !
992 ! Revision 1.9 2003/05/06 23:43:58 fnajjar
993 ! Commented off I/O and moved it to PLAG_appendDataFromBuffers
994 !
995 ! Revision 1.8 2003/04/18 23:13:34 fnajjar
996 ! Bug fix for incorrect definition of normal vector to pSFace
997 !
998 ! Revision 1.7 2003/04/18 19:23:18 fnajjar
999 ! Redefined dpFace to be a true dot product using FORTRAN90 intrinisic
1000 !
1001 ! Revision 1.6 2003/04/16 22:56:38 fnajjar
1002 ! Included improved positioning kernel for complex geometry
1003 !
1004 ! Revision 1.3 2003/02/04 19:06:46 f-najjar
1005 ! Commented write statement for out-of-range tiles
1006 !
1007 ! Revision 1.2 2003/01/10 19:22:26 f-najjar
1008 ! Included iReg in calling sequence
1009 !
1010 ! Revision 1.1 2002/10/25 14:16:31 f-najjar
1011 ! Initial Import of Rocpart
1012 !
1013 !******************************************************************************
1014 
1015 
1016 
1017 
1018 
1019 
1020 
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ibeg
Tfloat sum() const
Return the sum of all the pixel values in an image.
Definition: CImg.h:13022
subroutine rflo_getpatchdirection(patch, idir, jdir, kdir)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE inode
subroutine plag_injcejectparticle(region, iReg)
j indices k indices k
Definition: Indexing.h:6
subroutine plag_injcsetinjection(region, pTilePlag, iTile, tCoeff, tSum, poolVol, injectQ, ratio)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
subroutine plag_injcmakeparticle(region, injcDiamDist, diam, spLoad)
REAL(RFREAL) function rand1uniform(rdata)
Definition: ModRandom.F90:345
double sqrt(double d)
Definition: double.h:73
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
static const double pi
Definition: smooth_medial.C:43
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdir
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
subroutine plag_injcsetpositions(lbound, iNOff, ijNOff, i, j, k, sNormal, cellHeight, posPlag)
blockLoc i
Definition: read.cpp:79
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idir
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
j indices j
Definition: Indexing.h:6
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kdir
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jbeg
long double dot_product(pnt vec1, pnt vec2)
subroutine plag_injctestcell(region, iNOff, ijNOff, i, j, k, posPlag, cellLocate)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode kbeg
subroutine deregisterfunction(global)
Definition: ModError.F90:469
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jnode
subroutine plag_rflo_ejectparticle(region, pPlag, pTilePlag, iTile, lbound, iNOff, ijNOff, i, j, k, sxn, syn, szn, area, plagVolRatio)