64 TYPE(t_region
) :: region
67 INTEGER :: ipatch, itile
70 CHARACTER(CHRLEN) :: rcsidentstring
72 INTEGER :: bctype, npatches, ntiles
74 INTEGER :: ilev, n1, n2
76 INTEGER :: injcdiamdist
78 INTEGER :: ejecmodel,icont,ncont
80 REAL(RFREAL) :: randunif
81 REAL(RFREAL) :: poolvolumeinit, ratiophidensinv
82 REAL(RFREAL),
POINTER,
DIMENSION(:) :: injcmassfluxratio, densplag
84 TYPE(t_patch),
POINTER :: ppatch
90 rcsidentstring =
'$RCSfile: PLAG_InjcTileInitialize.F90,v $ $Revision: 1.4 $'
92 global => region%global
95 'PLAG_InjcTileInitialize.F90' )
97 IF ( global%myProcid == masterproc .AND. &
98 global%verbLevel > verbose_none )
THEN
99 WRITE(stdout,
'(A,3X,A)') solver_name,
'Initializing tile memory for PLAG...'
105 ilev = region%currLevel
106 npatches = region%nPatches
109 npatches = region%grid%nPatches
112 ncont = region%plagInput%nCont
113 injcdiamdist = region%plagInput%injcDiamDist
114 ejecmodel = region%plagInput%ejecModel
116 injcmassfluxratio => region%plagInput%injcMassFluxRatio
117 densplag => region%plagInput%dens
124 ppatch => region%levels(ilev)%patches(ipatch)
127 ppatch => region%patches(ipatch)
130 bctype = ppatch%bcType
134 IF (bctype>=bc_injection .AND. bctype<=bc_injection+bc_range)
THEN
139 n1 = abs(ppatch%l1end -ppatch%l1beg ) + 1
140 n2 = abs(ppatch%l2end -ppatch%l2beg ) + 1
144 ntiles = ppatch%nBFaces
147 ptileplag => ppatch%tilePlag
152 ptileplag%nPclsInjc(:ntiles) = 0
154 ptileplag%cv(:ncv,:ntiles) = 0.0_rfreal
155 ptileplag%dv(:ndv,:ntiles) = 0.0_rfreal
157 ptileplag%rhs(:ncv,:ntiles) = 0.0_rfreal
159 ptileplag%cvOld(:ncv,:ntiles) = 0.0_rfreal
160 ptileplag%rhsSum(:ncv,:ntiles) = 0.0_rfreal
167 ptileplag%dv(dv_tile_diam,itile), &
168 ptileplag%dv(dv_tile_spload,itile) )
175 IF ( randunif <= 0.0_rfreal)
THEN
176 ptileplag%dv(dv_tile_countdown,itile) = 50.0_rfreal
178 ptileplag%dv(dv_tile_countdown,itile) = -log(randunif)
183 IF ( ejecmodel == plag_ejec_cre )
THEN
184 poolvolumeinit = 0.0_rfreal
185 ratiophidensinv = poolvolumeinit &
186 *1.0_rfreal/
sum(injcmassfluxratio(:)/densplag(:))
189 ptileplag%cv(ptileplag%cvTileMass(icont),itile) = poolvolumeinit &
190 * injcmassfluxratio(icont)
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine rflo_getpatchdirection(patch, idir, jdir, kdir)
subroutine registerfunction(global, funName, fileName)
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
subroutine plag_injcmakeparticle(region, injcDiamDist, diam, spLoad)
REAL(RFREAL) function rand1uniform(rdata)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
subroutine plag_injctileinitialize(region)
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
subroutine deregisterfunction(global)