substate0 only needed for staggered state-stress integration
This commit is contained in:
parent
777620b800
commit
fc735d6391
|
@ -545,10 +545,6 @@ subroutine crystallite_init()
|
||||||
|
|
||||||
phases => config_material%get('phase')
|
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 elements: ', eMax
|
||||||
print'(a42,1x,i10)', ' # of integration points/element: ', iMax
|
print'(a42,1x,i10)', ' # of integration points/element: ', iMax
|
||||||
print'(a42,1x,i10)', 'max # of constituents/integration point: ', cMax
|
print'(a42,1x,i10)', 'max # of constituents/integration point: ', cMax
|
||||||
|
|
|
@ -212,7 +212,7 @@ module function integrateDamageState(dt,co,ce) result(broken)
|
||||||
if(broken) return
|
if(broken) return
|
||||||
|
|
||||||
size_so = damageState(ph)%sizeDotState
|
size_so = damageState(ph)%sizeDotState
|
||||||
damageState(ph)%state(1:size_so,me) = damageState(ph)%subState0(1:size_so,me) &
|
damageState(ph)%state(1:size_so,me) = damageState(ph)%state0 (1:size_so,me) &
|
||||||
+ damageState(ph)%dotState(1:size_so,me) * dt
|
+ damageState(ph)%dotState(1:size_so,me) * dt
|
||||||
source_dotState(1:size_so,2) = 0.0_pReal
|
source_dotState(1:size_so,2) = 0.0_pReal
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ module function integrateDamageState(dt,co,ce) result(broken)
|
||||||
damageState(ph)%dotState(:,me) = damageState(ph)%dotState(:,me) * zeta &
|
damageState(ph)%dotState(:,me) = damageState(ph)%dotState(:,me) * zeta &
|
||||||
+ source_dotState(1:size_so,1)* (1.0_pReal - zeta)
|
+ source_dotState(1:size_so,1)* (1.0_pReal - zeta)
|
||||||
r(1:size_so) = damageState(ph)%state (1:size_so,me) &
|
r(1:size_so) = damageState(ph)%state (1:size_so,me) &
|
||||||
- damageState(ph)%subState0(1:size_so,me) &
|
- damageState(ph)%State0 (1:size_so,me) &
|
||||||
- damageState(ph)%dotState(1:size_so,me) * dt
|
- 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)
|
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), &
|
converged_ = converged_ .and. converged(r(1:size_so), &
|
||||||
|
|
|
@ -103,9 +103,8 @@ module subroutine isobrittle_deltaState(C, Fe, ph,me)
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
strainenergy = 2.0_pReal*dot_product(strain,matmul(C,strain))/prm%W_crit
|
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)%deltaState(1,me) = merge(strainenergy - damageState(ph)%state(1,me), 0.0_pReal, &
|
||||||
damageState(ph)%subState0(1,me) - damageState(ph)%state(1,me), &
|
strainenergy > damageState(ph)%state(1,me))
|
||||||
strainenergy > damageState(ph)%subState0(1,me))
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
end subroutine isobrittle_deltaState
|
end subroutine isobrittle_deltaState
|
||||||
|
|
|
@ -197,8 +197,7 @@ module subroutine mechanical_init(materials,phases)
|
||||||
Nmembers
|
Nmembers
|
||||||
class(tNode), pointer :: &
|
class(tNode), pointer :: &
|
||||||
num_crystallite, &
|
num_crystallite, &
|
||||||
material, &
|
|
||||||
constituents, &
|
|
||||||
phase, &
|
phase, &
|
||||||
mech
|
mech
|
||||||
|
|
||||||
|
@ -1060,7 +1059,6 @@ module function phase_mechanical_constitutive(dt,co,ip,el) result(converged_)
|
||||||
|
|
||||||
enddo cutbackLooping
|
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)
|
converged_ = converged_ .and. .not. integrateDamageState(dt,co,(el-1)*discretization_nIPs + ip)
|
||||||
|
|
||||||
end function phase_mechanical_constitutive
|
end function phase_mechanical_constitutive
|
||||||
|
|
17
src/prec.f90
17
src/prec.f90
|
@ -38,16 +38,14 @@ module prec
|
||||||
sizeDotState = 0, & !< size of dot state, i.e. state(1:sizeDot) follows time evolution by dotState rates
|
sizeDotState = 0, & !< size of dot state, i.e. state(1:sizeDot) follows time evolution by dotState rates
|
||||||
offsetDeltaState = 0, & !< index offset of delta state
|
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
|
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), allocatable, dimension(:) :: &
|
||||||
real(pReal), pointer, dimension(:), contiguous :: &
|
|
||||||
atol
|
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, &
|
state0, &
|
||||||
state, & !< state
|
state, & !< state
|
||||||
dotState, & !< rate of state change
|
dotState, & !< rate of state change
|
||||||
deltaState !< increment of state change
|
deltaState !< increment of state change
|
||||||
real(pReal), allocatable, dimension(:,:) :: &
|
|
||||||
subState0
|
|
||||||
end type
|
end type
|
||||||
|
|
||||||
type, extends(tState) :: tPlasticState
|
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_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
|
real(pReal), private, parameter :: PREAL_MIN = tiny(0.0_pReal) !< smallest normalized floating point number
|
||||||
|
|
||||||
integer, dimension(0), parameter :: &
|
integer, dimension(0), parameter :: emptyIntArray = [integer::]
|
||||||
emptyIntArray = [integer::]
|
real(pReal), dimension(0), parameter :: emptyRealArray = [real(pReal)::]
|
||||||
real(pReal), dimension(0), parameter :: &
|
character(len=pStringLen), dimension(0), parameter :: emptyStringArray = [character(len=pStringLen)::]
|
||||||
emptyRealArray = [real(pReal)::]
|
|
||||||
character(len=pStringLen), dimension(0), parameter :: &
|
|
||||||
emptyStringArray = [character(len=pStringLen)::]
|
|
||||||
|
|
||||||
private :: &
|
private :: &
|
||||||
selfTest
|
selfTest
|
||||||
|
|
Loading…
Reference in New Issue