Post-processing filters

This module contains GEOS post-processing tools.

Geomechanics post-processing tools

geos.processing.post_processing.GeomechanicsCalculator module

GeomechanicsCalculator module is a vtk filter that allows to compute additional geomechanical properties from existing ones:
  • The Young modulus and the Poisson’s ratio named “youngModulus” and “poissonRatio” or bulk and shear moduli named “bulkModulus” and “shearModulus”

  • The initial Young modulus and Poisson’s ratio named “youngModulusInitial” and “poissonRatioInitial” or the initial bulk modulus named “bulkModulusInitial”

  • The porosity named “porosity”

  • The initial porosity named “porosityInitial”

  • The delta of pressure named “deltaPressure”

  • The density named “density”

  • The effective stress named “stressEffective”

  • The initial effective stress named “stressEffectiveInitial”

  • The pressure named “pressure”

The basic geomechanics outputs are:
  • The elastic moduli not present on the mesh

  • Biot coefficient

  • Compressibility, oedometric compressibility and real compressibility coefficient

  • Specific gravity

  • Real effective stress ratio

  • Total initial stress, total current stress and total stress ratio

  • Lithostatic stress (physic to update)

  • Elastic stain

  • Real reservoir stress path and reservoir stress path in oedometric condition

The advanced geomechanics outputs are:
  • Fracture index and threshold

  • Critical pore pressure and pressure index

GeomechanicsCalculator filter input mesh is either vtkPointSet or vtkUnstructuredGrid and returned mesh is of same type as input.

Important

Please refer to the GeosExtractMergeBlockVolume* filters to provide the correct input.

Note

  • The default physical constants used by the filter are:
    • grainBulkModulus = 38e9 Pa ( quartz value )

    • specificDensity = 1000.0 kg/m³ ( water value )

    • rockCohesion = 0.0 Pa ( fractured case )

    • frictionAngle = 10.0°

To use the filter:

import numpy as np
from geos.mesh.processing.GeomechanicsCalculator import GeomechanicsCalculator

# Define filter inputs
mesh: Union[ vtkPointSet, vtkUnstructuredGrid ]
computeAdvancedOutputs: bool # optional, defaults to False
speHandler: bool # optional, defaults to False

# Instantiate the filter
filter: GeomechanicsCalculator = GeomechanicsCalculator( mesh, computeAdvancedOutputs, speHandler )

# Use your own handler (if speHandler is True)
yourHandler: logging.Handler
filter.setLoggerHandler( yourHandler )

# Change the physical constants if needed
## Basic outputs
grainBulkModulus: float
specificDensity: float
filter.physicalConstants.grainBulkModulus = grainBulkModulus
filter.physicalConstants.specificDensity = specificDensity

## Advanced outputs
rockCohesion: float
frictionAngle: float
filter.physicalConstants.rockCohesion = rockCohesion
filter.physicalConstants.frictionAngle = frictionAngle

# Do calculations
filter.applyFilter()

# Get the mesh with the geomechanical output as attribute
output: Union[vtkPointSet, vtkUnstructuredGrid]
output = filter.getOutput()
class geos.processing.post_processing.GeomechanicsCalculator.GeomechanicsCalculator(mesh, computeAdvancedOutputs=False, speHandler=False)[source]

Bases: object

VTK Filter to perform Geomechanical output computation.

Parameters:
  • mesh (Union[vtkPointsSet, vtkUnstructuredGrid]) – Input mesh.

  • computeAdvancedOutputs (bool, optional) – True to compute advanced geomechanical parameters, False otherwise. Defaults to False.

  • speHandler (bool, optional) – True to use a specific handler, False to use the internal handler. Defaults to False.

class AdvancedOutputValue(_criticalTotalStressRatio=None, _stressRatioThreshold=None, _criticalPorePressure=None, _criticalPorePressureIndex=None)[source]

Bases: object

The dataclass with the value of the advanced geomechanics outputs.

property criticalPorePressure

Get the critical pore pressure value.

property criticalPorePressureIndex

Get the critical pore pressure index value.

property criticalTotalStressRatio

Get the critical total stress ratio value.

getAdvancedOutputValue(name)[source]

Get the value of the advanced output wanted.

Parameters:

name (str) – The name of the advanced output.

Returns:

the value of the advanced output.

Return type:

npt.NDArray[ np.float64 ]

property stressRatioThreshold

Get the stress ratio threshold value.

class BasicOutputValue(_biotCoefficient=None, _compressibility=None, _compressibilityOed=None, _compressibilityReal=None, _specificGravity=None, _effectiveStressRatioReal=None, _totalStress=None, _totalStressT0=None, _totalStressRatioReal=None, _elasticStrain=None, _deltaTotalStress=None, _rspReal=None, _rspOed=None, _effectiveStressRatioOed=None)[source]

Bases: object

The dataclass with the value of the basic geomechanics outputs.

property biotCoefficient

Get the biot coefficient value.

property compressibility

Get the compressibility value.

property compressibilityOed

Get the compressibility in oedometric condition value.

property compressibilityReal

Get the real compressibility value.

property deltaTotalStress

Get the total delta stress value.

property effectiveStressRatioOed

Get the effective stress ratio oedometric value.

property effectiveStressRatioReal

Get the real effective stress ratio value.

property elasticStrain

Get the elastic strain value.

getBasicOutputValue(name)[source]

Get the value of the basic output wanted.

Parameters:

name (str) – The name of the basic output.

Returns:

the value of the basic output.

Return type:

npt.NDArray[ np.float64 ]

property lithostaticStress

Get the lithostatic stress value.

property rspOed

Get the reservoir stress path in oedometric condition value.

property rspReal

Get the real reservoir stress path value.

property specificGravity

Get the specific gravity value.

property totalStress

Get the total stress value.

property totalStressRatioReal

Get the total real stress ratio value.

property totalStressT0

Get the initial total stress value.

class ElasticModuliValue(_bulkModulus=None, _shearModulus=None, _youngModulus=None, _poissonRatio=None, _bulkModulusT0=None, _youngModulusT0=None, _poissonRatioT0=None)[source]

Bases: object

The dataclass with the value of the elastic moduli.

property bulkModulus

Get the bulk modulus value.

property bulkModulusT0

Get the bulk modulus at the initial time value.

getElasticModulusValue(name)[source]

Get the wanted elastic modulus value.

Parameters:

name (str) – The name of the wanted elastic modulus.

Returns:

The value of the elastic modulus.

Return type:

npt.NDArray[np.float64]

property poissonRatio

Get the poisson ratio value.

property poissonRatioT0

Get the poisson ration at the initial time value.

setElasticModulusValue(name, value)[source]

Set the elastic modulus value wanted.

Parameters:
  • name (str) – The name of the elastic modulus.

  • value (npt.NDArray[np.float64]) – The value to set.

property shearModulus

Get the shear modulus value.

property youngModulus

Get the young modulus value.

property youngModulusT0

Get the young modulus at the initial time value.

class MandatoryAttributesValue(_porosity=None, _porosityInitial=None, _pressure=None, _deltaPressure=None, _density=None, _effectiveStress=None, _effectiveStressT0=None)[source]

Bases: object

The dataclass with the value of mandatory properties to have to compute other geomechanics properties.

property deltaPressure

Get the delta pressure value.

property density

Get the density value.

property effectiveStress

Get the effective stress value.

property effectiveStressT0

Get the initial effective stress value.

property porosity

Get the porosity value.

property porosityInitial

Get the initial porosity value.

property pressure

Get the pressure value.

setMandatoryAttributeValue(name, value)[source]

Set the value of a mandatory property.

Parameters:
  • name (str) – The name of the property.

  • value (npt.NDArray[np.float64]) – The value to set.

class PhysicalConstants(_grainBulkModulus=38000000000.0, _specificDensity=1000.0, _rockCohesion=0.0, _frictionAngle=0.17453292519943295)[source]

Bases: object

The dataclass with the value of the physical constant used to compute geomechanics properties.

property frictionAngle

Get the friction angle value.

property grainBulkModulus

Get the grain bulk modulus value.

property rockCohesion

Get the rock cohesion value.

property specificDensity

Get the specific density value.

applyFilter()[source]

Compute the geomechanical outputs of the mesh.

Returns:

True if calculation successfully ended, False otherwise.

Return type:

Boolean (bool)

computeAdvancedOutputs()[source]

Compute advanced geomechanical outputs.

Returns:

return True if calculation successfully ended, False otherwise.

Return type:

bool

computeBasicOutputs()[source]

Compute basic geomechanical outputs.

Returns:

return True if calculation successfully ended, False otherwise.

Return type:

bool

computeLithostaticStress()[source]

Compute lithostatic stress.

Returns:

True if calculation successfully ended, False otherwise.

Return type:

bool

getOutput()[source]

Get the mesh with the geomechanical outputs as attributes.

Returns:

The mesh with the geomechanical outputs as attributes.

Return type:

Union[vtkPointSet, vtkUnstructuredGrid]

getOutputType()[source]

Get output object type.

Returns:

Type of output object.

Return type:

str

physicalConstants
setLoggerHandler(handler)[source]

Set a specific handler for the filter logger.

In this filter 4 log levels are use, .info, .error, .warning and .critical, be sure to have at least the same 4 levels.

Parameters:

handler (logging.Handler) – The handler to add.