pyrtid.forward.models.SourceTerm#

class pyrtid.forward.models.SourceTerm(name: str, node_ids: ndarray[Any, dtype[int64]], times: ndarray[Any, dtype[float64]], flowrates: ndarray[Any, dtype[float64]], concentrations: ndarray[Any, dtype[float64]])[source]#

Bases: object

Define a source term object.

A well object can pump or inject.

Attributes
  • name (str) – Name of the instance.

  • x_coord (float) – x coordinate of the well.

  • y_coord (float) – y_coordinate of the well.

  • flowrates (NDArrayFloat) – Sequence of flowrates of the well. Positive = injection, negative = pumping.

  • concentrations (NDArrayFloat) – Concentrations of the first species, used only if flowrates is positive.

__init__(name: str, node_ids: ndarray[Any, dtype[int64]], times: ndarray[Any, dtype[float64]], flowrates: ndarray[Any, dtype[float64]], concentrations: ndarray[Any, dtype[float64]]) None[source]#

Initialize the instance.

Parameters
  • name (str) – Name of the instance.

  • x_coord (float) – x coordinate of the well.

  • y_coord (float) – y_coordinate of the well.

  • flowrates (NDArrayFloat) – Sequence of flowrates of the well (m3/s). Positive = injection, negative = pumping.

  • concentrations (NDArrayFloat) – Concentration, used only if flowrates is positive (mol/l). With dimension (nt, n_sp).

Methods definition

get_node_indices(grid: RectilinearGrid) ndarray[Any, dtype[int64]][source]#

Return the node indices.

get_values(time: float) Tuple[float, float][source]#

Return the concentrations and the flowrates for a given time.

property n_nodes: int#

Return the number of nodes.