imod.mf6.Buoyancy#

class imod.mf6.Buoyancy(reference_density: float, density_concentration_slope: Sequence[float], reference_concentration: Sequence[float], modelname: Sequence[str], species: Sequence[str], hhformulation_rhs: bool = False, densityfile: Optional[str] = None)[source]#

Buoyancy package. This package must be included when performing variable density simulation.

Note that reference_density is a single value, but density_concentration_slope, reference_concentration and modelname require an entry for every active species. Please refer to the examples.

Parameters:
  • reference_density (float,) – fluid reference density used in the equation of state.

  • density_concentration_slope (sequence of floats) – Slope of the (linear) density concentration line used in the density equation of state.

  • reference_concentration (sequence of floats) – Reference concentration used in the density equation of state.

  • modelname (sequence of strings,) – Name of the GroundwaterTransport (GWT) model used for the concentrations.

  • species (sequence of str,) – Name of the species used to calculate a density value.

  • hhformulation_rhs (bool, optional.) – 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. Default value is False.

  • densityfile – 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.

Examples

The buoyancy input for a single species called “salinity”, which is simulated by a GWT model called “gwt-1” are specified as follows:

>>> buy = imod.mf6.Buoyance(
...     reference_density=1000.0,
...     density_concentration_slope=[0.025],
...     reference_concentration=[0.0],
...     modelname=["gwt-1"],
...     species=["salinity"],
... )

Multiple species can be specified by presenting multiple values with an associated species coordinate. Two species, called “c1” and “c2”, simulated by the GWT models “gwt-1” and “gwt-2” are specified as:

>>> coords = {"species": ["c1", "c2"]}
>>> buy = imod.mf6.Buoyance(
...     reference_density=1000.0,
...     density_concentration_slope=[0.025, 0.01],
...     reference_concentration=[0.0, 0.0],
...     modelname=["gwt-1", "gwt-2"],
...     species=["c1", "c2"],
... )
__init__(reference_density: float, density_concentration_slope: Sequence[float], reference_concentration: Sequence[float], modelname: Sequence[str], species: Sequence[str], hhformulation_rhs: bool = False, densityfile: Optional[str] = None)[source]#

Methods

__init__(reference_density, ...[, ...])

add_periodic_auxiliary_variable()

from_file(path, **kwargs)

Loads an imod mf6 package from a file (currently only netcdf and zarr are supported).

get_auxiliary_variable_names()

isel()

period_data()

remove_nans_from_dataset()

render(directory, pkgname, globaltimes, binary)

sel()

to_sparse(arrdict, layer)

Convert from dense arrays to list based input

write(directory, pkgname, globaltimes, binary)

write_binary_griddata(outpath, da, dtype)

write_blockfile(directory, pkgname, ...)

write_netcdf(directory, pkgname[, ...])

Write to netcdf.

write_text_griddata(outpath, da, dtype)