Output stress and strain on the ground surface

Dear Pylith team,

PyLith supports output of the solution on any boundary of the domain by associating an output manager with a group of vertices corresponding to the surface of the boundary. The default output of this feature is displacement. I want to output stress and strain on the ground surface. Can this be achieved?
Thank you in advance.

Nick

For PyLith v2.x, only solution fields, such as displacement and velocity, can be output on boundaries. Stress and strain output are currently only available for materials.

Hi Brad,

Thank for your fast response.
I looked at the step-upper-crust.h5 in the 3d/hex8/step06.cfg output and found that the number of vertices does not correspond to the number of stress and strain. In this result file, the number of vertices is 280 and the number of stress and strain in each time step is 72. How can the results of stress and strain correspond to the vertices? In addition, I want to get the stress and strain of the ground point, is there any good way?

The txt file are attached below:
step06-upper_crust.txt (221.4 KB)

Nick

Stress and strain are computed at the finite-element quadrature points. When you use CellFilterAvg on the field, it averages the values over the quadrature points to give values at one location per cell (centroid). This is the normal procedure for values computed at quadrature points because nearly all visualization tools only understand output that one location per cell.

To get stress and strain at the ground surface in PyLith v2.x, the best you can do is to get the stress and strain at all of the quadrature points in a cell and use the value closest to a target point. Unfortunately, we have not implemented output of the coordinates of the quadrature points. Thus, in practice your best bet is to get the stress and strain at the centroid of the cell closest to the target point.

Hi Brad,

I know what you mean. How can the stress and strain results in h5 file correspond to the centroid coordinates of per cell? The h5 file does not seem to contain centroid coordinates.
Thanks again.

Nick

The centroid of any cell can be computed directly from the coordinates of the vertices.

For example, see pylith/plot_soln.py at releases/v2.2 · geodynamics/pylith · GitHub

Hi Brad,

The code you provided is very useful. Many thanks for your help.

Nick

Hi Brad,

What is the order of stress components in the material output H5 file? σxx, σyy, σzz, σxy, σyz, σxz or σxx, σxy, σxz, σyy, σyz, σzz?
Thanks.

Nick

Hi Nick,

The order is actually: xx, yy, zz, xy, xz, yz.

Cheers,
Charles

Hi Charles,

Thank you for your fast response. The order of components in tensor state-variables(total_strain, stress, etc) for materials in the tutorial is shown in the following picture, so the order in the tutorial is wrong, right?

Nick

No. I mis-typed. The order in the manual is correct. Sorry about that.

Cheers,
Charles

Okay, thanks again.

Nick