diff --git a/src/finite_elasticity_routines.F90 b/src/finite_elasticity_routines.F90 index ab1ebcf6..91f03acb 100644 --- a/src/finite_elasticity_routines.F90 +++ b/src/finite_elasticity_routines.F90 @@ -803,14 +803,17 @@ SUBROUTINE FINITE_ELASTICITY_GAUSS_ELASTICITY_TENSOR(EQUATIONS_SET,DEPENDENT_INT !Calculate 2nd Piola tensor (in Voigt form) STRESS_TENSOR=TEMPTERM1*DQ_DE + P*AZUv IF(EQUATIONS_SET%specification(3)==EQUATIONS_SET_GUCCIONE_ACTIVECONTRACTION_SUBTYPE) THEN + lambda(1) = 1/(SQRT(2.0_DP*E(1)+1)) !deriv of lambda wrt E + lambda(2) = 1/(SQRT(2.0_DP*E(2)+1)) !deriv of lambda wrt E + lambda(3) = 1/(SQRT(2.0_DP*E(3)+1)) !deriv of lambda wrt E !add active contraction stress values CALL Field_VariableGet(EQUATIONS_SET%INDEPENDENT%INDEPENDENT_FIELD,FIELD_U_VARIABLE_TYPE,FIELD_VARIABLE,ERR,ERROR,*999) - DO i=1,FIELD_VARIABLE%NUMBER_OF_COMPONENTS - dof_idx=FIELD_VARIABLE%COMPONENTS(i)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% & + DO component_idx=1,FIELD_VARIABLE%NUMBER_OF_COMPONENTS + dof_idx=FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% & & GAUSS_POINTS(GAUSS_POINT_NUMBER,ELEMENT_NUMBER) CALL FIELD_PARAMETER_SET_GET_LOCAL_DOF(EQUATIONS_SET%INDEPENDENT%INDEPENDENT_FIELD,FIELD_U_VARIABLE_TYPE, & - & FIELD_VALUES_SET_TYPE,dof_idx,VALUE,ERR,ERROR,*999) - STRESS_TENSOR(i)=STRESS_TENSOR(i)+VALUE + & FIELD_VALUES_SET_TYPE,dof_idx,VALUE,err,error,*999) + STRESS_TENSOR(component_idx)=STRESS_TENSOR(component_idx)+VALUE*(1.0_DP+1.45_DP*(lambda(component_idx)-1.0_DP)) ENDDO ENDIF @@ -6532,13 +6535,17 @@ SUBROUTINE FINITE_ELASTICITY_GAUSS_CAUCHY_TENSOR(EQUATIONS_SET,DEPENDENT_INTERPO !add active contraction stress value to the trace of the stress tensor - basically adding to hydrostatic pressure. !the active stress is stored inside the independent field that has been set up in the user program. !for generality we could set up 3 components in independent field for 3 different active stress components + lambda(1) = SQRT(AZL(1,1)) + lambda(2) = SQRT(AZL(2,2)) + lambda(3) = SQRT(AZL(3,3)) CALL Field_VariableGet(EQUATIONS_SET%INDEPENDENT%INDEPENDENT_FIELD,FIELD_U_VARIABLE_TYPE,FIELD_VARIABLE,err,error,*999) DO component_idx=1,FIELD_VARIABLE%NUMBER_OF_COMPONENTS dof_idx=FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% & & GAUSS_POINTS(GAUSS_POINT_NUMBER,ELEMENT_NUMBER) CALL FIELD_PARAMETER_SET_GET_LOCAL_DOF(EQUATIONS_SET%INDEPENDENT%INDEPENDENT_FIELD,FIELD_U_VARIABLE_TYPE, & & FIELD_VALUES_SET_TYPE,dof_idx,VALUE,err,error,*999) - PIOLA_TENSOR(component_idx,component_idx)=PIOLA_TENSOR(component_idx,component_idx)+VALUE + PIOLA_TENSOR(component_idx,component_idx)=PIOLA_TENSOR(component_idx,component_idx)+ & + & VALUE*(1.0_DP+1.45_DP*(lambda(component_idx)-1.0_DP))!/DZDNU(component_idx,component_idx) ENDDO ENDIF CASE(EQUATIONS_SET_TRANSVERSE_ISOTROPIC_HUMPHREY_YIN_SUBTYPE)