pyDeltaRCM.sed_tools.BaseRouter

class pyDeltaRCM.sed_tools.BaseRouter

BaseRouter.

Defines common methods for jitted routers.

Subclasses need to define run, _route_one_parcel, and _deposit_or_erode.

Note

Although this class is configured with @abc.abstractmethod methods, we cannot actually enforce the implementation of this BaseRouter as an abstract class, because Numba does not support abstract classes (yet; https://github.com/numba/numba/issues/6033). The classes are included in the base class with abstract decorators to help make it clear that these methods need to be implemented in subclassing Router.

__init__()

Methods

__init__()

run(*args, **kwargs)

_compute_Vp_ero(Vp_sed: float, U_loc: float, U_ero: float, beta: float, mod_erosion: float) float

Compute volume erorded based on velocity.

The volume of sediment eroded depends on the local flow velocity (U_loc), the critical velocity for erosion (U_ero), and beta.

Function is used by both sand and mud pathways, but the input value of U_ero depends on the pathway.

Parameters:
  • Vp_sed (float) – Volume of a sediment parcel.

  • U_loc (float) – Local flow velocity.

  • U_ero (float) – Critical velocity for erosion.

  • beta (float) – unknown.

  • mod_erosion (float) – Local linear modifier for erosion.

Returns:

Vp_ero – Volume of eroded sediment.

Return type:

float

abstract _deposit_or_erode(px: int, py: int)

Determine whether to erode or deposit.

This is the decision making component of the routine, and will be different for sand vs mud.

_limit_Vp_change(Vp, stage, eta, dx: float, dep_ero: int)

Limit change in volume to 1/4 of a cell volume.

Function is used by multiple pathways in mud_dep_ero and sand_dep_ero but with different inputs for the sediment volume (Vp).

dep_ero indicates which pathway we are in, dep==0, ero==1

_update_fields(Vp_change: float, px: int, py: int) None

Execute deposit of sand or mud.

Deposit sediment volume Vp_change. The change in bed elevation depends on the sediment mass conservation (i.e., Exner equation) and is equal to:

Vp_change / (dx * dx)

Following the sediment deposition/erosion, the new values for flow depth and flow velocity fields are determined.

Note

Total sediment mass is preserved, but individual categories of sand and mud are not. I.e., it is assumed that there is infinite sand and/or mud to erode at any location where erosion is occurring.

Parameters:
  • Vp_change (float) – Volume of sediment to deposit / erode. If erosion, Vp_change should be negative.

  • px (int) – Index.

  • py (int) – Index.