flopy.mfusg.mfusgddf module

mfusgddf module.

Contains the MfUsgDdf class. Note that the user can access the MfUsgDdf class as flopy.mfusg.MfUsgDdf.

class MfUsgDdf(model, rhofresh=1000.0, rhostd=1025.0, cstd=35.0, ithickav=1, imphdd=0, extension='ddf', unitnumber=None, filenames=None)[source]

Bases: Package

MODFLOW-USG Transport Density Driven Flow (DDF) package class.

Parameters:
  • model (model object) – the model object (of type flopy.mfusg.MfUsg) to which this package will be added.

  • rhofresh (density of freshwater) –

  • rhostd (density of standard solution) –

  • cstd (concentration of standard solution) –

  • ithickav (a flag indicating if thickness weighted averaging for density term) – 0 = arithmetic averaging; 1 = thickness weighting averaging

  • imphdd (a flag of hydraulic head term in the density formulation) – 0 = explicit (on the right-hand side vector) symmetry of the matrix 1 = implicit (on the left-hand side matrix) asymmetric matrix

  • extension (str, optional) – file extension (default is ‘ddf’).

  • 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.mfusg.mfusg()
>>> ddf = flopy.mfusg.mfusgddf(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.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:

ddf

Return type:

MfUsgDdf object

Examples

>>> import flopy
>>> ml = flopy.mfusg.MfUsg()
>>> ddf = flopy.mfusg.MfUsgDdf.load('Henry.ddf', ml)
write_file()[source]

Write the package file.

Return type:

None