Note
Go to the end to download the full example code or to run this example in your browser via Binder.
Stress analysis#
The following example from the ogs benchmark collection is used for the stress analysis:
<https://www.opengeosys.org/docs/benchmarks/thermo-mechanics/creepafterexcavation/>

Tensor components#
We can inspect the stress (or strain) tensor components by indexing.
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.



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()

Von Mises stress#
see: ogstools.variables.tensor_math.von_mises()

octahedral shear stress#
see: ogstools.variables.tensor_math.octahedral_shear()

Stresses in polar coordinates#
You can inspect stresses in a polar coordinate system by deriving a new Variable from the stress Variable. Specify the polar center and, if needed, the rotation axis (default is z-axis: [0, 0, 1]).
Here is a 3D example with a cylindrical hole at (0, 0, 0) in y direction:



Integrity criteria#
Evaluating models regarding their integrity is often dependent on the fluid pressure. If not already present, we have to calculate it manually, e.g. as a hypothetical water column proportional to the depth.
mesh["pressure"] = -1000 * 9.81 * mesh.points[:, 1]
fig = ot.plot.contourf(mesh, ot.variables.pressure)

Dilantancy criterion#
see: ogstools.variables.mesh_dependent.dilatancy_critescu()
Fluid pressure criterion#
see: ogstools.variables.mesh_dependent.fluid_pressure_criterion()

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






