added some sanity checks in damage modules.
This commit is contained in:
parent
1e4beb08ac
commit
36c2cc4347
|
@ -108,7 +108,8 @@ subroutine damage_anisoBrittle_init(fileUnit)
|
|||
worldrank, &
|
||||
numerics_integrator
|
||||
use lattice, only: &
|
||||
lattice_maxNcleavageFamily
|
||||
lattice_maxNcleavageFamily, &
|
||||
lattice_NcleavageSystem
|
||||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: fileUnit
|
||||
|
@ -199,7 +200,6 @@ subroutine damage_anisoBrittle_init(fileUnit)
|
|||
do j = 1_pInt, Nchunks_CleavageFamilies
|
||||
damage_anisoBrittle_Ncleavage(j,instance) = IO_intValue(line,positions,1_pInt+j)
|
||||
enddo
|
||||
damage_anisoBrittle_totalNcleavage(instance) = sum(damage_anisoBrittle_Ncleavage(:,instance))
|
||||
|
||||
case ('critical_displacement')
|
||||
do j = 1_pInt, Nchunks_CleavageFamilies
|
||||
|
@ -214,6 +214,30 @@ subroutine damage_anisoBrittle_init(fileUnit)
|
|||
end select
|
||||
endif; endif
|
||||
enddo parsingFile
|
||||
|
||||
sanityChecks: do phase = 1_pInt, size(phase_damage)
|
||||
myPhase: if (phase_damage(phase) == LOCAL_damage_anisoBrittle_ID) then
|
||||
NofMyPhase=count(material_phase==phase)
|
||||
instance = phase_damageInstance(phase)
|
||||
! sanity checks
|
||||
damage_anisoBrittle_Ncleavage(1:lattice_maxNcleavageFamily,instance) = &
|
||||
min(lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,phase),& ! limit active cleavage systems per family to min of available and requested
|
||||
damage_anisoBrittle_Ncleavage(1:lattice_maxNcleavageFamily,instance))
|
||||
damage_anisoBrittle_totalNcleavage(instance) = sum(damage_anisoBrittle_Ncleavage(:,instance)) ! how many cleavage systems altogether
|
||||
if (damage_anisoBrittle_aTol_damage(instance) >= 1.0e-3_pReal) &
|
||||
damage_anisoBrittle_aTol_damage(instance) = 1.0e-3_pReal ! default absolute tolerance 1e-3
|
||||
if (damage_anisoBrittle_aTol_disp(instance) >= 1.0e-3_pReal) &
|
||||
damage_anisoBrittle_aTol_disp(instance) = 1.0e-3_pReal ! default absolute tolerance 1e-3
|
||||
if (damage_anisoBrittle_sdot_0(instance) <= 0.0_pReal) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='sdot_0 ('//LOCAL_DAMAGE_anisoBrittle_LABEL//')')
|
||||
if (any(damage_anisoBrittle_critDisp(:,instance) <= 0.0_pReal)) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='critical_displacement ('//LOCAL_DAMAGE_anisoBrittle_LABEL//')')
|
||||
if (any(damage_anisoBrittle_critLoad(:,instance) <= 0.0_pReal)) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='critical_load ('//LOCAL_DAMAGE_anisoBrittle_LABEL//')')
|
||||
if (damage_anisoBrittle_N(instance) <= 0.0_pReal) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='rate_sensitivity_damage ('//LOCAL_DAMAGE_anisoBrittle_LABEL//')')
|
||||
endif myPhase
|
||||
enddo sanityChecks
|
||||
|
||||
initializeInstances: do phase = 1_pInt, size(phase_damage)
|
||||
if (phase_damage(phase) == LOCAL_damage_anisoBrittle_ID) then
|
||||
|
|
|
@ -101,7 +101,8 @@ subroutine damage_anisoDuctile_init(fileUnit)
|
|||
worldrank, &
|
||||
numerics_integrator
|
||||
use lattice, only: &
|
||||
lattice_maxNslipFamily
|
||||
lattice_maxNslipFamily, &
|
||||
lattice_NslipSystem
|
||||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: fileUnit
|
||||
|
@ -183,7 +184,6 @@ subroutine damage_anisoDuctile_init(fileUnit)
|
|||
do j = 1_pInt, Nchunks_SlipFamilies
|
||||
damage_anisoDuctile_Nslip(j,instance) = IO_intValue(line,positions,1_pInt+j)
|
||||
enddo
|
||||
damage_anisoDuctile_totalNslip(instance) = sum(damage_anisoDuctile_Nslip(:,instance))
|
||||
|
||||
case ('critical_accshear')
|
||||
do j = 1_pInt, Nchunks_SlipFamilies
|
||||
|
@ -193,7 +193,26 @@ subroutine damage_anisoDuctile_init(fileUnit)
|
|||
end select
|
||||
endif; endif
|
||||
enddo parsingFile
|
||||
|
||||
|
||||
sanityChecks: do phase = 1_pInt, size(phase_damage)
|
||||
myPhase: if (phase_damage(phase) == LOCAL_damage_anisoDuctile_ID) then
|
||||
NofMyPhase=count(material_phase==phase)
|
||||
instance = phase_damageInstance(phase)
|
||||
! sanity checks
|
||||
damage_anisoDuctile_Nslip(1:lattice_maxNslipFamily,instance) = &
|
||||
min(lattice_NslipSystem(1:lattice_maxNslipFamily,phase),& ! limit active cleavage systems per family to min of available and requested
|
||||
damage_anisoDuctile_Nslip(1:lattice_maxNslipFamily,instance))
|
||||
damage_anisoDuctile_totalNslip(instance) = sum(damage_anisoDuctile_Nslip(:,instance))
|
||||
if (damage_anisoDuctile_aTol_damage(instance) >= 1.0e-3_pReal) &
|
||||
damage_anisoDuctile_aTol_damage(instance) = 1.0e-3_pReal ! default absolute tolerance 1e-3
|
||||
if (any(damage_anisoDuctile_critAccShear(:,instance) <= 0.0_pReal)) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='critical_accshear ('//LOCAL_DAMAGE_anisoDuctile_LABEL//')')
|
||||
if (damage_anisoDuctile_N(instance) <= 0.0_pReal) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='rate_sensitivity_damage ('//LOCAL_DAMAGE_anisoDuctile_LABEL//')')
|
||||
endif myPhase
|
||||
enddo sanityChecks
|
||||
|
||||
|
||||
initializeInstances: do phase = 1_pInt, size(phase_damage)
|
||||
if (phase_damage(phase) == LOCAL_damage_anisoDuctile_ID) then
|
||||
NofMyPhase=count(material_phase==phase)
|
||||
|
|
|
@ -172,12 +172,26 @@ subroutine damage_isoBrittle_init(fileUnit)
|
|||
end select
|
||||
endif; endif
|
||||
enddo parsingFile
|
||||
|
||||
|
||||
|
||||
sanityChecks: do phase = 1_pInt, size(phase_damage)
|
||||
myPhase: if (phase_damage(phase) == LOCAL_damage_isoBrittle_ID) then
|
||||
NofMyPhase=count(material_phase==phase)
|
||||
instance = phase_damageInstance(phase)
|
||||
! sanity checks
|
||||
if (damage_isoBrittle_aTol(instance) >= 1.0e-3_pReal) &
|
||||
damage_isoBrittle_aTol(instance) = 1.0e-3_pReal ! default absolute tolerance 1e-3
|
||||
if (damage_isoBrittle_critStrainEnergy(instance) <= 0.0_pReal) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='critical_strain_energy ('//LOCAL_DAMAGE_isoBrittle_LABEL//')')
|
||||
if (damage_isoBrittle_N(instance) <= 0.0_pReal) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='rate_sensitivity_damage ('//LOCAL_DAMAGE_isoBrittle_LABEL//')')
|
||||
endif myPhase
|
||||
enddo sanityChecks
|
||||
|
||||
initializeInstances: do phase = 1_pInt, size(phase_damage)
|
||||
if (phase_damage(phase) == LOCAL_damage_isoBrittle_ID) then
|
||||
NofMyPhase=count(material_phase==phase)
|
||||
instance = phase_damageInstance(phase)
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! Determine size of postResults array
|
||||
outputsLoop: do o = 1_pInt,damage_isoBrittle_Noutput(instance)
|
||||
|
|
|
@ -171,6 +171,20 @@ subroutine damage_isoDuctile_init(fileUnit)
|
|||
end select
|
||||
endif; endif
|
||||
enddo parsingFile
|
||||
|
||||
sanityChecks: do phase = 1_pInt, size(phase_damage)
|
||||
myPhase: if (phase_damage(phase) == LOCAL_damage_isoDuctile_ID) then
|
||||
NofMyPhase=count(material_phase==phase)
|
||||
instance = phase_damageInstance(phase)
|
||||
! sanity checks
|
||||
if (damage_isoDuctile_aTol(instance) >= 1.0e-3_pReal) &
|
||||
damage_isoDuctile_aTol(instance) = 1.0e-3_pReal ! default absolute tolerance 1e-3
|
||||
if (damage_isoDuctile_critpStrain(instance) <= 0.0_pReal) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='critical_plastic_strain ('//LOCAL_DAMAGE_isoDuctile_LABEL//')')
|
||||
if (damage_isoDuctile_N(instance) <= 0.0_pReal) &
|
||||
call IO_error(211_pInt,el=instance,ext_msg='rate_sensitivity_damage ('//LOCAL_DAMAGE_isoDuctile_LABEL//')')
|
||||
endif myPhase
|
||||
enddo sanityChecks
|
||||
|
||||
initializeInstances: do phase = 1_pInt, size(phase_damage)
|
||||
if (phase_damage(phase) == LOCAL_damage_isoDuctile_ID) then
|
||||
|
|
Loading…
Reference in New Issue