From aa7af4e9c554ed0ff01de41db31c6df807245471 Mon Sep 17 00:00:00 2001 From: Bernardo Ferreira Date: Thu, 26 Oct 2023 09:14:39 -0400 Subject: [PATCH] Fixed execution error under finite strains. - Avoid state update kinematic post-processing when state update fails; --- src/cratepy/material/materialmodeling.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cratepy/material/materialmodeling.py b/src/cratepy/material/materialmodeling.py index 99595855..a2a339fa 100644 --- a/src/cratepy/material/materialmodeling.py +++ b/src/cratepy/material/materialmodeling.py @@ -1023,7 +1023,9 @@ def _material_su_interface(strain_formulation, problem_type, constitutive_model.state_update(inc_strain, state_variables_old) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Compute Cauchy stress tensor and material consistent tangent modulus - if strain_formulation == 'finite' and strain_type == 'finite-kinext': + if (not state_variables['is_su_fail'] + and strain_formulation == 'finite' + and strain_type == 'finite-kinext'): # Get Kirchhoff stress tensor (matricial form) kirchhoff_stress_mf = state_variables['stress_mf'] # Build Kirchhoff stress tensor