flopy.seawat.swtvsc module

class SeawatVsc(model, mt3dmuflg=-1, viscmin=0.0, viscmax=0.0, viscref=0.0008904, nsmueos=0, mutempopt=2, mtmuspec=1, dmudc=1.923e-06, cmuref=0.0, mtmutempspec=1, amucoeff=None, invisc=-1, visc=-1, extension='vsc', unitnumber=None, filenames=None, **kwargs)[source]

Bases: flopy.pakbase.Package

SEAWAT Viscosity Package Class.

Parameters:
  • model (model object) – The model object (of type flopy.seawat.swt.Seawat) to which this package will be added.
  • (or mt3drhoflg) (mt3dmuflg) – 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, or list of floats (of size nsmueos) if nsmueos > 1) – 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 – 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.
  • muncoeff (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 MODFLOW-2000 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 concentration (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).

Notes

Examples

>>> import flopy
>>> m = flopy.seawat.Seawat()
>>> vsc = flopy.modflow.SeawatVsc(m)
classmethod load(f, model, nper=None, ext_unit_dict=None)[source]

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.

Return type:

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)
unitnumber = 38
write_file()[source]

Write the package file

Returns:
Return type:None