# 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 ModflowGwfvsc(MFPackage):
"""
ModflowGwfvsc defines a VSC package.
Parameters
----------
viscref : double precision
fluid reference viscosity used in the equation of state. this value is set to
1.0 if not specified as an option.
temperature_species_name : string
string used to identify the auxspeciesname in packagedata that corresponds to
the temperature species. there can be only one occurrence of this temperature
species name in the packagedata block or the program will terminate with an
error. this value has no effect if viscosity does not depend on temperature.
thermal_formulation : string
may be used for specifying which viscosity formulation to use for the
temperature species. can be either linear or nonlinear. the linear viscosity
formulation is the default.
thermal_a2 : double precision
is an empirical parameter specified by the user for calculating viscosity using
a nonlinear formulation. if a2 is not specified, a default value of 10.0 is
assigned (voss, 1984).
thermal_a3 : double precision
is an empirical parameter specified by the user for calculating viscosity using
a nonlinear formulation. if a3 is not specified, a default value of 248.37 is
assigned (voss, 1984).
thermal_a4 : double precision
is an empirical parameter specified by the user for calculating viscosity using
a nonlinear formulation. if a4 is not specified, a default value of 133.15 is
assigned (voss, 1984).
viscosity_filerecord : (viscosityfile)
* viscosityfile : string
name of the binary output file to write viscosity information. The viscosity
file has the same format as the head file. Viscosity values will be written to
the viscosity file whenever heads are written to the binary head file. The
settings for controlling head output are contained in the Output Control
option.
nviscspecies : integer
number of species used in the viscosity equation of state. if either
concentrations or temperature (or both) are used to update viscosity then then
nrhospecies needs to be at least one.
packagedata : [list]
"""
viscosity_filerecord = ListTemplateGenerator(
("gwf6", "vsc", "options", "viscosity_filerecord")
)
packagedata = ListTemplateGenerator(("gwf6", "vsc", "packagedata", "packagedata"))
package_abbr = "gwfvsc"
_package_type = "vsc"
dfn_file_name = "gwf-vsc.dfn"
dfn = [
["header"],
[
"block options",
"name viscref",
"type double precision",
"reader urword",
"optional true",
"default 1.0",
],
[
"block options",
"name temperature_species_name",
"type string",
"shape",
"reader urword",
"optional true",
],
[
"block options",
"name thermal_formulation",
"type string",
"shape",
"reader urword",
"optional true",
"valid linear nonlinear",
],
[
"block options",
"name thermal_a2",
"type double precision",
"reader urword",
"optional true",
"default 10.",
],
[
"block options",
"name thermal_a3",
"type double precision",
"reader urword",
"optional true",
"default 248.37",
],
[
"block options",
"name thermal_a4",
"type double precision",
"reader urword",
"optional true",
"default 133.15",
],
[
"block options",
"name viscosity_filerecord",
"type record viscosity fileout viscosityfile",
"shape",
"reader urword",
"tagged true",
"optional true",
],
[
"block options",
"name viscosity",
"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 viscosityfile",
"type string",
"preserve_case true",
"shape",
"in_record true",
"reader urword",
"tagged false",
"optional false",
],
[
"block dimensions",
"name nviscspecies",
"type integer",
"reader urword",
"optional false",
],
[
"block packagedata",
"name packagedata",
"type recarray iviscspec dviscdc cviscref modelname auxspeciesname",
"shape (nrhospecies)",
"reader urword",
],
[
"block packagedata",
"name iviscspec",
"type integer",
"shape",
"tagged false",
"in_record true",
"reader urword",
"numeric_index true",
],
[
"block packagedata",
"name dviscdc",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name cviscref",
"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,
viscref=1.0,
temperature_species_name=None,
thermal_formulation=None,
thermal_a2=10.0,
thermal_a3=248.37,
thermal_a4=133.15,
viscosity_filerecord=None,
nviscspecies=None,
packagedata=None,
filename=None,
pname=None,
**kwargs,
):
"""
ModflowGwfvsc defines a VSC 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.
viscref : double precision
fluid reference viscosity used in the equation of state. this value is set to
1.0 if not specified as an option.
temperature_species_name : string
string used to identify the auxspeciesname in packagedata that corresponds to
the temperature species. there can be only one occurrence of this temperature
species name in the packagedata block or the program will terminate with an
error. this value has no effect if viscosity does not depend on temperature.
thermal_formulation : string
may be used for specifying which viscosity formulation to use for the
temperature species. can be either linear or nonlinear. the linear viscosity
formulation is the default.
thermal_a2 : double precision
is an empirical parameter specified by the user for calculating viscosity using
a nonlinear formulation. if a2 is not specified, a default value of 10.0 is
assigned (voss, 1984).
thermal_a3 : double precision
is an empirical parameter specified by the user for calculating viscosity using
a nonlinear formulation. if a3 is not specified, a default value of 248.37 is
assigned (voss, 1984).
thermal_a4 : double precision
is an empirical parameter specified by the user for calculating viscosity using
a nonlinear formulation. if a4 is not specified, a default value of 133.15 is
assigned (voss, 1984).
viscosity_filerecord : record
nviscspecies : integer
number of species used in the viscosity equation of state. if either
concentrations or temperature (or both) are used to update viscosity then then
nrhospecies needs to be at least one.
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, "vsc", filename, pname, loading_package, **kwargs)
self.viscref = self.build_mfdata("viscref", viscref)
self.temperature_species_name = self.build_mfdata(
"temperature_species_name", temperature_species_name
)
self.thermal_formulation = self.build_mfdata(
"thermal_formulation", thermal_formulation
)
self.thermal_a2 = self.build_mfdata("thermal_a2", thermal_a2)
self.thermal_a3 = self.build_mfdata("thermal_a3", thermal_a3)
self.thermal_a4 = self.build_mfdata("thermal_a4", thermal_a4)
self.viscosity_filerecord = self.build_mfdata(
"viscosity_filerecord", viscosity_filerecord
)
self.nviscspecies = self.build_mfdata("nviscspecies", nviscspecies)
self.packagedata = self.build_mfdata("packagedata", packagedata)
self._init_complete = True