Stress analysis#

Section author: Florian Zill (Helmholtz Centre for Environmental Research GmbH - UFZ)

The following example from the ogs benchmark collection is used for the stress analysis:

<https://www.opengeosys.org/docs/benchmarks/thermo-mechanics/creepafterexcavation/>

from ogstools.meshplotlib import examples, plot, setup
from ogstools.meshplotlib.plot_features import plot_streamlines
from ogstools.propertylib import mesh_dependent, presets

setup.reset()
setup.length.output_unit = "km"
mesh = examples.mesh_mechanics
fig = plot(mesh, presets.displacement)
plot solid mechanics

Tensor components#

We can inspect the stress (or strain) tensor components by indexing.

fig = plot(mesh, presets.stress["xx"])
fig = plot(mesh, presets.stress["xy"])
  • plot solid mechanics
  • plot solid mechanics

Principal stresses#

Let’s plot the the principal stress components and also overlay the direction of the corresponding eigenvector in the plot. Note: the eigenvalues are sorted by increasing order, i.e. eigenvalue[0] is the most negative / largest compressive principal stress.

eigvecs = presets.stress.eigenvectors
fig = plot(mesh, mesh_property=presets.stress.eigenvalues[0])
plot_streamlines(
    ax=fig.axes[0], mesh=mesh, mesh_property=eigvecs[0], plot_type="lines"
)
plot solid mechanics
fig = plot(mesh, mesh_property=presets.stress.eigenvalues[1])
plot_streamlines(
    ax=fig.axes[0], mesh=mesh, mesh_property=eigvecs[1], plot_type="lines"
)
plot solid mechanics
fig = plot(mesh, mesh_property=presets.stress.eigenvalues[2])
plot_streamlines(
    ax=fig.axes[0], mesh=mesh, mesh_property=eigvecs[2], plot_type="lines"
)
plot solid mechanics

We can also plot the mean of the principal stress, i.e. the magnitude of the hydrostatic component of the stress tensor. see: ogstools.propertylib.tensor_math.mean()

fig = plot(mesh, presets.stress.mean)
plot solid mechanics

Von Mises stress#

see: ogstools.propertylib.tensor_math.von_mises()

fig = plot(mesh, presets.stress.von_Mises)
plot solid mechanics

octahedral shear stress#

see: ogstools.propertylib.tensor_math.octahedral_shear()

fig = plot(mesh, presets.stress.octahedral_shear)
plot solid mechanics

Integrity criteria#

Evaluating models regarding their integrity is often dependent on the geometry, e.g. for a hypothetical water column proportional to the depth. Presets which fall under this category make use of ogstools.propertylib.mesh_dependent.

The hypothetical water column used in the integrity criteria would initially use existing “pressure” data in the mesh, otherwise it is automatically calculated as the following:

mesh["pressure"] = mesh_dependent.p_fluid(mesh)
fig = plot(mesh, presets.pressure)
plot solid mechanics
/builds/ogs/tools/ogstools/.venv-devcontainer/lib/python3.10/site-packages/pyvista/core/dataset.py:1975: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
  scalars = np.asanyarray(scalars)

But since this assumes that the top of the model is equal to the ground surface, the resulting pressure is underestimated. In this case we have to correct the depth manually. Then the pressure is calculated correctly:

mesh["depth"] = mesh_dependent.depth(mesh, use_coords=True)
fig = plot(mesh, "depth")
mesh["pressure"] = mesh_dependent.p_fluid(mesh)
fig = plot(mesh, presets.pressure)
  • plot solid mechanics
  • plot solid mechanics

Dilantancy criterion#

see: ogstools.propertylib.mesh_dependent.dilatancy_critescu()

fig = plot(mesh, presets.dilatancy_critescu_tot)
fig = plot(mesh, presets.dilatancy_critescu_eff)
  • plot solid mechanics
  • plot solid mechanics

Fluid pressure criterion#

see: ogstools.propertylib.mesh_dependent.fluid_pressure_criterion()

fig = plot(mesh, presets.fluid_pressure_crit)
plot solid mechanics

Total running time of the script: (0 minutes 4.086 seconds)