# 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 ModflowGwfbuy(MFPackage):
"""
ModflowGwfbuy defines a BUY package.
Parameters
----------
hhformulation_rhs : keyword
use the variable-density hydraulic head formulation and add off-diagonal terms
to the right-hand. this option will prevent the buy package from adding
asymmetric terms to the flow matrix.
denseref : double precision
fluid reference density used in the equation of state. this value is set to
1000. if not specified as an option.
density_filerecord : (densityfile)
* densityfile : string
name of the binary output file to write density information. The density file
has the same format as the head file. Density values will be written to the
density file whenever heads are written to the binary head file. The settings
for controlling head output are contained in the Output Control option.
dev_efh_formulation : keyword
use the variable-density equivalent freshwater head formulation instead of the
hydraulic head head formulation. this dev option has only been implemented for
confined aquifer conditions and should generally not be used.
nrhospecies : integer
number of species used in density equation of state. this value must be one or
greater if the buy package is activated.
packagedata : [list]
"""
density_filerecord = ListTemplateGenerator(
("gwf6", "buy", "options", "density_filerecord")
)
packagedata = ListTemplateGenerator(("gwf6", "buy", "packagedata", "packagedata"))
package_abbr = "gwfbuy"
_package_type = "buy"
dfn_file_name = "gwf-buy.dfn"
dfn = [
["header"],
[
"block options",
"name hhformulation_rhs",
"type keyword",
"reader urword",
"optional true",
],
[
"block options",
"name denseref",
"type double precision",
"reader urword",
"optional true",
"default 1000.",
],
[
"block options",
"name density_filerecord",
"type record density fileout densityfile",
"shape",
"reader urword",
"tagged true",
"optional true",
],
[
"block options",
"name density",
"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 densityfile",
"type string",
"preserve_case true",
"shape",
"in_record true",
"reader urword",
"tagged false",
"optional false",
],
[
"block options",
"name dev_efh_formulation",
"type keyword",
"reader urword",
"optional true",
],
[
"block dimensions",
"name nrhospecies",
"type integer",
"reader urword",
"optional false",
],
[
"block packagedata",
"name packagedata",
"type recarray irhospec drhodc crhoref modelname auxspeciesname",
"shape (nrhospecies)",
"reader urword",
],
[
"block packagedata",
"name irhospec",
"type integer",
"shape",
"tagged false",
"in_record true",
"reader urword",
"numeric_index true",
],
[
"block packagedata",
"name drhodc",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name crhoref",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name modelname",
"type string",
"in_record true",
"tagged false",
"shape",
"reader urword",
],
[
"block packagedata",
"name auxspeciesname",
"type string",
"in_record true",
"tagged false",
"shape",
"reader urword",
],
]
def __init__(
self,
model,
loading_package=False,
hhformulation_rhs=None,
denseref=1000.0,
density_filerecord=None,
dev_efh_formulation=None,
nrhospecies=None,
packagedata=None,
filename=None,
pname=None,
**kwargs,
):
"""
ModflowGwfbuy defines a BUY 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.
hhformulation_rhs : keyword
use the variable-density hydraulic head formulation and add off-diagonal terms
to the right-hand. this option will prevent the buy package from adding
asymmetric terms to the flow matrix.
denseref : double precision
fluid reference density used in the equation of state. this value is set to
1000. if not specified as an option.
density_filerecord : record
dev_efh_formulation : keyword
use the variable-density equivalent freshwater head formulation instead of the
hydraulic head head formulation. this dev option has only been implemented for
confined aquifer conditions and should generally not be used.
nrhospecies : integer
number of species used in density equation of state. this value must be one or
greater if the buy package is activated.
packagedata : [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, "buy", filename, pname, loading_package, **kwargs)
self.hhformulation_rhs = self.build_mfdata(
"hhformulation_rhs", hhformulation_rhs
)
self.denseref = self.build_mfdata("denseref", denseref)
self.density_filerecord = self.build_mfdata(
"density_filerecord", density_filerecord
)
self.dev_efh_formulation = self.build_mfdata(
"dev_efh_formulation", dev_efh_formulation
)
self.nrhospecies = self.build_mfdata("nrhospecies", nrhospecies)
self.packagedata = self.build_mfdata("packagedata", packagedata)
self._init_complete = True