Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(GeneralizedTransport): Introduce generalized transport parent class, sets up PR for GWE #1306

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions make/makefile
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# makefile created by pymake (version 1.2.9.dev0) for the 'mf6' executable.
# makefile created by pymake (version 1.2.7) for the 'mf6' executable.


include ./makedefaults

# Define the source file directories
SOURCEDIR1=../src
SOURCEDIR2=../src/Exchange
SOURCEDIR3=../src/Model
SOURCEDIR4=../src/Model/Geometry
SOURCEDIR5=../src/Model/TransportModel
SOURCEDIR6=../src/Model/ModelUtilities
SOURCEDIR7=../src/Model/Connection
SOURCEDIR2=../src/Distributed
SOURCEDIR3=../src/Exchange
SOURCEDIR4=../src/Model
SOURCEDIR5=../src/Model/Connection
SOURCEDIR6=../src/Model/Geometry
SOURCEDIR7=../src/Model/GroundWaterFlow
SOURCEDIR8=../src/Model/GroundWaterTransport
SOURCEDIR9=../src/Model/GroundWaterFlow
SOURCEDIR10=../src/Distributed
SOURCEDIR9=../src/Model/ModelUtilities
SOURCEDIR10=../src/Model/TransportModel
SOURCEDIR11=../src/Solution
SOURCEDIR12=../src/Solution/PETSc
SOURCEDIR13=../src/Solution/LinearMethods
SOURCEDIR12=../src/Solution/LinearMethods
SOURCEDIR13=../src/Solution/PETSc
SOURCEDIR14=../src/Timing
SOURCEDIR15=../src/Utilities
SOURCEDIR16=../src/Utilities/TimeSeries
SOURCEDIR17=../src/Utilities/Libraries
SOURCEDIR18=../src/Utilities/Libraries/rcm
SOURCEDIR19=../src/Utilities/Libraries/sparsekit
SOURCEDIR20=../src/Utilities/Libraries/sparskit2
SOURCEDIR16=../src/Utilities/ArrayRead
SOURCEDIR17=../src/Utilities/Idm
SOURCEDIR18=../src/Utilities/Idm/mf6blockfile
SOURCEDIR19=../src/Utilities/Idm/selector
SOURCEDIR20=../src/Utilities/Libraries
SOURCEDIR21=../src/Utilities/Libraries/blas
SOURCEDIR22=../src/Utilities/Libraries/daglib
SOURCEDIR23=../src/Utilities/Idm
SOURCEDIR24=../src/Utilities/Idm/selector
SOURCEDIR25=../src/Utilities/Idm/mf6blockfile
SOURCEDIR23=../src/Utilities/Libraries/rcm
SOURCEDIR24=../src/Utilities/Libraries/sparsekit
SOURCEDIR25=../src/Utilities/Libraries/sparskit2
SOURCEDIR26=../src/Utilities/Matrix
SOURCEDIR27=../src/Utilities/Vector
SOURCEDIR27=../src/Utilities/Memory
SOURCEDIR28=../src/Utilities/Observation
SOURCEDIR29=../src/Utilities/OutputControl
SOURCEDIR30=../src/Utilities/Memory
SOURCEDIR31=../src/Utilities/ArrayRead
SOURCEDIR30=../src/Utilities/TimeSeries
SOURCEDIR31=../src/Utilities/Vector

VPATH = \
${SOURCEDIR1} \
Expand Down Expand Up @@ -184,6 +184,7 @@ $(OBJDIR)/BaseModel.o \
$(OBJDIR)/PackageBudget.o \
$(OBJDIR)/HeadFileReader.o \
$(OBJDIR)/BudgetObject.o \
$(OBJDIR)/PrintSaveManager.o \
$(OBJDIR)/SfrCrossSectionManager.o \
$(OBJDIR)/dag_module.o \
$(OBJDIR)/BoundaryPackageExt.o \
Expand All @@ -192,7 +193,8 @@ $(OBJDIR)/VirtualDataContainer.o \
$(OBJDIR)/SimStages.o \
$(OBJDIR)/NumericalModel.o \
$(OBJDIR)/FlowModelInterface.o \
$(OBJDIR)/PrintSaveManager.o \
$(OBJDIR)/OutputControlData.o \
$(OBJDIR)/gwf3ic8.o \
$(OBJDIR)/Xt3dAlgorithm.o \
$(OBJDIR)/gwf3tvbase8.o \
$(OBJDIR)/gwf3sfr8.o \
Expand All @@ -206,10 +208,12 @@ $(OBJDIR)/gwf3drn8.o \
$(OBJDIR)/IndexMap.o \
$(OBJDIR)/VirtualModel.o \
$(OBJDIR)/BaseExchange.o \
$(OBJDIR)/tsp1fmi1.o \
$(OBJDIR)/GwtSpc.o \
$(OBJDIR)/OutputControl.o \
$(OBJDIR)/tsp1ic1.o \
$(OBJDIR)/TspAdvOptions.o \
$(OBJDIR)/UzfCellGroup.o \
$(OBJDIR)/gwt1fmi1.o \
$(OBJDIR)/OutputControlData.o \
$(OBJDIR)/gwf3ic8.o \
$(OBJDIR)/Xt3dInterface.o \
$(OBJDIR)/gwf3tvk8.o \
$(OBJDIR)/gwf3vsc8.o \
Expand All @@ -220,15 +224,19 @@ $(OBJDIR)/ImsLinearSettings.o \
$(OBJDIR)/ConvergenceSummary.o \
$(OBJDIR)/CellWithNbrs.o \
$(OBJDIR)/NumericalExchange.o \
$(OBJDIR)/tsp1ssm1.o \
$(OBJDIR)/tsp1oc1.o \
$(OBJDIR)/tsp1obs1.o \
$(OBJDIR)/tsp1mvt1.o \
$(OBJDIR)/tsp1adv1.o \
$(OBJDIR)/gwf3disv8.o \
$(OBJDIR)/gwf3disu8.o \
$(OBJDIR)/gwf3dis8.o \
$(OBJDIR)/gwf3uzf8.o \
$(OBJDIR)/gwt1apt1.o \
$(OBJDIR)/GwtSpc.o \
$(OBJDIR)/OutputControl.o \
$(OBJDIR)/gwt1ic1.o \
$(OBJDIR)/tsp1apt1.o \
$(OBJDIR)/gwt1mst1.o \
$(OBJDIR)/GwtDspOptions.o \
$(OBJDIR)/gwf3npf8.o \
$(OBJDIR)/GwtAdvOptions.o \
$(OBJDIR)/gwf3tvs8.o \
$(OBJDIR)/GwfStorageUtils.o \
$(OBJDIR)/Mover.o \
Expand All @@ -240,26 +248,18 @@ $(OBJDIR)/SparseMatrix.o \
$(OBJDIR)/LinearSolverBase.o \
$(OBJDIR)/ims8reordering.o \
$(OBJDIR)/VirtualExchange.o \
$(OBJDIR)/gwf3disu8.o \
$(OBJDIR)/GridSorting.o \
$(OBJDIR)/DisConnExchange.o \
$(OBJDIR)/CsrUtils.o \
$(OBJDIR)/tsp1cnc1.o \
$(OBJDIR)/tsp1.o \
$(OBJDIR)/gwt1uzt1.o \
$(OBJDIR)/gwt1ssm1.o \
$(OBJDIR)/gwt1src1.o \
$(OBJDIR)/gwt1sft1.o \
$(OBJDIR)/gwt1oc1.o \
$(OBJDIR)/gwt1obs1.o \
$(OBJDIR)/gwt1mwt1.o \
$(OBJDIR)/gwt1mvt1.o \
$(OBJDIR)/gwt1lkt1.o \
$(OBJDIR)/gwt1ist1.o \
$(OBJDIR)/gwt1dsp1.o \
$(OBJDIR)/gwt1cnc1.o \
$(OBJDIR)/gwt1adv1.o \
$(OBJDIR)/gwf3disv8.o \
$(OBJDIR)/gwf3dis8.o \
$(OBJDIR)/gwf3api8.o \
$(OBJDIR)/gwf3wel8.o \
$(OBJDIR)/gwf3rch8.o \
Expand Down
25 changes: 12 additions & 13 deletions msvs/mf6core.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,29 +163,19 @@
<File RelativePath="..\src\Model\GroundWaterFlow\gwf3wel8idm.f90"/></Filter>
<Filter Name="GroundWaterTransport">
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1adv1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1apt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1cnc1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1dis1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1disu1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1disv1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1dsp1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1dsp1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1fmi1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1ic1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1idm.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1ist1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1lkt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1mst1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1mvt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1mwt1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1obs1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1oc1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1sft1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1src1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1ssm1.f90"/>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1uzt1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1.f90"/></Filter>
<File RelativePath="..\src\Model\GroundWaterTransport\gwt1uzt1.f90"/></Filter>
<Filter Name="ModelUtilities">
<File RelativePath="..\src\Model\ModelUtilities\BoundaryPackage.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\BoundaryPackageExt.f90"/>
Expand All @@ -198,18 +188,27 @@
<File RelativePath="..\src\Model\ModelUtilities\GwfNpfOptions.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\GwfStorageUtils.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\GwfVscInputData.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\GwtAdvOptions.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\GwtDspOptions.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\GwtSpc.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\Mover.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\PackageMover.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\SfrCrossSectionManager.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\SfrCrossSectionUtils.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\TspAdvOptions.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\UzfCellGroup.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\Xt3dAlgorithm.f90"/>
<File RelativePath="..\src\Model\ModelUtilities\Xt3dInterface.f90"/></Filter>
<Filter Name="TransportModel">
<File RelativePath="..\src\Model\TransportModel\tsp1.f90"/></Filter>
<File RelativePath="..\src\Model\TransportModel\tsp1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1adv1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1apt1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1cnc1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1fmi1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1ic1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1mvt1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1obs1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1oc1.f90"/>
<File RelativePath="..\src\Model\TransportModel\tsp1ssm1.f90"/></Filter>
<File RelativePath="..\src\Model\BaseModel.f90"/>
<File RelativePath="..\src\Model\ExplicitModel.f90"/>
<File RelativePath="..\src\Model\NumericalModel.f90"/>
Expand Down
7 changes: 4 additions & 3 deletions src/Exchange/GwtGwtExchange.f90
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module GwtGwtExchangeModule
use VirtualModelModule, only: get_virtual_model
use DisConnExchangeModule, only: DisConnExchangeType
use GwtModule, only: GwtModelType
use GwtMvtModule, only: GwtMvtType
use TspMvtModule, only: TspMvtType
use ObserveModule, only: ObserveType
use ObsModule, only: ObsType
use SimModule, only: count_errors, store_error, &
Expand Down Expand Up @@ -66,7 +66,7 @@ module GwtGwtExchangeModule
!
! -- Mover transport package
integer(I4B), pointer :: inmvt => null() !< unit number for mover transport (0 if off)
type(GwtMvtType), pointer :: mvt => null() !< water mover object
type(TspMvtType), pointer :: mvt => null() !< water mover object
!
! -- Observation package
integer(I4B), pointer :: inobs => null() !< unit number for GWT-GWT observations
Expand Down Expand Up @@ -937,7 +937,7 @@ end function parse_option
!<
subroutine read_mvt(this, iout)
! -- modules
use GwtMvtModule, only: mvt_cr
use TspMvtModule, only: mvt_cr
! -- dummy
class(GwtExchangeType) :: this !< GwtExchangeType
integer(I4B), intent(in) :: iout
Expand All @@ -947,6 +947,7 @@ subroutine read_mvt(this, iout)
! for gwtmodel1 so that a call to save flows has an associated dis
! object.
call mvt_cr(this%mvt, this%name, this%inmvt, iout, this%gwtmodel1%fmi, &
this%gwtmodel1%eqnsclfac, &
gwfmodelname1=this%gwfmodelname1, &
gwfmodelname2=this%gwfmodelname2, &
fmi2=this%gwtmodel2%fmi)
Expand Down
29 changes: 20 additions & 9 deletions src/Model/Connection/GwtInterfaceModel.f90
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
module GwtInterfaceModelModule
use KindModule, only: I4B, DP
use ConstantsModule, only: DONE
use MemoryManagerModule, only: mem_allocate, mem_deallocate, mem_reallocate
use MemoryHelperModule, only: create_mem_path
use NumericalModelModule, only: NumericalModelType
use GwtModule, only: GwtModelType, CastAsGwtModel
use GwfDisuModule, only: disu_cr, CastAsDisuType
use GwtFmiModule, only: fmi_cr, GwtFmiType
use GwtAdvModule, only: adv_cr, GwtAdvType
use GwtAdvOptionsModule, only: GwtAdvOptionsType
use TspFmiModule, only: fmi_cr, TspFmiType
use TspAdvModule, only: adv_cr, TspAdvType
use TspAdvOptionsModule, only: TspAdvOptionsType
use GwtDspModule, only: dsp_cr, GwtDspType
use GwtDspOptionsModule, only: GwtDspOptionsType
use GwtMstModule, only: mst_cr
use GwtObsModule, only: gwt_obs_cr
use TspObsModule, only: tsp_obs_cr
use GridConnectionModule

implicit none
Expand All @@ -25,12 +26,16 @@ module GwtInterfaceModelModule

integer(i4B), pointer :: iAdvScheme => null() !< the advection scheme: 0 = up, 1 = central, 2 = tvd
integer(i4B), pointer :: ixt3d => null() !< xt3d setting: 0 = off, 1 = lhs, 2 = rhs
real(DP), pointer :: ieqnsclfac => null() !< governing eqn scaling factor: 1: GWT, >1: GWE

class(GridConnectionType), pointer :: gridConnection => null() !< The grid connection class will provide the interface grid
class(GwtModelType), private, pointer :: owner => null() !< the real GWT model for which the exchange coefficients
!! are calculated with this interface model

real(DP), dimension(:), pointer, contiguous :: porosity => null() !< to be filled with MST porosity

contains

procedure, pass(this) :: gwtifmod_cr
procedure :: model_df => gwtifmod_df
procedure :: model_ar => gwtifmod_ar
Expand Down Expand Up @@ -59,6 +64,7 @@ subroutine gwtifmod_cr(this, name, iout, gridConn)
! defaults
this%iAdvScheme = 0
this%ixt3d = 0
this%ieqnsclfac = DONE

this%iout = iout
this%gridConnection => gridConn
Expand All @@ -79,10 +85,12 @@ subroutine gwtifmod_cr(this, name, iout, gridConn)

! create dis and packages
call disu_cr(this%dis, this%name, '', -1, this%iout)
call fmi_cr(this%fmi, this%name, 0, this%iout)
call adv_cr(this%adv, this%name, adv_unit, this%iout, this%fmi)
call fmi_cr(this%fmi, this%name, 0, this%iout, this%ieqnsclfac, &
this%depvartype)
call adv_cr(this%adv, this%name, adv_unit, this%iout, this%fmi, &
this%ieqnsclfac)
call dsp_cr(this%dsp, this%name, '', -dsp_unit, this%iout, this%fmi)
call gwt_obs_cr(this%obs, inobs)
call tsp_obs_cr(this%obs, inobs)

end subroutine gwtifmod_cr

Expand All @@ -94,6 +102,7 @@ subroutine allocate_scalars(this, modelname)

call mem_allocate(this%iAdvScheme, 'ADVSCHEME', this%memoryPath)
call mem_allocate(this%ixt3d, 'IXT3D', this%memoryPath)
call mem_allocate(this%ieqnsclfac, 'IEQNSCLFAC', this%memoryPath)

end subroutine allocate_scalars

Expand All @@ -117,7 +126,7 @@ subroutine gwtifmod_df(this)
class(GwtInterfaceModelType) :: this !< the GWT interface model
! local
class(*), pointer :: disPtr
type(GwtAdvOptionsType) :: adv_options
type(TspAdvOptionsType) :: adv_options
type(GwtDspOptionsType) :: dsp_options

this%moffset = 0
Expand All @@ -127,7 +136,7 @@ subroutine gwtifmod_df(this)
! define DISU
disPtr => this%dis
call this%gridConnection%getDiscretization(CastAsDisuType(disPtr))
call this%fmi%fmi_df(this%dis)
call this%fmi%fmi_df(this%dis, 1)

if (this%inadv > 0) then
call this%adv%adv_df(adv_options)
Expand Down Expand Up @@ -192,6 +201,7 @@ subroutine gwtifmod_da(this)
! this
call mem_deallocate(this%iAdvScheme)
call mem_deallocate(this%ixt3d)
call mem_deallocate(this%ieqnsclfac)

! gwt packages
call this%dis%dis_da()
Expand Down Expand Up @@ -219,6 +229,7 @@ subroutine gwtifmod_da(this)
call mem_deallocate(this%inmvt)
call mem_deallocate(this%inoc)
call mem_deallocate(this%inobs)
call mem_deallocate(this%eqnsclfac)

! base
call this%NumericalModelType%model_da()
Expand Down
Loading