History Matching

Contains the implementations for the history matching methods

Implements the supported history matching methods.

class calisim.history_matching.implementation.HistoryMatchingMethod(calibration_func: Callable, specification: HistoryMatchingMethodModel, engine: str = 'ies', implementation: CalibrationWorkflowBase | None = None)[source]

The history matching method class.

pydantic model calisim.history_matching.implementation.HistoryMatchingMethodModel[source]

The history matching method data model.

Parameters:

BaseModel (CalibrationModel) – The calibration base model class.

Config:
  • arbitrary_types_allowed: bool = True

  • protected_namespaces: tuple = ()

Fields:
field covariance: ndarray | None = None

The covariance matrix for variables

calisim.history_matching.implementation.get_implementations() dict[str, type[CalibrationWorkflowBase]][source]

Get the calibration implementations for history matching.

Returns:

The dictionary of

calibration implementations for history matching.

Return type:

Dict[str, type[CalibrationWorkflowBase]]

Iterative Ensemble Smoother

Contains the implementations for history matching methods using iterative_ensemble_smoother

Implements the supported history matching methods using the iterative_ensemble_smoother library.

class calisim.history_matching.ies_wrapper.IESHistoryMatching(calibration_func: Callable, specification: CalibrationModel, task: str)[source]

The iterative_ensemble_smoother history matching method class.

analyze() None[source]

Analyze the results of the simulation calibration procedure.

convert_parameters(X: ndarray) list[dict[str, float]][source]

Convert the parameters from an array to a list of records.

Parameters:

X (np.ndarray) – The array of parameters.

Returns:

The list of parameters.

Return type:

List[Dict[str, float]]

execute() None[source]

Execute the simulation calibration procedure.

run_simulation(parameters: list[dict[str, float]]) ndarray[source]

Run the simulation for the history matching procedure.

Parameters:

parameters (List[Dict[str, float]]) – The list of simulation parameters.

Returns:

The ensemble outputs.

Return type:

np.ndarray

pyESMDA

Contains the implementations for history matching methods using pyESMDA

Implements the supported history matching methods using the pyESMDA library.

class calisim.history_matching.pyesmda_wrapper.PyESMDAHistoryMatching(calibration_func: Callable, specification: CalibrationModel, task: str)[source]

The pyESMDA history matching method class.

analyze() None[source]

Analyze the results of the simulation calibration procedure.

execute() None[source]

Execute the simulation calibration procedure.

calisim.history_matching.pyesmda_wrapper.forward_model(_: ndarray, workflow: HistoryMatchingBase) ndarray[source]

The forward model for the ensemble simulation.

Parameters:
  • m_ensemble (np.ndarray) – The ensemble simulation parameters.

  • workflow (HistoryMatchingBase)

Returns:

The ensemble results.

Return type:

np.ndarray