substate0 only needed for staggered state-stress integration

This commit is contained in:
Martin Diehl 2021-07-16 23:19:48 +02:00
parent 777620b800
commit fc735d6391
5 changed files with 14 additions and 26 deletions

View File

@ -545,10 +545,6 @@ subroutine crystallite_init()
phases => config_material%get('phase')
do ph = 1, phases%length
if (damageState(ph)%sizeState > 0) allocate(damageState(ph)%subState0,source=damageState(ph)%state0) ! ToDo: hack
enddo
print'(a42,1x,i10)', ' # of elements: ', eMax
print'(a42,1x,i10)', ' # of integration points/element: ', iMax
print'(a42,1x,i10)', 'max # of constituents/integration point: ', cMax

View File

@ -212,8 +212,8 @@ module function integrateDamageState(dt,co,ce) result(broken)
if(broken) return
size_so = damageState(ph)%sizeDotState
damageState(ph)%state(1:size_so,me) = damageState(ph)%subState0(1:size_so,me) &
+ damageState(ph)%dotState (1:size_so,me) * dt
damageState(ph)%state(1:size_so,me) = damageState(ph)%state0 (1:size_so,me) &
+ damageState(ph)%dotState(1:size_so,me) * dt
source_dotState(1:size_so,2) = 0.0_pReal
iteration: do NiterationState = 1, num%nState
@ -228,9 +228,9 @@ module function integrateDamageState(dt,co,ce) result(broken)
zeta = damper(damageState(ph)%dotState(:,me),source_dotState(1:size_so,1),source_dotState(1:size_so,2))
damageState(ph)%dotState(:,me) = damageState(ph)%dotState(:,me) * zeta &
+ source_dotState(1:size_so,1)* (1.0_pReal - zeta)
r(1:size_so) = damageState(ph)%state (1:size_so,me) &
- damageState(ph)%subState0(1:size_so,me) &
- damageState(ph)%dotState (1:size_so,me) * dt
r(1:size_so) = damageState(ph)%state (1:size_so,me) &
- damageState(ph)%State0 (1:size_so,me) &
- damageState(ph)%dotState(1:size_so,me) * dt
damageState(ph)%state(1:size_so,me) = damageState(ph)%state(1:size_so,me) - r(1:size_so)
converged_ = converged_ .and. converged(r(1:size_so), &
damageState(ph)%state(1:size_so,me), &

View File

@ -103,9 +103,8 @@ module subroutine isobrittle_deltaState(C, Fe, ph,me)
associate(prm => param(ph))
strainenergy = 2.0_pReal*dot_product(strain,matmul(C,strain))/prm%W_crit
damageState(ph)%deltaState(1,me) = merge(strainenergy - damageState(ph)%state(1,me), &
damageState(ph)%subState0(1,me) - damageState(ph)%state(1,me), &
strainenergy > damageState(ph)%subState0(1,me))
damageState(ph)%deltaState(1,me) = merge(strainenergy - damageState(ph)%state(1,me), 0.0_pReal, &
strainenergy > damageState(ph)%state(1,me))
end associate
end subroutine isobrittle_deltaState

View File

@ -197,8 +197,7 @@ module subroutine mechanical_init(materials,phases)
Nmembers
class(tNode), pointer :: &
num_crystallite, &
material, &
constituents, &
phase, &
mech
@ -1060,7 +1059,6 @@ module function phase_mechanical_constitutive(dt,co,ip,el) result(converged_)
enddo cutbackLooping
if (damageState(ph)%sizeState > 0) damageState(ph)%subState0(:,en) = damageState(ph)%state0(:,en)
converged_ = converged_ .and. .not. integrateDamageState(dt,co,(el-1)*discretization_nIPs + ip)
end function phase_mechanical_constitutive

View File

@ -38,16 +38,14 @@ module prec
sizeDotState = 0, & !< size of dot state, i.e. state(1:sizeDot) follows time evolution by dotState rates
offsetDeltaState = 0, & !< index offset of delta state
sizeDeltaState = 0 !< size of delta state, i.e. state(offset+1:offset+sizeDelta) follows time evolution by deltaState increments
! http://stackoverflow.com/questions/3948210
real(pReal), pointer, dimension(:), contiguous :: &
real(pReal), allocatable, dimension(:) :: &
atol
real(pReal), pointer, dimension(:,:), contiguous :: & ! a pointer is needed here because we might point to state/doState. However, they will never point to something, but are rather allocated and, hence, contiguous
! http://stackoverflow.com/questions/3948210
real(pReal), pointer, dimension(:,:), contiguous :: & !< is basically an allocatable+target, but in a type needs to be pointer
state0, &
state, & !< state
dotState, & !< rate of state change
deltaState !< increment of state change
real(pReal), allocatable, dimension(:,:) :: &
subState0
end type
type, extends(tState) :: tPlasticState
@ -61,12 +59,9 @@ module prec
real(pReal), private, parameter :: PREAL_EPSILON = epsilon(0.0_pReal) !< minimum positive number such that 1.0 + EPSILON /= 1.0.
real(pReal), private, parameter :: PREAL_MIN = tiny(0.0_pReal) !< smallest normalized floating point number
integer, dimension(0), parameter :: &
emptyIntArray = [integer::]
real(pReal), dimension(0), parameter :: &
emptyRealArray = [real(pReal)::]
character(len=pStringLen), dimension(0), parameter :: &
emptyStringArray = [character(len=pStringLen)::]
integer, dimension(0), parameter :: emptyIntArray = [integer::]
real(pReal), dimension(0), parameter :: emptyRealArray = [real(pReal)::]
character(len=pStringLen), dimension(0), parameter :: emptyStringArray = [character(len=pStringLen)::]
private :: &
selfTest