27 procedure,
public :: pass =>
pass_dis
50 allocate (method%type)
54 method%delegates = .true.
60 deallocate (this%type)
66 integer(I4B),
intent(in) :: ic
82 select type (dis => this%fmi%dis)
84 icu = dis%get_nodeuser(ic)
85 call get_ijk(icu, dis%nrow, dis%ncol, dis%nlay, &
89 dz = cell%defn%top - cell%defn%bot
95 cell%xOrigin = cell%defn%polyvert(1, 1)
96 cell%yOrigin = cell%defn%polyvert(2, 1)
97 cell%zOrigin = cell%defn%bot
102 factor =
done / cell%defn%retfactor
103 factor = factor / cell%defn%porosity
104 term = factor / areax
105 cell%vx1 = cell%defn%faceflow(1) * term
106 cell%vx2 = -cell%defn%faceflow(3) * term
107 term = factor / areay
108 cell%vy1 = cell%defn%faceflow(4) * term
109 cell%vy2 = -cell%defn%faceflow(2) * term
110 term = factor / areaz
111 cell%vz1 = cell%defn%faceflow(6) * term
112 cell%vz2 = -cell%defn%faceflow(7) * term
117 subroutine load_dis(this, particle, next_level, submethod)
121 integer(I4B),
intent(in) :: next_level
122 class(
methodtype),
pointer,
intent(inout) :: submethod
126 select type (cell => this%cell)
129 ic = particle%idomain(next_level)
130 call this%load_celldefn(ic, cell%defn)
131 call this%load_cell(ic, cell)
134 if (this%fmi%ibdgwfsat0(ic) == 0)
then
137 trackfilectl=this%trackfilectl, &
138 tracktimes=this%tracktimes)
144 trackfilectl=this%trackfilectl, &
145 tracktimes=this%tracktimes)
164 integer(I4B) :: inface
165 integer(I4B) :: idiag
176 select type (dis => this%fmi%dis)
179 inface = particle%iboundary(2)
180 inbr = cell%defn%facenbr(inface)
181 idiag = this%fmi%dis%con%ia(cell%defn%icell)
183 ic = dis%con%ja(ipos)
184 icu = dis%get_nodeuser(ic)
185 call get_ijk(icu, dis%nrow, dis%ncol, dis%nlay, &
187 particle%idomain(2) = ic
192 if (inface .eq. 1)
then
194 else if (inface .eq. 2)
then
196 else if (inface .eq. 3)
then
198 else if (inface .eq. 4)
then
200 else if (inface .eq. 6)
then
202 else if (inface .eq. 7)
then
205 particle%iboundary(2) = inface
210 topfrom = cell%defn%top
211 botfrom = cell%defn%bot
212 zrel = (z - botfrom) / (topfrom - botfrom)
215 sat = this%fmi%gwfsat(ic)
216 z = bot + zrel * sat * (top - bot)
231 integer(I4B) :: idiag
233 integer(I4B) :: inface
236 inface = particle%iboundary(2)
237 inbr = cell%defn%facenbr(inface)
238 idiag = this%fmi%dis%con%ia(cell%defn%icell)
242 this%flowja(ipos) = this%flowja(ipos) -
done
245 this%flowja(this%fmi%dis%con%isym(ipos)) &
246 = this%flowja(this%fmi%dis%con%isym(ipos)) +
done
258 select type (c => this%cell)
264 if (cell%defn%facenbr(particle%iboundary(2)) .eq. 0)
then
266 particle%advancing = .false.
267 call this%save(particle, reason=3)
271 call this%load_particle(cell, particle)
272 call this%update_flowja(cell, particle)
281 real(DP),
intent(in) :: tmax
283 call this%track(particle, 1, tmax)
289 integer,
intent(in) :: iatop
290 double precision :: top
292 if (iatop .lt. 0)
then
293 top = this%fmi%dis%top(-iatop)
295 top = this%fmi%dis%bot(iatop)
303 integer(I4B),
intent(in) :: ic
307 call this%load_properties(ic, defn)
310 call this%fmi%dis%get_polyverts( &
316 call this%load_neighbors(defn)
319 defn%ispv180(1:defn%npolyverts + 1) = .false.
322 call this%load_flows(defn)
329 integer(I4B),
intent(in) :: ic
334 defn%iatop =
get_iatop(this%fmi%dis%get_ncpl(), &
335 this%fmi%dis%get_nodeuser(ic))
336 defn%top = this%fmi%dis%bot(ic) + &
337 this%fmi%gwfsat(ic) * &
338 (this%fmi%dis%top(ic) - this%fmi%dis%bot(ic))
339 defn%bot = this%fmi%dis%bot(ic)
340 defn%sat = this%fmi%gwfsat(ic)
341 defn%porosity = this%porosity(ic)
342 defn%retfactor = this%retfactor(ic)
343 defn%izone = this%izone(ic)
344 defn%can_be_rect = .true.
345 defn%can_be_quad = .false.
363 integer(I4B) :: irow1
364 integer(I4B) :: irow2
365 integer(I4B) :: jcol1
366 integer(I4B) :: jcol2
367 integer(I4B) :: klay1
368 integer(I4B) :: klay2
369 integer(I4B) :: iedgeface
371 select type (dis => this%fmi%dis)
376 icu1 = dis%get_nodeuser(ic1)
377 call get_ijk(icu1, dis%nrow, dis%ncol, dis%nlay, &
379 call get_jk(icu1, dis%get_ncpl(), dis%nlay, j1, klay1)
380 do iloc = 1, dis%con%ia(ic1 + 1) - dis%con%ia(ic1) - 1
381 ipos = dis%con%ia(ic1) + iloc
383 if (dis%con%mask(ipos) == 0) cycle
384 ic2 = dis%con%ja(ipos)
385 icu2 = dis%get_nodeuser(ic2)
386 call get_ijk(icu2, dis%nrow, dis%ncol, dis%nlay, &
388 if (klay2 == klay1)
then
390 if (irow2 > irow1)
then
393 else if (jcol2 > jcol1)
then
396 else if (irow2 < irow1)
then
403 defn%facenbr(iedgeface) = int(iloc, 1)
404 else if (klay2 > klay1)
then
406 defn%facenbr(defn%npolyverts + 2) = int(iloc, 1)
409 defn%facenbr(defn%npolyverts + 3) = int(iloc, 1)
414 defn%facenbr(defn%npolyverts + 1) = defn%facenbr(1)
428 defn%faceflow =
dzero
430 call this%load_boundary_flows_to_defn(defn)
431 call this%load_face_flows_to_defn(defn)
434 defn%distflow = this%fmi%SourceFlows(defn%icell) + &
435 this%fmi%SinkFlows(defn%icell) + &
436 this%fmi%StorageFlows(defn%icell)
439 if (this%fmi%SinkFlows(defn%icell) .ne.
dzero)
then
452 integer(I4B) :: m, n, nfaces
455 nfaces = defn%npolyverts + 3
459 q = this%fmi%gwfflowja(this%fmi%dis%con%ia(defn%icell) + n)
460 defn%faceflow(m) = defn%faceflow(m) + q
462 if (defn%faceflow(m) <
dzero) defn%inoexitface = 0
473 integer(I4B) :: ioffset
476 defn%faceflow(1) = defn%faceflow(1) + &
477 this%fmi%BoundaryFlows(ioffset + 1)
478 defn%faceflow(2) = defn%faceflow(2) + &
479 this%fmi%BoundaryFlows(ioffset + 2)
480 defn%faceflow(3) = defn%faceflow(3) + &
481 this%fmi%BoundaryFlows(ioffset + 3)
482 defn%faceflow(4) = defn%faceflow(4) + &
483 this%fmi%BoundaryFlows(ioffset + 4)
484 defn%faceflow(5) = defn%faceflow(1)
485 defn%faceflow(6) = defn%faceflow(6) + &
486 this%fmi%BoundaryFlows(ioffset + 9)
487 defn%faceflow(7) = defn%faceflow(7) + &
488 this%fmi%BoundaryFlows(ioffset + 10)
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 ...
integer(i4b), parameter, public max_poly_cells
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.
Cell-level tracking methods.
type(methodcellpollocktype), pointer, public method_cell_plck
type(methodcellpasstobottype), pointer, public method_cell_ptb
subroutine load_flows(this, defn)
Load flows into the cell definition. These include face, boundary and net distributed flows....
subroutine load_boundary_flows_to_defn(this, defn)
Add boundary flows to the cell definition faceflow array. Assumes cell index and number of vertices a...
double precision function get_top(this, iatop)
Returns a top elevation based on index iatop.
subroutine load_particle(this, cell, particle)
Load cell properties into the particle, including.
subroutine load_properties(this, ic, defn)
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 load_celldefn(this, ic, defn)
Loads cell definition from the grid.
subroutine apply_dis(this, particle, tmax)
Apply the method to a particle.
subroutine load_dis(this, particle, next_level, submethod)
Load the cell geometry and tracking method.
subroutine load_cell(this, ic, cell)
subroutine load_face_flows_to_defn(this, defn)
subroutine load_neighbors(this, defn)
Loads face neighbors to cell definition from the grid. Assumes cell index and number of vertices are ...
subroutine pass_dis(this, particle)
Pass a particle to the next cell, if there is one.
Particle tracking strategies.
Base grid cell definition.
Structured grid discretization.
Base type for particle tracking methods.
Particle tracked by the PRT model.
Manages particle track (i.e. pathline) files.