Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated analytic Jacobian evaluation for Guccione Active-contraction #164

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/finite_elasticity_routines.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down