Skip to content

Principal stress state symmetry in get_principal_values function #1

@aplowman

Description

@aplowman

We need to decide and document how to order the output principal values in mathsutils.get_principal_values(). Ordering from the invoked np.eigvals() is not guaranteed, so we should apply some subsequent ordering ourselves. However, there are different options.

We start with: eigvals = np.linalg.eigvals(tensors). After this, we could:

Sort in decreasing order (positive to negative):

return np.sort(eigvals, axis=-1)[..., ::-1]

Or, sort by absolute value in decreasing order:

sort_idx = np.argsort(np.abs(eigvals), axis=-1)
return np.take_along_axis(eigvals, sort_idx, axis=-1)[..., ::-1]

This is an issue because it results in different visualisations when showing a yield function with the stress states used to fit it. It's not clear to me what symmetry we should expect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions