elphick.geomet.utils.estimates.coerce_estimates

elphick.geomet.utils.estimates.coerce_estimates(estimate_stream, input_stream, recovery_bounds=(0.01, 0.99), complement_name='complement', fs_name='Flowsheet', show_plot=False)[source]

Coerce output estimates within recovery and the component range.

Estimates contain error and at times can exceed the specified component range, or can consume more component mass than is available in the feed. This function modifies (coerces) only the non-compliant estimate records in order to balance the node and keep all dry components within range. Moisture is not modified.

estimate_stream (supplied)

/

input_stream (supplied)

complement_stream

  1. limits the estimate to within the recovery bounds,

  2. ensures the estimate is within the component range,

  3. solves the complement, and ensures it is in range,

  4. if the complement is out of range, it is adjusted and the estimate adjusted to maintain the balance.

Parameters:
  • estimate_stream (Stream) – The estimated object, which is a node output

  • input_stream (Stream) – The input object, which is a node input

  • recovery_bounds (tuple[float, float]) – The bounds for the recovery, default is 0.01 to 0.99

  • complement_name (str) – The name of the complement , for plots.

  • fs_name (str) – The name of the flowsheet, for plots.

  • show_plot (bool) – If True, show the network plot

Return type:

Stream

Returns:

The coerced estimate stream