43 method%name => method%cell%type
44 method%delegates = .true.
46 method%subcell => subcell
55 deallocate (this%name)
58 call this%method_subcell_plck%deallocate()
59 deallocate (this%method_subcell_plck)
63 subroutine load_mcpq(this, particle, next_level, submethod)
66 integer,
intent(in) :: next_level
67 class(
methodtype),
pointer,
intent(inout) :: submethod
69 select type (subcell => this%subcell)
71 call this%load_subcell(particle, subcell)
73 call this%method_subcell_plck%init( &
76 subcell=this%subcell, &
78 tracktimes=this%tracktimes)
79 submethod => this%method_subcell_plck
88 integer(I4B) :: isc, exitFace, npolyverts, inface, infaceoff
90 select type (cell => this%cell)
94 npolyverts = cell%defn%npolyverts
97 select case (exitface)
187 inface = npolyverts + 2
190 inface = npolyverts + 3
193 if (inface .eq. -1)
then
195 else if (inface .eq. 0)
then
198 if ((inface .ge. 1) .and. (inface .le. 4))
then
200 inface = inface + cell%irvOrigin - 1
201 if (inface .gt. 4) inface = inface - 4
202 inface = cell%irectvert(inface) + infaceoff
203 if (inface .lt. 1) inface = inface + npolyverts
215 real(DP),
intent(in) :: tmax
217 double precision :: xOrigin, yOrigin, zOrigin, sinrot, cosrot
219 select type (cell => this%cell)
221 call this%assess(particle, this%cell%defn, tmax)
222 if (.not. particle%advancing)
return
227 xorigin = cell%xOrigin
228 yorigin = cell%yOrigin
229 zorigin = cell%zOrigin
232 call particle%transform(xorigin, yorigin, zorigin, &
234 call this%track(particle, 2, tmax)
235 call particle%transform(xorigin, yorigin, zorigin, &
236 sinrot, cosrot, invert=.true.)
237 call particle%reset_transform()
248 real(DP) :: dx, dy, dz, areax, areay, areaz
249 real(DP) :: dxprel, dyprel
250 integer(I4B) :: isc, npolyverts, m1, m2
251 real(DP) :: qextl1, qextl2, qintl1, qintl2
252 real(DP) :: factor, term
254 select type (cell => this%cell)
256 factor =
done / cell%defn%retfactor
257 factor = factor / cell%defn%porosity
258 npolyverts = cell%defn%npolyverts
268 dxprel = particle%x / dx
269 dyprel = particle%y / dy
271 if (dyprel .ge. 5d-1)
then
272 if (dxprel .le. 5d-1)
then
278 if (dxprel .le. 5d-1)
then
285 subcell%isubcell = isc
290 dz = cell%defn%top - &
295 qintl1 = cell%qintl(isc)
297 qintl2 = cell%qintl(isc + 1)
298 qextl1 = cell%qextl1(isc)
299 qextl2 = cell%qextl2(isc)
304 subcell%sinrot =
dzero
305 subcell%cosrot =
done
306 subcell%zOrigin =
dzero
311 term = factor / areax
312 subcell%vx1 = qintl1 * term
313 subcell%vx2 = -qextl2 * term
314 term = factor / areay
315 subcell%vy1 = -qintl2 * term
316 subcell%vy2 = -qextl1 * term
319 subcell%yOrigin =
dzero
320 term = factor / areax
321 subcell%vx1 = -qintl2 * term
322 subcell%vx2 = -qextl1 * term
323 term = factor / areay
324 subcell%vy1 = qextl2 * term
325 subcell%vy2 = -qintl1 * term
327 subcell%xOrigin =
dzero
328 subcell%yOrigin =
dzero
329 term = factor / areax
330 subcell%vx1 = qextl2 * term
331 subcell%vx2 = -qintl1 * term
332 term = factor / areay
333 subcell%vy1 = qextl1 * term
334 subcell%vy2 = qintl2 * term
336 subcell%xOrigin =
dzero
338 term = factor / areax
339 subcell%vx1 = qextl1 * term
340 subcell%vx2 = qintl2 * term
341 term = factor / areay
342 subcell%vy1 = qintl1 * term
343 subcell%vy2 = -qextl2 * term
347 term = factor / areaz
348 subcell%vz1 = 2.5d-1 * cell%defn%faceflow(m1) * term
349 subcell%vz2 = -2.5d-1 * cell%defn%faceflow(m2) * term
subroutine, public create_cell_rect_quad(cell)
Create a new rectangular-quad cell.
This module contains simulation constants.
real(dp), parameter dzero
real constant zero
real(dp), parameter done
real constant 1
subroutine pstop(status, message)
Stop the program, optionally specifying an error status code.
This module defines variable data types.
procedure subroutine, public create_method_cell_quad(method)
Create a new Pollock quad-refined cell method.
subroutine load_mcpq(this, particle, next_level, submethod)
Load subcell into tracking method.
subroutine pass_mcpq(this, particle)
Pass particle to next subcell if there is one, or to the cell face.
subroutine load_subcell(this, particle, subcell)
Load the rectangular subcell from the rectangular cell.
subroutine apply_mcpq(this, particle, tmax)
Solve the quad-rectangular cell via Pollock's method.
Particle tracking strategies.
@, public level_subfeature
subroutine, public create_method_subcell_pollock(method)
Create a new Pollock's subcell method.
subroutine, public create_subcell_rect(subcell)
Create a new rectangular subcell.
Base grid cell definition.
Base type for particle tracking methods.
Rectangular subcell tracking method.
Particle tracked by the PRT model.