gnome.ops.density ================= .. py:module:: gnome.ops.density Attributes ---------- .. autoapisummary:: gnome.ops.density.logger Functions --------- .. autoapisummary:: gnome.ops.density.init_density gnome.ops.density.recalc_density Module Contents --------------- .. py:data:: logger .. py:function:: 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. :param sc: spill container :param int num_released: number of elements to be initialized :param water: Water object to use. If None, uses default values :param substance: gnome.spills.substance.Substance or subclass thereof :param aggregate: Flag for whether to trigger mass balance updates in spill container .. py:function:: 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