new numerics parameter "defgradTolerance" replaces "relevantStrain" in cpfem, since "relevantStrain" is also used in crystallite but in a different context.
"defgradTolerance" gets the same standard value as "relevantStrain" so calculations should be consistent with older ones
This commit is contained in:
parent
3a23dc4bbd
commit
dba4ae7ef1
|
@ -72,12 +72,14 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
prec_init
|
prec_init
|
||||||
use numerics, only: numerics_init, &
|
use numerics, only: numerics_init, &
|
||||||
relevantStrain, &
|
relevantStrain, &
|
||||||
|
defgradTolerance, &
|
||||||
iJacoStiffness
|
iJacoStiffness
|
||||||
use debug, only: debug_init, &
|
use debug, only: debug_init, &
|
||||||
debug_g, &
|
debug_g, &
|
||||||
debug_i, &
|
debug_i, &
|
||||||
debug_e, &
|
debug_e, &
|
||||||
debugger, &
|
debugger, &
|
||||||
|
selectiveDebugger, &
|
||||||
verboseDebugger
|
verboseDebugger
|
||||||
use FEsolving, only: FE_init, &
|
use FEsolving, only: FE_init, &
|
||||||
parallelExecution, &
|
parallelExecution, &
|
||||||
|
@ -210,9 +212,9 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cp_en = mesh_FEasCP('elem',element)
|
cp_en = mesh_FEasCP('elem',element)
|
||||||
|
selectiveDebugger = (cp_en == debug_e .and. IP == debug_i)
|
||||||
|
|
||||||
if (cp_en == 1 .and. IP == 1) then
|
if (debugger .and. selectiveDebugger) then
|
||||||
if (debugger) then
|
|
||||||
!$OMP CRITICAL (write2out)
|
!$OMP CRITICAL (write2out)
|
||||||
write(6,*)
|
write(6,*)
|
||||||
write(6,*) '#####################################'
|
write(6,*) '#####################################'
|
||||||
|
@ -222,7 +224,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
call flush (6)
|
call flush (6)
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
! according to our "mode" we decide what to do
|
! according to our "mode" we decide what to do
|
||||||
select case (mode)
|
select case (mode)
|
||||||
|
@ -239,9 +240,9 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
j = 1:mesh_maxNips, &
|
j = 1:mesh_maxNips, &
|
||||||
k = 1:mesh_NcpElems ) &
|
k = 1:mesh_NcpElems ) &
|
||||||
constitutive_state0(i,j,k)%p = constitutive_state(i,j,k)%p ! microstructure of crystallites
|
constitutive_state0(i,j,k)%p = constitutive_state(i,j,k)%p ! microstructure of crystallites
|
||||||
if (debugger) then
|
if (debugger .and. selectiveDebugger) then
|
||||||
!$OMP CRITICAL (write2out)
|
!$OMP CRITICAL (write2out)
|
||||||
write(6,'(a,/,4(3(e20.8,x),/))') 'aged state at 1 1 1', constitutive_state(1,1,1)%p
|
write(6,'(a16,i2,x,i5,/,4(3(e20.8,x),/))') 'aged state at 1 ',IP,cp_en, constitutive_state(1,IP,cp_en)%p
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
do k = 1,mesh_NcpElems
|
do k = 1,mesh_NcpElems
|
||||||
|
@ -259,11 +260,11 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
! deformation gradient outdated or any actual deformation gradient differs more than relevantStrain from the stored one
|
! deformation gradient outdated or any actual deformation gradient differs more than relevantStrain from the stored one
|
||||||
if (terminallyIll .or. outdatedFFN1 .or. any(abs(ffn1 - materialpoint_F(:,:,IP,cp_en)) > relevantStrain)) then
|
if (terminallyIll .or. outdatedFFN1 .or. any(abs(ffn1 - materialpoint_F(:,:,IP,cp_en)) > defgradTolerance)) then
|
||||||
if (.not. terminallyIll .and. .not. outdatedFFN1) then
|
if (.not. terminallyIll .and. .not. outdatedFFN1) then
|
||||||
if (debugger) then
|
if (debugger) then
|
||||||
!$OMP CRITICAL (write2out)
|
!$OMP CRITICAL (write2out)
|
||||||
write(6,'(a11,x,i5,x,i2,x,a10,/,3(3(f10.6,x),/))') 'outdated at',cp_en,IP,'FFN1 now:',ffn1(:,1),ffn1(:,2),ffn1(:,3)
|
write(6,'(a11,x,i2,x,i5,x,a12,/,3(3(f10.6,x),/))') 'outdated at',IP,cp_en,'; FFN1 now:',ffn1(:,1),ffn1(:,2),ffn1(:,3)
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
outdatedFFN1 = .true.
|
outdatedFFN1 = .true.
|
||||||
|
@ -355,14 +356,13 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
||||||
! return the local stress and the jacobian from storage
|
! return the local stress and the jacobian from storage
|
||||||
cauchyStress(:) = CPFEM_cs(:,IP,cp_en)
|
cauchyStress(:) = CPFEM_cs(:,IP,cp_en)
|
||||||
jacobian(:,:) = CPFEM_dcsdE(:,:,IP,cp_en)
|
jacobian(:,:) = CPFEM_dcsdE(:,:,IP,cp_en)
|
||||||
if (IP == 1 .and. cp_en == 1) then
|
if (debugger .and. selectiveDebugger) then
|
||||||
if (debugger) then
|
|
||||||
!$OMP CRITICAL (write2out)
|
!$OMP CRITICAL (write2out)
|
||||||
write(6,'(a,/,6(6(f10.3,x)/))') 'jacobian/GPa at ip 1 el 1',jacobian/1e9
|
write(6,'(a16,x,i2,x,a2,x,i4,/,6(f10.3,x)/)') 'stress/MPa at ip', IP, 'el', cp_en, cauchyStress/1e6
|
||||||
|
write(6,'(a18,x,i2,x,a2,x,i4,/,6(6(f10.3,x)/))') 'jacobian/GPa at ip', IP, 'el', cp_en, jacobian/1e9
|
||||||
call flush(6)
|
call flush(6)
|
||||||
!$OMP END CRITICAL (write2out)
|
!$OMP END CRITICAL (write2out)
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
! return temperature
|
! return temperature
|
||||||
if (theTime > 0.0_pReal) Temperature = materialpoint_Temperature(IP,cp_en) ! homogenized result except for potentially non-isothermal starting condition.
|
if (theTime > 0.0_pReal) Temperature = materialpoint_Temperature(IP,cp_en) ! homogenized result except for potentially non-isothermal starting condition.
|
||||||
|
|
|
@ -1053,6 +1053,9 @@ endfunction
|
||||||
case (289)
|
case (289)
|
||||||
msg = 'Non-positive definite volume discrepancy penalty in RGC'
|
msg = 'Non-positive definite volume discrepancy penalty in RGC'
|
||||||
|
|
||||||
|
case (294)
|
||||||
|
msg = 'Non-positive tolerance for deformation gradient'
|
||||||
|
|
||||||
case (299)
|
case (299)
|
||||||
msg = 'Chosen perturbation method does not exist'
|
msg = 'Chosen perturbation method does not exist'
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
### $Id$ ###
|
### $Id$ ###
|
||||||
### numerical parameters ###
|
### numerical parameters ###
|
||||||
|
|
||||||
relevantStrain 1.0e-9 # strain increment considered significant
|
relevantStrain 1.0e-9 # strain increment considered significant (used by crystallite to determine whether strain inc is considered significant)
|
||||||
|
defgradTolerance 1.0e-7 # deviation of deformation gradient that is still allowed (used by CPFEM to determine outdated ffn1)
|
||||||
iJacoStiffness 1 # frequency of stiffness update
|
iJacoStiffness 1 # frequency of stiffness update
|
||||||
iJacoLpresiduum 1 # frequency of Jacobian update of residuum in Lp
|
iJacoLpresiduum 1 # frequency of Jacobian update of residuum in Lp
|
||||||
pert_Fg 1.0e-7 # deformation gradient perturbation for grain tangent
|
pert_Fg 1.0e-7 # deformation gradient perturbation for grain tangent
|
||||||
|
|
|
@ -15,7 +15,8 @@ integer(pInt) iJacoStiffness, & ! freque
|
||||||
nState, & ! state loop limit
|
nState, & ! state loop limit
|
||||||
nStress, & ! stress loop limit
|
nStress, & ! stress loop limit
|
||||||
pert_method ! method used in perturbation technique for tangent
|
pert_method ! method used in perturbation technique for tangent
|
||||||
real(pReal) relevantStrain, & ! strain increment considered significant
|
real(pReal) relevantStrain, & ! strain increment considered significant (used by crystallite to determine whether strain inc is considered significant)
|
||||||
|
defgradTolerance, & ! deviation of deformation gradient that is still allowed (used by CPFEM to determine outdated ffn1)
|
||||||
pert_Fg, & ! strain perturbation for FEM Jacobi
|
pert_Fg, & ! strain perturbation for FEM Jacobi
|
||||||
subStepMinCryst, & ! minimum (relative) size of sub-step allowed during cutback in crystallite
|
subStepMinCryst, & ! minimum (relative) size of sub-step allowed during cutback in crystallite
|
||||||
subStepMinHomog, & ! minimum (relative) size of sub-step allowed during cutback in homogenization
|
subStepMinHomog, & ! minimum (relative) size of sub-step allowed during cutback in homogenization
|
||||||
|
@ -85,6 +86,7 @@ subroutine numerics_init()
|
||||||
|
|
||||||
! initialize all parameters with standard values
|
! initialize all parameters with standard values
|
||||||
relevantStrain = 1.0e-7_pReal
|
relevantStrain = 1.0e-7_pReal
|
||||||
|
defgradTolerance = 1.0e-7_pReal
|
||||||
iJacoStiffness = 1_pInt
|
iJacoStiffness = 1_pInt
|
||||||
iJacoLpresiduum = 1_pInt
|
iJacoLpresiduum = 1_pInt
|
||||||
pert_Fg = 1.0e-7_pReal
|
pert_Fg = 1.0e-7_pReal
|
||||||
|
@ -139,6 +141,8 @@ subroutine numerics_init()
|
||||||
select case(tag)
|
select case(tag)
|
||||||
case ('relevantstrain')
|
case ('relevantstrain')
|
||||||
relevantStrain = IO_floatValue(line,positions,2)
|
relevantStrain = IO_floatValue(line,positions,2)
|
||||||
|
case ('defgradtolerance')
|
||||||
|
defgradTolerance = IO_floatValue(line,positions,2)
|
||||||
case ('ijacostiffness')
|
case ('ijacostiffness')
|
||||||
iJacoStiffness = IO_intValue(line,positions,2)
|
iJacoStiffness = IO_intValue(line,positions,2)
|
||||||
case ('ijacolpresiduum')
|
case ('ijacolpresiduum')
|
||||||
|
@ -223,6 +227,7 @@ subroutine numerics_init()
|
||||||
|
|
||||||
! writing parameters to output file
|
! writing parameters to output file
|
||||||
write(6,'(a24,x,e8.1)') 'relevantStrain: ',relevantStrain
|
write(6,'(a24,x,e8.1)') 'relevantStrain: ',relevantStrain
|
||||||
|
write(6,'(a24,x,e8.1)') 'defgradTolerance: ',defgradTolerance
|
||||||
write(6,'(a24,x,i8)') 'iJacoStiffness: ',iJacoStiffness
|
write(6,'(a24,x,i8)') 'iJacoStiffness: ',iJacoStiffness
|
||||||
write(6,'(a24,x,i8)') 'iJacoLpresiduum: ',iJacoLpresiduum
|
write(6,'(a24,x,i8)') 'iJacoLpresiduum: ',iJacoLpresiduum
|
||||||
write(6,'(a24,x,e8.1)') 'pert_Fg: ',pert_Fg
|
write(6,'(a24,x,e8.1)') 'pert_Fg: ',pert_Fg
|
||||||
|
@ -268,6 +273,7 @@ subroutine numerics_init()
|
||||||
|
|
||||||
! sanity check
|
! sanity check
|
||||||
if (relevantStrain <= 0.0_pReal) call IO_error(260)
|
if (relevantStrain <= 0.0_pReal) call IO_error(260)
|
||||||
|
if (defgradTolerance <= 0.0_pReal) call IO_error(294)
|
||||||
if (iJacoStiffness < 1_pInt) call IO_error(261)
|
if (iJacoStiffness < 1_pInt) call IO_error(261)
|
||||||
if (iJacoLpresiduum < 1_pInt) call IO_error(262)
|
if (iJacoLpresiduum < 1_pInt) call IO_error(262)
|
||||||
if (pert_Fg <= 0.0_pReal) call IO_error(263)
|
if (pert_Fg <= 0.0_pReal) call IO_error(263)
|
||||||
|
|
Loading…
Reference in New Issue