flopy.modflow.mfsor module

mfsor module. Contains the ModflowSor class. Note that the user can access the ModflowSor class as flopy.modflow.ModflowSor.

Additional information for this MODFLOW package can be found at the Online MODFLOW Guide.

class ModflowSor(model, mxiter=200, accl=1, hclose=1e-05, iprsor=0, extension='sor', unitnumber=None, filenames=None)[source]

Bases: flopy.pakbase.Package

MODFLOW Slice-successive overrelaxation Package Class.

Parameters:
  • model (model object) – The model object (of type :class:flopy.modflow.mf.Modflow) to which this package will be added.
  • mxiter (integer) – The maximum number of iterations allowed in a time step. (default is 200)
  • accl (float) – The acceleration variable, which must be greater than zero and is generally between 1. and 2. (default is 1)
  • hclose (float > 0) – The head change criterion for convergence. When the maximum absolute value of head change from all nodes during an iteration is less than or equal to hclose, iteration stops. (default is 1e-5)
  • iprsor (integer > 0) – the printout interval for sor. iprsor, if equal to zero, is changed to 999. The maximum head change (positive or negative) is printed for each iteration of a time step whenever the time step is an even multiple of iprsor. This printout also occurs at the end of each stress period regardless of the value of iprsor. (default is 0)
  • extension (string) – Filename extension (default is ‘sor’)
  • unitnumber (int) – File unit number (default is None).
  • filenames (str or list of str) – Filenames to use for the package. If filenames=None the package name will be created using the model name and package extension. If a single string is passed the package will be set to the string. Default is None.

Notes

Examples

>>> import flopy
>>> ml = flopy.modflow.Modflow()
>>> sor = flopy.modflow.ModflowSor(ml)
classmethod load(f, model, 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.modflow.mf.Modflow) to which this package will be added.
  • 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:

sor

Return type:

ModflowSor object

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> sor = flopy.modflow.ModflowSor.load('test.sor', m)
write_file()[source]

Write the package file.

Returns:
Return type:None