Skip to content

Conversation

@Dakar1912
Copy link

Adding missing stress components in order to directly calculate Stress Criteria, such as Von Mises, Tresca...

Copy link
Member

@johannes-mueller johannes-mueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General request: Please add unit tests to test the new behavior.

Comment on lines +247 to +256
# element_types = {el.type for el in instance.elements}
# unsupported_types = {et for et in element_types if et[0] != "C"}
# if unsupported_types:
# raise ValueError(
# "Only continuum elements (C...) are supported at this point, sorry. "
# "Please submit an issue to https://github.com/boschresearch/pylife/issues "
# "if you need to support other types. "
# "(Unsupported types %s found in instance %s)" % (
# ", ".join(unsupported_types), instance_name
# ))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this code still needed? Do we really support all element types? We need to be sure about that. If yes we delete the code, not comment it.

if stress_component not in response_values.columns:
response_values[stress_component] = 0.0

return response_values
Copy link
Member

@johannes-mueller johannes-mueller Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about other tensor variables like strain and force? Can we add those, too? Otherwise it would be like a half finished improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants