boschresearch / pylife

a general library for fatigue and reliability
https://pylife.readthedocs.io
Apache License 2.0
138 stars 25 forks source link

RuntimeError in SeegerBeste #128

Closed maierbn closed 4 days ago

maierbn commented 5 days ago

Describe the bug Calling SeegerBeste.stress or SeegerBeste.stress_secondary_branch with a scalar load yields a RuntimeError.

To Reproduce Code snippet to reproduce the bug (no screenshot but pasted code)

from pylife.materiallaws.notch_approximation_law_seegerbeste import SeegerBeste

E = 206e3    # [MPa] Young's modulus
K = 1184     # [MPa]
n = 0.187    # [-]
K_p = 3.5    # [-] (de: Traglastformzahl) K_p = F_plastic / F_yield (3.1.1)

notch_approximation_law = SeegerBeste(E, K, n, K_p)

stress = notch_approximation_law.stress(150.0)
stress_secondary_branch = notch_approximation_law.stress_secondary_branch(150.0)

Expected result No error

Observed result

E       TypeError: unsupported operand type(s) for +: 'int' and 'str'

src\pylife\materiallaws\notch_approximation_law_seegerbeste.py:100: TypeError

Environment (please complete the following information):

johannes-mueller commented 5 days ago

PR will be reissued