Note
MODFLOW-USG CLN package demo
This example problem demonstrates use of the CLN process for simulating flow to a well pumping from two aquifers seperated by an impermeable confining unit. A structured finite-difference grid with 100 rows and 100 columns was used. Each square cells is 470m by 470 m in extent. Initial heads are 10m in aquifer 1 and 30m in aquifer 2.
[1]:
import os, shutil
from tempfile import TemporaryDirectory
import numpy as np
import matplotlib.pyplot as plt
import flopy
[2]:
# temporary directory
temp_dir = TemporaryDirectory()
cln_ws = temp_dir.name
Loading Example 03_conduit_confined
The elevation of the top of layer 1 is -100 m, the bottom of layer 1 is -110 m, the top of layer 2 is -120 m and the bottom of layer 2 is -130 m. The confining unit between layers1 and 2 is impermeable and is represented using a quasi-three-dimensional approach. The only way a stress from one aquifer can be propagated to another is through the cln well that penetrates both aquifers.
The hydraulic conductivity values of the upper and lower aquifers are 100 and 400 m/d, respectively. Both aquifers have a primaey storage coefficient of 0.0001 and a specific yield of 0.01.
A vertical conduit well is located at the center of the domain and has a radius of 0.5 m. The well pumps 62,840 m3/d and is open fully to both aquifers from top to bottom. The CLN Process was used with a circular conduit geometry type to discretize the well bore with two conduit cells, one in each layer. The WEL Package was used to pump from the bottom CLN cell.
[3]:
model_ws = os.path.join("../../examples/data/mfusg_test", "03_conduit_confined")
mf = flopy.mfusg.MfUsg.load(
"ex3.nam", model_ws=model_ws, exe_name="mfusg", check=False, verbose=True
)
Creating new model with name: ex3
--------------------------------------------------
Parsing the namefile --> ../../examples/data/mfusg_test/03_conduit_confined/ex3.nam
could not set filehandle to ex3.lst
could not set filehandle to ex3.cbb
could not set filehandle to ex3.hds
could not set filehandle to ex3.ddn
could not set filehandle to ex3.clncbb
could not set filehandle to ex3.clnhds
--------------------------------------------------
External unit dictionary:
{7: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.lst, filetype:LIST, 1: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.bas, filetype:BAS6, 14: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.wel, filetype:WEL, 12: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.dis, filetype:DIS, 11: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.bcf, filetype:BCF6, 13: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.cln, filetype:CLN, 22: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.oc, filetype:OC, 19: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.sms, filetype:SMS, 50: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.cbb, filetype:DATA(BINARY), 30: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.hds, filetype:DATA(BINARY), 31: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.ddn, filetype:DATA(BINARY), 35: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.clncbb, filetype:DATA(BINARY), 36: filename:../../examples/data/mfusg_test/03_conduit_confined/ex3.clnhds, filetype:DATA(BINARY)}
--------------------------------------------------
ModflowBas6 free format:True
loading dis package file...
Loading dis package with:
2 layers, 100 rows, 100 columns, and 1 stress periods
loading laycbd...
loading delr...
loading delc...
loading top...
loading botm...
for 2 layers and 1 confining beds
loading stress period data...
for 1 stress periods
adding Package: DIS
DIS package load...success
LIST package load...skipped
loading bas6 package file...
adding Package: BAS6
BAS6 package load...success
loading wel package file...
loading <class 'flopy.mfusg.mfusgwel.MfUsgWel'> for kper 1
implicit itmp_cln of 0 in ../../examples/data/mfusg_test/03_conduit_confined/ex3.wel
Adding ex3.cbc (unit=50) to the output list.
adding Package: WEL
WEL package load...success
loading bcf package file...
loading ipakcb, HDRY, IWDFLG, WETFCT, IWETIT, IHDWET...
loading LAYCON...
loading TRPY...
loading sf1 layer 1...
loading hy layer 1...
loading vcont layer 1...
loading sf2 layer 1...
loading sf1 layer 2...
loading hy layer 2...
loading sf2 layer 2...
adding Package: BCF6
BCF6 package load...success
loading CLN package file...
ncln 1
iclnnds -1
iclncb 35
iclnhd 36
iclndd 0
iclnib 0
nclngwc 2
TRANSIENT False
PRINTIAJA False
RECTANGULAR 0
BHEDETAIL False
SAVECLNCON 0
SAVECLNMAS 0
GRAVITY None
VISCOSITY None
Reading nndcln...
Reading node_prop...
Reading cln_gwc...
Reading cln_circ...
Reading ibound...
Reading strt...
Adding ex3.clncbb (unit=35) to the output list.
Adding ex3.clnhds (unit=36) to the output list.
adding Package: CLN
CLN package load...success
loading oc package file...
Adding ex3.hds (unit=30) to the output list.
Adding ex3.ddn (unit=31) to the output list.
adding Package: OC
OC package load...success
loading sms package file...
loading HCLOSE HICLOSE MXITER ITER1 IPRSMS NONLINMETH LINMETH...
HCLOSE 0.001
HICLOSE 1e-05
MXITER 220
ITER1 600
IPRSMS 1
NONLINMETH 2
LINMETH 1
loading THETA AKAPPA GAMMA AMOMENTUM NUMTRACK BTOL BREDUC RESLIM...
THETA 0.9
AKAPPA 0.07
GAMMA 0.1
AMOMENTUM 0.0
NUMTRACK 200
BTOL 1.1
BREDUC 0.2
RESLIM 1.0
loading IACL NORDER LEVEL NORTH IREDSYS RRCTOL IDROPTOL EPSRN
IACL 2
NORDER 1
LEVEL 3
NORTH 14
IREDSYS 0
RRCTOL 0.0
IDROPTOL 0
EPSRN 0.001
adding Package: SMS
SMS package load...success
DATA(BINARY) package load...skipped
ex3.cbb
DATA(BINARY) package load...skipped
ex3.hds
DATA(BINARY) package load...skipped
ex3.ddn
DATA(BINARY) package load...skipped
ex3.clncbb
DATA(BINARY) package load...skipped
ex3.clnhds
WARNING:
External file unit 0 does not exist in ext_unit_dict.
The following 7 packages were successfully loaded.
ex3.dis
ex3.bas
ex3.wel
ex3.bcf
ex3.cln
ex3.oc
ex3.sms
The following 1 packages were not loaded.
ex3.lst
[4]:
# output control
mf.remove_package("OC")
spd = {}
for i in range(mf.nper):
for j in range(mf.dis.nstp[i]):
spd[(i, j)] = ["save head", "save budget"]
oc = flopy.modflow.ModflowOc(
mf, stress_period_data=spd, unitnumber=[22, 30, 31, 50]
)
removing Package: ['OC']
adding Package: OC
[5]:
model_ws = os.path.join(cln_ws, "ex03")
if os.path.exists(model_ws):
shutil.rmtree(model_ws)
os.mkdir(model_ws)
mf.model_ws = model_ws
changing model workspace...
../../../../../../../tmp/tmp4yh8kv73/ex03
[6]:
mf.write_input()
success, buff = mf.run_model(silent=True, report=True)
if success:
for line in buff:
print(line)
else:
raise ValueError("Failed to run.")
Writing packages:
Package: DIS
Package: BAS6
Package: WEL
Package: BCF6
Package: CLN
Package: SMS
Package: OC
MODFLOW-USG
U.S. GEOLOGICAL SURVEY MODULAR FINITE-DIFFERENCE GROUNDWATER FLOW MODEL
Version 1.5.00 02/27/2019
Using NAME file: ex3.nam
Run start date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:09
Solving: Stress period: 1 Time step: 1 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 2 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 3 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 4 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 5 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 6 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 7 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 8 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 9 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 10 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 11 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 12 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 13 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 14 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 15 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 16 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 17 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 18 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 19 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 20 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 21 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 22 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 23 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 24 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 25 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 26 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 27 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 28 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 29 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 30 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 31 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 32 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 33 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 34 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 35 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 36 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 37 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 38 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 39 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 40 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 41 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 42 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 43 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 44 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 45 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 46 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 47 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 48 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 49 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 50 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 51 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 52 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 53 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 54 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 55 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 56 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 57 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 58 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 59 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 60 Groundwater Flow Eqn.
Run end date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:11
Elapsed run time: 2.003 Seconds
Normal termination of simulation
[7]:
head_file = os.path.join(mf.model_ws, "ex3.clnhds")
headobj = flopy.utils.HeadFile(head_file)
[8]:
simtimes = headobj.get_times()
nper = len(simtimes)
nnode = mf.cln.nclnnds
simhead = np.zeros((1, 1, nnode, nper))
for i in range(nper):
simhead[:, :, :, i] = headobj.get_data(kstpkper=(i, 0))
simhead = np.squeeze(simhead)
[9]:
fig = plt.figure(figsize=(8, 5), dpi=150)
ax = fig.add_subplot(111)
ax.plot(simtimes, simhead[0], label="CLN Layer 1")
ax.plot(simtimes, simhead[1], label="CLN Layer 2")
ax.set_xlabel("Time, in days")
ax.set_ylabel("Simulated Head in pumping well, in meters")
ax.set_title("MODFLOW USG Ex3 Conduit Confined")
ax.legend()
[9]:
<matplotlib.legend.Legend at 0x7f280a254730>
[10]:
cbb_file = os.path.join(mf.model_ws, "ex3.clncbb")
cbb = flopy.utils.CellBudgetFile(cbb_file)
# cbb.list_records()
simflow = cbb.get_data(kstpkper=(0, 0), text="GWF")[0]
for i in range(nper - 1):
simflow = np.append(
simflow, cbb.get_data(kstpkper=(i + 1, 0), text="GWF")[0]
)
simflow1 = simflow[simflow["node"] == 1]["q"]
simflow2 = simflow[simflow["node"] == 2]["q"]
[11]:
fig = plt.figure(figsize=(8, 11), dpi=150)
ax1 = fig.add_subplot(211)
ax1.plot(simtimes, simflow1, label="CLN Layer 1")
ax1.set_xlabel("Time, in days")
ax1.set_ylabel("Discharge to well, in cubic meters per day")
ax1.set_title("MODFLOW USG Ex3 Conduit Confined")
ax1.legend()
ax2 = fig.add_subplot(212)
ax2.plot(simtimes, simflow2, label="CLN Layer 2")
ax2.set_xlabel("Time, in days")
ax2.set_ylabel("Discharge to well, in cubic meters per day")
ax2.legend()
[11]:
<matplotlib.legend.Legend at 0x7f280a1235e0>
Create example 03A_conduit_unconfined of mfusg 1.5
An unconfined example was simulated with this problem setup. The same simulation setup of previous example is used. However, the elevation of the top of layer 1 is 10 m, the bottom of layer 1 is 0 m, the top of layer 2 is -10 m, and the bottom of layer 2 is -20 m. The CLN domain is discretized using two vertical conduit cells. It depicts the behavior of unconfined flow in the conduit when the CLN cell in layer 1 becomes dry.
[12]:
modelname = "ex03a"
model_ws = os.path.join(cln_ws, modelname)
mf = flopy.mfusg.MfUsg(
modelname=modelname, model_ws=model_ws, exe_name="mfusg", verbose=True
)
[13]:
ipakcb = 50
nlay = 2
nrow = 100
ncol = 100
laycbd = [1, 0]
delr = 470.000
delc = 470.000
ztop = 10.0
botm = [0.0, -10.0, -20.0]
perlen = 160
nstp = 160
dis = flopy.modflow.ModflowDis(
mf,
nlay,
nrow,
ncol,
delr=delr,
delc=delc,
laycbd=laycbd,
top=ztop,
botm=botm,
perlen=perlen,
nstp=nstp,
steady=False,
lenuni=0,
)
bas = flopy.modflow.ModflowBas(mf, ibound=1, strt=[10.0, 30.0])
bcf = flopy.mfusg.MfUsgBcf(
mf,
ipakcb=ipakcb,
laycon=4,
wetfct=1.0,
iwetit=5,
hy=[100.0, 400.0],
vcont=0.0,
sf1=1e-4,
sf2=0.01,
)
sms = flopy.mfusg.MfUsgSms(
mf,
hclose=1.0e-3,
hiclose=1.0e-5,
mxiter=220,
iter1=600,
iprsms=1,
nonlinmeth=2,
linmeth=1,
theta=0.9,
akappa=0.07,
gamma=0.1,
amomentum=0.0,
numtrack=200,
btol=1.1,
breduc=0.2,
reslim=1.0,
iacl=2,
norder=1,
level=3,
north=14,
)
adding Package: DIS
adding Package: BAS6
Adding ex03a.cbc (unit=50) to the output list.
adding Package: BCF6
adding Package: SMS
[14]:
# output control
spd = {}
for i in range(mf.nper):
for j in range(mf.dis.nstp[i]):
spd[(i, j)] = ["save head", "save budget"]
oc = flopy.modflow.ModflowOc(mf, stress_period_data=spd)
Adding ex03a.hds (unit=51) to the output list.
adding Package: OC
[15]:
unitnumber = [71, 35, 36, 0, 0, 0, 0]
node_prop = [
[1, 1, 0, 10.0, 0.0, 1.57, 0, 0],
[2, 1, 0, 10.0, -20.0, 1.57, 0, 0],
]
cln_gwc = [
[1, 1, 50, 50, 0, 0, 10.0, 1.0, 0],
[2, 2, 50, 50, 0, 0, 10.0, 1.0, 0],
]
nconduityp = 1
cln_circ = [[1, 0.5, 3.23e10]]
strt = [10.0, 30.0]
cln = flopy.mfusg.MfUsgCln(
mf,
ncln=1,
iclnnds=-1,
nndcln=2,
nclngwc=2,
node_prop=node_prop,
cln_gwc=cln_gwc,
cln_circ=cln_circ,
strt=strt,
unitnumber=unitnumber,
)
Adding ex03a.clncb (unit=35) to the output list.
Adding ex03a.clnhd (unit=36) to the output list.
adding Package: CLN
[16]:
options = []
options.append("autoflowreduce")
cln_stress_period_data = {0: [[1, -62840.0]]}
wel = flopy.mfusg.MfUsgWel(
mf,
ipakcb=ipakcb,
options=options,
cln_stress_period_data=cln_stress_period_data,
)
adding Package: WEL
[17]:
wel.cln_stress_period_data.data
[17]:
{0: rec.array([(1, -62840.)],
dtype=[('node', '<i8'), ('flux', '<f4')])}
[18]:
mf.write_input()
success, buff = mf.run_model(silent=True, report=True)
if success:
for line in buff:
print(line)
else:
raise ValueError("Failed to run.")
Writing packages:
Package: DIS
Package: BAS6
Package: BCF6
Package: SMS
Package: OC
Package: CLN
Package: WEL
MODFLOW-USG
U.S. GEOLOGICAL SURVEY MODULAR FINITE-DIFFERENCE GROUNDWATER FLOW MODEL
Version 1.5.00 02/27/2019
Using NAME file: ex03a.nam
Run start date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:12
Solving: Stress period: 1 Time step: 1 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 2 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 3 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 4 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 5 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 6 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 7 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 8 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 9 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 10 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 11 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 12 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 13 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 14 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 15 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 16 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 17 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 18 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 19 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 20 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 21 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 22 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 23 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 24 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 25 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 26 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 27 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 28 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 29 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 30 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 31 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 32 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 33 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 34 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 35 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 36 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 37 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 38 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 39 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 40 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 41 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 42 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 43 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 44 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 45 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 46 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 47 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 48 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 49 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 50 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 51 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 52 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 53 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 54 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 55 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 56 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 57 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 58 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 59 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 60 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 61 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 62 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 63 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 64 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 65 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 66 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 67 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 68 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 69 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 70 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 71 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 72 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 73 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 74 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 75 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 76 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 77 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 78 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 79 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 80 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 81 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 82 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 83 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 84 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 85 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 86 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 87 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 88 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 89 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 90 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 91 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 92 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 93 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 94 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 95 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 96 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 97 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 98 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 99 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 100 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 101 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 102 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 103 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 104 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 105 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 106 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 107 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 108 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 109 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 110 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 111 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 112 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 113 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 114 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 115 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 116 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 117 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 118 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 119 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 120 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 121 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 122 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 123 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 124 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 125 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 126 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 127 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 128 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 129 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 130 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 131 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 132 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 133 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 134 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 135 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 136 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 137 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 138 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 139 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 140 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 141 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 142 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 143 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 144 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 145 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 146 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 147 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 148 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 149 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 150 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 151 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 152 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 153 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 154 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 155 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 156 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 157 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 158 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 159 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 160 Groundwater Flow Eqn.
Run end date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:27
Elapsed run time: 15.101 Seconds
Normal termination of simulation
[19]:
head_file = os.path.join(mf.model_ws, modelname + ".clnhd")
headobj = flopy.utils.HeadFile(head_file)
simtimes = headobj.get_times()
nper = len(simtimes)
nnode = mf.cln.nclnnds
simhead = np.zeros((1, 1, nnode, nper))
for i in range(nper):
simhead[:, :, :, i] = headobj.get_data(kstpkper=(i, 0))
head_case1 = np.squeeze(simhead)
[20]:
fig = plt.figure(figsize=(8, 5), dpi=150)
ax = fig.add_subplot(111)
ax.plot(simtimes, head_case1[0], label="CLN Layer 1")
ax.plot(simtimes, head_case1[1], label="CLN Layer 2")
ax.set_xlabel("Time, in days")
ax.set_ylabel("Simulated Head in pumping well, in meters")
ax.set_title("MODFLOW USG Ex3a Conduit Unconfined")
ax.legend()
[20]:
<matplotlib.legend.Legend at 0x7f280a1cd000>
[21]:
cbb_file = os.path.join(mf.model_ws, modelname + ".clncb")
cbb = flopy.utils.CellBudgetFile(cbb_file)
# cbb.list_records()
simflow = cbb.get_data(kstpkper=(0, 0), text="GWF")[0]
for i in range(nper - 1):
simflow = np.append(
simflow, cbb.get_data(kstpkper=(i + 1, 0), text="GWF")[0]
)
flow_case1 = simflow
Modify CLN amd WEL package to example create 03B_conduit_unconfined of mfusg 1.5
The problem is solved using only one CLN conduit cell to represent the well connecting both aquifer layers. This is conceptually equivalent to the MNW methodology and does not colve for flow within the well. The behavior of unconfined flow between the well and layer 1 negalects the dry-cell condition whereby head in the well is below the bottom of layer 1.
[22]:
modelname = "ex03b"
model_ws = os.path.join(cln_ws, modelname)
mf.model_ws = model_ws
mf._set_name(modelname)
for i, fname in enumerate(mf.output_fnames):
mf.output_fnames[i] = modelname + os.path.splitext(fname)[1]
creating model workspace...
../../../../../../../tmp/tmp4yh8kv73/ex03b
changing model workspace...
../../../../../../../tmp/tmp4yh8kv73/ex03b
[23]:
mf.remove_package("CLN")
node_prop = [[1, 1, 0, 30.0, -20.0, 1.57]]
cln_gwc = [
[1, 1, 50, 50, 0, 0, 10.0, 1.0, 0],
[1, 2, 50, 50, 0, 0, 10.0, 1.0, 0],
]
strt = 20.0
cln = flopy.mfusg.MfUsgCln(
mf,
ncln=1,
iclnnds=-1,
nndcln=1,
nclngwc=2,
node_prop=node_prop,
cln_gwc=cln_gwc,
cln_circ=cln_circ,
strt=strt,
unitnumber=unitnumber,
)
removing Package: ['CLN']
adding Package: CLN
[24]:
mf.remove_package("WEL")
options = []
options.append("autoflowreduce")
options.append("iunitafr 55")
cln_stress_period_data = {0: [[0, -62840.0]]}
wel = flopy.mfusg.MfUsgWel(
mf,
ipakcb=ipakcb,
options=options,
cln_stress_period_data=cln_stress_period_data,
)
removing Package: ['WEL']
Adding ex03b.afr (unit=55) to the output list.
adding Package: WEL
[25]:
mf.write_input()
success, buff = mf.run_model(silent=True, report=True)
if success:
for line in buff:
print(line)
else:
raise ValueError("Failed to run.")
Writing packages:
Package: DIS
Package: BAS6
Package: BCF6
Package: SMS
Package: OC
Package: CLN
Package: WEL
MODFLOW-USG
U.S. GEOLOGICAL SURVEY MODULAR FINITE-DIFFERENCE GROUNDWATER FLOW MODEL
Version 1.5.00 02/27/2019
Using NAME file: ex03b.nam
Run start date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:28
Solving: Stress period: 1 Time step: 1 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 2 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 3 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 4 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 5 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 6 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 7 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 8 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 9 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 10 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 11 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 12 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 13 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 14 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 15 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 16 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 17 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 18 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 19 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 20 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 21 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 22 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 23 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 24 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 25 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 26 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 27 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 28 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 29 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 30 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 31 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 32 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 33 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 34 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 35 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 36 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 37 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 38 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 39 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 40 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 41 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 42 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 43 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 44 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 45 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 46 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 47 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 48 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 49 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 50 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 51 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 52 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 53 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 54 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 55 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 56 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 57 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 58 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 59 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 60 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 61 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 62 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 63 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 64 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 65 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 66 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 67 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 68 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 69 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 70 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 71 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 72 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 73 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 74 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 75 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 76 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 77 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 78 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 79 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 80 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 81 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 82 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 83 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 84 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 85 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 86 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 87 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 88 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 89 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 90 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 91 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 92 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 93 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 94 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 95 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 96 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 97 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 98 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 99 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 100 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 101 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 102 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 103 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 104 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 105 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 106 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 107 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 108 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 109 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 110 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 111 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 112 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 113 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 114 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 115 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 116 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 117 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 118 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 119 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 120 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 121 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 122 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 123 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 124 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 125 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 126 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 127 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 128 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 129 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 130 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 131 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 132 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 133 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 134 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 135 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 136 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 137 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 138 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 139 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 140 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 141 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 142 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 143 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 144 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 145 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 146 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 147 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 148 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 149 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 150 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 151 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 152 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 153 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 154 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 155 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 156 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 157 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 158 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 159 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 160 Groundwater Flow Eqn.
Run end date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:38
Elapsed run time: 10.805 Seconds
Normal termination of simulation
[26]:
head_file = os.path.join(mf.model_ws, modelname + ".clnhd")
headobj = flopy.utils.HeadFile(head_file)
simtimes = headobj.get_times()
nper = len(simtimes)
nnode = mf.cln.nclnnds
simhead = np.zeros((1, 1, nnode, nper))
for i in range(nper):
simhead[:, :, :, i] = headobj.get_data(kstpkper=(i, 0))
head_case2 = np.squeeze(simhead)
[27]:
fig = plt.figure(figsize=(8, 5), dpi=150)
ax = fig.add_subplot(111)
ax.plot(simtimes, head_case2)
ax.set_xlabel("Time, in days")
ax.set_ylabel("Simulated Head in pumping well, in meters")
ax.set_title("MODFLOW USG Ex3b Conduit Unconfined")
[27]:
Text(0.5, 1.0, 'MODFLOW USG Ex3b Conduit Unconfined')
[28]:
cbb_file = os.path.join(mf.model_ws, modelname + ".clncb")
cbb = flopy.utils.CellBudgetFile(cbb_file)
# cbb.list_records()
simflow = cbb.get_data(kstpkper=(0, 0), text="GWF")[0]
for i in range(nper - 1):
simflow = np.append(
simflow, cbb.get_data(kstpkper=(i + 1, 0), text="GWF")[0]
)
flow_case2 = simflow
Modify CLN amd WEL package to example create 03C_conduit_unconfined of mfusg 1.5
The CLN well is discretized using two conduit geometry CLN cells but with the confined option for flow winthin the conduit and between CLN and GWF domains.
[29]:
modelname = "ex03c"
model_ws = os.path.join(cln_ws, modelname)
mf.model_ws = model_ws
mf._set_name(modelname)
for i, fname in enumerate(mf.output_fnames):
mf.output_fnames[i] = modelname + os.path.splitext(fname)[1]
creating model workspace...
../../../../../../../tmp/tmp4yh8kv73/ex03c
changing model workspace...
../../../../../../../tmp/tmp4yh8kv73/ex03c
[30]:
mf.remove_package("CLN")
node_prop = [
[1, 1, 0, 10.0, 0.0, 1.57, 1, 0],
[2, 1, 0, 10.0, -20.0, 1.57, 1, 0],
]
cln_gwc = [
[1, 1, 50, 50, 0, 0, 10.0, 1.0, 0],
[2, 2, 50, 50, 0, 0, 10.0, 1.0, 0],
]
strt = [10.0, 30.0]
cln = flopy.mfusg.MfUsgCln(
mf,
ncln=1,
iclnnds=-1,
nndcln=2,
nclngwc=2,
node_prop=node_prop,
cln_gwc=cln_gwc,
cln_circ=cln_circ,
strt=strt,
unitnumber=unitnumber,
)
removing Package: ['CLN']
adding Package: CLN
[31]:
mf.remove_package("WEL")
cln_stress_period_data = {0: [[1, -62840.0]]}
wel = flopy.mfusg.MfUsgWel(
mf,
ipakcb=ipakcb,
options=options,
cln_stress_period_data=cln_stress_period_data,
)
removing Package: ['WEL']
adding Package: WEL
[32]:
mf.write_input()
success, buff = mf.run_model(silent=True, report=True)
if success:
for line in buff:
print(line)
else:
raise ValueError("Failed to run.")
Writing packages:
Package: DIS
Package: BAS6
Package: BCF6
Package: SMS
Package: OC
Package: CLN
Package: WEL
MODFLOW-USG
U.S. GEOLOGICAL SURVEY MODULAR FINITE-DIFFERENCE GROUNDWATER FLOW MODEL
Version 1.5.00 02/27/2019
Using NAME file: ex03c.nam
Run start date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:39
Solving: Stress period: 1 Time step: 1 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 2 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 3 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 4 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 5 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 6 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 7 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 8 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 9 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 10 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 11 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 12 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 13 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 14 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 15 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 16 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 17 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 18 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 19 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 20 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 21 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 22 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 23 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 24 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 25 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 26 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 27 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 28 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 29 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 30 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 31 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 32 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 33 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 34 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 35 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 36 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 37 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 38 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 39 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 40 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 41 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 42 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 43 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 44 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 45 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 46 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 47 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 48 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 49 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 50 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 51 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 52 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 53 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 54 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 55 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 56 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 57 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 58 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 59 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 60 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 61 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 62 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 63 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 64 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 65 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 66 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 67 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 68 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 69 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 70 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 71 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 72 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 73 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 74 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 75 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 76 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 77 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 78 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 79 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 80 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 81 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 82 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 83 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 84 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 85 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 86 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 87 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 88 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 89 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 90 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 91 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 92 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 93 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 94 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 95 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 96 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 97 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 98 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 99 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 100 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 101 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 102 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 103 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 104 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 105 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 106 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 107 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 108 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 109 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 110 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 111 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 112 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 113 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 114 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 115 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 116 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 117 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 118 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 119 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 120 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 121 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 122 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 123 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 124 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 125 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 126 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 127 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 128 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 129 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 130 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 131 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 132 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 133 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 134 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 135 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 136 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 137 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 138 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 139 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 140 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 141 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 142 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 143 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 144 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 145 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 146 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 147 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 148 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 149 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 150 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 151 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 152 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 153 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 154 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 155 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 156 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 157 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 158 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 159 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 160 Groundwater Flow Eqn.
Run end date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:52
Elapsed run time: 13.073 Seconds
Normal termination of simulation
[33]:
head_file = os.path.join(mf.model_ws, modelname + ".clnhd")
headobj = flopy.utils.HeadFile(head_file)
simtimes = headobj.get_times()
nper = len(simtimes)
nnode = mf.cln.nclnnds
simhead = np.zeros((1, 1, nnode, nper))
for i in range(nper):
simhead[:, :, :, i] = headobj.get_data(kstpkper=(i, 0))
head_case3 = np.squeeze(simhead)
[34]:
fig = plt.figure(figsize=(8, 5), dpi=150)
ax = fig.add_subplot(111)
ax.plot(simtimes, head_case3[0], label="CLN Layer 1")
ax.plot(simtimes, head_case3[1], label="CLN Layer 2")
ax.set_xlabel("Time, in days")
ax.set_ylabel("Simulated Head in pumping well, in meters")
ax.set_title("MODFLOW USG Ex3c Conduit Unconfined")
ax.legend()
[34]:
<matplotlib.legend.Legend at 0x7f2800a0e4d0>
[35]:
cbb_file = os.path.join(mf.model_ws, modelname + ".clncb")
cbb = flopy.utils.CellBudgetFile(cbb_file)
# cbb.list_records()
simflow = cbb.get_data(kstpkper=(0, 0), text="GWF")[0]
for i in range(nper - 1):
simflow = np.append(
simflow, cbb.get_data(kstpkper=(i + 1, 0), text="GWF")[0]
)
flow_case3 = simflow
Modify CLN amd WEL package to example create 03D_conduit_unconfined of mfusg 1.5
Only one CLN cell to discretize the well but includes the “flow-to-dry-cell” option to limit flow in layer 1 when the head in the CLN cell is below the bottom of the layer.
[36]:
modelname = "ex03d"
model_ws = os.path.join(cln_ws, modelname)
mf.model_ws = model_ws
mf._set_name(modelname)
for i, fname in enumerate(mf.output_fnames):
mf.output_fnames[i] = modelname + os.path.splitext(fname)[1]
creating model workspace...
../../../../../../../tmp/tmp4yh8kv73/ex03d
changing model workspace...
../../../../../../../tmp/tmp4yh8kv73/ex03d
[37]:
mf.remove_package("CLN")
node_prop = [[1, 1, 0, 30.0, -20.0, 1.57]]
cln_gwc = [
[1, 1, 50, 50, 0, 0, 10.0, 1.0, 1],
[1, 2, 50, 50, 0, 0, 10.0, 1.0, 1],
]
strt = 20.0
cln = flopy.mfusg.MfUsgCln(
mf,
ncln=1,
iclnnds=-1,
nndcln=1,
nclngwc=2,
node_prop=node_prop,
cln_gwc=cln_gwc,
cln_circ=cln_circ,
strt=strt,
unitnumber=unitnumber,
)
removing Package: ['CLN']
adding Package: CLN
[38]:
mf.remove_package("WEL")
cln_stress_period_data = {0: [[0, -62840.0]]}
wel = flopy.mfusg.MfUsgWel(
mf,
ipakcb=ipakcb,
options=options,
cln_stress_period_data=cln_stress_period_data,
)
removing Package: ['WEL']
adding Package: WEL
[39]:
mf.write_input()
success, buff = mf.run_model(silent=True, report=True)
if success:
for line in buff:
print(line)
else:
raise ValueError("Failed to run.")
Writing packages:
Package: DIS
Package: BAS6
Package: BCF6
Package: SMS
Package: OC
Package: CLN
Package: WEL
MODFLOW-USG
U.S. GEOLOGICAL SURVEY MODULAR FINITE-DIFFERENCE GROUNDWATER FLOW MODEL
Version 1.5.00 02/27/2019
Using NAME file: ex03d.nam
Run start date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:04:53
Solving: Stress period: 1 Time step: 1 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 2 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 3 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 4 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 5 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 6 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 7 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 8 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 9 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 10 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 11 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 12 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 13 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 14 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 15 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 16 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 17 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 18 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 19 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 20 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 21 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 22 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 23 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 24 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 25 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 26 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 27 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 28 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 29 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 30 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 31 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 32 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 33 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 34 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 35 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 36 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 37 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 38 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 39 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 40 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 41 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 42 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 43 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 44 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 45 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 46 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 47 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 48 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 49 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 50 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 51 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 52 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 53 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 54 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 55 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 56 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 57 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 58 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 59 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 60 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 61 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 62 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 63 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 64 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 65 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 66 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 67 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 68 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 69 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 70 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 71 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 72 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 73 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 74 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 75 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 76 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 77 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 78 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 79 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 80 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 81 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 82 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 83 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 84 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 85 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 86 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 87 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 88 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 89 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 90 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 91 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 92 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 93 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 94 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 95 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 96 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 97 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 98 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 99 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 100 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 101 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 102 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 103 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 104 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 105 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 106 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 107 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 108 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 109 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 110 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 111 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 112 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 113 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 114 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 115 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 116 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 117 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 118 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 119 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 120 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 121 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 122 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 123 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 124 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 125 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 126 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 127 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 128 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 129 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 130 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 131 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 132 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 133 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 134 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 135 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 136 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 137 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 138 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 139 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 140 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 141 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 142 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 143 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 144 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 145 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 146 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 147 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 148 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 149 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 150 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 151 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 152 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 153 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 154 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 155 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 156 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 157 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 158 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 159 Groundwater Flow Eqn.
Solving: Stress period: 1 Time step: 160 Groundwater Flow Eqn.
Run end date and time (yyyy/mm/dd hh:mm:ss): 2023/05/04 16:05:04
Elapsed run time: 10.959 Seconds
Normal termination of simulation
[40]:
head_file = os.path.join(mf.model_ws, modelname + ".clnhd")
headobj = flopy.utils.HeadFile(head_file)
simtimes = headobj.get_times()
nper = len(simtimes)
nnode = mf.cln.nclnnds
simhead = np.zeros((1, 1, nnode, nper))
for i in range(nper):
simhead[:, :, :, i] = headobj.get_data(kstpkper=(i, 0))
head_case4 = np.squeeze(simhead)
[41]:
cbb_file = os.path.join(mf.model_ws, modelname + ".clncb")
cbb = flopy.utils.CellBudgetFile(cbb_file)
# cbb.list_records()
simflow = cbb.get_data(kstpkper=(0, 0), text="GWF")[0]
for i in range(nper - 1):
simflow = np.append(
simflow, cbb.get_data(kstpkper=(i + 1, 0), text="GWF")[0]
)
flow_case4 = simflow
Comparing four cases
[42]:
fig = plt.figure(figsize=(8, 5), dpi=150)
ax = fig.add_subplot(111)
ax.plot(simtimes, head_case1[1], label="Case A")
ax.plot(simtimes, head_case2, label="Case B")
ax.plot(simtimes, head_case3[1], dashes=[6, 2], label="Case C")
ax.plot(simtimes, head_case4, dashes=[6, 2], label="Case D")
ax.set_xlabel("Time, in days")
ax.set_ylabel("Simulated Head in pumping well, in meters")
ax.legend()
[42]:
<matplotlib.legend.Legend at 0x7f2800969480>
[43]:
fig = plt.figure(figsize=(8, 11), dpi=150)
ax1 = fig.add_subplot(211)
ax1.plot(
simtimes,
flow_case1[::2,]["q"],
label="Case A",
)
ax1.plot(
simtimes,
flow_case2[::2,]["q"],
label="Case B",
)
ax1.plot(
simtimes,
flow_case3[::2,]["q"],
dashes=[6, 2],
label="Case C",
)
ax1.plot(
simtimes,
flow_case4[::2,]["q"],
dashes=[6, 2],
label="Case D",
)
ax1.set_xlabel("Time, in days")
ax1.set_ylabel("Layer 1 flow to well")
ax1.legend()
ax2 = fig.add_subplot(212)
ax2.plot(
simtimes,
flow_case1[1::2,]["q"],
label="Case A",
)
ax2.plot(
simtimes,
flow_case2[1::2,]["q"],
label="Case B",
)
ax2.plot(
simtimes,
flow_case3[1::2,]["q"],
dashes=[6, 2],
label="Case C",
)
ax2.plot(
simtimes,
flow_case4[1::2,]["q"],
dashes=[6, 2],
label="Case D",
)
ax2.set_xlabel("Time, in days")
ax2.set_ylabel("Layer 2 flow to well")
ax2.legend()
[43]:
<matplotlib.legend.Legend at 0x7f28008a77c0>