41 method%type => method%cell%type
42 method%delegates = .true.
44 method%subcell => subcell
50 deallocate (this%type)
54 subroutine load_mcpq(this, particle, next_level, submethod)
57 integer,
intent(in) :: next_level
58 class(
methodtype),
pointer,
intent(inout) :: submethod
60 select type (subcell => this%subcell)
62 call this%load_subcell(particle, subcell)
66 subcell=this%subcell, &
67 trackfilectl=this%trackfilectl, &
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
219 if (particle%z > cell%defn%top)
then
220 particle%z = cell%defn%top
221 call this%save(particle, reason=1)
228 xorigin = cell%xOrigin
229 yorigin = cell%yOrigin
230 zorigin = cell%zOrigin
233 call particle%transform(xorigin, yorigin, zorigin, &
235 call this%track(particle, 2, tmax)
236 call particle%transform(xorigin, yorigin, zorigin, &
237 sinrot, cosrot, invert=.true.)
238 call particle%transform(reset=.true.)
249 real(DP) :: dx, dy, dz, areax, areay, areaz
250 real(DP) :: dxprel, dyprel
251 integer(I4B) :: isc, npolyverts, m1, m2
252 real(DP) :: qextl1, qextl2, qintl1, qintl2
253 real(DP) :: factor, term
255 select type (cell => this%cell)
257 factor =
done / cell%defn%retfactor
258 factor = factor / cell%defn%porosity
259 npolyverts = cell%defn%npolyverts
261 isc = particle%idomain(3)
269 dxprel = particle%x / dx
270 dyprel = particle%y / dy
272 if (dyprel .ge. 5d-1)
then
273 if (dxprel .le. 5d-1)
then
279 if (dxprel .le. 5d-1)
then
286 subcell%isubcell = isc
287 particle%idomain(3) = isc
291 dz = cell%defn%top - &
296 qintl1 = cell%qintl(isc)
298 qintl2 = cell%qintl(isc + 1)
299 qextl1 = cell%qextl1(isc)
300 qextl2 = cell%qextl2(isc)
305 subcell%sinrot =
dzero
306 subcell%cosrot =
done
307 subcell%zOrigin =
dzero
312 term = factor / areax
313 subcell%vx1 = qintl1 * term
314 subcell%vx2 = -qextl2 * term
315 term = factor / areay
316 subcell%vy1 = -qintl2 * term
317 subcell%vy2 = -qextl1 * term
320 subcell%yOrigin =
dzero
321 term = factor / areax
322 subcell%vx1 = -qintl2 * term
323 subcell%vx2 = -qextl1 * term
324 term = factor / areay
325 subcell%vy1 = qextl2 * term
326 subcell%vy2 = -qintl1 * term
328 subcell%xOrigin =
dzero
329 subcell%yOrigin =
dzero
330 term = factor / areax
331 subcell%vx1 = qextl2 * term
332 subcell%vx2 = -qintl1 * term
333 term = factor / areay
334 subcell%vy1 = qextl1 * term
335 subcell%vy2 = qintl2 * term
337 subcell%xOrigin =
dzero
339 term = factor / areax
340 subcell%vx1 = qextl1 * term
341 subcell%vx2 = qintl2 * term
342 term = factor / areay
343 subcell%vy1 = qintl1 * term
344 subcell%vy2 = -qextl2 * term
348 term = factor / areaz
349 subcell%vz1 = 2.5d-1 * cell%defn%faceflow(m1) * term
350 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.
Manages particle track (i.e. pathline) files.