flopy.mfusg.mfusggnc module
Mfusggnc module.
This is for the Ghost Node Correction (GNC) Package for MODFLOW-USG. Contains the MfUsgGnc class. Note that the user can access the MfUsgGnc class as flopy.mfusg.MfUsgGnc.
- class MfUsgGnc(model, numgnc=0, numalphaj=1, i2kn=0, isymgncn=0, iflalphan=0, gncdata=None, extension='gnc', options=None, unitnumber=None, filenames=None)[source]
Bases:
Package
MODFLOW USG Ghost Node Correction (GNC) Package Class.
- Parameters:
numgnc (integer) – numgnc (integer) is the number of GNC entries.
numalphaj (integer) – numalphaj (integer) is the number of contributing factors.
i2kn (integer) – 0 : second-order correction not applied to unconfined transmissivity. 1 : second-order correction applied to unconfined transmissivity.
isymgncn (integer) – 0 : implicit update on left-hand side matrix for asymmetric systems. 1 : explicit update on right-hand side vector for symmetric systems.
iflalphan (integer) –
0 : AlphaJ is contributing factors from all adjacent contributing nodes. 1 : AlphaJ represent the saturated conductances between the ghost node
location and node j, and the contributing factors are computed internally using the equations for the unconfined conductances.
gncdata ([cellidn, cellidm, cellidsj, alphasj]) –
cellidn ((integer, …)) is the cellid of the cell in which the ghost node is located.
cellidm ((integer, …)) is the cellid of the connecting cell
cellidsj ((integer, …)) is the array of CELLIDS for the contributing j cells. This Item is repeated for each of the numalphaj adjacent contributing cells of the ghost node.
alphasj (double) is the contributing factors for each contributing node in CELLIDSJ. This Item is repeated for each of the numalphaj adjacent contributing cells of the ghost node.
model (model object) – The model object (of type
flopy.modflow.mf.Modflow
) to which this package will be added.extension (str, optional) – File extension (default is ‘gnc’.
unitnumber (int, optional) – FORTRAN unit number for this package (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.modflow.Modflow() >>> gnc = flopy.mfusg.MfUsgGnc(m)
- static get_empty(numgnc=0, numalphaj=1, iflalphan=0)[source]
Returns empty GNC recarray of defualt dtype.
- classmethod load(f, model, pak_type='gnc', ext_unit_dict=None, **kwargs)[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:
gnc
- Return type:
MfUsgGnc object
Examples
>>> import flopy >>> m = flopy.modflow.Modflow() >>> gnc = flopy.modflow.ModflowGnc.load('test.gnc', m)