MDStressLab++
|
Generates 2D contour plots of stress components from .stress files. More...
Go to the source code of this file.
Namespaces | |
namespace | visualize |
Functions | |
visualize.read_file (filename) | |
Reads a .stress file containing atomistic stress data. | |
visualize.plot_contour (data, output_fname, component_index, component_label) | |
Plots a 2D contour of the selected stress component. | |
Variables | |
dict | visualize.STRESS_COMPONENTS |
Mapping from stress component names to (column index, label). | |
visualize.filename = sys.argv[1] | |
visualize.component_key = sys.argv[2].lower() | |
visualize.component_index | |
visualize.component_label | |
visualize.base | |
visualize._ | |
str | visualize.plt_fname = f"{base}_{component_key}.pdf" |
visualize.data = read_file(filename) | |
Generates 2D contour plots of stress components from .stress files.
This script reads atomistic simulation output and visualizes a selected stress component (e.g., σyy) using a filled contour plot.
The input file should be structured as follows:
Each data line must contain 9 floating-point values: the atomic position (x, y, z)
followed by the six unique components of the symmetric Cauchy stress tensor.
Converts the selected stress component from internal units to GPa (by multiplying by 160.0), and saves a PDF contour plot.
Definition in file visualize.py.