gnome.ops.density

Attributes

logger

Functions

init_density(sc, num_released[, water, substance, ...])

Initializes the density of the last num_rel elements of a spill container (sc),

recalc_density(sc[, water, aggregate])

Recalculates the density of the elements in a spill container. This is necessary

Module Contents

gnome.ops.density.logger
gnome.ops.density.init_density(sc, num_released, water=None, substance=None, aggregate=True)

Initializes the density of the last num_rel elements of a spill container (sc), taking into account environmental conditions.

Parameters:
  • sc – spill container

  • num_rel – int

  • water – Water object to use. If None, uses default values

  • substance – gnome.spills.substance.Substance or subclass thereof

  • aggregate – Flag for whether to trigger mass balance updates in spill container

gnome.ops.density.recalc_density(sc, water=None, aggregate=True)

Recalculates the density of the elements in a spill container. This is necessary if ‘mass_components’ have changed. :param sc: spill container :param water: Water object to use. If None, uses default :param aggregate: Flag for whether to trigger mass balance updates in spill container