Source code for flopy.mf6.modflow.mfprtprp

# autogenerated file, do not modify

from os import PathLike, curdir
from typing import Union

from flopy.mf6.data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator
from flopy.mf6.mfpackage import MFChildPackages, MFPackage


[docs]class ModflowPrtprp(MFPackage): """ ModflowPrtprp defines a PRP package. Parameters ---------- boundnames : keyword keyword to indicate that boundary names may be provided with the list of particle release points. print_input : keyword keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read. dev_exit_solve_method : integer the method for iterative solution of particle exit location and time in the generalized pollock's method. 0 default, 1 brent, 2 chandrupatla. the default is brent's method. exit_solve_tolerance : double precision the convergence tolerance for iterative solution of particle exit location and time in the generalized pollock's method. a value of 0.00001 works well for many problems, but the value that strikes the best balance between accuracy and runtime is problem-dependent. local_z : keyword indicates that 'zrpt' defines the local z coordinate of the release point within the cell, with value of 0 at the bottom and 1 at the top of the cell. if the cell is partially saturated at release time, the top of the cell is considered to be the water table elevation (the head in the cell) rather than the top defined by the user. extend_tracking : keyword indicates that particles should be tracked beyond the end of the simulation's final time step (using that time step's flows) until particles terminate or reach a specified stop time. by default, particles are terminated at the end of the simulation's final time step. track_filerecord : (trackfile) * trackfile : string name of the binary output file to write tracking information. trackcsv_filerecord : (trackcsvfile) * trackcsvfile : string name of the comma-separated value (CSV) file to write tracking information. stoptime : double precision real value defining the maximum simulation time to which particles in the package can be tracked. particles that have not terminated earlier due to another termination condition will terminate when simulation time stoptime is reached. if the last stress period in the simulation consists of more than one time step, particles will not be tracked past the ending time of the last stress period, regardless of stoptime. if the extend_tracking option is enabled and the last stress period in the simulation is steady-state, the simulation ending time will not limit the time to which particles can be tracked, but stoptime and stoptraveltime will continue to apply. if stoptime and stoptraveltime are both provided, particles will be stopped if either is reached. stoptraveltime : double precision real value defining the maximum travel time over which particles in the model can be tracked. particles that have not terminated earlier due to another termination condition will terminate when their travel time reaches stoptraveltime. if the last stress period in the simulation consists of more than one time step, particles will not be tracked past the ending time of the last stress period, regardless of stoptraveltime. if the extend_tracking option is enabled and the last stress period in the simulation is steady-state, the simulation ending time will not limit the time to which particles can be tracked, but stoptime and stoptraveltime will continue to apply. if stoptime and stoptraveltime are both provided, particles will be stopped if either is reached. stop_at_weak_sink : keyword is a text keyword to indicate that a particle is to terminate when it enters a cell that is a weak sink. by default, particles are allowed to pass though cells that are weak sinks. istopzone : integer integer value defining the stop zone number. if cells have been assigned izone values in the griddata block, a particle terminates if it enters a cell whose izone value matches istopzone. an istopzone value of zero indicates that there is no stop zone. the default value is zero. drape : keyword is a text keyword to indicate that if a particle's release point is in a cell that happens to be inactive at release time, the particle is to be moved to the topmost active cell below it, if any. by default, a particle is not released into the simulation if its release point's cell is inactive at release time. release_timesrecord : (release_times, times) * release_times : keyword keyword indicating release times will follow * times : [double precision] times to release, relative to the beginning of the simulation. RELEASE_TIMES and RELEASE_TIMESFILE are mutually exclusive. release_timesfilerecord : (timesfile) * timesfile : string name of the release times file. RELEASE_TIMES and RELEASE_TIMESFILE are mutually exclusive. dry_tracking_method : string is a string indicating how particles should behave in dry-but-active cells (as can occur with the newton formulation). the value can be 'drop', 'stop', or 'stay'. the default is 'drop', which passes particles vertically and instantaneously to the water table. 'stop' causes particles to terminate. 'stay' causes particles to remain stationary but active. dev_forceternary : keyword force use of the ternary tracking method regardless of cell type in disv grids. release_time_tolerance : double precision real number indicating the tolerance within which to consider consecutive release times coincident. coincident release times will be merged into a single release time. the default is :math:`epsilon times 10^{11}`, where :math:`epsilon` is machine precision. release_time_frequency : double precision real number indicating the time frequency at which to release particles. this option can be used to schedule releases at a regular interval for the duration of the simulation, starting at the simulation start time. the release schedule is the union of this option, the releasetimes block, and period block releasesetting selections. if none of these are provided, a single release time is configured at the beginning of the first time step of the simulation's first stress period. nreleasepts : integer is the number of particle release points. nreleasetimes : integer is the number of particle release times specified in the releasetimes block. this is not necessarily the total number of release times; release times are the union of release_time_frequency, releasetimes block, and period block releasesetting selections. packagedata : [list] releasetimes : [list] perioddata : list """ track_filerecord = ListTemplateGenerator( ("prt6", "prp", "options", "track_filerecord") ) trackcsv_filerecord = ListTemplateGenerator( ("prt6", "prp", "options", "trackcsv_filerecord") ) release_timesrecord = ListTemplateGenerator( ("prt6", "prp", "options", "release_timesrecord") ) release_timesfilerecord = ListTemplateGenerator( ("prt6", "prp", "options", "release_timesfilerecord") ) packagedata = ListTemplateGenerator(("prt6", "prp", "packagedata", "packagedata")) releasetimes = ListTemplateGenerator( ("prt6", "prp", "releasetimes", "releasetimes") ) perioddata = ListTemplateGenerator(("prt6", "prp", "period", "perioddata")) package_abbr = "prtprp" _package_type = "prp" dfn_file_name = "prt-prp.dfn" dfn = [ ["header", "multi-package"], [ "block options", "name boundnames", "type keyword", "shape", "reader urword", "optional true", ], [ "block options", "name print_input", "type keyword", "reader urword", "optional true", ], [ "block options", "name dev_exit_solve_method", "type integer", "reader urword", "optional true", ], [ "block options", "name exit_solve_tolerance", "type double precision", "reader urword", "optional true", "default 1e-5", ], [ "block options", "name local_z", "type keyword", "reader urword", "optional true", ], [ "block options", "name extend_tracking", "type keyword", "reader urword", "optional true", ], [ "block options", "name track_filerecord", "type record track fileout trackfile", "shape", "reader urword", "tagged true", "optional true", ], [ "block options", "name track", "type keyword", "shape", "in_record true", "reader urword", "tagged true", "optional false", ], [ "block options", "name fileout", "type keyword", "shape", "in_record true", "reader urword", "tagged true", "optional false", ], [ "block options", "name trackfile", "type string", "preserve_case true", "shape", "in_record true", "reader urword", "tagged false", "optional false", ], [ "block options", "name trackcsv_filerecord", "type record trackcsv fileout trackcsvfile", "shape", "reader urword", "tagged true", "optional true", ], [ "block options", "name trackcsv", "type keyword", "shape", "in_record true", "reader urword", "tagged true", "optional false", ], [ "block options", "name trackcsvfile", "type string", "preserve_case true", "shape", "in_record true", "reader urword", "tagged false", "optional false", ], [ "block options", "name stoptime", "type double precision", "reader urword", "optional true", ], [ "block options", "name stoptraveltime", "type double precision", "reader urword", "optional true", ], [ "block options", "name stop_at_weak_sink", "type keyword", "reader urword", "optional true", ], [ "block options", "name istopzone", "type integer", "reader urword", "optional true", ], [ "block options", "name drape", "type keyword", "reader urword", "optional true", ], [ "block options", "name release_timesrecord", "type record release_times times", "shape", "reader urword", "tagged true", "optional true", "removed 6.6.1", ], [ "block options", "name release_times", "type keyword", "reader urword", "in_record true", "tagged true", "shape", "removed 6.6.1", ], [ "block options", "name times", "type double precision", "shape (unknown)", "reader urword", "in_record true", "tagged false", "repeating true", "removed 6.6.1", ], [ "block options", "name release_timesfilerecord", "type record release_timesfile timesfile", "shape", "reader urword", "tagged true", "optional true", "removed 6.6.1", ], [ "block options", "name release_timesfile", "type keyword", "reader urword", "in_record true", "tagged true", "shape", "removed 6.6.1", ], [ "block options", "name timesfile", "type string", "preserve_case true", "shape", "in_record true", "reader urword", "tagged false", "optional false", "removed 6.6.1", ], [ "block options", "name dry_tracking_method", "type string", "valid drop stop stay", "reader urword", "optional true", ], [ "block options", "name dev_forceternary", "type keyword", "reader urword", "optional false", "mf6internal ifrctrn", ], [ "block options", "name release_time_tolerance", "type double precision", "reader urword", "optional true", ], [ "block options", "name release_time_frequency", "type double precision", "reader urword", "optional true", ], [ "block dimensions", "name nreleasepts", "type integer", "reader urword", "optional false", ], [ "block dimensions", "name nreleasetimes", "type integer", "reader urword", "optional false", ], [ "block packagedata", "name packagedata", "type recarray irptno cellid xrpt yrpt zrpt boundname", "shape (nreleasepts)", "reader urword", ], [ "block packagedata", "name irptno", "type integer", "shape", "tagged false", "in_record true", "reader urword", "numeric_index true", ], [ "block packagedata", "name cellid", "type integer", "shape (ncelldim)", "tagged false", "in_record true", "reader urword", ], [ "block packagedata", "name xrpt", "type double precision", "shape", "tagged false", "in_record true", "reader urword", ], [ "block packagedata", "name yrpt", "type double precision", "shape", "tagged false", "in_record true", "reader urword", ], [ "block packagedata", "name zrpt", "type double precision", "shape", "tagged false", "in_record true", "reader urword", ], [ "block packagedata", "name boundname", "type string", "shape", "tagged false", "in_record true", "reader urword", "optional true", ], [ "block releasetimes", "name releasetimes", "type recarray time", "shape (nreleasetimes)", "reader urword", ], [ "block releasetimes", "name time", "type double precision", "shape", "tagged false", "in_record true", "reader urword", ], [ "block period", "name iper", "type integer", "block_variable True", "in_record true", "tagged false", "shape", "valid", "reader urword", "optional false", ], [ "block period", "name perioddata", "type recarray releasesetting", "shape", "reader urword", ], [ "block period", "name releasesetting", "type keystring all first last frequency steps fraction", "shape", "tagged false", "in_record true", "reader urword", ], [ "block period", "name all", "type keyword", "shape", "in_record true", "reader urword", ], [ "block period", "name first", "type keyword", "shape", "in_record true", "reader urword", ], [ "block period", "name last", "type keyword", "shape", "in_record true", "reader urword", ], [ "block period", "name frequency", "type integer", "shape", "tagged true", "in_record true", "reader urword", ], [ "block period", "name steps", "type integer", "shape (<nstp)", "tagged true", "in_record true", "reader urword", ], [ "block period", "name fraction", "type double precision", "shape (<nstp)", "tagged true", "in_record true", "reader urword", "optional true", "removed 6.6.0", ], ] def __init__( self, model, loading_package=False, boundnames=None, print_input=None, dev_exit_solve_method=None, exit_solve_tolerance=1e-05, local_z=None, extend_tracking=None, track_filerecord=None, trackcsv_filerecord=None, stoptime=None, stoptraveltime=None, stop_at_weak_sink=None, istopzone=None, drape=None, release_timesrecord=None, release_timesfilerecord=None, dry_tracking_method=None, dev_forceternary=None, release_time_tolerance=None, release_time_frequency=None, nreleasepts=None, nreleasetimes=None, packagedata=None, releasetimes=None, perioddata=None, filename=None, pname=None, **kwargs, ): """ ModflowPrtprp defines a PRP package. Parameters ---------- model Model that this package is a part of. Package is automatically added to model when it is initialized. loading_package : bool Do not set this parameter. It is intended for debugging and internal processing purposes only. boundnames : keyword keyword to indicate that boundary names may be provided with the list of particle release points. print_input : keyword keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read. dev_exit_solve_method : integer the method for iterative solution of particle exit location and time in the generalized pollock's method. 0 default, 1 brent, 2 chandrupatla. the default is brent's method. exit_solve_tolerance : double precision the convergence tolerance for iterative solution of particle exit location and time in the generalized pollock's method. a value of 0.00001 works well for many problems, but the value that strikes the best balance between accuracy and runtime is problem-dependent. local_z : keyword indicates that 'zrpt' defines the local z coordinate of the release point within the cell, with value of 0 at the bottom and 1 at the top of the cell. if the cell is partially saturated at release time, the top of the cell is considered to be the water table elevation (the head in the cell) rather than the top defined by the user. extend_tracking : keyword indicates that particles should be tracked beyond the end of the simulation's final time step (using that time step's flows) until particles terminate or reach a specified stop time. by default, particles are terminated at the end of the simulation's final time step. track_filerecord : record trackcsv_filerecord : record stoptime : double precision real value defining the maximum simulation time to which particles in the package can be tracked. particles that have not terminated earlier due to another termination condition will terminate when simulation time stoptime is reached. if the last stress period in the simulation consists of more than one time step, particles will not be tracked past the ending time of the last stress period, regardless of stoptime. if the extend_tracking option is enabled and the last stress period in the simulation is steady-state, the simulation ending time will not limit the time to which particles can be tracked, but stoptime and stoptraveltime will continue to apply. if stoptime and stoptraveltime are both provided, particles will be stopped if either is reached. stoptraveltime : double precision real value defining the maximum travel time over which particles in the model can be tracked. particles that have not terminated earlier due to another termination condition will terminate when their travel time reaches stoptraveltime. if the last stress period in the simulation consists of more than one time step, particles will not be tracked past the ending time of the last stress period, regardless of stoptraveltime. if the extend_tracking option is enabled and the last stress period in the simulation is steady-state, the simulation ending time will not limit the time to which particles can be tracked, but stoptime and stoptraveltime will continue to apply. if stoptime and stoptraveltime are both provided, particles will be stopped if either is reached. stop_at_weak_sink : keyword is a text keyword to indicate that a particle is to terminate when it enters a cell that is a weak sink. by default, particles are allowed to pass though cells that are weak sinks. istopzone : integer integer value defining the stop zone number. if cells have been assigned izone values in the griddata block, a particle terminates if it enters a cell whose izone value matches istopzone. an istopzone value of zero indicates that there is no stop zone. the default value is zero. drape : keyword is a text keyword to indicate that if a particle's release point is in a cell that happens to be inactive at release time, the particle is to be moved to the topmost active cell below it, if any. by default, a particle is not released into the simulation if its release point's cell is inactive at release time. release_timesrecord : (release_times, times) * release_times : keyword keyword indicating release times will follow * times : [double precision] times to release, relative to the beginning of the simulation. RELEASE_TIMES and RELEASE_TIMESFILE are mutually exclusive. release_timesfilerecord : record dry_tracking_method : string is a string indicating how particles should behave in dry-but-active cells (as can occur with the newton formulation). the value can be 'drop', 'stop', or 'stay'. the default is 'drop', which passes particles vertically and instantaneously to the water table. 'stop' causes particles to terminate. 'stay' causes particles to remain stationary but active. dev_forceternary : keyword force use of the ternary tracking method regardless of cell type in disv grids. release_time_tolerance : double precision real number indicating the tolerance within which to consider consecutive release times coincident. coincident release times will be merged into a single release time. the default is :math:`epsilon times 10^{11}`, where :math:`epsilon` is machine precision. release_time_frequency : double precision real number indicating the time frequency at which to release particles. this option can be used to schedule releases at a regular interval for the duration of the simulation, starting at the simulation start time. the release schedule is the union of this option, the releasetimes block, and period block releasesetting selections. if none of these are provided, a single release time is configured at the beginning of the first time step of the simulation's first stress period. nreleasepts : integer is the number of particle release points. nreleasetimes : integer is the number of particle release times specified in the releasetimes block. this is not necessarily the total number of release times; release times are the union of release_time_frequency, releasetimes block, and period block releasesetting selections. packagedata : [list] releasetimes : [list] perioddata : list filename : str File name for this package. pname : str Package name for this package. parent_file : MFPackage Parent package file that references this package. Only needed for utility packages (mfutl*). For example, mfutllaktab package must have a mfgwflak package parent_file. """ super().__init__(model, "prp", filename, pname, loading_package, **kwargs) self.boundnames = self.build_mfdata("boundnames", boundnames) self.print_input = self.build_mfdata("print_input", print_input) self.dev_exit_solve_method = self.build_mfdata( "dev_exit_solve_method", dev_exit_solve_method ) self.exit_solve_tolerance = self.build_mfdata( "exit_solve_tolerance", exit_solve_tolerance ) self.local_z = self.build_mfdata("local_z", local_z) self.extend_tracking = self.build_mfdata("extend_tracking", extend_tracking) self.track_filerecord = self.build_mfdata("track_filerecord", track_filerecord) self.trackcsv_filerecord = self.build_mfdata( "trackcsv_filerecord", trackcsv_filerecord ) self.stoptime = self.build_mfdata("stoptime", stoptime) self.stoptraveltime = self.build_mfdata("stoptraveltime", stoptraveltime) self.stop_at_weak_sink = self.build_mfdata( "stop_at_weak_sink", stop_at_weak_sink ) self.istopzone = self.build_mfdata("istopzone", istopzone) self.drape = self.build_mfdata("drape", drape) self.release_timesrecord = self.build_mfdata( "release_timesrecord", release_timesrecord ) self.release_timesfilerecord = self.build_mfdata( "release_timesfilerecord", release_timesfilerecord ) self.dry_tracking_method = self.build_mfdata( "dry_tracking_method", dry_tracking_method ) self.dev_forceternary = self.build_mfdata("dev_forceternary", dev_forceternary) self.release_time_tolerance = self.build_mfdata( "release_time_tolerance", release_time_tolerance ) self.release_time_frequency = self.build_mfdata( "release_time_frequency", release_time_frequency ) self.nreleasepts = self.build_mfdata("nreleasepts", nreleasepts) self.nreleasetimes = self.build_mfdata("nreleasetimes", nreleasetimes) self.packagedata = self.build_mfdata("packagedata", packagedata) self.releasetimes = self.build_mfdata("releasetimes", releasetimes) self.perioddata = self.build_mfdata("perioddata", perioddata) self._init_complete = True