gnome.ops.viscosity
¶
Module Contents¶
Functions¶
|
Initializes the viscosity of the last num_rel elements of a spill container (sc), |
|
Recalculates the viscosity of the elements in a spill container. |
|
kv1 is constant. |
Attributes¶
- gnome.ops.viscosity.logger¶
- gnome.ops.viscosity.init_viscosity(sc, num_released, water=None, aggregate=True)¶
Initializes the viscosity 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
aggregate – Flag for whether to trigger mass balance updates in spill container
- gnome.ops.viscosity.recalc_viscosity(sc, water=None, aggregate=True)¶
Recalculates the viscosity of the elements in a spill container. :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
- gnome.ops.viscosity._get_kv1_weathering_visc_update(v0, visc_curvfit_param)¶
kv1 is constant. It defining the exponential change in viscosity as it weathers due to the fraction lost to evaporation/dissolution:
v(t) = v’ * exp(kv1 * f_lost_evap_diss)
kv1 = sqrt(v0) * 1500 if kv1 < 1, then return 1 if kv1 > 10, then return 10
Since this is fixed for an oil, it only needs to be computed once. Use lru_cache on this function to cache the result for a given initial viscosity: v0