Post-processing functions#

PyTwin functions to perform physics-specific post-processing operations.

stress_strain_component(str_vectors, item, comp)

Reduce an array of stress or strain tensors to an array of scalar values.

Workflow example#

This code show how the functions may be used to calculate equivalent strain for a material with Poisson’s ratio of 0.3 (for example steel) where input strains lie in the XZ plane. See Static structural analysis and optimization using 3D field ROM for further examples where the function is applied to TwinModel results.

>>> import numpy as np
>>> from pytwin import stress_strain_component
>>> strain_vectors = np.array([[-2.1e-4, 0.0, 5.0e-5, 0.0, 0.0, 1.5e-6]])
>>> E_vonMises = stress_strain_component(strain_vectors, "E", "EQV", effective_pr=0.3)
>>> E_vonMises
array([0.00018382])