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/>

import ogstools as ogs
from ogstools import examples

mesh = examples.load_mesh_mechanics_2D()
fig = mesh.plot_contourf(ogs.variables.displacement)
plot solid mechanics

Tensor components#

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

fig = mesh.plot_contourf(ogs.variables.stress["xx"])
fig = mesh.plot_contourf(ogs.variables.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 = ogs.variables.stress.eigenvectors
fig = mesh.plot_contourf(variable=ogs.variables.stress.eigenvalues[0])
mesh.plot_quiver(ax=fig.axes[0], variable=eigvecs[0], glyph_type="line")
plot solid mechanics
fig = mesh.plot_contourf(variable=ogs.variables.stress.eigenvalues[1])
mesh.plot_quiver(ax=fig.axes[0], variable=eigvecs[1], glyph_type="line")
plot solid mechanics
fig = mesh.plot_contourf(variable=ogs.variables.stress.eigenvalues[2])
mesh.plot_quiver(ax=fig.axes[0], variable=eigvecs[2], glyph_type="line")
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.variables.tensor_math.mean()

fig = mesh.plot_contourf(ogs.variables.stress.mean)
plot solid mechanics

Von Mises stress#

see: ogstools.variables.tensor_math.von_mises()

fig = mesh.plot_contourf(ogs.variables.stress.von_Mises)
plot solid mechanics

octahedral shear stress#

see: ogstools.variables.tensor_math.octahedral_shear()

fig = mesh.plot_contourf(ogs.variables.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.variables.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.p_fluid()
fig = mesh.plot_contourf(ogs.variables.pressure)
plot solid mechanics
/builds/ogs/tools/ogstools/.venv-devcontainer/lib/python3.10/site-packages/pyvista/core/dataset.py:2020: 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.depth(use_coords=True)
fig = mesh.plot_contourf("depth")
mesh["pressure"] = mesh.p_fluid()
fig = mesh.plot_contourf(ogs.variables.pressure)
  • plot solid mechanics
  • plot solid mechanics
/builds/ogs/tools/ogstools/.venv-devcontainer/lib/python3.10/site-packages/pyvista/core/dataset.py:2020: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
  scalars = np.asanyarray(scalars)

Dilantancy criterion#

see: ogstools.variables.mesh_dependent.dilatancy_critescu()

fig = mesh.plot_contourf(ogs.variables.dilatancy_critescu_tot)
fig = mesh.plot_contourf(ogs.variables.dilatancy_critescu_eff)
  • plot solid mechanics
  • plot solid mechanics

Fluid pressure criterion#

see: ogstools.variables.mesh_dependent.fluid_pressure_criterion()

fig = mesh.plot_contourf(ogs.variables.fluid_pressure_crit)
plot solid mechanics

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