40 method%type => method%cell%type
41 method%delegates = .true.
43 method%subcell => subcell
49 deallocate (this%type)
53 subroutine load_mcpq(this, particle, next_level, submethod)
56 integer,
intent(in) :: next_level
57 class(
methodtype),
pointer,
intent(inout) :: submethod
59 select type (subcell => this%subcell)
61 call this%load_subcell(particle, subcell)
66 subcell=this%subcell, &
67 trackctl=this%trackctl, &
68 tracktimes=this%tracktimes)
78 integer(I4B) :: isc, exitFace, npolyverts, inface, infaceoff
80 select type (cell => this%cell)
82 exitface = particle%iboundary(3)
83 isc = particle%idomain(3)
84 npolyverts = cell%defn%npolyverts
87 select case (exitface)
95 particle%idomain(3) = 4
96 particle%iboundary(3) = 2
100 particle%idomain(3) = 3
101 particle%iboundary(3) = 2
124 particle%idomain(3) = 2
125 particle%iboundary(3) = 1
129 particle%idomain(3) = 1
130 particle%iboundary(3) = 1
137 particle%idomain(3) = 2
138 particle%iboundary(3) = 4
150 particle%idomain(3) = 3
151 particle%iboundary(3) = 4
162 particle%idomain(3) = 1
163 particle%iboundary(3) = 3
167 particle%idomain(3) = 4
168 particle%iboundary(3) = 3
177 inface = npolyverts + 2
180 inface = npolyverts + 3
183 if (inface .eq. -1)
then
184 particle%iboundary(2) = 0
185 else if (inface .eq. 0)
then
186 particle%iboundary(2) = 0
188 if ((inface .ge. 1) .and. (inface .le. 4))
then
190 inface = inface + cell%irvOrigin - 1
191 if (inface .gt. 4) inface = inface - 4
192 inface = cell%irectvert(inface) + infaceoff
193 if (inface .lt. 1) inface = inface + npolyverts
195 particle%iboundary(2) = inface
205 real(DP),
intent(in) :: tmax
207 double precision :: xOrigin, yOrigin, zOrigin, sinrot, cosrot
209 select type (cell => this%cell)
212 call this%update(particle, cell%defn)
213 if (.not. particle%advancing)
return
217 if (particle%z > cell%defn%top)
then
218 particle%z = cell%defn%top
219 call this%save(particle, reason=1)
224 xorigin = cell%xOrigin
225 yorigin = cell%yOrigin
226 zorigin = cell%zOrigin
229 call particle%transform(xorigin, yorigin, zorigin, &
233 call this%track(particle, 2, tmax)
237 call particle%transform(xorigin, yorigin, zorigin, &
238 sinrot, cosrot, invert=.true.)
239 call particle%transform(reset=.true.)
250 real(DP) :: dx, dy, dz, areax, areay, areaz
251 real(DP) :: dxprel, dyprel
252 integer(I4B) :: isc, npolyverts, m1, m2
253 real(DP) :: qextl1, qextl2, qintl1, qintl2
254 real(DP) :: factor, term
256 select type (cell => this%cell)
258 factor =
done / cell%defn%retfactor
259 factor = factor / cell%defn%porosity
260 npolyverts = cell%defn%npolyverts
262 isc = particle%idomain(3)
270 dxprel = particle%x / dx
271 dyprel = particle%y / dy
273 if (dyprel .ge. 5d-1)
then
274 if (dxprel .le. 5d-1)
then
280 if (dxprel .le. 5d-1)
then
287 subcell%isubcell = isc
288 particle%idomain(3) = isc
292 dz = cell%defn%top - &
297 qintl1 = cell%qintl(isc)
299 qintl2 = cell%qintl(isc + 1)
300 qextl1 = cell%qextl1(isc)
301 qextl2 = cell%qextl2(isc)
306 subcell%sinrot =
dzero
307 subcell%cosrot =
done
308 subcell%zOrigin =
dzero
313 term = factor / areax
314 subcell%vx1 = qintl1 * term
315 subcell%vx2 = -qextl2 * term
316 term = factor / areay
317 subcell%vy1 = -qintl2 * term
318 subcell%vy2 = -qextl1 * term
321 subcell%yOrigin =
dzero
322 term = factor / areax
323 subcell%vx1 = -qintl2 * term
324 subcell%vx2 = -qextl1 * term
325 term = factor / areay
326 subcell%vy1 = qextl2 * term
327 subcell%vy2 = -qintl1 * term
329 subcell%xOrigin =
dzero
330 subcell%yOrigin =
dzero
331 term = factor / areax
332 subcell%vx1 = qextl2 * term
333 subcell%vx2 = -qintl1 * term
334 term = factor / areay
335 subcell%vy1 = qextl1 * term
336 subcell%vy2 = qintl2 * term
338 subcell%xOrigin =
dzero
340 term = factor / areax
341 subcell%vx1 = qextl1 * term
342 subcell%vx2 = qintl2 * term
343 term = factor / areay
344 subcell%vy1 = qintl1 * term
345 subcell%vy2 = -qextl2 * term
349 term = factor / areaz
350 subcell%vz1 = 2.5d-1 * cell%defn%faceflow(m1) * term
351 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.
Subcell-level tracking methods.
type(methodsubcellpollocktype), pointer, public method_subcell_plck
subroutine, public create_subcell_rect(subcell)
Create a new rectangular subcell.
Base grid cell definition.
Base type for particle tracking methods.
Particle tracked by the PRT model.