26 integer(I4B),
pointer :: ik22overk => null()
27 integer(I4B),
pointer :: ik33overk => null()
28 real(dp),
dimension(:),
pointer,
contiguous :: k11 => null()
29 real(dp),
dimension(:),
pointer,
contiguous :: k22 => null()
30 real(dp),
dimension(:),
pointer,
contiguous :: k33 => null()
31 integer(I4B),
pointer :: kchangeper => null()
32 integer(I4B),
pointer :: kchangestp => null()
33 integer(I4B),
dimension(:),
pointer,
contiguous :: nodekchange => null()
52 subroutine tvk_cr(tvk, name_model, inunit, iout)
54 type(
tvktype),
pointer,
intent(out) :: tvk
55 character(len=*),
intent(in) :: name_model
56 integer(I4B),
intent(in) :: inunit
57 integer(I4B),
intent(in) :: iout
60 call tvk%init(name_model,
'TVK',
'TVK', inunit, iout)
72 character(len=LENMEMPATH) :: npfMemoryPath
74 character(len=*),
parameter :: fmttvk = &
75 "(1x,/1x,'TVK -- TIME-VARYING K PACKAGE, VERSION 1, 08/18/2021', &
76 &' INPUT READ FROM UNIT ', i0, //)"
79 write (this%iout, fmttvk) this%inunit
84 call mem_setptr(this%ik22overk,
'IK22OVERK', npfmemorypath)
85 call mem_setptr(this%ik33overk,
'IK33OVERK', npfmemorypath)
86 call mem_setptr(this%k11,
'K11', npfmemorypath)
87 call mem_setptr(this%k22,
'K22', npfmemorypath)
88 call mem_setptr(this%k33,
'K33', npfmemorypath)
89 call mem_setptr(this%kchangeper,
'KCHANGEPER', npfmemorypath)
90 call mem_setptr(this%kchangestp,
'KCHANGESTP', npfmemorypath)
91 call mem_setptr(this%nodekchange,
'NODEKCHANGE', npfmemorypath)
102 character(len=*),
intent(in) :: keyword
118 integer(I4B),
intent(in) :: n
119 character(len=*),
intent(in) :: varname
121 real(dp),
pointer :: bndelem
123 select case (varname)
125 bndelem => this%k11(n)
127 bndelem => this%k22(n)
129 bndelem => this%k33(n)
143 integer(I4B),
intent(in) :: kper
144 integer(I4B),
intent(in) :: kstp
146 this%kchangeper = kper
147 this%kchangestp = kstp
163 do i = 1, this%dis%nodes
164 this%nodekchange(i) = 0
178 integer(I4B),
intent(in) :: n
179 character(len=*),
intent(in) :: varName
181 character(len=LINELENGTH) :: cellstr
183 character(len=*),
parameter :: fmtkerr = &
184 "(1x, a, ' changed hydraulic property ', a, ' is <= 0 for cell ', a, &
188 this%nodekchange(n) = 1
191 if (varname ==
'K')
then
192 if (this%k11(n) <=
dzero)
then
193 call this%dis%noder_to_string(n, cellstr)
195 trim(adjustl(this%packName)),
'K', trim(cellstr), this%k11(n)
198 elseif (varname ==
'K22')
then
199 if (this%ik22overk == 1)
then
200 this%k22(n) = this%k22(n) * this%k11(n)
202 if (this%k22(n) <=
dzero)
then
203 call this%dis%noder_to_string(n, cellstr)
205 trim(adjustl(this%packName)),
'K22', trim(cellstr), this%k22(n)
208 elseif (varname ==
'K33')
then
209 if (this%ik33overk == 1)
then
210 this%k33(n) = this%k33(n) * this%k11(n)
212 if (this%k33(n) <=
dzero)
then
213 call this%dis%noder_to_string(n, cellstr)
215 trim(adjustl(this%packName)),
'K33', trim(cellstr), this%k33(n)
230 nullify (this%ik22overk)
231 nullify (this%ik33overk)
235 nullify (this%kchangeper)
236 nullify (this%kchangestp)
237 nullify (this%nodekchange)
Announce package and set pointers to variables.
Get an array value pointer given a variable name and node index.
Announce package and set pointers to variables.
Clear all per-node change flags.
Mark property changes as having occurred at (kper, kstp)
Check that a given property value is valid.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenmempath
maximum length of the memory path
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
This module contains common time-varying property functionality.
subroutine, public tvbase_da(this)
Deallocate package memory.
This module contains time-varying conductivity package methods.
subroutine tvk_set_changed_at(this, kper, kstp)
Mark property changes as having occurred at (kper, kstp)
subroutine tvk_da(this)
Deallocate package memory.
logical function tvk_read_option(this, keyword)
Read a TVK-specific option from the OPTIONS block.
subroutine, public tvk_cr(tvk, name_model, inunit, iout)
Create a new TvkType object.
subroutine tvk_ar_set_pointers(this)
Announce package and set pointers to variables.
real(dp) function, pointer tvk_get_pointer_to_value(this, n, varName)
Get an array value pointer given a variable name and node index.
subroutine tvk_validate_change(this, n, varName)
Check that a given property value is valid.
subroutine tvk_reset_change_flags(this)
Clear all per-node change flags.