Mohr’s Circle Package
This package includes utilities to compute and plot Mohr’s Circles using the Python View from Paraview.
geos_posp.visu.mohrCircles.functionsMohrCircle module
functionsMohrCircle module provides a set of utilities to instanciate Mohr’s circles and Mohr-Coulomb failure envelope.
- geos_posp.visu.mohrCircles.functionsMohrCircle.buildPythonViewScript(dir_path, mohrCircles, rockCohesion, frictionAngle, userChoices)[source]
Builds the Python script used to launch the Python View.
The script is returned as a string to be then injected in the Python View.
- Parameters:
dir_path (str) – directory path
mohrCircles (list[MohrCircle]) – list of MohrCircle objects
rockCohesion (float) – rock cohesion (Pa)
frictionAngle (float) – friction angle (rad)
userChoices (dict[str, Any]) – dictionnary of user plot parameters
- Returns:
Complete Python View script.
- Return type:
str
- geos_posp.visu.mohrCircles.functionsMohrCircle.createMohrCircleAtTimeStep(stressArray, cellIds, timeStep, convention)[source]
Create MohrCircle object(s) at a given time step for all cell ids.
- Parameters:
stressArray (npt.NDArray[np.float64]) – stress numpy array
cellIds (list[str]) – list of cell ids
timeStep (str) – time step
convention (* True is usual) – convention used for compression.
convention
convention – Returns:
list[MohrCircle] – list of MohrCircle objects.
- geos_posp.visu.mohrCircles.functionsMohrCircle.createMohrCirclesFromPrincipalComponents(mohrCircleParams)[source]
Create Mohr’s circle objects from principal components.
- Parameters:
mohrCircleParams (list[tuple[str, float, float, float]]) – list of Mohr’s
parameters (circle)
- Returns:
list of Mohr’s circle objects.
- Return type:
list[MohrCircle]
- geos_posp.visu.mohrCircles.functionsMohrCircle.createMohrCoulombEnvelope(rockCohesion, frictionAngle)[source]
Create MohrCoulomb object from user parameters.
- Parameters:
rockCohesion (float) – rock cohesion (Pa).
frictionAngle (float) – friction angle in radian.
- Returns:
MohrCoulomb object.
- Return type:
- geos_posp.visu.mohrCircles.functionsMohrCircle.findAnnotateTuples(mohrCircle)[source]
Get the values and location of min and max normal stress or Mohr’s circle.
- Parameters:
mohrCircle (MohrCircle) – input Mohr’s circle
maxTau (float) – max shear stress
- Returns:
labels and location of labels.
- Return type:
tuple[str, str, tuple[float, float], tuple[float, float]]
geos_posp.visu.mohrCircles.plotMohrCircles module
plotMohrCircles module provides a set of functions to plot multiple Mohr’s circles and a failure envelope from a list of MohrCircle and MohrCoulomb objects respectively.
- geos_posp.visu.mohrCircles.plotMohrCircles.createMohrCirclesFigure(mohrCircles, mohrCoulomb, userChoices)[source]
Create Mohr’s circle figure.
- Parameters:
mohrCircles (list[MohrCircle]) – list of MohrCircle objects.
mohrCoulomb (MohrCoulomb) – MohrCoulomb object defining the failure
envelope.
userChoices (dict[str, Any]) – dictionnary to define figure properties.
- Returns:
Figure object
- Return type:
Figure