Skip to content

Commit

Permalink
fix(dis): corrected connection vector error in DIS package (#308)
Browse files Browse the repository at this point in the history
Code was incorrectly calculating cell center elevations when nozee was .false.  This error would have affected XT3D simulations with unconfined flow and non-zero values specified for ANGLE2 in the NPF Package.  It also would affect dispersive transport with XT3D for unconfined conditions.
  • Loading branch information
langevin-usgs authored Feb 13, 2020
1 parent 0f2a497 commit c39a17d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions doc/ReleaseNotes/ReleaseNotes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ \section{History}
\underline{NEW FUNCTIONALITY}

\underline{BASIC FUNCTIONALITY}
\begin{itemize}
\item Corrected an error in how the discretization package (for regular MODFLOW grids) calculates the distance between two cells when one or both of the cells are unconfined. The error in the code would have only affected XT3D simulations with a regular grid, unconfined conditions, and specification of ANGLE2 in the NPF Package.
\end{itemize}

\underline{STRESS PACKAGES}
\begin{itemize}
Expand Down
10 changes: 4 additions & 6 deletions src/Model/GroundWaterFlow/gwf3dis8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1343,10 +1343,6 @@ subroutine connection_vector(this, noden, nodem, nozee, satn, satm, ihc, &
integer(I4B) :: i1, i2, j1, j2, k1, k2
integer(I4B) :: nodeu1, nodeu2, ipos
! ------------------------------------------------------------------------------
!
! -- Calculate cell center z values
z1 = this%bot(noden) + DHALF * (this%top(noden) - this%bot(noden))
z2 = this%bot(nodem) + DHALF * (this%top(nodem) - this%bot(nodem))
!
! -- Set vector components based on ihc
if(ihc == 0) then
Expand All @@ -1359,15 +1355,17 @@ subroutine connection_vector(this, noden, nodem, nozee, satn, satm, ihc, &
else
zcomp = -DONE
endif
z1 = this%bot(noden) + DHALF * (this%top(noden) - this%bot(noden))
z2 = this%bot(nodem) + DHALF * (this%top(nodem) - this%bot(nodem))
conlen = abs(z2 - z1)
else
!
if(nozee) then
z1 = DZERO
z2 = DZERO
else
z1 = z1 * satn
z2 = z2 * satm
z1 = this%bot(noden) + DHALF * satn * (this%top(noden) - this%bot(noden))
z2 = this%bot(nodem) + DHALF * satm * (this%top(nodem) - this%bot(nodem))
endif
ipos = this%con%getjaindex(noden, nodem)
ds = this%con%cl1(this%con%jas(ipos)) + this%con%cl2(this%con%jas(ipos))
Expand Down

0 comments on commit c39a17d

Please sign in to comment.