flopy.mt3d.mtgcg module

class Mt3dGcg(model, mxiter=1, iter1=50, isolve=3, ncrs=0, accl=1, cclose=1e-05, iprgcg=0, extension='gcg', unitnumber=None, filenames=None)[source]

Bases: flopy.pakbase.Package

MT3DMS Generalized Conjugate Gradient Package Class.

Parameters:
  • model (model object) – The model object (of type flopy.mt3d.mt.Mt3dms) to which this package will be added.
  • mxiter (int) – is the maximum number of outer iterations; it should be set to an integer greater than one only when a nonlinear sorption isotherm is included in simulation. (default is 1)
  • iter1 (int) – is the maximum number of inner iterations; a value of 30-50 should be adequate for most problems. (default is 50)
  • isolve (int) – is the type of preconditioners to be used with the Lanczos/ORTHOMIN acceleration scheme: = 1, Jacobi = 2, SSOR = 3, Modified Incomplete Cholesky (MIC) (MIC usually converges faster, but it needs significantly more memory) (default is 3)
  • ncrs (int) – is an integer flag for treatment of dispersion tensor cross terms: = 0, lump all dispersion cross terms to the right-hand-side (approximate but highly efficient). = 1, include full dispersion tensor (memory intensive). (default is 0)
  • accl (float) – is the relaxation factor for the SSOR option; a value of 1.0 is generally adequate. (default is 1)
  • cclose (float) – is the convergence criterion in terms of relative concentration; a real value between 10-4 and 10-6 is generally adequate. (default is 1.E-5)
  • iprgcg (int) – IPRGCG is the interval for printing the maximum concentration changes of each iteration. Set IPRGCG to zero as default for printing at the end of each stress period. (default is 0)
  • extension (string) – Filename extension (default is ‘gcg’)
  • 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
>>> m = flopy.mt3d.Mt3dms()
>>> gcg = flopy.mt3d.Mt3dGcg(m)
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.mt3d.mt.Mt3dms) 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:

gcg – Mt3dGcg object.

Return type:

Mt3dGcg object

Examples

>>> import flopy
>>> mt = flopy.mt3d.Mt3dms()
>>> gcg = flopy.mt3d.Mt3dGcg.load('test.gcg', m)
unitnumber = 35
write_file()[source]

Write the package file

Returns:
Return type:None