40 method%name => method%cell%type
41 method%delegates = .true.
43 method%subcell => subcell
49 deallocate (this%name)
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%check(particle, cell%defn)
213 if (.not. particle%advancing)
return
217 xorigin = cell%xOrigin
218 yorigin = cell%yOrigin
219 zorigin = cell%zOrigin
222 call particle%transform(xorigin, yorigin, zorigin, &
226 call this%track(particle, 2, tmax)
229 call particle%transform(xorigin, yorigin, zorigin, &
230 sinrot, cosrot, invert=.true.)
231 call particle%reset_transform()
242 real(DP) :: dx, dy, dz, areax, areay, areaz
243 real(DP) :: dxprel, dyprel
244 integer(I4B) :: isc, npolyverts, m1, m2
245 real(DP) :: qextl1, qextl2, qintl1, qintl2
246 real(DP) :: factor, term
248 select type (cell => this%cell)
250 factor =
done / cell%defn%retfactor
251 factor = factor / cell%defn%porosity
252 npolyverts = cell%defn%npolyverts
254 isc = particle%idomain(3)
262 dxprel = particle%x / dx
263 dyprel = particle%y / dy
265 if (dyprel .ge. 5d-1)
then
266 if (dxprel .le. 5d-1)
then
272 if (dxprel .le. 5d-1)
then
279 subcell%isubcell = isc
280 particle%idomain(3) = isc
284 dz = cell%defn%top - &
289 qintl1 = cell%qintl(isc)
291 qintl2 = cell%qintl(isc + 1)
292 qextl1 = cell%qextl1(isc)
293 qextl2 = cell%qextl2(isc)
298 subcell%sinrot =
dzero
299 subcell%cosrot =
done
300 subcell%zOrigin =
dzero
305 term = factor / areax
306 subcell%vx1 = qintl1 * term
307 subcell%vx2 = -qextl2 * term
308 term = factor / areay
309 subcell%vy1 = -qintl2 * term
310 subcell%vy2 = -qextl1 * term
313 subcell%yOrigin =
dzero
314 term = factor / areax
315 subcell%vx1 = -qintl2 * term
316 subcell%vx2 = -qextl1 * term
317 term = factor / areay
318 subcell%vy1 = qextl2 * term
319 subcell%vy2 = -qintl1 * term
321 subcell%xOrigin =
dzero
322 subcell%yOrigin =
dzero
323 term = factor / areax
324 subcell%vx1 = qextl2 * term
325 subcell%vx2 = -qintl1 * term
326 term = factor / areay
327 subcell%vy1 = qextl1 * term
328 subcell%vy2 = qintl2 * term
330 subcell%xOrigin =
dzero
332 term = factor / areax
333 subcell%vx1 = qextl1 * term
334 subcell%vx2 = qintl2 * term
335 term = factor / areay
336 subcell%vy1 = qintl1 * term
337 subcell%vy2 = -qextl2 * term
341 term = factor / areaz
342 subcell%vz1 = 2.5d-1 * cell%defn%faceflow(m1) * term
343 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.