MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
gwfinterfacemodelmodule Module Reference

Data Types

type  gwfinterfacemodeltype
 The GWF Interface Model is a utility to calculate the solution's exchange coefficients from the interface between a GWF model and its GWF neighbors. The interface model itself will not be part of the solution, it is not being solved. Patching (a part of the) discretizations of two GWF models in a general way, e.g. DIS+DIS with refinement, requires the resulting. More...
 

Functions/Subroutines

subroutine gwfifm_cr (this, name, iout, gridConn)
 set up the interface model, analogously to what More...
 
subroutine gwfifm_df (this)
 Define, mostly DISU and the NPF package. More...
 
subroutine gwfifm_ar (this)
 allocate and read the packages More...
 
subroutine gwfifm_da (this)
 Clean up. More...
 
subroutine setnpfoptions (this, npfOptions)
 Copy NPF options from the model owning the interface to the data structure. More...
 
subroutine setbuydata (this, buyData)
 Sets the BUY input data from the models that make up this interface. We adopt everything from the owning model, but during validation it should be. More...
 

Function/Subroutine Documentation

◆ gwfifm_ar()

subroutine gwfinterfacemodelmodule::gwfifm_ar ( class(gwfinterfacemodeltype this)
private
Parameters
thisthe GWF interface model

Definition at line 119 of file GwfInterfaceModel.f90.

120  class(GwfInterfaceModelType) :: this !< the GWF interface model
121 
122  call this%npf%npf_ar(this%ic, this%vsc, this%ibound, this%x)
123  if (this%inbuy > 0) call this%buy%buy_ar(this%npf, this%ibound)
124 

◆ gwfifm_cr()

subroutine gwfinterfacemodelmodule::gwfifm_cr ( class(gwfinterfacemodeltype this,
character(len=*), intent(in)  name,
integer(i4b), intent(in)  iout,
class(gridconnectiontype), intent(in), pointer  gridConn 
)
Parameters
thisthe GWF interface model
[in]namethe interface model's name
[in]ioutthe output unit
[in]gridconnthe grid connection for creating a DISU

Definition at line 46 of file GwfInterfaceModel.f90.

47  class(GwfInterfaceModelType) :: this !< the GWF interface model
48  character(len=*), intent(in) :: name !< the interface model's name
49  integer(I4B), intent(in) :: iout !< the output unit
50  class(GridConnectionType), pointer, intent(in) :: gridConn !< the grid connection for creating a DISU
51  ! local
52  class(*), pointer :: modPtr
53 
54  this%memoryPath = create_mem_path(name)
55  call this%allocate_scalars(name)
56 
57  this%iout = iout
58 
59  this%gridConnection => gridconn
60  modptr => this%gridConnection%model
61  this%owner => castasgwfmodel(modptr)
62 
63  this%innpf = huge(1_i4b)
64  this%inewton = this%owner%inewton
65  this%inewtonur = this%owner%inewtonur
66 
67  if (this%owner%inbuy > 0) then
68  this%inbuy = huge(1_i4b)
69  end if
70 
71  ! create discretization and packages
72  call disu_cr(this%dis, this%name, '', -1, this%iout)
73  call npf_cr(this%npf, this%name, '', -this%innpf, this%iout)
74  call xt3d_cr(this%xt3d, this%name, -this%innpf, this%iout)
75  call buy_cr(this%buy, this%name, this%inbuy, this%iout)
76 
Here is the call graph for this function:

◆ gwfifm_da()

subroutine gwfinterfacemodelmodule::gwfifm_da ( class(gwfinterfacemodeltype this)
private
Parameters
thisthe GWF interface model

Definition at line 129 of file GwfInterfaceModel.f90.

131  class(GwfInterfaceModelType) :: this !< the GWF interface model
132 
133  ! -- Internal flow packages deallocate
134  call this%dis%dis_da()
135  call this%npf%npf_da()
136  call this%xt3d%xt3d_da()
137  call this%buy%buy_da()
138  !
139  ! -- Internal package objects
140  deallocate (this%dis)
141  deallocate (this%npf)
142  deallocate (this%xt3d)
143  !
144  ! -- Scalars
145  call mem_deallocate(this%inic)
146  call mem_deallocate(this%inoc)
147  call mem_deallocate(this%inobs)
148  call mem_deallocate(this%innpf)
149  call mem_deallocate(this%inbuy)
150  call mem_deallocate(this%invsc)
151  call mem_deallocate(this%insto)
152  call mem_deallocate(this%incsub)
153  call mem_deallocate(this%inmvr)
154  call mem_deallocate(this%inhfb)
155  call mem_deallocate(this%ingnc)
156  call mem_deallocate(this%iss)
157  call mem_deallocate(this%inewtonur)
158  !
159  ! -- NumericalModelType
160  call this%NumericalModelType%model_da()
161 

◆ gwfifm_df()

subroutine gwfinterfacemodelmodule::gwfifm_df ( class(gwfinterfacemodeltype this)
private
Parameters
thisthe GWF interface model

Definition at line 81 of file GwfInterfaceModel.f90.

82  class(GwfInterfaceModelType) :: this !< the GWF interface model
83  ! local
84  type(GwfNpfOptionsType) :: npfOptions
85  type(GwfBuyInputDataType) :: buyData
86  class(*), pointer :: disPtr
87 
88  this%moffset = 0
89 
90  ! define DISU
91  disptr => this%dis
92  call this%gridConnection%getDiscretization(castasdisutype(disptr))
93 
94  ! define NPF package
95  call npfoptions%construct()
96  call this%setNpfOptions(npfoptions)
97  call this%npf%npf_df(this%dis, this%xt3d, 0, 0, npfoptions)
98  call npfoptions%destroy()
99 
100  ! define BUY package
101  if (this%inbuy > 0) then
102  call buydata%construct(this%owner%buy%nrhospecies)
103  call this%setBuyData(buydata)
104  call this%buy%buy_df(this%dis, buydata)
105  call buydata%destruct()
106  end if
107 
108  this%neq = this%dis%nodes
109  this%nja = this%dis%nja
110  this%ia => this%dis%con%ia
111  this%ja => this%dis%con%ja
112 
113  call this%allocate_arrays()
114 
Here is the call graph for this function:

◆ setbuydata()

subroutine gwfinterfacemodelmodule::setbuydata ( class(gwfinterfacemodeltype this,
type(gwfbuyinputdatatype buyData 
)
private
Parameters
thisthe interface model
buydatathe data for the buoyancy package

Definition at line 189 of file GwfInterfaceModel.f90.

190  class(GwfInterfaceModelType) :: this !< the interface model
191  type(GwfBuyInputDataType) :: buyData !< the data for the buoyancy package
192  ! local
193  integer(I4B) :: i
194 
195  buydata%denseref = this%owner%buy%denseref
196  buydata%iform = this%owner%buy%iform
197  buydata%nrhospecies = this%owner%buy%nrhospecies
198 
199  do i = 1, buydata%nrhospecies
200  buydata%drhodc(i) = this%owner%buy%drhodc(i)
201  buydata%crhoref(i) = this%owner%buy%crhoref(i)
202  buydata%cmodelname(i) = this%owner%buy%cmodelname(i)
203  buydata%cauxspeciesname(i) = this%owner%buy%cauxspeciesname(i)
204  end do
205 

◆ setnpfoptions()

subroutine gwfinterfacemodelmodule::setnpfoptions ( class(gwfinterfacemodeltype this,
type(gwfnpfoptionstype npfOptions 
)
Parameters
thisthe GWF interface model
npfoptionsthe options data to be filled

Definition at line 167 of file GwfInterfaceModel.f90.

168  class(GwfInterfaceModelType) :: this !< the GWF interface model
169  type(GwfNpfOptionsType) :: npfOptions !< the options data to be filled
170 
171  ! for now, assuming full homogeneity, so just take
172  ! the options from the owning model's npf package
173  npfoptions%icellavg = this%owner%npf%icellavg
174  npfoptions%ithickstrt = this%owner%npf%ithickstrt
175  npfoptions%iperched = this%owner%npf%iperched
176  npfoptions%ivarcv = this%owner%npf%ivarcv
177  npfoptions%idewatcv = this%owner%npf%idewatcv
178  npfoptions%irewet = this%owner%npf%irewet
179  npfoptions%wetfct = this%owner%npf%wetfct
180  npfoptions%iwetit = this%owner%npf%iwetit
181  npfoptions%ihdwet = this%owner%npf%ihdwet
182