pywellsfm.model

The pywellsfm.model package defines the core domain model used by pyWellSFM (wells, curves, stratigraphic elements/facies, markers, and simulation parameters).

Files documented

This page is built from the following Python modules:

  • __init__.py (pywellsfm.model)

  • AccommodationSpaceWellCalculator.py (pywellsfm.model.AccommodationSpaceWellCalculator)

  • AccumulationModel.py (pywellsfm.model.AccumulationModel)

  • Curve.py (pywellsfm.model.Curve)

  • DepositionalEnvironment.py (pywellsfm.model.DepositionalEnvironment)

  • DepthAgeModel.py (pywellsfm.model.DepthAgeModel)

  • Element.py (pywellsfm.model.Element)

  • EnvironmentConditionModel.py (pywellsfm.model.EnvironmentConditionModel)

  • Facies.py (pywellsfm.model.Facies)

  • Marker.py (pywellsfm.model.Marker)

  • FSSimulationParameters.py (pywellsfm.model.FSSimulationParameters)

  • Well.py (pywellsfm.model.Well)

  • enums.py (pywellsfm.model.enums)

API reference

Public API.

This package contains data structures.

The symbols re-exported here form the supported, stable entry points. Callers should prefer importing from pywellsfm.model instead of submodules.

class pywellsfm.model.AccommodationSpaceWellCalculator(well: Well, faciesList: list[SedimentaryFacies])

Bases: object

Class to compute accommodation space curve.

Accommodation space curve represents the variation of accommodation from the base of the start of a sequence.

Parameters:
  • well (Well) – input well

  • faciesList (list[SedimentaryFacies]) – list of sedimentary facies with depositional conditions to get the waterDepth from facies log.

_computeAccommodationArray(faciesLog: Striplog, baseDepth: float, topDepth: float, accommodationAtBase: float = 0.0) ndarray[tuple[Any, ...], dtype[float64]]

Compute apparent accommodation space array along the well.

Array is composed of as many rows as the number of limits of interval (i.e., len(faciesLog) + 1) and columns are:

  • depth where accommodation is computed

  • minimum accommodation computed from the waterDepth right below the depth

  • minimum accommodation computed from the waterDepth right above the depth

  • maximum accommodation computed from the waterDepth right below the depth

  • maximum accommodation computed from the waterDepth right above the depth

Parameters:
  • faciesLog (str) – sedimentary facies log

  • baseDepth (float) – depth where to start calculation.

  • topDepth (float) – depth to stop calculation.

  • accommodationAtBase (float) – cummulative accommodation at the base depth. Defaults to 0.

Return npt.NDArray[np.float64]:

accommodation array

_computeAccommodationStepCurve(faciesLog: Striplog, baseDepth: float, topDepth: float) ndarray[tuple[Any, ...], dtype[float64]]
_computeAccommodationValue(thickness: float, waterDepthBase: tuple[float, float], waterDepthTop: tuple[float, float]) tuple[float, float]

Compute the accommodation according to thickness and waterDepth.

Parameters:
  • thickness (float) – interval thickness

  • waterDepthBase (tuple[float, float]) – waterDepth at the base of the interval

  • waterDepthTop (tuple[float, float]) – waterDepth at the top of the interval

Return tuple[float, float]:

accommodation variation from base to top

_computeWaterDepthStepCurve(faciesLog: Striplog, baseDepth: float, topDepth: float) ndarray[tuple[Any, ...], dtype[float64]]
_convertIntervalCurve2UncertaintyCurve(stepCurve: ndarray[tuple[Any, ...], dtype[float64]], uncertaintyCurve: UncertaintyCurve) None
_getInitialwaterDepthRange() tuple[float, float]

Get the initial waterDepth range.

The waterDepth is retreive from the facies log at and facies conditions.

Return tuple[float, float]:

min and max initial waterDepth values.

_getWaterDepthRangeFromFaciesName(faciesName: str) tuple[float, float]

Get the waterDepth range from the facies name.

Parameters:

faciesName (str) – facies name

Raises:

ValueError – if the facies name is not in the list or the waterDepth conditions is undefined for a given facies.

Return tuple[float, float]:

waterDepth minimum and maximum values.

_initCurves() None
computeAccommodationCurve(faciesLogName: str, fromMarker: Marker | None = None, toMarker: Marker | None = None, accommodationAtBase: float = 0.0) UncertaintyCurve

Compute accommodation space along the well.

Parameters:
  • faciesLogName (str) – name of the sedimentary facies log

  • step (float) – step between continuous log samples

  • fromMarker (Marker) – base marker where to start calculation. If no marker is given, calculation starts from the base of the well. Defaults to None.

  • toMarker (Marker) – to marker where to stop calculation. If no marker is given, calculation stops at the top of the well. Defaults to None.

  • accommodationAtBase (float) – accommodation at the base marker. Defaults to 0.

Return UncertaintyCurve:

accommodation curve

computeAccommodationCurve0(faciesLogName: str, fromMarker: Marker | None = None, toMarker: Marker | None = None) UncertaintyCurve

Compute accommodation space along the well.

Parameters:
  • faciesLogName (str) – name of the sedimentary facies log

  • step (float) – step between continuous log samples

  • fromMarker (Marker) – base marker where to start calculation. If no marker is given, calculation starts from the base of the well. Defaults to None.

  • toMarker (Marker) – to marker where to stop calculation. If no marker is given, calculation stops at the top of the well. Defaults to None.

Return UncertaintyCurve:

accommodation curve

computeWaterDepthCurve(faciesLogName: str, fromMarker: Marker | None = None, toMarker: Marker | None = None) UncertaintyCurve

Compute the waterDepth along the well.

Parameters:
  • faciesLogName (str) – name of the sedimentary facies log

  • step (float) – step between continuous log samples

  • fromMarker (Marker) – base marker where to start calculation. If no marker is given, calculation starts from the base of the well. Defaults to None.

  • toMarker (Marker) – to marker where to stop calculation. If no marker is given, calculation stops at the top of the well. Defaults to None.

Return UncertaintyCurve:

waterDepth curve

getInitialwaterDepth() float

Get the initial waterDepth.

Take the middle value of the range as initial waterDepth get from facies log.

Return float:

initial waterDepth value.

_accommodationStepCurve: ndarray[tuple[Any, ...], dtype[float64]] | None

accommodation per interval

_eps: float

epsilon for depth around the markers

_faciesDict: dict[str, SedimentaryFacies]

dictionary of facies with environment conditions

_waterDepthStepCurve: ndarray[tuple[Any, ...], dtype[float64]] | None

waterDepth per interval

_well: Well

input well

accommodationChangeCurve: UncertaintyCurve

output accommodation variation curve with uncertainties

accommodationCurve: UncertaintyCurve

output cummulative accommodation curve with uncertainties

waterDepthCurve: UncertaintyCurve

output waterDepth curve with uncertainties

class pywellsfm.model.AccumulationCurve(envFactorName: str, abscissa: ndarray[tuple[Any, ...], dtype[float64]], ordinate: ndarray[tuple[Any, ...], dtype[float64]])

Bases: Curve

Defines a accumulation curve.

An accumulation curve defines the reduction coefficients according to environment conditions. The curve uses a linear interpolation function between given points.

Parameters:
  • envFactorName (str) – environmental factor name

  • abscissa (npt.NDArray[np.float64]) – abscissa values

  • ordinate (npt.NDArray[np.float64]) – ordinate values. Must be between 0 and 1.

class pywellsfm.model.AccumulationModel(name: str, elementAccumulationModels: dict[str, AccumulationModelElementBase] | None = None)

Bases: object

Defines the accumulation model for sediments.

An accumulation model defines a list of elements and the rules that govern their accumulation through time.

Parameters:
  • name (str) – name of the accumulation model

  • elementAccumulationModels (dict | None) – dictionary of element names to their corresponding accumulation models

addElement(elementName: str, accumulationModel: AccumulationModelElementBase) None

Add an element to the accumulation model.

Parameters:
  • elementName (str) – name of the element to add

  • accumulationModel (AccumulationModelElementBase) – accumulation model associated to the element

getElementAccumulationAt(elementName: str, environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Compute the accumulation rate of an element in the model.

This method should be implemented in derived classes.

Parameters:
  • elementName (str) – name of the element to compute the accumulation rate of

  • environmentConditions (dict[str, float] | None) – optional environmental conditions. Keys are environmental factor names, values are the conditions.

  • age (float | None) – age of the accumulation.

Return float:

accumulation rate of the element (m/My)

getElementModel(elementName: str) AccumulationModelElementBase | None

Get an element of the model from its name.

Parameters:

elementName (str) – name of the element to get

Return AccumulationModelElementBase | None:

element with the given name, or None if not found

getTotalAccumulationAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Compute the total accumulation rate from element models.

Parameters:
  • environmentConditions (dict[str, float] | None) – optional environmental conditions. Keys are environmental factor names, values are the conditions.

  • age (float | None) – age of the accumulation.

Return float:

total accumulation rate (m/My)

removeElement(elementName: str) None

Remove an element from the model.

Parameters:

elementName (str) – name of the element to remove

class pywellsfm.model.AccumulationModelElementGaussian(elementName: str, accumulationRate: float, std_dev_factor: float | None = None)

Bases: AccumulationModelElementBase

Defines an accumulation model based on a probabilistic approach.

In this accumulation model, the accumulation rate of the element follows a Gaussian distribution centered around the reference accumulation rate of the element, with a standard deviation defined as a fraction of the reference rate.

Parameters:
  • elementName (str) – name of the element the model applies to

  • accumulationRate (float) – reference accumulation rate of the element (m/My)

  • std_dev_factor (float | None) – ratio of standard deviation to the reference accumulation rate. If None, the default value is 0.2.

getAccumulationCoefficientAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Get the accumulation coefficient from the Gaussian distribution.

Parameters:
  • environmentConditions (dict[str, float] | None) – environmental conditions (ignored by this model, accepted for API consistency)

  • age (float | None) – age of the accumulation (ignored by this model, accepted for API consistency)

Return float:

accumulation coefficient

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.AccumulationModelElementOptimum(elementName: str, accumulationRate: float, accumulationCurves: dict[str, AccumulationCurve] | None = None)

Bases: AccumulationModelElementBase

Defines an accumulation model based on environmental optimums.

The accumulation rate is maximal if all environmental conditions are at their optimum value. The accumulation rate decreases as the environmental values deviate from their optimum. The rate equals the reference accumulation rate of the element multiplied by the product of all the reduction coefficients defined by the accumulation curves.

Parameters:
  • elementName (str) – name of the element

  • accumulationRate (float) – reference accumulation rate of the element (m/My)

  • accumulationCurves (dict[str, AccumulationCurve] | None) – element accumulation reduction curves

addAccumulationCurve(curve: AccumulationCurve) None

Add a reduction coefficient curve that modulate the accumulation.

The name of the environmental factor is the name of x axis of the curve.

Parameters:

curve (AccumulationCurve) – reduction coefficient curve

getAccumulationCoefficientAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Get accumulation coefficient from environmental conditions.

Parameters:
  • environmentConditions (dict[str, float] | None) – environment conditions. The keys are the name of the curves, the values are the corresponding conditions. Required for this model type.

  • age (float | None) – age of the accumulation.

Return float:

accumulation coefficient (0-1)

Raises:

ValueError – if environmentConditions is None or empty

getAccumulationCurve(curveName: str) AccumulationCurve | None

Get the reduction coefficient curve corresponding to the name.

Parameters:

curveName (str) – name of the accumulation curve

Return AccumulationCurve | None:

reduction coefficient curve

removeAccumulationCurve(curveName: str) None

Remove an accumulation curve from the model.

Parameters:

curveName (str) – name of the accumulation curve to remove

_abc_impl = <_abc._abc_data object>
accumulationCurves: dict[str, AccumulationCurve]
class pywellsfm.model.CarbonateOpenRampDepositionalEnvironmentModel(tidal_range: float = 2.0, fairweather_wave_breaking_waterDepth: float = 5.0, fairweather_wave_base_waterDepth: float = 20.0, storm_wave_base_waterDepth: float = 50.0, shelf_break_waterDepth: float = 200.0, slope_toe_max_waterDepth: float = 1000.0)

Bases: DepositionalEnvironmentModel

Defines an open carbonate ramp depositional environment model.

The open carbonate ramp depositional environment is characterized by a gently sloping ramp with no significant break in slope. The inner plateform zone is typically dominated by patch reefs and other buildups, but is not protected from wave energy by a barrier. The outer ramp is characterized by a lower energy. The model has a pre-defined list of environmnents, but waterDepth ranges are parameterized based on input parameters. The list of pre-defined environmnets includes:

  • Continent: terrestrial environment, above tidal limit.

  • SupraTidal: supratidal zone where carbonate/salt precipitation may occur.

  • Inner Ramp Upper Shoreface: 0 to fairweather wave-breaking depth, where energy is high

  • Inner Ramp Lower Shoreface: fairweather wave-breaking depth to fairweather wave-base where energy is lower than the shoreface zone

  • Buildup: patch reefs and other buildups creating locally low waterDepth () and high energy () environment.

  • Outer Ramp: fairweather wave-base to storm wave-base (offshore zone), where energy is low

  • Shelf Slope: Continental slope

  • Basin: Deep basin (intra-shelf or open ocean)

Energy is given between 0.0 (no energy) and 1.0 (high energy). Distality is here given as the distance from the shoreline in km. The most significant is the relative distality between environments.

Parameters:
  • tidal_range (float) – tidal range in meters (default 2 m).

  • fairweather_wave_breaking_waterDepth (float) – fairweather wave-breaking depth (default 5 m).

  • fairweather_wave_base_waterDepth (float) – fairweather wave-base depth (default 20 m).

  • storm_wave_base_waterDepth (float) – storm wave-base depth (default 50 m).

  • shelf_break_waterDepth (float) – shelf-break depth (default 200 m).

  • slope_toe_max_waterDepth (float) – base of the slope maximum waterDepth (default 1000 m).

class pywellsfm.model.CarbonateProtectedRampDepositionalEnvironmentModel(tidal_range: float = 2.0, lagoon_max_waterDepth: float = 10.0, fairweather_wave_base_waterDepth: float = 20.0, storm_wave_base_waterDepth: float = 50.0, shelf_break_waterDepth: float = 200.0, slope_toe_max_waterDepth: float = 1000.0)

Bases: DepositionalEnvironmentModel

Defines a carbonate ramp depositional environment model.

The model is defined as a list of depositional environments. The model has a pre-defined list of environmnents, but waterDepth ranges are parameterized based on input parameters. The list of pre-defined environmnets includes:

  • Continent: terrestrial environment, above tidal limit.

  • SupraTidal: supratidal zone where carbonate/salt precipitation may occur.

  • Inner Ramp Upper Shoreface: 0 to fairweather wave-breaking depth, where energy is high

  • Inner Ramp Lower Shoreface: fairweather wave-breaking depth to fairweather wave-base where energy is lower than the shoreface zone

  • Buildup: patch reefs and other buildups creating locally low waterDepth () and high energy () environment.

  • Outer Ramp: fairweather wave-base to storm wave-base (offshore zone), where energy is low

  • Shelf Slope: Continental slope

  • Basin: Deep basin (intra-shelf or open ocean)

Parameters:
  • tidal_range (float) – tidal range in meters (default 2 m).

  • lagoon_max_waterDepth (float) – maximum depth of the lagoon (default 10 m).

  • fairweather_wave_base_waterDepth (float) – fairweather wave-base depth (default 20 m).

  • storm_wave_base_waterDepth (float) – storm wave-base depth (default 50 m).

  • shelf_break_waterDepth (float) – shelf-break depth (default 200 m).

  • slope_toe_max_waterDepth (float) – base of the slope maximum waterDepth (default 1000 m).

class pywellsfm.model.Curve(xAxisName: str, yAxisName: str, abscissa: ndarray[tuple[Any, ...], dtype[float64]], ordinate: ndarray[tuple[Any, ...], dtype[float64]], interpolationFunction: str | Any | None = None, **args: Any)

Bases: object

Defines a curve by two lists of abscissa and ordinate coordinates.

Parameters:
  • xAxisName (str) – x axis name

  • yAxisName (str) – y axis name

  • abscissa (npt.NDArray[np.float64]) – abscissa values

  • ordinate (npt.NDArray[np.float64]) – ordinate values

  • interpolationFunction (str | "function" | None) – name of interpolation method according to scipy.interpolate.interp1d method, or a class inherited from pywellsfm.utils.interpolation.Interpolator to compute the interpolation (see for instance pywellsfm.utils.interpolation.PolynomialInterpolator). By default, if interpolationFunction is None, the LowerBoundInterpolator is used.

_getIndexOfX(x: float, tol: float = 1e-06) int

Get the index of x in the abscissa values.

Parameters:
  • x (float) – value to check for

  • tol (float) – Tolerance, defaults to 1e-6.

Return int:

index of x in abscissa array, or -1 if absent.

_updateBounds() None

Update minimum and maximum abscissa.

addSampledPoint(x: float, y: float, tol: float = 1e-06) None

Add a sampled point to the curve.

Parameters:
  • x (float) – abscissa value

  • y (float) – ordinate value

  • tol (float) – tolerance value to determine if x is already in the array of abscissa. Defaults to 1e-6.

copy() Self

Create a copy of self.

Return Curve: a copy of the current Curve object.

getValueAt(at: float) float

Get the value at the given coordinate.

Returns the first/last value if input coordinate is outside of the domain the curve is defined.

Parameters:

at (float) – input coordinate

Return float:

output value

setSampledPoints(abscissa: ndarray[tuple[Any, ...], dtype[float64]], ordinate: ndarray[tuple[Any, ...], dtype[float64]]) None

Set abscissa and ordinate values of sampled points.

Parameters:
  • abscissa (npt.NDArray[np.float64]) – abscissa values

  • ordinate (npt.NDArray[np.float64]) – ordinate values

setValueAt(x: float, y: float, tol: float = 1e-06) None

Set the value at the given abscissa.

Parameters:
  • x (float) – abscissa value

  • y (float) – ordinate value

  • tol (float) – tolerance value to determine if x is already in the array of abscissa. Defaults to 1e-6.

setValueBetween(xmin: float, xmax: float, y: float, tol: float = 1e-06) None

Set a constant value between xmin and xmax abscissa.

Parameters:
  • xmin (float) – minimum abscissa value

  • xmax (float) – maximum abscissa value

  • y (float) – ordinate value

  • tol (float) – tolerance value to determine if x is already in the array of abscissa. Defaults to 1e-6.

toDataFrame(fromX: float = -inf, toX: float = inf, dx: float = inf, columnNames: tuple[str, str] = ('', '')) DataFrame

Create a DataFrame from the curve.

By default the dataframe contains the curve over the whole definition domain sampled by the same number of points as the curve.

Parameters:
  • fromX (float) – starting abscissa, defaults to -inf

  • toX (float) – end abscissa, defaults to +inf

  • dx (float) – sampling step, defaults to +inf

  • columnNames (tuple[str, str]) – names of dataframe columns, defaults to (“x”, “y”)

Return pd.DataFrame:

2 column dataframe

class pywellsfm.model.DepositionalEnvironment(name: str, waterDepthModel: EnvironmentConditionModelStats, envConditionsModel: EnvironmentConditionsModel | None = None, distality: float | None = None)

Bases: object

Defines a depositional environment.

The environment is defined from a waterDepth range and optionaly other property ranges including energy, temperature, salinity, etc.

Curves can be set to define relationships between properties, e.g. energy vs waterDepth, temperature vs age.

Note

Properties can be related to a single other property, e.g. temperature can be defined as a function of waterDepth, but not as a function of both waterDepth and age.

Parameters:
  • name (str) – name of the environment

  • waterDepthModel (EnvironmentConditionModelStats) – model for the water depth of the environment. It must be based on a statistical distribution, either constant, uniform, triangular or Gaussian.

  • environmentConditionsModel (EnvironmentConditionsModel | None) – model for the evolution of environment conditions, including energy, temperature, salinity, etc. If None, a default model with no conditions is used.

  • distality (float) – distality of the environment, defined as the distance from the shoreline, in km.

getEnvironmentConditions(waterDepth: float, age: float) dict[str, float]

Get environment conditions corresponding to this environment.

Parameters:
  • waterDepth (float) – water depth value.

  • age (float) – age at the location (only needed if some conditions depend on age).

Return dict[str, float]:

dictionary containing environment conditions for the given water depth and age.

property waterDepth_max: float

Maximum waterDepth of the environment.

property waterDepth_min: float

Minimum waterDepth of the environment.

property waterDepth_range: tuple[float, float]

WaterDepth range of the environment.

property waterDepth_rangeRef: float

Reference value of the waterDepth range.

property waterDepth_rangeWidth: float

Width of the waterDepth range.

class pywellsfm.model.DepositionalEnvironmentModel(name: str, environments: list[DepositionalEnvironment])

Bases: object

Defines a depositional environment model.

The model is defined as a list of depositional environments. These environments defined the spatial organization of the depositional system.

Parameters:
  • name (str) – name of the depositional system

  • environments (list[DepositionalEnvironment]) – list of depositional environments defining the model.

addEnvironment(environment: DepositionalEnvironment | set[DepositionalEnvironment]) None

Add an environment or set of environments to the model.

If an environment with the same name already exists in the model, it is not added.

Parameters:

environment (DepositionalEnvironment|set[]) – environment or set of environments to add

clearAllEnvironments() None

Remove all environments from the collection.

environmentExists(environmentName: str) bool

Check if an environment exists in the collection by name.

Parameters:

environmentName (str) – name of the environment to check

Return bool:

True if the environment exists in the collection

getEnvironmentByName(environmentName: str) DepositionalEnvironment | None

Get environment from the collection by name.

Parameters:

environmentName (str) – name of the environment to get

Return DepositionalEnvironment | None:

environment with the given name, or None if not found

getEnvironmentCount() int

Get the number of environments in the collection.

Return int:

number of environments

isEmpty() bool

Check if the collection is empty.

Return bool:

True if the collection is empty

removeEnvironment(environmentNames: str | set[str]) None

Remove an environment or set of environments from the list by name.

Parameters:

environmentNames (str | set[str]) – name or set of names of environments to remove

class pywellsfm.model.DepthAgeModel(interpolationMethod: str | Any = 'linear', **args: Any)

Bases: object

Defines depth-age model and conversion methods.

Parameters:
  • interpolationMethod (str | Any, optional) – Interpolation methods between time markers. Defaults to “linear”.

  • args (dict[Any, Any]) – any other arguments.

addMarker(marker: Marker) None

Add a single time marker.

Parameters:

marker (Marker) – marker

convertContinuousLogToAge(inputLog: Curve) Curve

Convert a continuous log from depth to age domain.

Parameters:

inputLog (Curve) – input log in depth domain

Return Curve:

output log in age domain

convertContinuousLogToDepth(inputLog: Curve) Curve

Convert a continuous log from age to depth domain.

Parameters:

inputLog (Curve) – input log in age domain

Return Curve:

output log in depth domain

convertDiscreteLogToAge(inputLog: Curve) Curve

Convert a discrete log from depth to age domain.

Parameters:

inputLog (Curve) – input log in depth domain

Return Curve:

output log in age domain

convertDiscreteLogToDepth(inputLog: Curve) Curve

Convert a discrete log from age to depth domain.

Parameters:

inputLog (Curve) – input log in age domain

Return Curve:

output log in depth domain

getAge(depth: float) tuple[float] | None

Get the age(s) from a given depth.

A given depth may correspond to multiple ages.

Parameters:

depth (float) – input depth

Return tuple[float]:

output ages.

getDepth(age: float) float

Get the depth from a given age.

Parameters:

age (float) – input age

Return float:

output depth

setMarkers(markers: set[Marker]) None

Set time markers.

Parameters:

markers (set[Marker]) – list of markers

updateCurve(ageDepths: ndarray[tuple[Any, ...], dtype[float64]]) None

Update depth-age curve.

Parameters:

ageDepths (npt.NDArray[np.float64]) – array of shape (n,2) with age in first column and depth in second column.

class pywellsfm.model.Element(name: str)

Bases: object

Defines an Element which is a sediment that is accumulated.

The element is accumulated (produced/deposited) at a rate that may be modulated by external conditions depending on the accumulation model used.

Parameters:

name (str) – name of the element

class pywellsfm.model.EnvironmentConditionModelCombination(models: list[EnvironmentConditionModelBase])

Bases: EnvironmentConditionModelBase

Defines a model that combines multiple env condition models.

The environment condition is the combination of the values from the individual models. Basic usage include the use of a curve model combined with a statistical model to add variability to the curve. In this case the statistical model can be defined around 1.0 to represent a coefficient that modifies the curve value.

The combination is performed by:

  • computing the env condition of each model

  • compute the ratios of the given value to the reference env condition for each model

  • multiply these ratios by the reference env condition

Ideally, the reference env condition should be equal over all models (e.g., same average if multiple statistical models). If not, the reference env condition of the combination is the average of the reference env conditions of the models.

Parameters:

models (list[EnvironmentConditionModelBase]) – list of environment condition models to combine

checkModelsConsistency() bool

Check if env conditions models are consistent.

The reference environment conditions of the models should be similar to ensure a meaningful combination. If the reference environment conditions are very different, the combination may not be meaningful.

Return bool:

True if the environment condition models are consistent (name and reference environment condition), False otherwise.

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the value of the environmental condition from the curve.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location.

Return float:

environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionModelConstant(environmentConditionName: str, value: float)

Bases: EnvironmentConditionModelStats

Defines an env condition model based on a constant value.

In this model, the environmental condition is constant and equal to the provided value.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • value (float) – value of the environmental condition

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the constant value of the environmental condition.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

environmental condition

getReferenceValue() float

Reference value for the environmental condition.

For a constant value, the reference value is the constant value itself.

Return float:

reference value for the environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionModelCurve(environmentConditionName: str, curve: Curve)

Bases: EnvironmentConditionModelBase

Defines an env condition model based on a curve.

In this model, the environmental condition is defined by a curve that relates the condition to another condition like water depth or age.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • curve (Curve) – curve defining the relationship between the environmental condition and another condition like water depth or age.

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the value of the environmental condition from the curve.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location.

Return float:

environmental condition

_abc_impl = <_abc._abc_data object>
property relatedConditionName: str

Get the name of the related condition (x-axis) from the curve.

Return str:

name of the related condition (x-axis)

class pywellsfm.model.EnvironmentConditionModelGaussian(environmentConditionName: str, meanValue: float, stdDev: float | None = None, minValue: float = -inf, maxValue: float = inf)

Bases: EnvironmentConditionModelStats

Defines an env condition model based on a Gaussian distribution.

In this model, the environmental condition follows a Gaussian distribution centered around the mean value, with a standard deviation defined as a fraction of the mean value.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • meanValue (float) – mean value of the environmental condition

  • stdDev (float | None) – standard deviation of the environmental condition. If None, the default value is 0.2.

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the env condition coefficient from the Gaussian distribution.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

environmental condition

getReferenceValue() float

Reference value for the environmental condition.

For a Gaussian distribution, the reference value is the mean value.

Return float:

reference value for the environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionModelUniform(environmentConditionName: str, minValue: float, maxValue: float)

Bases: EnvironmentConditionModelStats

Defines an env condition model based on a uniform distribution.

In this model, the environmental condition follows a uniform distribution centered around the mean value, with a standard deviation defined as a fraction of the mean value.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • minValue (float) – minimum value of the environmental condition

  • maxValue (float) – maximum value of the environmental condition

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the env condition coefficient from the uniform distribution.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

environmental condition

getReferenceValue() float

Reference value for the environmental condition.

For a uniform distribution, the reference value is the mid-point of the range.

Return float:

reference value for the environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionsModel(envConditionModels: list[EnvironmentConditionModelBase] | None = None)

Bases: object

Defines the model for environment conditions.

This model contains a set of environment condition models. The model can be used to compute the environmental conditions at a water depth and age.

addEnvironmentConditionModel(name: str, model: EnvironmentConditionModelBase) None

Add an environment condition model to the model.

Parameters:
  • name (str) – name of the environment condition.

  • model (EnvironmentConditionModelBase) – environment condition model to add.

getCurveModelDependencies() dict[str, str]

Get the condition dependencies from models based on a curve.

Return dict[str, str]:

dict mapping target condition (y-axis) to source condition (x-axis).

getEnvironmentConditionsAt(waterDepth: float, age: float | None = None) dict[str, float]

Get all environment condition values from known waterDepth and age.

Resolution strategy:

  • Build the condition universe from envConditionModels.

  • Infer dependency edges from curve-based models (target condition depends on source condition).

  • Resolve independent conditions first via model.getEnvironmentConditionAt().

  • Resolve conditions that depend directly on waterDepth and, when available, on age.

  • Iteratively resolve remaining conditions once their source value is available.

  • Raise ValueError if unresolved conditions remain (missing or cyclic dependencies).

This is effectively a dependency-ordered (topological) resolution, supporting both independent models and condition-to-condition models.

Parameters:
  • waterDepth (float) – water depth at the location.

  • age (float | None) – age at the location (optional, only needed if some conditions depend on age).

Return dict[str, float]:

environment condition dict.

isEnvironmentConditionModelPresent(name: str) bool

Check if an environment condition model is present in the model.

Parameters:

name (str) – name of the environment condition to check.

Return bool:

True if the environment condition model is present, False otherwise.

removeEnvironmentConditionModel(name: str) None

Remove an environment condition model from the model.

Parameters:

name (str) – name of the environment condition to remove.

envConditionModels: dict[str, EnvironmentConditionModelBase]
property environmentConditionNames: list[str]

Get the list of environment condition names defined in the model.

Return list[str]:

list of environment condition names.

class pywellsfm.model.EnvironmentalFacies(name: str, criteria: set[FaciesCriteria])

Bases: Facies

A facies defined from environmental criteria.

An environmental facies contains the criteria from which it is defined.

Parameters:
  • name (str) – name of the facies

  • criteria (set[FaciesCriteria]) – set of criteria used to define the facies

class pywellsfm.model.FSSimulatorParameters(max_waterDepth_change_per_step: float = 0.5, dt_min: float = 0.001, dt_max: float = 0.1, safety: float = 0.9, max_steps: int = 1000000000)

Bases: object

Parameters for the Forward Stratigraphic Simulator (FSSimulator).

dt_max: float = 0.1

maximum time step (in Myr). Default is 0.1 Myr.

dt_min: float = 0.001

minimum time step (in Myr). Default is 1e-3 Myr.

max_steps: int = 1000000000

maximum number of steps. Default is 1e9.

max_waterDepth_change_per_step: float = 0.5

maximum waterDepth change and accumulated thickness per step (in meters). Default is 0.5 m.

safety: float = 0.9

safety factor for time step adjustment. Must be in (0, 1]. Default is 0.9.

class pywellsfm.model.Facies(name: str, criteria: FaciesCriteria | set[FaciesCriteria], criteriaType: FaciesCriteriaType = FaciesCriteriaType.UNCATEGORIZED)

Bases: object

A facies is a category of rock defined from some criteria.

Parameters:
  • name (str) – name of the facies

  • criteria (FaciesCriteria | set[FaciesCriteria]) – criteria or set of criteria used to define the facies

  • criteriaType (FaciesCriteriaType) – type of criteria used to define the facies. Default is UNCATEGORIZED that means that any criteria type can be used.

addCriteria(criteria: FaciesCriteria | set[FaciesCriteria]) None

Add a criteria to the facies.

Parameters:

criteria (FaciesCriteria) – criteria to add

getCriteria(criteriaName: str) FaciesCriteria | None

Get a criteria defining the facies by name.

Parameters:

criteriaName (str) – name of the criteria to get

Return FaciesCriteria | None:

criteria with the given name, or None if not found

getCriteriaCount() int

Get the number of criteria defining the facies.

Return int:

number of criteria

class pywellsfm.model.FaciesCriteria(name: str, minRange: float = -inf, maxRange: float = inf, type: FaciesCriteriaType = FaciesCriteriaType.UNCATEGORIZED)

Bases: object

Defines a criteria to classify rocks based on a range of a property.

Parameters:
  • name (str) – property name

  • minRange (float) – minimum value of the property. Default is -infinity.

  • maxRange (float) – maximum value of the property. Default is infinity.

  • type (FaciesCriteriaType) – type of the criteria. Default is UNCATEGORIZED.

hasType(type: FaciesCriteriaType) bool

Check if criteria is of given type.

Parameters:

type (FaciesCriteriaType) – criteria type

Return bool:

True if criteria is of given type

isNamed(name: str) bool

Compare criteria name against input name.

Name comparison is case insensitive.

Parameters:

name (str) – input name

Return bool:

True if the criteria name equals input name

class pywellsfm.model.FaciesCriteriaCollection(criteriaType: FaciesCriteriaType = FaciesCriteriaType.UNCATEGORIZED)

Bases: object

Collection of facies criteria.

Criteria types include:

  • sedimentatological criteria (e.g., grain size, element composition, classifications)

  • petrophysical criteria (e.g., porosity, permeability, density)

  • environmental conditions (e.g., water depth, energy level, temperature)

  • uncategorized criteria (e.g., any other property used to define facies)

All criteria of the collection must be unique by name.

Parameters:

criteriaType (FaciesCriteriaType) – type of criteria allowed in the collection. Default is UNCATEGORIZED that means that any criteria type can be added.

addCriteria(criteria: FaciesCriteria | set[FaciesCriteria]) None

Add a criteria or set of criteria to the collection.

If a criteria with the same name already exists in the collection, it is not added.

Parameters:

criteria (FaciesCriteria | set[FaciesCriteria]) – criteria or set of criteria to add

clearAllCriteria() None

Remove all criteria from the collection.

clearCriteriaByType(criteriaType: FaciesCriteriaType) int

Remove all criteria of a given type from the collection.

Parameters:

criteriaType (FaciesCriteriaType) – type of criteria to remove

Return int:

number of criteria removed

criteriaExists(criteriaName: str) bool

Check if a criteria exists in the collection by name.

Parameters:

criteriaName (str) – name of the criteria to check

Return bool:

True if the criteria exists in the collection

criteriaIsAllowed(criteria: FaciesCriteria) bool

Check if a criteria can be added to the collection.

A criteria can be added if its type matches the collection type, or if the collection type is UNCATEGORIZED.

Parameters:

criteria (FaciesCriteria) – criteria to check

Return bool:

True if the criteria can be added to the collection

getAllCriteria() set[FaciesCriteria]

Get all criteria in the collection.

Return set[FaciesCriteria]:

set of all criteria

getCriteriaByName(criteriaName: str) FaciesCriteria | None

Get criteria from the collection by name.

Parameters:

criteriaName (str) – name of the criteria to get

Return FaciesCriteria | None:

criteria with the given name, or None if not found

getCriteriaCount() int

Get the number of criteria in the collection.

Return int:

number of criteria

getCriteriaSetByType(criteriaType: FaciesCriteriaType) set[FaciesCriteria]

Get a subset of criteria from the collection by type.

Parameters:

criteriaType (FaciesCriteriaType) – type of criteria to get

Return set[FaciesCriteria]:

set of criteria of the given type

isEmpty() bool

Check if the collection is empty.

Return bool:

True if the collection is empty

removeCriteria(criteriaNames: str | set[str]) None

Remove a criteria or set of criteria from the collection by name.

Parameters:

criteriaNames (str | set[str]) – name or set of names of criteria to remove

class pywellsfm.model.FaciesCriteriaType(*values)

Bases: StrEnum

Criteria types.

Criteria types include:
  • sedimentatological criteria (e.g., grain size, element composition, classifications)

  • petrophysical criteria (e.g., porosity, permeability, density)

  • environmental conditions (e.g., water depth, energy level, temperature)

  • uncategorized criteria (e.g., any other property used to define facies)

static _generate_next_value_(name, start, count, last_values)

Return the lower-cased version of the member name.

ENVIRONMENTAL = 'environmental'
PETROPHYSICAL = 'petrophysical'
SEDIMENTOLOGICAL = 'sedimentological'
UNCATEGORIZED = 'uncategorized'
class pywellsfm.model.FaciesModel(faciesSet: set[Facies])

Bases: object

Defines a facies model containing a set of facies.

Parameters:

faciesSet (set[Facies]) – set of facies in the model

getCriteriaRangeForFacies(faciesName: str, criteriaName: str) tuple[float, float] | None

Get the range of a criteria for a given facies.

Parameters:
  • faciesName (str) – name of the facies

  • criteriaName (str) – name of the criteria

Return tuple[float, float] | None:

(min, max) range of the criteria for the facies, or None if not found

getFaciesByName(faciesName: str) Facies | None

Get a facies from the model by name.

Parameters:

faciesName (str) – name of the facies to get

Return Facies | None:

facies with the given name, or None if not found

faciesSet: set[Facies]
class pywellsfm.model.Marker(name: str, depth: float, age: float = nan, stratigraphicType: StratigraphicSurfaceType = StratigraphicSurfaceType.UNKNOWN)

Bases: object

Defines stratigraphic markers and associated properties.

Parameters:
  • name (str) – name of the marker

  • depth (float) – marker depth

  • age (float) – marker age, defaults to np.nan

  • stratigraphicType (StratigraphicSurfaceType) – stratigraphic type of the marker, defaults to StratigraphicSurfaceType.UNKNOWN.

areCollocated(other: Any) bool

Two markers are collocated if they are at the same depth.

Parameters:

other (Any) – other object

Return bool:

True if at the same depth

areFromSameHorizon(other: Any) bool

Check that two markers are from the same horizon.

Two markers belong to a same horizon if they have the same name and age.

Parameters:

other (Any) – other object

Return bool:

True if same name and synchrone

areSynchrone(other: Any) bool

Two markers are synchrone if they are at the same age.

Parameters:

other (Any) – other object

Return bool:

True if at the same age

depth: float

depth of the marker

name: str

name of the marker

stratigraphicType: StratigraphicSurfaceType

stratigraphic relationship between above and bottom units

class pywellsfm.model.PetrophysicalFacies(name: str, criteria: set[FaciesCriteria])

Bases: Facies

A facies defined from petrophysical criteria only.

A petrophysical facies contains the criteria from which it is defined.

Parameters:
  • name (str) – name of the facies

  • criteria (set[FaciesCriteria]) – set of criteria used to define the facies

class pywellsfm.model.RealizationData(well: Well, initialBathymetry: float, initialEnvironmentName: str | None, subsidenceCurve: Curve | None, subsidenceType: SubsidenceType)

Bases: object

Data class for to define realization-specific parameters.

Parameters:
  • well (Well) – well object

  • initialBathymetry (float) – initial bathymetry for the realization.

  • subsidenceCurve (Curve | None) – subsidence curve for the realization.

  • subsidenceType (SubsidenceType) – subsidence type for the realization.

  • initialEnvironment (DepositionalEnvironment | None) – initial depositional environment for the realization.

initialBathymetry: float
initialEnvironmentName: str | None
subsidenceCurve: Curve | None
subsidenceType: SubsidenceType
well: Well
class pywellsfm.model.Scenario(name: str, accumulationModel: AccumulationModel, eustaticCurve: Curve | None, depositionalEnvironmentModel: DepositionalEnvironmentModel | None = None, faciesModel: FaciesModel | None = None)

Bases: object

Defines a simulation scenario.

A scenario defines all the parameters that are supposed to be uniform over a given area. It includes the accumulation model and the eustatic curve.

Parameters:
  • name (str) – name of the scenario

  • accumulationModel (AccumulationModel) – accumulation model used in the scenario. It defines the list of elements and their default accumulation rates.

  • eustaticCurve (Curve | None) – Eustatic curve, defaults to None

  • depositionalEnvironmentModel (DepositionalEnvironmentModel) – depositional environment model used in the scenario. It defines the list of depositional environments and their corresponding environmental conditions.

  • faciesModel (FaciesModel | None) – facies model used in the scenario. It defines the list of facies and their default proportions.

accumulationModel: AccumulationModel

accumulation model used in the scenario

depositionalEnvironmentModel: DepositionalEnvironmentModel | None = None

depositional environment model used in the scenario

eustaticCurve: Curve | None

eustatic curve used in the scenario

faciesModel: FaciesModel | None = None

facies model used in the scenario

name: str

name of the scenario

class pywellsfm.model.SedimentaryFacies(name: str, criteria: set[FaciesCriteria])

Bases: Facies

A facies defined from sedimentological criteria.

A sedimentary facies contains the criteria and optionnaly the environmental conditions from which it is deposited.

Parameters:
  • name (str) – name of the facies

  • criteria (set[FaciesCriteria]) – set of criteria used to define the facies

class pywellsfm.model.StratigraphicSurfaceType(*values)

Bases: StrEnum

Define surface stratigraphic type.

static _generate_next_value_(name, start, count, last_values)

Return the lower-cased version of the member name.

BASELAP = 'Baselap'
CONFORM = 'Conform'
EROSIVE = 'Erosive'
TOPLAP = 'Toplap'
UNKNOWN = 'Unknown'
class pywellsfm.model.SubsidenceType(*values)

Bases: StrEnum

Subsidence curve type.

static _generate_next_value_(name, start, count, last_values)

Return the lower-cased version of the member name.

CUMULATIVE = 'cumulative'

cumulative subsidence curve, where values are cumulative subsidence at a given age

RATE = 'rate'

subsidence rate curve, where values are subsidence rate at a given age. Subsidence at a given age is then computed by multiplying the rate by the time interval

class pywellsfm.model.UncertaintyCurve(curveName: str, curve: Curve)

Bases: object

Defines a curve associated to an uncertainty range.

Parameters:
  • curveName (str) – curve name

  • curve (Curve) – median curve.

addSampledPoint(x: float, y: float, ymin: float = nan, ymax: float = nan) None

Add a sampled point to the curves.

If no values are given for ymin and/or ymax, y value is set to minimum and maximum curves.

Parameters:
  • x (float) – abscissa value

  • y (float) – median value

  • ymin (float) – minimum value. Defaults to np.nan.

  • ymax (float) – maximum value. Defaults to np.nan.

getAbscissa() ndarray[tuple[Any, ...], dtype[float64]]

Get abscissa values of the curves.

Return npt.NDArray[np.float64]:

abscissa array

getMaxValues() ndarray[tuple[Any, ...], dtype[float64]]

Get maximum ordinate values of the curves.

Return npt.NDArray[np.float64]:

maximum ordinate array

getMedianValues() ndarray[tuple[Any, ...], dtype[float64]]

Get median ordinate values of the curves.

Return npt.NDArray[np.float64]:

median ordinate array

getMinValues() ndarray[tuple[Any, ...], dtype[float64]]

Get minimum ordinate values of the curves.

Return npt.NDArray[np.float64]:

minimum ordinate array

getRangeAt(abscissa: float) tuple[float, float, float]

Get the range of values for a given abscissa.

Parameters:

abscissa (float) – input abscissa

Return tuple[float, float, float]:

tuple containing the minimum, median and maximum values

setCurve(curve: Curve) None

Set the median curve.

: param Curve (optional) curve: median curve. : raises TypeError: if input object is not of type Curve.

setMaxCurveValues(values: ndarray[tuple[Any, ...], dtype[float64]]) None

Set the maximum curve values.

Parameters:

values (npt.NDArray[np.float64]) – maximum values

setMinCurveValues(values: ndarray[tuple[Any, ...], dtype[float64]]) None

Set the minimum curve values.

Parameters:

values (npt.NDArray[np.float64]) – minimum values

setSampledPoints(abscissa: ndarray[tuple[Any, ...], dtype[float64]], ordinate: ndarray[tuple[Any, ...], dtype[float64]], setAsMinValues: bool = False, setAsMaxValues: bool = False) None

Set abscissa and ordinate values of sampled points.

The ordinate is set to the median curve, but it can also be set to minimum and maximum curves by setting setAsMinValues and setAsMaxValues to True respectively.

Parameters:
  • abscissa (npt.NDArray[np.float64]) – abscissa values

  • ordinate (npt.NDArray[np.float64]) – ordinate values

  • setAsMinValues (bool) – if True, set ordinate array to minimum curve. Defaults to False.

  • setAsMaxValues (bool) – if True, set ordinate array to maximum curve. Defaults to False.

class pywellsfm.model.Well(name: str, wellHeadCoords: ndarray[tuple[Any, ...], dtype[float64]], depth: float)

Bases: object

Defines a well.

Parameters:
  • name (str) – name of the well.

  • wellHeadCoords (npt.NDArray[np.float64]) – x,y,z coordinates of the well head.

  • depth (float) – depth of the well

_addContinuousLog(logName: str, log: Curve) None
_addDiscreteLog(logName: str, log: Striplog) None
addAgeLog(logName: str, log: Curve | Striplog) None

Add a well log in age domain.

Well log can be continuous or discrete. If a log with the name exists, it is erased.

Parameters:
  • logName (str) – well log name

  • log (Curve | Striplog) – input log

addLog(logName: str, log: Curve | Striplog) None

Add a well log.

Well log can be continuous or discrete. If a log with the name exists, it is erased.

Parameters:
  • logName (str) – well log name

  • log (Curve | Striplog) – input log

addMarkers(markers: Marker | list[Marker]) None

Add well markers.

Parameters:

markers (Marker | list[Marker]) – a marker or a list of markers

getAgeLog(logName: str) Curve | Striplog | None

Get well log in depth domain from its name.

Parameters:

logName (str) – well log name

Return Curve | Striplog:

output log

getContinuousLogNames() set[str]

Get the set of continuous well log names.

Return set[str]:

set of continuous well log names

getDepthLog(logName: str) Curve | Striplog | None

Get well log in depth domain from its name.

Parameters:

logName (str) – well log name

Return Curve | Striplog:

output log

getDiscreteLogNames() set[str]

Get the set of discrete well log names.

Return set[str]:

set of discrete well log names

getMarkers() list[Marker]

Get well markers.

Return list[Marker]:

list of well markers

initDepthAgeModel() None

Initialize depth-age model.

setMarkers(markers: list[Marker]) None

Set well markers.

Existing makers are deleted. Use Well.addMarkers if you want to keep existing markers instead.

Parameters:

markers (list[Marker]) – list of well markers

setWellPath(wellPath: ndarray[tuple[Any, ...], dtype[float64]]) None

Set well path for deviated wells.

Parameters:

wellPath (npt.NDArray[np.float64]) – array containing x,y,z coordinates

shallowCopy(newName: str, copyMarkers: bool, copyLogs: bool) Well

Make a shallow copy of the well.

Useful to create a simulated version of the well.

Parameters:
  • newName (str) – new name of the well.

  • copyMarkers (bool) – if True, copy markers by reference.

  • copyLogs (bool) – if True, copy logs by reference.

Return Well:

a copy of the well

_ageLogs: dict[str, Curve | Striplog]

well logs (discrete or continuous) in age domain

_depthAgeModel: DepthAgeModel | None

depth age model

_logs: dict[str, Curve | Striplog]

well logs (discrete or continuous) in depth domain

_markers: list[Marker]

well markers defining remarkable horizons

_wellPath: ndarray[tuple[Any, ...], dtype[float64]]

well path containing x,y,z coordinates of the path. By default, vertical well from well head

depth: float

well depth

name: str

name of the well

property oldestMarker: Marker

Get the first (oldest) marker age.

Return Marker:

oldest marker

property oldestMarkerAge: float

Get the first (oldest) marker age.

Return float:

oldest marker age

wellHeadCoords: ndarray[tuple[Any, ...], dtype[float64]]

x,y,z coordinates of the well head

property youngestMarker: Marker

Get the last (youngest) marker age.

Return Marker:

youngest marker

property youngestMarkerAge: float

Get the last (youngest) marker age.

Return float:

youngest marker age

class pywellsfm.model.AccommodationSpaceWellCalculator.AccommodationSpaceWellCalculator(well: Well, faciesList: list[SedimentaryFacies])

Bases: object

Class to compute accommodation space curve.

Accommodation space curve represents the variation of accommodation from the base of the start of a sequence.

Parameters:
  • well (Well) – input well

  • faciesList (list[SedimentaryFacies]) – list of sedimentary facies with depositional conditions to get the waterDepth from facies log.

_computeAccommodationArray(faciesLog: Striplog, baseDepth: float, topDepth: float, accommodationAtBase: float = 0.0) ndarray[tuple[Any, ...], dtype[float64]]

Compute apparent accommodation space array along the well.

Array is composed of as many rows as the number of limits of interval (i.e., len(faciesLog) + 1) and columns are:

  • depth where accommodation is computed

  • minimum accommodation computed from the waterDepth right below the depth

  • minimum accommodation computed from the waterDepth right above the depth

  • maximum accommodation computed from the waterDepth right below the depth

  • maximum accommodation computed from the waterDepth right above the depth

Parameters:
  • faciesLog (str) – sedimentary facies log

  • baseDepth (float) – depth where to start calculation.

  • topDepth (float) – depth to stop calculation.

  • accommodationAtBase (float) – cummulative accommodation at the base depth. Defaults to 0.

Return npt.NDArray[np.float64]:

accommodation array

_computeAccommodationStepCurve(faciesLog: Striplog, baseDepth: float, topDepth: float) ndarray[tuple[Any, ...], dtype[float64]]
_computeAccommodationValue(thickness: float, waterDepthBase: tuple[float, float], waterDepthTop: tuple[float, float]) tuple[float, float]

Compute the accommodation according to thickness and waterDepth.

Parameters:
  • thickness (float) – interval thickness

  • waterDepthBase (tuple[float, float]) – waterDepth at the base of the interval

  • waterDepthTop (tuple[float, float]) – waterDepth at the top of the interval

Return tuple[float, float]:

accommodation variation from base to top

_computeWaterDepthStepCurve(faciesLog: Striplog, baseDepth: float, topDepth: float) ndarray[tuple[Any, ...], dtype[float64]]
_convertIntervalCurve2UncertaintyCurve(stepCurve: ndarray[tuple[Any, ...], dtype[float64]], uncertaintyCurve: UncertaintyCurve) None
_getInitialwaterDepthRange() tuple[float, float]

Get the initial waterDepth range.

The waterDepth is retreive from the facies log at and facies conditions.

Return tuple[float, float]:

min and max initial waterDepth values.

_getWaterDepthRangeFromFaciesName(faciesName: str) tuple[float, float]

Get the waterDepth range from the facies name.

Parameters:

faciesName (str) – facies name

Raises:

ValueError – if the facies name is not in the list or the waterDepth conditions is undefined for a given facies.

Return tuple[float, float]:

waterDepth minimum and maximum values.

_initCurves() None
computeAccommodationCurve(faciesLogName: str, fromMarker: Marker | None = None, toMarker: Marker | None = None, accommodationAtBase: float = 0.0) UncertaintyCurve

Compute accommodation space along the well.

Parameters:
  • faciesLogName (str) – name of the sedimentary facies log

  • step (float) – step between continuous log samples

  • fromMarker (Marker) – base marker where to start calculation. If no marker is given, calculation starts from the base of the well. Defaults to None.

  • toMarker (Marker) – to marker where to stop calculation. If no marker is given, calculation stops at the top of the well. Defaults to None.

  • accommodationAtBase (float) – accommodation at the base marker. Defaults to 0.

Return UncertaintyCurve:

accommodation curve

computeAccommodationCurve0(faciesLogName: str, fromMarker: Marker | None = None, toMarker: Marker | None = None) UncertaintyCurve

Compute accommodation space along the well.

Parameters:
  • faciesLogName (str) – name of the sedimentary facies log

  • step (float) – step between continuous log samples

  • fromMarker (Marker) – base marker where to start calculation. If no marker is given, calculation starts from the base of the well. Defaults to None.

  • toMarker (Marker) – to marker where to stop calculation. If no marker is given, calculation stops at the top of the well. Defaults to None.

Return UncertaintyCurve:

accommodation curve

computeWaterDepthCurve(faciesLogName: str, fromMarker: Marker | None = None, toMarker: Marker | None = None) UncertaintyCurve

Compute the waterDepth along the well.

Parameters:
  • faciesLogName (str) – name of the sedimentary facies log

  • step (float) – step between continuous log samples

  • fromMarker (Marker) – base marker where to start calculation. If no marker is given, calculation starts from the base of the well. Defaults to None.

  • toMarker (Marker) – to marker where to stop calculation. If no marker is given, calculation stops at the top of the well. Defaults to None.

Return UncertaintyCurve:

waterDepth curve

getInitialwaterDepth() float

Get the initial waterDepth.

Take the middle value of the range as initial waterDepth get from facies log.

Return float:

initial waterDepth value.

_accommodationComputed: bool
_accommodationStepCurve: ndarray[tuple[Any, ...], dtype[float64]] | None

accommodation per interval

_eps: float

epsilon for depth around the markers

_faciesDict: dict[str, SedimentaryFacies]

dictionary of facies with environment conditions

_waterDepthComputed: bool
_waterDepthStepCurve: ndarray[tuple[Any, ...], dtype[float64]] | None

waterDepth per interval

_well: Well

input well

accommodationChangeCurve: UncertaintyCurve

output accommodation variation curve with uncertainties

accommodationCurve: UncertaintyCurve

output cummulative accommodation curve with uncertainties

waterDepthCurve: UncertaintyCurve

output waterDepth curve with uncertainties

class pywellsfm.model.AccumulationModel.AccumulationModel(name: str, elementAccumulationModels: dict[str, AccumulationModelElementBase] | None = None)

Bases: object

Defines the accumulation model for sediments.

An accumulation model defines a list of elements and the rules that govern their accumulation through time.

Parameters:
  • name (str) – name of the accumulation model

  • elementAccumulationModels (dict | None) – dictionary of element names to their corresponding accumulation models

addElement(elementName: str, accumulationModel: AccumulationModelElementBase) None

Add an element to the accumulation model.

Parameters:
  • elementName (str) – name of the element to add

  • accumulationModel (AccumulationModelElementBase) – accumulation model associated to the element

getElementAccumulationAt(elementName: str, environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Compute the accumulation rate of an element in the model.

This method should be implemented in derived classes.

Parameters:
  • elementName (str) – name of the element to compute the accumulation rate of

  • environmentConditions (dict[str, float] | None) – optional environmental conditions. Keys are environmental factor names, values are the conditions.

  • age (float | None) – age of the accumulation.

Return float:

accumulation rate of the element (m/My)

getElementModel(elementName: str) AccumulationModelElementBase | None

Get an element of the model from its name.

Parameters:

elementName (str) – name of the element to get

Return AccumulationModelElementBase | None:

element with the given name, or None if not found

getTotalAccumulationAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Compute the total accumulation rate from element models.

Parameters:
  • environmentConditions (dict[str, float] | None) – optional environmental conditions. Keys are environmental factor names, values are the conditions.

  • age (float | None) – age of the accumulation.

Return float:

total accumulation rate (m/My)

removeElement(elementName: str) None

Remove an element from the model.

Parameters:

elementName (str) – name of the element to remove

elements: dict[str, AccumulationModelElementBase]
name: str
class pywellsfm.model.AccumulationModel.AccumulationModelCombination(models: list[AccumulationModelElementBase])

Bases: AccumulationModelElementBase

Defines a model that combines multiple accumulation models.

The accumulation rate of the element is the combination of the accumulation rates of the individual models.

The combination is performed by:

  • computing the accumulation rate of each model

  • compute the ratio of accumulation rate of each model to the reference accumulation rate

  • multiply this ratio by the reference accumulation rate

Ideally, the reference accumulation rate of the element should be equal over all models. If not, the reference accumulation rate of the element is the average of the reference accumulation rates of the models.

Parameters:

models (list[AccumulationModelElementBase]) – list of accumulation models to combine

checkModelsConsistency() bool

Check if accumulation models are consistent.

The reference accumulation rates of the models should be similar to ensure a meaningful combination. If the reference accumulation rates are very different, the combination may not be meaningful.

Return bool:

True if the accumulation models are consistent (name and reference accumulation rate), False otherwise.

getAccumulationCoefficientAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Get the accumulation rate by combining multiple models.

Parameters:
  • environmentConditions (dict[str, float] | None) – environmental conditions (ignored by this model, accepted for API consistency)

  • age (float | None) – age of the accumulation (ignored by this model, accepted for API consistency)

Return float:

accumulation rate (m/My)

_abc_impl = <_abc._abc_data object>
models: list[AccumulationModelElementBase]
class pywellsfm.model.AccumulationModel.AccumulationModelElementBase(elementName: str, accumulationRate: float)

Bases: ABC

Defines the base class for accumulation models based on elements.

Parameters:
  • elementName (str) – name of the element the model applies to

  • accumulationRate (float) – reference accumulation rate of the element (m/My)

getAccumulationAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Compute the accumulation rate of the element.

This method should be implemented in derived classes.

Parameters:
  • environmentConditions (dict[str, float] | None) – optional environmental conditions. Keys are environmental factor names, values are the conditions.

  • age (float | None) – age of the accumulation.

Return float:

accumulation rate (m/My)

abstractmethod getAccumulationCoefficientAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Compute the accumulation coefficient of the element.

This method should be implemented in derived classes.

Parameters:
  • environmentConditions (dict[str, float] | None) – optional environmental conditions. Keys are environmental factor names, values are the conditions.

  • age (float | None) – age of the accumulation.

Return float:

accumulation coefficient

_abc_impl = <_abc._abc_data object>
accumulationRate: float
class pywellsfm.model.AccumulationModel.AccumulationModelElementGaussian(elementName: str, accumulationRate: float, std_dev_factor: float | None = None)

Bases: AccumulationModelElementBase

Defines an accumulation model based on a probabilistic approach.

In this accumulation model, the accumulation rate of the element follows a Gaussian distribution centered around the reference accumulation rate of the element, with a standard deviation defined as a fraction of the reference rate.

Parameters:
  • elementName (str) – name of the element the model applies to

  • accumulationRate (float) – reference accumulation rate of the element (m/My)

  • std_dev_factor (float | None) – ratio of standard deviation to the reference accumulation rate. If None, the default value is 0.2.

getAccumulationCoefficientAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Get the accumulation coefficient from the Gaussian distribution.

Parameters:
  • environmentConditions (dict[str, float] | None) – environmental conditions (ignored by this model, accepted for API consistency)

  • age (float | None) – age of the accumulation (ignored by this model, accepted for API consistency)

Return float:

accumulation coefficient

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.AccumulationModel.AccumulationModelElementOptimum(elementName: str, accumulationRate: float, accumulationCurves: dict[str, AccumulationCurve] | None = None)

Bases: AccumulationModelElementBase

Defines an accumulation model based on environmental optimums.

The accumulation rate is maximal if all environmental conditions are at their optimum value. The accumulation rate decreases as the environmental values deviate from their optimum. The rate equals the reference accumulation rate of the element multiplied by the product of all the reduction coefficients defined by the accumulation curves.

Parameters:
  • elementName (str) – name of the element

  • accumulationRate (float) – reference accumulation rate of the element (m/My)

  • accumulationCurves (dict[str, AccumulationCurve] | None) – element accumulation reduction curves

addAccumulationCurve(curve: AccumulationCurve) None

Add a reduction coefficient curve that modulate the accumulation.

The name of the environmental factor is the name of x axis of the curve.

Parameters:

curve (AccumulationCurve) – reduction coefficient curve

getAccumulationCoefficientAt(environmentConditions: dict[str, float] | None = None, age: float | None = None) float

Get accumulation coefficient from environmental conditions.

Parameters:
  • environmentConditions (dict[str, float] | None) – environment conditions. The keys are the name of the curves, the values are the corresponding conditions. Required for this model type.

  • age (float | None) – age of the accumulation.

Return float:

accumulation coefficient (0-1)

Raises:

ValueError – if environmentConditions is None or empty

getAccumulationCurve(curveName: str) AccumulationCurve | None

Get the reduction coefficient curve corresponding to the name.

Parameters:

curveName (str) – name of the accumulation curve

Return AccumulationCurve | None:

reduction coefficient curve

removeAccumulationCurve(curveName: str) None

Remove an accumulation curve from the model.

Parameters:

curveName (str) – name of the accumulation curve to remove

_abc_impl = <_abc._abc_data object>
accumulationCurves: dict[str, AccumulationCurve]
class pywellsfm.model.Curve.AccumulationCurve(envFactorName: str, abscissa: ndarray[tuple[Any, ...], dtype[float64]], ordinate: ndarray[tuple[Any, ...], dtype[float64]])

Bases: Curve

Defines a accumulation curve.

An accumulation curve defines the reduction coefficients according to environment conditions. The curve uses a linear interpolation function between given points.

Parameters:
  • envFactorName (str) – environmental factor name

  • abscissa (npt.NDArray[np.float64]) – abscissa values

  • ordinate (npt.NDArray[np.float64]) – ordinate values. Must be between 0 and 1.

class pywellsfm.model.Curve.Curve(xAxisName: str, yAxisName: str, abscissa: ndarray[tuple[Any, ...], dtype[float64]], ordinate: ndarray[tuple[Any, ...], dtype[float64]], interpolationFunction: str | Any | None = None, **args: Any)

Bases: object

Defines a curve by two lists of abscissa and ordinate coordinates.

Parameters:
  • xAxisName (str) – x axis name

  • yAxisName (str) – y axis name

  • abscissa (npt.NDArray[np.float64]) – abscissa values

  • ordinate (npt.NDArray[np.float64]) – ordinate values

  • interpolationFunction (str | "function" | None) – name of interpolation method according to scipy.interpolate.interp1d method, or a class inherited from pywellsfm.utils.interpolation.Interpolator to compute the interpolation (see for instance pywellsfm.utils.interpolation.PolynomialInterpolator). By default, if interpolationFunction is None, the LowerBoundInterpolator is used.

_getIndexOfX(x: float, tol: float = 1e-06) int

Get the index of x in the abscissa values.

Parameters:
  • x (float) – value to check for

  • tol (float) – Tolerance, defaults to 1e-6.

Return int:

index of x in abscissa array, or -1 if absent.

_updateBounds() None

Update minimum and maximum abscissa.

addSampledPoint(x: float, y: float, tol: float = 1e-06) None

Add a sampled point to the curve.

Parameters:
  • x (float) – abscissa value

  • y (float) – ordinate value

  • tol (float) – tolerance value to determine if x is already in the array of abscissa. Defaults to 1e-6.

copy() Self

Create a copy of self.

Return Curve: a copy of the current Curve object.

getValueAt(at: float) float

Get the value at the given coordinate.

Returns the first/last value if input coordinate is outside of the domain the curve is defined.

Parameters:

at (float) – input coordinate

Return float:

output value

setSampledPoints(abscissa: ndarray[tuple[Any, ...], dtype[float64]], ordinate: ndarray[tuple[Any, ...], dtype[float64]]) None

Set abscissa and ordinate values of sampled points.

Parameters:
  • abscissa (npt.NDArray[np.float64]) – abscissa values

  • ordinate (npt.NDArray[np.float64]) – ordinate values

setValueAt(x: float, y: float, tol: float = 1e-06) None

Set the value at the given abscissa.

Parameters:
  • x (float) – abscissa value

  • y (float) – ordinate value

  • tol (float) – tolerance value to determine if x is already in the array of abscissa. Defaults to 1e-6.

setValueBetween(xmin: float, xmax: float, y: float, tol: float = 1e-06) None

Set a constant value between xmin and xmax abscissa.

Parameters:
  • xmin (float) – minimum abscissa value

  • xmax (float) – maximum abscissa value

  • y (float) – ordinate value

  • tol (float) – tolerance value to determine if x is already in the array of abscissa. Defaults to 1e-6.

toDataFrame(fromX: float = -inf, toX: float = inf, dx: float = inf, columnNames: tuple[str, str] = ('', '')) DataFrame

Create a DataFrame from the curve.

By default the dataframe contains the curve over the whole definition domain sampled by the same number of points as the curve.

Parameters:
  • fromX (float) – starting abscissa, defaults to -inf

  • toX (float) – end abscissa, defaults to +inf

  • dx (float) – sampling step, defaults to +inf

  • columnNames (tuple[str, str]) – names of dataframe columns, defaults to (“x”, “y”)

Return pd.DataFrame:

2 column dataframe

class pywellsfm.model.Curve.UncertaintyCurve(curveName: str, curve: Curve)

Bases: object

Defines a curve associated to an uncertainty range.

Parameters:
  • curveName (str) – curve name

  • curve (Curve) – median curve.

addSampledPoint(x: float, y: float, ymin: float = nan, ymax: float = nan) None

Add a sampled point to the curves.

If no values are given for ymin and/or ymax, y value is set to minimum and maximum curves.

Parameters:
  • x (float) – abscissa value

  • y (float) – median value

  • ymin (float) – minimum value. Defaults to np.nan.

  • ymax (float) – maximum value. Defaults to np.nan.

getAbscissa() ndarray[tuple[Any, ...], dtype[float64]]

Get abscissa values of the curves.

Return npt.NDArray[np.float64]:

abscissa array

getMaxValues() ndarray[tuple[Any, ...], dtype[float64]]

Get maximum ordinate values of the curves.

Return npt.NDArray[np.float64]:

maximum ordinate array

getMedianValues() ndarray[tuple[Any, ...], dtype[float64]]

Get median ordinate values of the curves.

Return npt.NDArray[np.float64]:

median ordinate array

getMinValues() ndarray[tuple[Any, ...], dtype[float64]]

Get minimum ordinate values of the curves.

Return npt.NDArray[np.float64]:

minimum ordinate array

getRangeAt(abscissa: float) tuple[float, float, float]

Get the range of values for a given abscissa.

Parameters:

abscissa (float) – input abscissa

Return tuple[float, float, float]:

tuple containing the minimum, median and maximum values

setCurve(curve: Curve) None

Set the median curve.

: param Curve (optional) curve: median curve. : raises TypeError: if input object is not of type Curve.

setMaxCurveValues(values: ndarray[tuple[Any, ...], dtype[float64]]) None

Set the maximum curve values.

Parameters:

values (npt.NDArray[np.float64]) – maximum values

setMinCurveValues(values: ndarray[tuple[Any, ...], dtype[float64]]) None

Set the minimum curve values.

Parameters:

values (npt.NDArray[np.float64]) – minimum values

setSampledPoints(abscissa: ndarray[tuple[Any, ...], dtype[float64]], ordinate: ndarray[tuple[Any, ...], dtype[float64]], setAsMinValues: bool = False, setAsMaxValues: bool = False) None

Set abscissa and ordinate values of sampled points.

The ordinate is set to the median curve, but it can also be set to minimum and maximum curves by setting setAsMinValues and setAsMaxValues to True respectively.

Parameters:
  • abscissa (npt.NDArray[np.float64]) – abscissa values

  • ordinate (npt.NDArray[np.float64]) – ordinate values

  • setAsMinValues (bool) – if True, set ordinate array to minimum curve. Defaults to False.

  • setAsMaxValues (bool) – if True, set ordinate array to maximum curve. Defaults to False.

class pywellsfm.model.DepositionalEnvironment.CarbonateOpenRampDepositionalEnvironmentModel(tidal_range: float = 2.0, fairweather_wave_breaking_waterDepth: float = 5.0, fairweather_wave_base_waterDepth: float = 20.0, storm_wave_base_waterDepth: float = 50.0, shelf_break_waterDepth: float = 200.0, slope_toe_max_waterDepth: float = 1000.0)

Bases: DepositionalEnvironmentModel

Defines an open carbonate ramp depositional environment model.

The open carbonate ramp depositional environment is characterized by a gently sloping ramp with no significant break in slope. The inner plateform zone is typically dominated by patch reefs and other buildups, but is not protected from wave energy by a barrier. The outer ramp is characterized by a lower energy. The model has a pre-defined list of environmnents, but waterDepth ranges are parameterized based on input parameters. The list of pre-defined environmnets includes:

  • Continent: terrestrial environment, above tidal limit.

  • SupraTidal: supratidal zone where carbonate/salt precipitation may occur.

  • Inner Ramp Upper Shoreface: 0 to fairweather wave-breaking depth, where energy is high

  • Inner Ramp Lower Shoreface: fairweather wave-breaking depth to fairweather wave-base where energy is lower than the shoreface zone

  • Buildup: patch reefs and other buildups creating locally low waterDepth () and high energy () environment.

  • Outer Ramp: fairweather wave-base to storm wave-base (offshore zone), where energy is low

  • Shelf Slope: Continental slope

  • Basin: Deep basin (intra-shelf or open ocean)

Energy is given between 0.0 (no energy) and 1.0 (high energy). Distality is here given as the distance from the shoreline in km. The most significant is the relative distality between environments.

Parameters:
  • tidal_range (float) – tidal range in meters (default 2 m).

  • fairweather_wave_breaking_waterDepth (float) – fairweather wave-breaking depth (default 5 m).

  • fairweather_wave_base_waterDepth (float) – fairweather wave-base depth (default 20 m).

  • storm_wave_base_waterDepth (float) – storm wave-base depth (default 50 m).

  • shelf_break_waterDepth (float) – shelf-break depth (default 200 m).

  • slope_toe_max_waterDepth (float) – base of the slope maximum waterDepth (default 1000 m).

class pywellsfm.model.DepositionalEnvironment.CarbonateProtectedRampDepositionalEnvironmentModel(tidal_range: float = 2.0, lagoon_max_waterDepth: float = 10.0, fairweather_wave_base_waterDepth: float = 20.0, storm_wave_base_waterDepth: float = 50.0, shelf_break_waterDepth: float = 200.0, slope_toe_max_waterDepth: float = 1000.0)

Bases: DepositionalEnvironmentModel

Defines a carbonate ramp depositional environment model.

The model is defined as a list of depositional environments. The model has a pre-defined list of environmnents, but waterDepth ranges are parameterized based on input parameters. The list of pre-defined environmnets includes:

  • Continent: terrestrial environment, above tidal limit.

  • SupraTidal: supratidal zone where carbonate/salt precipitation may occur.

  • Inner Ramp Upper Shoreface: 0 to fairweather wave-breaking depth, where energy is high

  • Inner Ramp Lower Shoreface: fairweather wave-breaking depth to fairweather wave-base where energy is lower than the shoreface zone

  • Buildup: patch reefs and other buildups creating locally low waterDepth () and high energy () environment.

  • Outer Ramp: fairweather wave-base to storm wave-base (offshore zone), where energy is low

  • Shelf Slope: Continental slope

  • Basin: Deep basin (intra-shelf or open ocean)

Parameters:
  • tidal_range (float) – tidal range in meters (default 2 m).

  • lagoon_max_waterDepth (float) – maximum depth of the lagoon (default 10 m).

  • fairweather_wave_base_waterDepth (float) – fairweather wave-base depth (default 20 m).

  • storm_wave_base_waterDepth (float) – storm wave-base depth (default 50 m).

  • shelf_break_waterDepth (float) – shelf-break depth (default 200 m).

  • slope_toe_max_waterDepth (float) – base of the slope maximum waterDepth (default 1000 m).

class pywellsfm.model.DepositionalEnvironment.DepositionalEnvironment(name: str, waterDepthModel: EnvironmentConditionModelStats, envConditionsModel: EnvironmentConditionsModel | None = None, distality: float | None = None)

Bases: object

Defines a depositional environment.

The environment is defined from a waterDepth range and optionaly other property ranges including energy, temperature, salinity, etc.

Curves can be set to define relationships between properties, e.g. energy vs waterDepth, temperature vs age.

Note

Properties can be related to a single other property, e.g. temperature can be defined as a function of waterDepth, but not as a function of both waterDepth and age.

Parameters:
  • name (str) – name of the environment

  • waterDepthModel (EnvironmentConditionModelStats) – model for the water depth of the environment. It must be based on a statistical distribution, either constant, uniform, triangular or Gaussian.

  • environmentConditionsModel (EnvironmentConditionsModel | None) – model for the evolution of environment conditions, including energy, temperature, salinity, etc. If None, a default model with no conditions is used.

  • distality (float) – distality of the environment, defined as the distance from the shoreline, in km.

getEnvironmentConditions(waterDepth: float, age: float) dict[str, float]

Get environment conditions corresponding to this environment.

Parameters:
  • waterDepth (float) – water depth value.

  • age (float) – age at the location (only needed if some conditions depend on age).

Return dict[str, float]:

dictionary containing environment conditions for the given water depth and age.

property waterDepth_max: float

Maximum waterDepth of the environment.

property waterDepth_min: float

Minimum waterDepth of the environment.

property waterDepth_range: tuple[float, float]

WaterDepth range of the environment.

property waterDepth_rangeRef: float

Reference value of the waterDepth range.

property waterDepth_rangeWidth: float

Width of the waterDepth range.

class pywellsfm.model.DepositionalEnvironment.DepositionalEnvironmentModel(name: str, environments: list[DepositionalEnvironment])

Bases: object

Defines a depositional environment model.

The model is defined as a list of depositional environments. These environments defined the spatial organization of the depositional system.

Parameters:
  • name (str) – name of the depositional system

  • environments (list[DepositionalEnvironment]) – list of depositional environments defining the model.

addEnvironment(environment: DepositionalEnvironment | set[DepositionalEnvironment]) None

Add an environment or set of environments to the model.

If an environment with the same name already exists in the model, it is not added.

Parameters:

environment (DepositionalEnvironment|set[]) – environment or set of environments to add

clearAllEnvironments() None

Remove all environments from the collection.

environmentExists(environmentName: str) bool

Check if an environment exists in the collection by name.

Parameters:

environmentName (str) – name of the environment to check

Return bool:

True if the environment exists in the collection

getEnvironmentByName(environmentName: str) DepositionalEnvironment | None

Get environment from the collection by name.

Parameters:

environmentName (str) – name of the environment to get

Return DepositionalEnvironment | None:

environment with the given name, or None if not found

getEnvironmentCount() int

Get the number of environments in the collection.

Return int:

number of environments

isEmpty() bool

Check if the collection is empty.

Return bool:

True if the collection is empty

removeEnvironment(environmentNames: str | set[str]) None

Remove an environment or set of environments from the list by name.

Parameters:

environmentNames (str | set[str]) – name or set of names of environments to remove

Defines a depth-age model and conversion methods.

Warning

consider only 1 depth per age (no stratigraphic layer duplication)

class pywellsfm.model.DepthAgeModel.DepthAgeModel(interpolationMethod: str | Any = 'linear', **args: Any)

Bases: object

Defines depth-age model and conversion methods.

Parameters:
  • interpolationMethod (str | Any, optional) – Interpolation methods between time markers. Defaults to “linear”.

  • args (dict[Any, Any]) – any other arguments.

addMarker(marker: Marker) None

Add a single time marker.

Parameters:

marker (Marker) – marker

convertContinuousLogToAge(inputLog: Curve) Curve

Convert a continuous log from depth to age domain.

Parameters:

inputLog (Curve) – input log in depth domain

Return Curve:

output log in age domain

convertContinuousLogToDepth(inputLog: Curve) Curve

Convert a continuous log from age to depth domain.

Parameters:

inputLog (Curve) – input log in age domain

Return Curve:

output log in depth domain

convertDiscreteLogToAge(inputLog: Curve) Curve

Convert a discrete log from depth to age domain.

Parameters:

inputLog (Curve) – input log in depth domain

Return Curve:

output log in age domain

convertDiscreteLogToDepth(inputLog: Curve) Curve

Convert a discrete log from age to depth domain.

Parameters:

inputLog (Curve) – input log in age domain

Return Curve:

output log in depth domain

getAge(depth: float) tuple[float] | None

Get the age(s) from a given depth.

A given depth may correspond to multiple ages.

Parameters:

depth (float) – input depth

Return tuple[float]:

output ages.

getDepth(age: float) float

Get the depth from a given age.

Parameters:

age (float) – input age

Return float:

output depth

setMarkers(markers: set[Marker]) None

Set time markers.

Parameters:

markers (set[Marker]) – list of markers

updateCurve(ageDepths: ndarray[tuple[Any, ...], dtype[float64]]) None

Update depth-age curve.

Parameters:

ageDepths (npt.NDArray[np.float64]) – array of shape (n,2) with age in first column and depth in second column.

class pywellsfm.model.Element.Element(name: str)

Bases: object

Defines an Element which is a sediment that is accumulated.

The element is accumulated (produced/deposited) at a rate that may be modulated by external conditions depending on the accumulation model used.

Parameters:

name (str) – name of the element

class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionModelBase(environmentConditionName: str)

Bases: ABC

Defines the base class for environment condition models.

An environment condition model defines the laws that govern the evolution of a given environmental condition (e.g., temperature, energy, salinity, etc.) in a given depositional environment.

Parameters:

environmentConditionName (str) – name of the environmental condition the model applies to

abstractmethod getEnvironmentConditionAt(relatedCondition: float | None = None) float

Compute the environmental condition of the environment.

This method should be implemented in derived classes.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location.

Return float:

environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionModelCombination(models: list[EnvironmentConditionModelBase])

Bases: EnvironmentConditionModelBase

Defines a model that combines multiple env condition models.

The environment condition is the combination of the values from the individual models. Basic usage include the use of a curve model combined with a statistical model to add variability to the curve. In this case the statistical model can be defined around 1.0 to represent a coefficient that modifies the curve value.

The combination is performed by:

  • computing the env condition of each model

  • compute the ratios of the given value to the reference env condition for each model

  • multiply these ratios by the reference env condition

Ideally, the reference env condition should be equal over all models (e.g., same average if multiple statistical models). If not, the reference env condition of the combination is the average of the reference env conditions of the models.

Parameters:

models (list[EnvironmentConditionModelBase]) – list of environment condition models to combine

checkModelsConsistency() bool

Check if env conditions models are consistent.

The reference environment conditions of the models should be similar to ensure a meaningful combination. If the reference environment conditions are very different, the combination may not be meaningful.

Return bool:

True if the environment condition models are consistent (name and reference environment condition), False otherwise.

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the value of the environmental condition from the curve.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location.

Return float:

environmental condition

_abc_impl = <_abc._abc_data object>
models: list[EnvironmentConditionModelBase]
class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionModelConstant(environmentConditionName: str, value: float)

Bases: EnvironmentConditionModelStats

Defines an env condition model based on a constant value.

In this model, the environmental condition is constant and equal to the provided value.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • value (float) – value of the environmental condition

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the constant value of the environmental condition.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

environmental condition

getReferenceValue() float

Reference value for the environmental condition.

For a constant value, the reference value is the constant value itself.

Return float:

reference value for the environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionModelCurve(environmentConditionName: str, curve: Curve)

Bases: EnvironmentConditionModelBase

Defines an env condition model based on a curve.

In this model, the environmental condition is defined by a curve that relates the condition to another condition like water depth or age.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • curve (Curve) – curve defining the relationship between the environmental condition and another condition like water depth or age.

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the value of the environmental condition from the curve.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location.

Return float:

environmental condition

_abc_impl = <_abc._abc_data object>
property relatedConditionName: str

Get the name of the related condition (x-axis) from the curve.

Return str:

name of the related condition (x-axis)

class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionModelGaussian(environmentConditionName: str, meanValue: float, stdDev: float | None = None, minValue: float = -inf, maxValue: float = inf)

Bases: EnvironmentConditionModelStats

Defines an env condition model based on a Gaussian distribution.

In this model, the environmental condition follows a Gaussian distribution centered around the mean value, with a standard deviation defined as a fraction of the mean value.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • meanValue (float) – mean value of the environmental condition

  • stdDev (float | None) – standard deviation of the environmental condition. If None, the default value is 0.2.

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the env condition coefficient from the Gaussian distribution.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

environmental condition

getReferenceValue() float

Reference value for the environmental condition.

For a Gaussian distribution, the reference value is the mean value.

Return float:

reference value for the environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionModelStats(environmentConditionName: str, minValue: float, maxValue: float)

Bases: EnvironmentConditionModelBase

Base class for environment condition models based on statistics.

In these models, the environmental condition follows a statistical distribution (e.g., uniform, Gaussian) defined by the provided parameters.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • minValue (float) – minimum value of the environmental condition

  • maxValue (float) – maximum value of the environmental condition

abstractmethod getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the env condition coefficient from the uniform distribution.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

environmental condition

getEnvironmentConditionCoefficientAt(relatedCondition: float | None = None) float

Get the env condition coefficient from the Gaussian distribution.

Valid only if the mean value is not zero.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

env condition coefficient (mean value)

abstractmethod getReferenceValue() float

Reference value for the environmental condition.

This is the value used to normalize the distribution. It may be the mean value for a Gaussian distribution, or the mid-point for a uniform distribution.

Return float:

reference value for the environmental condition

_abc_impl = <_abc._abc_data object>
property range: tuple[float, float]

Range of the environmental condition.

property rangeMid: float

Mid-point of the range.

property rangeWidth: float

Width of the range.

class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionModelTriangular(environmentConditionName: str, modeValue: float, minValue: float, maxValue: float)

Bases: EnvironmentConditionModelStats

Defines an env condition model based on a triangular distribution.

In this model, the environmental condition follows a triangular distribution centered around the mode.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • minValue (float) – minimum value of the environmental condition

  • maxValue (float) – maximum value of the environmental condition

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the env condition coefficient from the triangular distribution.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

environmental condition

getReferenceValue() float

Reference value for the environmental condition.

For a triangular distribution, the reference value is the mode.

Return float:

reference value for the environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionModelUniform(environmentConditionName: str, minValue: float, maxValue: float)

Bases: EnvironmentConditionModelStats

Defines an env condition model based on a uniform distribution.

In this model, the environmental condition follows a uniform distribution centered around the mean value, with a standard deviation defined as a fraction of the mean value.

Parameters:
  • environmentConditionName (str) – name of the environmental condition the model applies to

  • minValue (float) – minimum value of the environmental condition

  • maxValue (float) – maximum value of the environmental condition

getEnvironmentConditionAt(relatedCondition: float | None = None) float

Get the env condition coefficient from the uniform distribution.

Parameters:

relatedCondition (float | None) – value of the related condition (e.g., water depth or age) at the location (ignored by this model, accepted for API consistency).

Return float:

environmental condition

getReferenceValue() float

Reference value for the environmental condition.

For a uniform distribution, the reference value is the mid-point of the range.

Return float:

reference value for the environmental condition

_abc_impl = <_abc._abc_data object>
class pywellsfm.model.EnvironmentConditionModel.EnvironmentConditionsModel(envConditionModels: list[EnvironmentConditionModelBase] | None = None)

Bases: object

Defines the model for environment conditions.

This model contains a set of environment condition models. The model can be used to compute the environmental conditions at a water depth and age.

addEnvironmentConditionModel(name: str, model: EnvironmentConditionModelBase) None

Add an environment condition model to the model.

Parameters:
  • name (str) – name of the environment condition.

  • model (EnvironmentConditionModelBase) – environment condition model to add.

getCurveModelDependencies() dict[str, str]

Get the condition dependencies from models based on a curve.

Return dict[str, str]:

dict mapping target condition (y-axis) to source condition (x-axis).

getEnvironmentConditionsAt(waterDepth: float, age: float | None = None) dict[str, float]

Get all environment condition values from known waterDepth and age.

Resolution strategy:

  • Build the condition universe from envConditionModels.

  • Infer dependency edges from curve-based models (target condition depends on source condition).

  • Resolve independent conditions first via model.getEnvironmentConditionAt().

  • Resolve conditions that depend directly on waterDepth and, when available, on age.

  • Iteratively resolve remaining conditions once their source value is available.

  • Raise ValueError if unresolved conditions remain (missing or cyclic dependencies).

This is effectively a dependency-ordered (topological) resolution, supporting both independent models and condition-to-condition models.

Parameters:
  • waterDepth (float) – water depth at the location.

  • age (float | None) – age at the location (optional, only needed if some conditions depend on age).

Return dict[str, float]:

environment condition dict.

isEnvironmentConditionModelPresent(name: str) bool

Check if an environment condition model is present in the model.

Parameters:

name (str) – name of the environment condition to check.

Return bool:

True if the environment condition model is present, False otherwise.

removeEnvironmentConditionModel(name: str) None

Remove an environment condition model from the model.

Parameters:

name (str) – name of the environment condition to remove.

envConditionModels: dict[str, EnvironmentConditionModelBase]
property environmentConditionNames: list[str]

Get the list of environment condition names defined in the model.

Return list[str]:

list of environment condition names.

class pywellsfm.model.Facies.EnvironmentalFacies(name: str, criteria: set[FaciesCriteria])

Bases: Facies

A facies defined from environmental criteria.

An environmental facies contains the criteria from which it is defined.

Parameters:
  • name (str) – name of the facies

  • criteria (set[FaciesCriteria]) – set of criteria used to define the facies

class pywellsfm.model.Facies.Facies(name: str, criteria: FaciesCriteria | set[FaciesCriteria], criteriaType: FaciesCriteriaType = FaciesCriteriaType.UNCATEGORIZED)

Bases: object

A facies is a category of rock defined from some criteria.

Parameters:
  • name (str) – name of the facies

  • criteria (FaciesCriteria | set[FaciesCriteria]) – criteria or set of criteria used to define the facies

  • criteriaType (FaciesCriteriaType) – type of criteria used to define the facies. Default is UNCATEGORIZED that means that any criteria type can be used.

addCriteria(criteria: FaciesCriteria | set[FaciesCriteria]) None

Add a criteria to the facies.

Parameters:

criteria (FaciesCriteria) – criteria to add

getCriteria(criteriaName: str) FaciesCriteria | None

Get a criteria defining the facies by name.

Parameters:

criteriaName (str) – name of the criteria to get

Return FaciesCriteria | None:

criteria with the given name, or None if not found

getCriteriaCount() int

Get the number of criteria defining the facies.

Return int:

number of criteria

criteriaCollection: FaciesCriteriaCollection
name: str
class pywellsfm.model.Facies.FaciesCriteria(name: str, minRange: float = -inf, maxRange: float = inf, type: FaciesCriteriaType = FaciesCriteriaType.UNCATEGORIZED)

Bases: object

Defines a criteria to classify rocks based on a range of a property.

Parameters:
  • name (str) – property name

  • minRange (float) – minimum value of the property. Default is -infinity.

  • maxRange (float) – maximum value of the property. Default is infinity.

  • type (FaciesCriteriaType) – type of the criteria. Default is UNCATEGORIZED.

hasType(type: FaciesCriteriaType) bool

Check if criteria is of given type.

Parameters:

type (FaciesCriteriaType) – criteria type

Return bool:

True if criteria is of given type

isNamed(name: str) bool

Compare criteria name against input name.

Name comparison is case insensitive.

Parameters:

name (str) – input name

Return bool:

True if the criteria name equals input name

maxRange: float
minRange: float
name: str
type: FaciesCriteriaType
class pywellsfm.model.Facies.FaciesCriteriaCollection(criteriaType: FaciesCriteriaType = FaciesCriteriaType.UNCATEGORIZED)

Bases: object

Collection of facies criteria.

Criteria types include:

  • sedimentatological criteria (e.g., grain size, element composition, classifications)

  • petrophysical criteria (e.g., porosity, permeability, density)

  • environmental conditions (e.g., water depth, energy level, temperature)

  • uncategorized criteria (e.g., any other property used to define facies)

All criteria of the collection must be unique by name.

Parameters:

criteriaType (FaciesCriteriaType) – type of criteria allowed in the collection. Default is UNCATEGORIZED that means that any criteria type can be added.

addCriteria(criteria: FaciesCriteria | set[FaciesCriteria]) None

Add a criteria or set of criteria to the collection.

If a criteria with the same name already exists in the collection, it is not added.

Parameters:

criteria (FaciesCriteria | set[FaciesCriteria]) – criteria or set of criteria to add

clearAllCriteria() None

Remove all criteria from the collection.

clearCriteriaByType(criteriaType: FaciesCriteriaType) int

Remove all criteria of a given type from the collection.

Parameters:

criteriaType (FaciesCriteriaType) – type of criteria to remove

Return int:

number of criteria removed

criteriaExists(criteriaName: str) bool

Check if a criteria exists in the collection by name.

Parameters:

criteriaName (str) – name of the criteria to check

Return bool:

True if the criteria exists in the collection

criteriaIsAllowed(criteria: FaciesCriteria) bool

Check if a criteria can be added to the collection.

A criteria can be added if its type matches the collection type, or if the collection type is UNCATEGORIZED.

Parameters:

criteria (FaciesCriteria) – criteria to check

Return bool:

True if the criteria can be added to the collection

getAllCriteria() set[FaciesCriteria]

Get all criteria in the collection.

Return set[FaciesCriteria]:

set of all criteria

getCriteriaByName(criteriaName: str) FaciesCriteria | None

Get criteria from the collection by name.

Parameters:

criteriaName (str) – name of the criteria to get

Return FaciesCriteria | None:

criteria with the given name, or None if not found

getCriteriaCount() int

Get the number of criteria in the collection.

Return int:

number of criteria

getCriteriaSetByType(criteriaType: FaciesCriteriaType) set[FaciesCriteria]

Get a subset of criteria from the collection by type.

Parameters:

criteriaType (FaciesCriteriaType) – type of criteria to get

Return set[FaciesCriteria]:

set of criteria of the given type

isEmpty() bool

Check if the collection is empty.

Return bool:

True if the collection is empty

removeCriteria(criteriaNames: str | set[str]) None

Remove a criteria or set of criteria from the collection by name.

Parameters:

criteriaNames (str | set[str]) – name or set of names of criteria to remove

criteria: set[FaciesCriteria]
type: FaciesCriteriaType
class pywellsfm.model.Facies.FaciesCriteriaType(*values)

Bases: StrEnum

Criteria types.

Criteria types include:
  • sedimentatological criteria (e.g., grain size, element composition, classifications)

  • petrophysical criteria (e.g., porosity, permeability, density)

  • environmental conditions (e.g., water depth, energy level, temperature)

  • uncategorized criteria (e.g., any other property used to define facies)

static _generate_next_value_(name, start, count, last_values)

Return the lower-cased version of the member name.

ENVIRONMENTAL = 'environmental'
PETROPHYSICAL = 'petrophysical'
SEDIMENTOLOGICAL = 'sedimentological'
UNCATEGORIZED = 'uncategorized'
class pywellsfm.model.Facies.FaciesModel(faciesSet: set[Facies])

Bases: object

Defines a facies model containing a set of facies.

Parameters:

faciesSet (set[Facies]) – set of facies in the model

getCriteriaRangeForFacies(faciesName: str, criteriaName: str) tuple[float, float] | None

Get the range of a criteria for a given facies.

Parameters:
  • faciesName (str) – name of the facies

  • criteriaName (str) – name of the criteria

Return tuple[float, float] | None:

(min, max) range of the criteria for the facies, or None if not found

getFaciesByName(faciesName: str) Facies | None

Get a facies from the model by name.

Parameters:

faciesName (str) – name of the facies to get

Return Facies | None:

facies with the given name, or None if not found

faciesSet: set[Facies]
class pywellsfm.model.Facies.PetrophysicalFacies(name: str, criteria: set[FaciesCriteria])

Bases: Facies

A facies defined from petrophysical criteria only.

A petrophysical facies contains the criteria from which it is defined.

Parameters:
  • name (str) – name of the facies

  • criteria (set[FaciesCriteria]) – set of criteria used to define the facies

class pywellsfm.model.Facies.SedimentaryFacies(name: str, criteria: set[FaciesCriteria])

Bases: Facies

A facies defined from sedimentological criteria.

A sedimentary facies contains the criteria and optionnaly the environmental conditions from which it is deposited.

Parameters:
  • name (str) – name of the facies

  • criteria (set[FaciesCriteria]) – set of criteria used to define the facies

class pywellsfm.model.Marker.Marker(name: str, depth: float, age: float = nan, stratigraphicType: StratigraphicSurfaceType = StratigraphicSurfaceType.UNKNOWN)

Bases: object

Defines stratigraphic markers and associated properties.

Parameters:
  • name (str) – name of the marker

  • depth (float) – marker depth

  • age (float) – marker age, defaults to np.nan

  • stratigraphicType (StratigraphicSurfaceType) – stratigraphic type of the marker, defaults to StratigraphicSurfaceType.UNKNOWN.

areCollocated(other: Any) bool

Two markers are collocated if they are at the same depth.

Parameters:

other (Any) – other object

Return bool:

True if at the same depth

areFromSameHorizon(other: Any) bool

Check that two markers are from the same horizon.

Two markers belong to a same horizon if they have the same name and age.

Parameters:

other (Any) – other object

Return bool:

True if same name and synchrone

areSynchrone(other: Any) bool

Two markers are synchrone if they are at the same age.

Parameters:

other (Any) – other object

Return bool:

True if at the same age

age: float
depth: float

depth of the marker

name: str

name of the marker

stratigraphicType: StratigraphicSurfaceType

stratigraphic relationship between above and bottom units

class pywellsfm.model.Marker.StratigraphicSurfaceType(*values)

Bases: StrEnum

Define surface stratigraphic type.

static _generate_next_value_(name, start, count, last_values)

Return the lower-cased version of the member name.

BASELAP = 'Baselap'
CONFORM = 'Conform'
EROSIVE = 'Erosive'
TOPLAP = 'Toplap'
UNKNOWN = 'Unknown'
class pywellsfm.model.FSSimulationParameters.FSSimulatorParameters(max_waterDepth_change_per_step: float = 0.5, dt_min: float = 0.001, dt_max: float = 0.1, safety: float = 0.9, max_steps: int = 1000000000)

Bases: object

Parameters for the Forward Stratigraphic Simulator (FSSimulator).

dt_max: float = 0.1

maximum time step (in Myr). Default is 0.1 Myr.

dt_min: float = 0.001

minimum time step (in Myr). Default is 1e-3 Myr.

max_steps: int = 1000000000

maximum number of steps. Default is 1e9.

max_waterDepth_change_per_step: float = 0.5

maximum waterDepth change and accumulated thickness per step (in meters). Default is 0.5 m.

safety: float = 0.9

safety factor for time step adjustment. Must be in (0, 1]. Default is 0.9.

class pywellsfm.model.FSSimulationParameters.RealizationData(well: Well, initialBathymetry: float, initialEnvironmentName: str | None, subsidenceCurve: Curve | None, subsidenceType: SubsidenceType)

Bases: object

Data class for to define realization-specific parameters.

Parameters:
  • well (Well) – well object

  • initialBathymetry (float) – initial bathymetry for the realization.

  • subsidenceCurve (Curve | None) – subsidence curve for the realization.

  • subsidenceType (SubsidenceType) – subsidence type for the realization.

  • initialEnvironment (DepositionalEnvironment | None) – initial depositional environment for the realization.

initialBathymetry: float
initialEnvironmentName: str | None
subsidenceCurve: Curve | None
subsidenceType: SubsidenceType
well: Well
class pywellsfm.model.FSSimulationParameters.Scenario(name: str, accumulationModel: AccumulationModel, eustaticCurve: Curve | None, depositionalEnvironmentModel: DepositionalEnvironmentModel | None = None, faciesModel: FaciesModel | None = None)

Bases: object

Defines a simulation scenario.

A scenario defines all the parameters that are supposed to be uniform over a given area. It includes the accumulation model and the eustatic curve.

Parameters:
  • name (str) – name of the scenario

  • accumulationModel (AccumulationModel) – accumulation model used in the scenario. It defines the list of elements and their default accumulation rates.

  • eustaticCurve (Curve | None) – Eustatic curve, defaults to None

  • depositionalEnvironmentModel (DepositionalEnvironmentModel) – depositional environment model used in the scenario. It defines the list of depositional environments and their corresponding environmental conditions.

  • faciesModel (FaciesModel | None) – facies model used in the scenario. It defines the list of facies and their default proportions.

accumulationModel: AccumulationModel

accumulation model used in the scenario

depositionalEnvironmentModel: DepositionalEnvironmentModel | None = None

depositional environment model used in the scenario

eustaticCurve: Curve | None

eustatic curve used in the scenario

faciesModel: FaciesModel | None = None

facies model used in the scenario

name: str

name of the scenario

class pywellsfm.model.enums.SubsidenceType(*values)

Bases: StrEnum

Subsidence curve type.

static _generate_next_value_(name, start, count, last_values)

Return the lower-cased version of the member name.

CUMULATIVE = 'cumulative'

cumulative subsidence curve, where values are cumulative subsidence at a given age

RATE = 'rate'

subsidence rate curve, where values are subsidence rate at a given age. Subsidence at a given age is then computed by multiplying the rate by the time interval

class pywellsfm.model.Well.Well(name: str, wellHeadCoords: ndarray[tuple[Any, ...], dtype[float64]], depth: float)

Bases: object

Defines a well.

Parameters:
  • name (str) – name of the well.

  • wellHeadCoords (npt.NDArray[np.float64]) – x,y,z coordinates of the well head.

  • depth (float) – depth of the well

_addContinuousLog(logName: str, log: Curve) None
_addDiscreteLog(logName: str, log: Striplog) None
addAgeLog(logName: str, log: Curve | Striplog) None

Add a well log in age domain.

Well log can be continuous or discrete. If a log with the name exists, it is erased.

Parameters:
  • logName (str) – well log name

  • log (Curve | Striplog) – input log

addLog(logName: str, log: Curve | Striplog) None

Add a well log.

Well log can be continuous or discrete. If a log with the name exists, it is erased.

Parameters:
  • logName (str) – well log name

  • log (Curve | Striplog) – input log

addMarkers(markers: Marker | list[Marker]) None

Add well markers.

Parameters:

markers (Marker | list[Marker]) – a marker or a list of markers

getAgeLog(logName: str) Curve | Striplog | None

Get well log in depth domain from its name.

Parameters:

logName (str) – well log name

Return Curve | Striplog:

output log

getContinuousLogNames() set[str]

Get the set of continuous well log names.

Return set[str]:

set of continuous well log names

getDepthLog(logName: str) Curve | Striplog | None

Get well log in depth domain from its name.

Parameters:

logName (str) – well log name

Return Curve | Striplog:

output log

getDiscreteLogNames() set[str]

Get the set of discrete well log names.

Return set[str]:

set of discrete well log names

getMarkers() list[Marker]

Get well markers.

Return list[Marker]:

list of well markers

initDepthAgeModel() None

Initialize depth-age model.

setMarkers(markers: list[Marker]) None

Set well markers.

Existing makers are deleted. Use Well.addMarkers if you want to keep existing markers instead.

Parameters:

markers (list[Marker]) – list of well markers

setWellPath(wellPath: ndarray[tuple[Any, ...], dtype[float64]]) None

Set well path for deviated wells.

Parameters:

wellPath (npt.NDArray[np.float64]) – array containing x,y,z coordinates

shallowCopy(newName: str, copyMarkers: bool, copyLogs: bool) Well

Make a shallow copy of the well.

Useful to create a simulated version of the well.

Parameters:
  • newName (str) – new name of the well.

  • copyMarkers (bool) – if True, copy markers by reference.

  • copyLogs (bool) – if True, copy logs by reference.

Return Well:

a copy of the well

_ageLogs: dict[str, Curve | Striplog]

well logs (discrete or continuous) in age domain

_depthAgeModel: DepthAgeModel | None

depth age model

_logs: dict[str, Curve | Striplog]

well logs (discrete or continuous) in depth domain

_markers: list[Marker]

well markers defining remarkable horizons

_wellPath: ndarray[tuple[Any, ...], dtype[float64]]

well path containing x,y,z coordinates of the path. By default, vertical well from well head

depth: float

well depth

name: str

name of the well

property oldestMarker: Marker

Get the first (oldest) marker age.

Return Marker:

oldest marker

property oldestMarkerAge: float

Get the first (oldest) marker age.

Return float:

oldest marker age

wellHeadCoords: ndarray[tuple[Any, ...], dtype[float64]]

x,y,z coordinates of the well head

property youngestMarker: Marker

Get the last (youngest) marker age.

Return Marker:

youngest marker

property youngestMarkerAge: float

Get the last (youngest) marker age.

Return float:

youngest marker age