flopy.utils.get_transmissivities
methodfor computing open interval transmissivities (for weighted averages of heads or fluxes) In practice this method might be used to:
In [1]:
%matplotlib inline
import sys
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import flopy
print(sys.version)
print('numpy version: {}'.format(np.__version__))
print('matplotlib version: {}'.format(mpl.__version__))
print('flopy version: {}'.format(flopy.__version__))
In [2]:
sctop = [-.25, .5, 1.7, 1.5, 3., 2.5] # screen tops
scbot = [-1., -.5, 1.2, 0.5, 1.5, -.2] # screen bottoms
# head in each layer, for 6 head target locations
heads = np.array([[1., 2.0, 2.05, 3., 4., 2.5],
[1.1, 2.1, 2.2, 2., 3.5, 3.],
[1.2, 2.3, 2.4, 0.6, 3.4, 3.2]
])
nl, nr = heads.shape
nc = nr
botm = np.ones((nl, nr, nc), dtype=float)
top = np.ones((nr, nc), dtype=float) * 2.1
hk = np.ones((nl, nr, nc), dtype=float) * 2.
for i in range(nl):
botm[nl-i-1, :, :] = i
botm
Out[2]:
In [3]:
m = flopy.modflow.Modflow('junk', version='mfnwt', model_ws='temp')
dis = flopy.modflow.ModflowDis(m, nlay=nl, nrow=nr, ncol=nc, botm=botm, top=top)
upw = flopy.modflow.ModflowUpw(m, hk=hk)
SpatialReference
has been set up, the real-world x and y coordinates could be supplied with the x
and y
argumentssctop
and scbot
arguments are given, the transmissivites are computed for the open intervals only
(cells that are partially within the open interval have reduced thickness, cells outside of the open interval have transmissivities of 0). If no sctop
or scbot
arguments are supplied, trasmissivites reflect the full saturated thickness in each column of cells (see plot below, which shows different open intervals relative to the model layering)
In [4]:
r, c = np.arange(nr), np.arange(nc)
T = flopy.utils.get_transmissivities(heads, m, r=r, c=c, sctop=sctop, scbot=scbot)
np.round(T, 2)
Out[4]:
In [5]:
m.dis.botm.array[:, r, c]
Out[5]:
In [6]:
fig, ax = plt.subplots()
plt.plot(m.dis.top.array[r, c], label='model top')
for i, l in enumerate(m.dis.botm.array[:, r, c]):
label = 'layer {} bot'.format(i+1)
if i == m.nlay -1:
label = 'model bot'
plt.plot(l, label=label)
plt.plot(heads[0], label='piezometric surface', color='b', linestyle=':')
for iw in range(len(sctop)):
ax.fill_between([iw-.25, iw+.25], scbot[iw], sctop[iw],
facecolor='None', edgecolor='k')
ax.legend(loc=2)
Out[6]:
In [7]:
T = flopy.utils.get_transmissivities(heads, m, r=r, c=c)
np.round(T, 2)
Out[7]:
In [ ]: