imod.mf6.Buoyancy#

class imod.mf6.Buoyancy(*_, **__)[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.

  • validate ({True, False}) – Flag to indicate whether the package should be validated upon initialization. This raises a ValidationError if package input is provided in the wrong manner. Defaults to True.

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: str | None = None, validate: bool = True)[source]#

Methods

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

cleanup(dis)

clip_box([time_min, time_max, layer_min, ...])

Clip a package by a bounding box (time, layer, y, x).

copy()

from_file(path, **kwargs)

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

get_non_grid_data(grid_names)

This function copies the attributes of a dataset that are scalars, such as options.

get_regrid_methods()

get_transport_model_names()

Returns the names of the transport models used by this buoyancy package.

is_clipping_supported()

is_empty()

Returns True if the package is empty- for example if it contains only no-data values.

is_grid_agnostic_package()

is_regridding_supported()

is_splitting_supported()

isel()

mask(mask)

Mask values outside of domain.

regrid_like(target_grid, regrid_cache[, ...])

Creates a package of the same type as this package, based on another discretization.

render(directory, pkgname, globaltimes, binary)

sel()

to_netcdf(*args, **kwargs)

Write dataset contents to a netCDF file.

update_transport_models(new_modelnames)

The names of the transport models can change in some cases, for example when partitioning.

write(pkgname, globaltimes, directory[, ...])

Write package to file

write_binary_griddata(outpath, da, dtype)

write_blockfile(pkgname, globaltimes, ...)

write_text_griddata(outpath, da, dtype)

Attributes

auxiliary_data_fields

dataset