flopy.seawat.swtvsc Module¶

class
flopy.seawat.swtvsc.
SeawatVsc
(model, mt3dmuflg=1, viscmin=0.0, viscmax=0.0, viscref=0.0008904, nsmueos=0, mutempopt=2, mtmuspec=1, dmudc=1.923e06, cmuref=0.0, mtmutempspec=1, amucoeff=None, invisc=1, visc=1, extension='vsc', unitnumber=None, filenames=None, **kwargs)¶ SEAWAT Viscosity Package Class.
Parameters: model : model object
The model object (of type
flopy.seawat.swt.Seawat
) to which this package will be added.mt3dmuflg (or mt3drhoflg) : int
is the MT3DMS species number that will be used in the equation to compute fluid viscosity. If MT3DMUFLG >= 0, fluid density is calculated using the MT3DMS species number that corresponds with MT3DMUFLG. If MT3DMUFLG = 1, fluid viscosity is calculated using one or more MT3DMS species.
viscmin : float
is the minimum fluid viscosity. If the resulting viscosity value calculated with the equation is less than VISCMIN, the viscosity value is set to VISCMIN. If VISCMIN = 0, the computed fluid viscosity is not limited by VISCMIN (this is the option to use for most simulations). If VISCMIN > 0, a computed fluid viscosity less than VISCMIN is automatically reset to VISCMIN.
viscmax : float
is the maximum fluid viscosity. If the resulting viscosity value calculated with the equation is greater than VISCMAX, the viscosity value is set to VISCMAX. If VISCMAX = 0, the computed fluid viscosity is not limited by VISCMAX (this is the option to use for most simulations). If VISCMAX > 0, a computed fluid viscosity larger than VISCMAX is automatically reset to VISCMAX.
viscref : float
is the fluid viscosity at the reference concentration and reference temperature. For most simulations, VISCREF is specified as the viscosity of freshwater.
dmudc : float
is the slope of the linear equation that relates fluid viscosity to solute concentration.
nmueos : int
is the number of MT3DMS species to be used in the linear equation for fluid viscosity (this number does not include the temperature species if the nonlinear option is being used). This value is read only if MT3DMUFLG = 1. A value of zero indicates that none of the MT3DMS species have a linear effect on fluid viscosity (the nonlinear temperature dependence may still be activated); nothing should be entered for item 3c in this case.
mutempopt : int
is a flag that specifies the option for including the effect of temperature on fluid viscosity. If MUTEMPOPT = 0, the effect of temperature on fluid viscosity is not included or is a simple linear relation that is specified in item 3c. If MUTEMPOPT = 1, fluid viscosity is calculated using equation 18. The size of the AMUCOEFF array in item 3e is 4 (MUNCOEFF = 4). If MUTEMPOPT = 2, fluid viscosity is calculated using equation 19. The size of the AMUCOEFF array in item 3e is 5 (MUNCOEFF = 5). If MUTEMPOPT = 3, fluid viscosity is calculated using equation 20. The size of the AMUCOEFF array in item 3e is 2 (MUNCOEFF = 2). If NSMUEOS and MUTEMPOPT are both set to zero, all fluid viscosities are set to VISCREF.
mtmuspec : int, or list of ints (of size nsmueos) if nsmueos > 1
is the MT3DMS species number corresponding to the adjacent DMUDC and CMUREF.
dmudc : float, or list of floats (of size nsmueos) if nsmueos > 1
is the slope of the linear equation that relates fluid viscosity to solute concentration.
cmuref : float, or list of floats (of size nsmueos) if nsmueos > 1
is the reference concentration.
mtmuspectemp : int
is the MT3DMS species number that corresponds to temperature. This value must be between 1 and NCOMP and should not be listed in MTMUSPEC of item 3c.
amucoeff : float
is the coefficient array of size MUNCOEFF. AMUCOEFF is A in equations 18, 19, and 20.
muncoef : int
is the size of the AMUCOEFF array.
invisc : int
is a flag. INVISC is read only if MT3DMUFLG is equal to zero. If INVISC < 0, values for the VISC array will be reused from the previous stress period. If it is the first stress period, values for the VISC array will be set to VISCREF. If INVISC = 0, values for the VISC array will be set to VISCREF. If INVISC >= 1, values for the VISC array will be read from item 5. If INVISC = 2, values read for the VISC array are assumed to represent solute concentration, and will be converted to viscosity values.
visc : float or array of floats (nlay, nrow, ncol)
is the fluid viscosity array read for each layer using the MODFLOW2000 U2DREL array reader. The VISC array is read only if MT3DMUFLG is equal to zero. The VISC array may also be entered in terms of solute concen tration (or any other units) if INVISC is set to 2, and the simple linear expression in item 3 can be used to represent the relation to viscosity.
extension : string
Filename extension (default is ‘vsc’)
unitnumber : int
File unit number (default is 38).
Examples
>>> import flopy >>> m = flopy.seawat.Seawat() >>> vsc = flopy.modflow.SeawatVsc(m)

check
(f=None, verbose=True, level=1)¶ Check package data for common errors.
Parameters: f : str or file handle
String defining file name or file handle for summary file of check method output. If a sting is passed a file handle is created. If f is None, check method does not write results to a summary file. (default is None)
verbose : bool
Boolean flag used to determine if check method results are written to the screen
level : int
Check method analysis level. If level=0, summary checks are performed. If level=1, full checks are performed.
Returns: None
Examples
>>> import flopy >>> m = flopy.modflow.Modflow.load('model.nam') >>> m.dis.check()

static
load
(f, model, nper=None, ext_unit_dict=None)¶ Load an existing package.
Parameters: f : filename or file handle
File to load.
model : model object
The model object (of type
flopy.seawat.swt.Seawat
) to which this package will be added.nper : int
The number of stress periods. If nper is None, then nper will be obtained from the model object. (default is None).
ext_unit_dict : dictionary, optional
If the arrays in the file are specified using EXTERNAL, or older style array control records, then f should be a file handle. In this case ext_unit_dict is required, which can be constructed using the function
flopy.utils.mfreadnam.parsenamefile
.Returns: vsc : SeawatVsc object
SeawatVsc object.
Examples
>>> import flopy >>> mf = flopy.modflow.Modflow() >>> dis = flopy.modflow.ModflowDis(mf) >>> mt = flopy.mt3d.Mt3dms() >>> swt = flopy.seawat.Seawat(modflowmodel=mf, mt3dmsmodel=mt) >>> vdf = flopy.seawat.SeawatVsc.load('test.vsc', m)

plot
(**kwargs)¶ Plot 2D, 3D, transient 2D, and stress period list (MfList) package input data
Parameters: **kwargs : dict
 filename_base : str
Base file name that will be used to automatically generate file names for output image files. Plots will be exported as image files if file_name_base is not None. (default is None)
 file_extension : str
Valid matplotlib.pyplot file extension for savefig(). Only used if filename_base is not None. (default is ‘png’)
 mflay : int
MODFLOW zerobased layer number to return. If None, then all all layers will be included. (default is None)
 kper : int
MODFLOW zerobased stress period number to return. (default is zero)
 key : str
MfList dictionary key. (default is None)
Returns: axes : list
Empty list is returned if filename_base is not None. Otherwise a list of matplotlib.pyplot.axis are returned.
Examples
>>> import flopy >>> ml = flopy.modflow.Modflow.load('test.nam') >>> ml.dis.plot()

to_shapefile
(filename, **kwargs)¶ Export 2D, 3D, and transient 2D model data to shapefile (polygons). Adds an attribute for each layer in each data array
Parameters: filename : str
Shapefile name to write
Returns: None
Examples
>>> import flopy >>> ml = flopy.modflow.Modflow.load('test.nam') >>> ml.lpf.to_shapefile('test_hk.shp')

write_file
()¶ Write the package file
Returns: None
