28 procedure,
public :: pass =>
pass_dis
51 allocate (method%name)
55 method%delegates = .true.
61 deallocate (this%name)
67 integer(I4B),
intent(in) :: ic
83 select type (dis => this%fmi%dis)
85 icu = dis%get_nodeuser(ic)
87 call get_ijk(icu, dis%nrow, dis%ncol, dis%nlay, &
92 dz = cell%defn%top - cell%defn%bot
99 cell%xOrigin = cell%defn%polyvert(1, 1)
100 cell%yOrigin = cell%defn%polyvert(2, 1)
101 cell%zOrigin = cell%defn%bot
104 factor =
done / cell%defn%retfactor
105 factor = factor / cell%defn%porosity
108 term = factor / areaz
110 cell%vz1 = cell%defn%faceflow(6) * term
111 cell%vz2 = -cell%defn%faceflow(7) * term
113 if (this%fmi%ibdgwfsat0(ic) == 0)
then
124 term = factor / areax
125 cell%vx1 = cell%defn%faceflow(1) * term
126 cell%vx2 = -cell%defn%faceflow(3) * term
129 term = factor / areay
130 cell%vy1 = cell%defn%faceflow(4) * term
131 cell%vy2 = -cell%defn%faceflow(2) * term
137 subroutine load_dis(this, particle, next_level, submethod)
141 integer(I4B),
intent(in) :: next_level
142 class(
methodtype),
pointer,
intent(inout) :: submethod
146 select type (cell => this%cell)
148 ic = particle%itrdomain(next_level)
149 call this%load_cell_defn(ic, cell%defn)
150 call this%load_cell(ic, cell)
151 if (this%fmi%ibdgwfsat0(ic) == 0)
then
155 events=this%events, &
156 tracktimes=this%tracktimes)
162 events=this%events, &
163 tracktimes=this%tracktimes)
184 integer(I4B) :: inface
185 integer(I4B) :: idiag
196 select type (dis => this%fmi%dis)
200 inbr = cell%defn%facenbr(inface)
201 idiag = this%fmi%dis%con%ia(cell%defn%icell)
203 ic = dis%con%ja(ipos)
204 icu = dis%get_nodeuser(ic)
205 call get_ijk(icu, dis%nrow, dis%ncol, dis%nlay, irow, icol, ilay)
213 if (inface .eq. 1)
then
215 else if (inface .eq. 2)
then
217 else if (inface .eq. 3)
then
219 else if (inface .eq. 4)
then
221 else if (inface .eq. 6)
then
223 else if (inface .eq. 7)
then
231 topfrom = cell%defn%top
232 botfrom = cell%defn%bot
233 zrel = (z - botfrom) / (topfrom - botfrom)
236 sat = this%fmi%gwfsat(ic)
237 z = bot + zrel * sat * (top - bot)
251 integer(I4B) :: idiag
253 integer(I4B) :: inface
257 inbr = cell%defn%facenbr(inface)
258 idiag = this%fmi%dis%con%ia(cell%defn%icell)
262 this%flowja(ipos) = this%flowja(ipos) -
done
265 this%flowja(this%fmi%dis%con%isym(ipos)) &
266 = this%flowja(this%fmi%dis%con%isym(ipos)) +
done
278 integer(I4B) :: iface
279 logical(LGP) :: no_neighbors
281 select type (c => this%cell)
285 no_neighbors = cell%defn%facenbr(iface) == 0
288 if (no_neighbors)
then
293 call this%load_particle(cell, particle)
294 call this%update_flowja(cell, particle)
302 real(DP),
intent(in) :: tmax
304 call this%track(particle, 1, tmax)
310 integer,
intent(in) :: iatop
311 double precision :: top
313 if (iatop .lt. 0)
then
314 top = this%fmi%dis%top(-iatop)
316 top = this%fmi%dis%bot(iatop)
324 integer(I4B),
intent(in) :: ic
327 call this%load_cell_properties(ic, defn)
328 call this%fmi%dis%get_polyverts( &
332 call this%load_cell_neighbors(defn)
333 call this%load_cell_saturation_status(defn)
334 defn%ispv180(1:defn%npolyverts + 1) = .false.
335 call this%load_cell_flows(defn)
342 integer(I4B),
intent(in) :: ic
345 integer(I4B) :: irow, icol, ilay, icu
349 defn%iatop =
get_iatop(this%fmi%dis%get_ncpl(), &
350 this%fmi%dis%get_nodeuser(ic))
351 defn%top = this%fmi%dis%bot(ic) + &
352 this%fmi%gwfsat(ic) * &
353 (this%fmi%dis%top(ic) - this%fmi%dis%bot(ic))
354 defn%bot = this%fmi%dis%bot(ic)
355 defn%sat = this%fmi%gwfsat(ic)
356 defn%porosity = this%porosity(ic)
357 defn%retfactor = this%retfactor(ic)
358 select type (dis => this%fmi%dis)
360 icu = dis%get_nodeuser(ic)
361 call get_ijk(icu, dis%nrow, dis%ncol, dis%nlay, irow, icol, ilay)
364 defn%izone = this%izone(ic)
365 defn%can_be_rect = .true.
366 defn%can_be_quad = .false.
384 integer(I4B) :: irow1
385 integer(I4B) :: irow2
386 integer(I4B) :: jcol1
387 integer(I4B) :: jcol2
388 integer(I4B) :: klay1
389 integer(I4B) :: klay2
390 integer(I4B) :: iedgeface
392 select type (dis => this%fmi%dis)
397 icu1 = dis%get_nodeuser(ic1)
398 call get_ijk(icu1, dis%nrow, dis%ncol, dis%nlay, &
400 call get_jk(icu1, dis%get_ncpl(), dis%nlay, j1, klay1)
401 do iloc = 1, dis%con%ia(ic1 + 1) - dis%con%ia(ic1) - 1
402 ipos = dis%con%ia(ic1) + iloc
404 if (dis%con%mask(ipos) == 0) cycle
405 ic2 = dis%con%ja(ipos)
406 icu2 = dis%get_nodeuser(ic2)
407 call get_ijk(icu2, dis%nrow, dis%ncol, dis%nlay, &
409 if (klay2 == klay1)
then
411 if (irow2 > irow1)
then
414 else if (jcol2 > jcol1)
then
417 else if (irow2 < irow1)
then
424 defn%facenbr(iedgeface) = int(iloc, 1)
425 else if (klay2 > klay1)
then
427 defn%facenbr(defn%npolyverts + 2) = int(iloc, 1)
430 defn%facenbr(defn%npolyverts + 3) = int(iloc, 1)
435 defn%facenbr(defn%npolyverts + 1) = defn%facenbr(1)
449 defn%faceflow =
dzero
450 call this%load_cell_boundary_flows(defn)
451 call this%load_cell_face_flows(defn)
452 call this%cap_cell_wt_flow(defn)
453 call this%load_cell_no_exit_face(defn)
456 defn%distflow = this%fmi%SourceFlows(defn%icell) + &
457 this%fmi%SinkFlows(defn%icell) + &
458 this%fmi%StorageFlows(defn%icell)
461 if (this%fmi%SinkFlows(defn%icell) .ne.
dzero)
then
473 integer(I4B) :: m, n, nfaces
476 nfaces = defn%npolyverts + 3
480 q = this%fmi%gwfflowja(this%fmi%dis%con%ia(defn%icell) + n)
481 defn%faceflow(m) = defn%faceflow(m) + q
493 integer(I4B) :: ioffset
495 ioffset = (defn%icell - 1) * this%fmi%max_faces
496 defn%faceflow(1) = defn%faceflow(1) + &
497 this%fmi%BoundaryFlows(ioffset + 1)
498 defn%faceflow(2) = defn%faceflow(2) + &
499 this%fmi%BoundaryFlows(ioffset + 2)
500 defn%faceflow(3) = defn%faceflow(3) + &
501 this%fmi%BoundaryFlows(ioffset + 3)
502 defn%faceflow(4) = defn%faceflow(4) + &
503 this%fmi%BoundaryFlows(ioffset + 4)
504 defn%faceflow(5) = defn%faceflow(1)
505 defn%faceflow(6) = defn%faceflow(6) + &
506 this%fmi%BoundaryFlows(ioffset + this%fmi%max_faces - 1)
507 defn%faceflow(7) = defn%faceflow(7) + &
508 this%fmi%BoundaryFlows(ioffset + this%fmi%max_faces)
integer(i4b) function, public get_iatop(ncpl, icu)
Get the index corresponding to top elevation of a cell in the grid. This is -1 if the cell is in the ...
subroutine, public create_cell_rect(cell)
Create a new rectangular cell.
This module contains simulation constants.
real(dp), parameter dzero
real constant zero
real(dp), parameter done
real constant 1
subroutine, public get_ijk(nodenumber, nrow, ncol, nlay, irow, icol, ilay)
Get row, column and layer indices from node number and grid dimensions. If nodenumber is invalid,...
subroutine, public get_jk(nodenumber, ncpl, nlay, icpl, ilay)
Get layer index and within-layer node index from node number and grid dimensions. If nodenumber is in...
This module defines variable data types.
pure logical function, public is_close(a, b, rtol, atol, symmetric)
Check if a real value is approximately equal to another.
Cell-level tracking methods.
type(methodcellpollocktype), pointer, public method_cell_plck
type(methodcellpasstobottype), pointer, public method_cell_ptb
subroutine load_cell_face_flows(this, defn)
subroutine load_cell_defn(this, ic, defn)
Loads cell definition from the grid.
double precision function get_top(this, iatop)
Returns a top elevation based on index iatop.
subroutine load_cell_properties(this, ic, defn)
subroutine load_particle(this, cell, particle)
Load cell properties into the particle, including.
subroutine load_cell_boundary_flows(this, defn)
Add boundary flows to the cell definition faceflow array. Assumes cell index and number of vertices a...
subroutine update_flowja(this, cell, particle)
Update cell-cell flows of particle mass. Every particle is currently assigned unit mass.
subroutine, public create_method_dis(method)
Create a new structured grid (DIS) tracking method.
subroutine apply_dis(this, particle, tmax)
Apply the structured tracking method to a particle.
subroutine load_dis(this, particle, next_level, submethod)
Load the cell geometry and tracking method.
subroutine load_cell_neighbors(this, defn)
Loads face neighbors to cell definition from the grid. Assumes cell index and number of vertices are ...
subroutine load_cell(this, ic, cell)
subroutine load_cell_flows(this, defn)
Load flows into the cell definition. These include face, boundary and net distributed flows....
subroutine pass_dis(this, particle)
Pass a particle to the next cell, if there is one.
Particle tracking strategies.
@, public terminate
particle terminated
@ term_boundary
terminated at a boundary face
Base grid cell definition.
Structured grid discretization.
Base type for particle tracking methods.
Particle tracked by the PRT model.