flopy.modpath.mp7particledata module

mp7particledata module. Contains the ParticleData, CellDataType,
FaceDataType, and NodeParticleData classes.
class CellDataType(drape=0, columncelldivisions=3, rowcelldivisions=3, layercelldivisions=3)[source]

Bases: object

Cell data type class to create a MODPATH 7 particle location template for input style 2, 3, and 4 in cells (templatesubdivisiontype = 2).

Parameters:
  • drape (int) – Drape indicates how particles are treated when starting locations are specified for cells that are dry. If drape is 0, Particles are placed in the specified cell. If the cell is dry at the time of release, the status of the particle is set to unreleased and removed from the simulation. If drape is 1, particles are placed in the upper most active grid cell directly beneath the specified layer, row, column or node location (default is 0).
  • columncelldivisions (int) – Number of particles in a cell in the column (x-coordinate) direction (default is 3).
  • rowcelldivisions (int) – Number of particles in a cell in the row (y-coordinate) direction (default is 3).
  • layercelldivisions (int) – Number of particles in a cell in the layer (z-coordinate) direction (default is 3).

Examples

>>> import flopy
>>> cd = flopy.modpath.CellDataType()
write(f=None)[source]
Parameters:f (fileobject) – Fileobject that is open with write access
class FaceDataType(drape=0, verticaldivisions1=3, horizontaldivisions1=3, verticaldivisions2=3, horizontaldivisions2=3, verticaldivisions3=3, horizontaldivisions3=3, verticaldivisions4=3, horizontaldivisions4=3, rowdivisions5=3, columndivisions5=3, rowdivisions6=3, columndivisions6=3)[source]

Bases: object

Face data type class to create a MODPATH 7 particle location template for input style 2, 3, and 4 on cell faces (templatesubdivisiontype = 2).

Parameters:
  • drape (int) – Drape indicates how particles are treated when starting locations are specified for cells that are dry. If drape is 0, Particles are placed in the specified cell. If the cell is dry at the time of release, the status of the particle is set to unreleased and removed from the simulation. If drape is 1, particles are placed in the upper most active grid cell directly beneath the specified layer, row, column or node location (default is 0).
  • verticaldivisions1 (int) – The number of vertical subdivisions that define the two-dimensional array of particles on cell face 1 (default is 3).
  • horizontaldivisions1 (int) – The number of horizontal subdivisions that define the two-dimensional array of particles on cell face 1 (default is 3).
  • verticaldivisions2 (int) – The number of vertical subdivisions that define the two-dimensional array of particles on cell face 2 (default is 3).
  • horizontaldivisions2 (int) – The number of horizontal subdivisions that define the two-dimensional array of particles on cell face 2 (default is 3).
  • verticaldivisions3 (int) – The number of vertical subdivisions that define the two-dimensional array of particles on cell face 3 (default is 3).
  • horizontaldivisions3 (int) – The number of horizontal subdivisions that define the two-dimensional array of particles on cell face 3 (default is 3).
  • verticaldivisions4 (int) – The number of vertical subdivisions that define the two-dimensional array of particles on cell face 4 (default is 3).
  • horizontaldivisions4 (int) – The number of horizontal subdivisions that define the two-dimensional array of particles on cell face 4 (default is 3).
  • rowdivisions5 (int) – The number of row subdivisions that define the two-dimensional array of particles on the bottom cell face (face 5) (default is 3).
  • columndivisions5 (int) – The number of column subdivisions that define the two-dimensional array of particles on the bottom cell face (face 5) (default is 3).
  • rowdivisions6 (int) – The number of row subdivisions that define the two-dimensional array of particles on the top cell face (face 6) (default is 3).
  • columndivisions6 (int) – The number of column subdivisions that define the two-dimensional array of particles on the top cell face (face 6) (default is 3).

Examples

>>> import flopy
>>> fd = flopy.modpath.FaceDataType()
write(f=None)[source]
Parameters:f (fileobject) – Fileobject that is open with write access
class LRCParticleData(subdivisiondata=None, lrcregions=None)[source]

Bases: object

Layer, row, column particle data template class to create MODPATH 7 particle location input style 2 on cell faces (templatesubdivisiontype = 1) and/or in cells (templatesubdivisiontype = 2). Particle locations for this template are specified by layer, row, column regions.

Parameters:
  • subdivisiondata (FaceDataType, CellDataType or list of FaceDataType) – and/or CellDataType types FaceDataType, CellDataType, or a list of FaceDataType and/or CellDataTypes that are used to create one or more particle templates in a particle group. If subdivisiondata is None, a default CellDataType with 27 particles per cell will be created (default is None).
  • lrcregions (list of lists tuples or np.ndarrays) – Layer, row, column (zero-based) regions with particles created using the specified template parameters. A region is defined as a list/tuple of minlayer, minrow, mincolumn, maxlayer, maxrow, maxcolumn values. If subdivisiondata is a list, a list/tuple or array of layer, row, column regions with the same length as subdivision data must be provided. If lrcregions is None, particles will be placed in the first model cell (default is None).

Examples

>>> import flopy
>>> pg = flopy.modpath.LRCParticleData(lrcregions=[0, 0, 0, 3, 10, 10])
write(f=None)[source]
Parameters:f (fileobject) – Fileobject that is open with write access
class NodeParticleData(subdivisiondata=None, nodes=None)[source]

Bases: object

Node particle data template class to create MODPATH 7 particle location input style 3 on cell faces (templatesubdivisiontype = 1) and/or in cells (templatesubdivisiontype = 2). Particle locations for this template are specified by nodes.

Parameters:
  • subdivisiondata (FaceDataType, CellDataType or list of FaceDataType) – and/or CellDataType types FaceDataType, CellDataType, or a list of FaceDataType and/or CellDataTypes that are used to create one or more particle templates in a particle group. If subdivisiondata is None, a default CellDataType with 27 particles per cell will be created (default is None).
  • nodes (int, list of ints, tuple of ints, or np.ndarray) – Nodes (zero-based) with particles created using the specified template parameters. If subdivisiondata is a list, a list of nodes with the same length as subdivision data must be provided. If nodes is None, particles will be placed in the first model cell (default is None).

Examples

>>> import flopy
>>> pg = flopy.modpath.NodeParticleData(nodes=[100, 101])
write(f=None)[source]
Parameters:f (fileobject) – Fileobject that is open with write access
class ParticleData(partlocs=None, structured=False, particleids=None, localx=None, localy=None, localz=None, timeoffset=None, drape=None)[source]

Bases: object

Class to create the most basic particle data type (starting location input style 1). Input style 1 is the most general input style and provides the most flexibility in customizing starting locations.

Parameters:
  • partlocs (list/tuple of int, list/tuple of list/tuple, or np.ndarray) – Particle locations (zero-based) that are either layer, row, column locations or nodes.
  • structured (bool) – Boolean defining if a structured (True) or unstructured particle recarray will be created (default is True).
  • particleids (list, tuple, or np.ndarray) – Particle ids for the defined particle locations. If particleids is None, MODPATH 7 will define the particle ids to each particle location. If particleids is provided a particle id must be provided for each partloc (default is None).
  • localx (float, list, tuple, or np.ndarray) – Local x-location of the particle in the cell. If a single value is provided all particles will have the same localx position. If a list, tuple, or np.ndarray is provided a localx position must be provided for each partloc. If localx is None, a value of 0.5 (center of the cell) will be used (default is None).
  • localy (float, list, tuple, or np.ndarray) – Local y-location of the particle in the cell. If a single value is provided all particles will have the same localy position. If a list, tuple, or np.ndarray is provided a localy position must be provided for each partloc. If localy is None, a value of 0.5 (center of the cell) will be used (default is None).
  • localz (float, list, tuple, or np.ndarray) – Local z-location of the particle in the cell. If a single value is provided all particles will have the same localz position. If a list, tuple, or np.ndarray is provided a localz position must be provided for each partloc. If localy is None, a value of 0.5 (center of the cell) will be used (default is None).
  • timeoffset (float, list, tuple, or np.ndarray) – Timeoffset of the particle relative to the release time. If a single value is provided all particles will have the same timeoffset. If a list, tuple, or np.ndarray is provided a timeoffset must be provided for each partloc. If timeoffset is None, a value of 0. (equal to the release time) will be used (default is None).
  • drape (int, list, tuple, or np.ndarray) – Drape indicates how particles are treated when starting locations are specified for cells that are dry. If drape is 0, Particles are placed in the specified cell. If the cell is dry at the time of release, the status of the particle is set to unreleased and removed from the simulation. If drape is 1, particles are placed in the upper most active grid cell directly beneath the specified layer, row, column or node location. If a single value is provided all particles will have the same drape value. If a list, tuple, or np.ndarray is provided a drape value must be provided for each partloc. If drape is None, a value of 0 will be used (default is None).

Examples

>>> import flopy
>>> locs = [(0, 0, 0), (1, 0, 0), (2, 0, 0)]
>>> pd = flopy.modpath.ParticleData(locs, structured=True, drape=0,
...                                 localx=0.5, localy=0.5, localz=1)
write(f=None)[source]
Parameters:f (fileobject) – Fileobject that is open with write access