Best way to output a scalar quantitiy in a 3D domain

Hi all,

I am wondering what is the best way to output a scalar quantity at different depth slice for a 3D domain.

The scale I would like to output is D = sigma_zz/(nu*(sigma_xx+sigma_yy)), which measures the degree of plane strain or plane stress.

What I would like to do is have this D variable output at different depth of 3D model, for each depth I have a slice of the domain.

Here are some approaches that I would like to try and maybe Pylith developer could suggest more efficient approach:

  1. Define Node set / Element set at different depth in the input Exodus mesh file, and use subdomain-output to output the stress field at these slices.

Here I would like to know how the uniform refinement works, because I input a coarse mesh to Pyltih and use the uniform refinement to run with required resolution, does the new nodes generated by the refinement will be automatically added to the nodes set defined in coarse mesh?

  1. If Pylith already has some slice output capability so that I don’t need to specify nodeset in the mesh model ?
    And If that is the case, can I do the calculation within Pylith to output D directly ?

I know I could do this through post-processing by outputting the stress field directly from Pylith and then do the calculation. However outputing a 3D domain information is time consuming.

Thank you,

It is possible to write a special filter in C++ to do the scalar calculation but not at a particular depth.

I think computing this scalar quantity during post-processing is much more robust and easier. You can select how often you output information and using HDF5 output is much more efficient that VTK output. If output is time consuming, describe how often you want your output written and show us your output settings (send the pylith_parameter.json file generated during the simulation or via pylithinfo).

Thanks Brad.
So If I output the information using HDF5 format, I know I could write a Python script to post-process it and get the scalar quantity. And after that could I transform it to a format to be view in Paraview ?

Is there any example script in Pylith postprocessing script that does something similar ?


See examples/3d/subduction/ The script is a bit more complicated than it needs to be because it is Pyre. The parts relevant to what you want to do are reading the output files via h5py (starting at line 168) and updating the Xdmf file using the Xdmf object (starting at line 273).

Thanks for the suggestion, will give it a try.