removed delta state for J2 and phenopowerlaw when using new state

This commit is contained in:
Martin Diehl 2014-06-17 06:54:49 +00:00
parent 98ec754cdf
commit 3533138936
4 changed files with 42 additions and 44 deletions

View File

@ -55,9 +55,7 @@ module constitutive
constitutive_LpAndItsTangent, & constitutive_LpAndItsTangent, &
constitutive_TandItsTangent, & constitutive_TandItsTangent, &
constitutive_collectDotState, & constitutive_collectDotState, &
#ifndef NEWSTATE
constitutive_collectDeltaState, & constitutive_collectDeltaState, &
#endif
constitutive_postResults constitutive_postResults
private :: & private :: &
@ -938,10 +936,10 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, Temperature,
end subroutine constitutive_collectDotState end subroutine constitutive_collectDotState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief contains the constitutive equation for calculating the incremental change of !> @brief for constitutive models having an instantaneous change of state (so far, only nonlocal)
!> microstructure based on the current stress and state !> will return false if delta state is not needed/supported by the constitutive model
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine constitutive_collectDeltaState(Tstar_v, ipc, ip, el) logical function constitutive_collectDeltaState(Tstar_v, ipc, ip, el)
use prec, only: & use prec, only: &
pLongInt pLongInt
use debug, only: & use debug, only: &
@ -978,6 +976,7 @@ subroutine constitutive_collectDeltaState(Tstar_v, ipc, ip, el)
select case (phase_plasticity(material_phase(ipc,ip,el))) select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_NONLOCAL_ID) case (PLASTICITY_NONLOCAL_ID)
constitutive_collectDeltaState = .true.
#ifdef NEWSTATE #ifdef NEWSTATE
call constitutive_nonlocal_deltaState(mappingConstitutive, Tstar_v,ipc,ip,el) call constitutive_nonlocal_deltaState(mappingConstitutive, Tstar_v,ipc,ip,el)
#else #else
@ -985,10 +984,8 @@ subroutine constitutive_collectDeltaState(Tstar_v, ipc, ip, el)
constitutive_state(ipc,ip,el), Tstar_v,ipc,ip,el) constitutive_state(ipc,ip,el), Tstar_v,ipc,ip,el)
#endif #endif
case default case default
#ifdef NEWSTATE constitutive_collectDeltaState = .false.
plasticState(mappingConstitutive(2,ipc,ip,el))%deltaState(:,mappingConstitutive(2,ipc,ip,el)) = & #ifndef NEWSTATE
0.0_pReal
#else
constitutive_deltaState(ipc,ip,el)%p = 0.0_pReal !ToDo: needed or will it remain zero anyway? constitutive_deltaState(ipc,ip,el)%p = 0.0_pReal !ToDo: needed or will it remain zero anyway?
#endif #endif
end select end select
@ -1003,7 +1000,9 @@ subroutine constitutive_collectDeltaState(Tstar_v, ipc, ip, el)
!$OMP END CRITICAL (debugTimingDeltaState) !$OMP END CRITICAL (debugTimingDeltaState)
endif endif
end subroutine constitutive_collectDeltaState end function constitutive_collectDeltaState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief returns array of constitutive results !> @brief returns array of constitutive results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -322,7 +322,6 @@ subroutine constitutive_j2_init(fileUnit)
allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase),source=0.0_pReal) allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%aTolState (NofMyPhase),source=constitutive_j2_aTolResistance(instance)) allocate(plasticState(phase)%aTolState (NofMyPhase),source=constitutive_j2_aTolResistance(instance))
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase),source=0.0_pReal) allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDotState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase),source=0.0_pReal) allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase),source=0.0_pReal)
if (any(numerics_integrator == 1_pInt)) then if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase),source=0.0_pReal) allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase),source=0.0_pReal)

View File

@ -516,7 +516,6 @@ allocate(constitutive_phenopowerlaw_sizePostResults(maxNinstance),
allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal) allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal) allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState_backup(sizeDotState,NofMyPhase), source=0.0_pReal) allocate(plasticState(phase)%dotState_backup(sizeDotState,NofMyPhase), source=0.0_pReal)
if (any(numerics_integrator == 1_pInt)) then if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase),source=0.0_pReal) allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase),source=0.0_pReal)

View File

@ -3339,6 +3339,7 @@ end subroutine crystallite_integrateStateFPI
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief calculates a jump in the state according to the current state and the current stress !> @brief calculates a jump in the state according to the current state and the current stress
!> returns true, if state jump was successfull or not needed. false indicates NaN in delta state
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
logical function crystallite_stateJump(g,i,e) logical function crystallite_stateJump(g,i,e)
use debug, only: & use debug, only: &
@ -3361,8 +3362,8 @@ logical function crystallite_stateJump(g,i,e)
#endif #endif
homogenization_Ngrains homogenization_Ngrains
use constitutive, only: & use constitutive, only: &
#ifndef NEWSTATE
constitutive_collectDeltaState, & constitutive_collectDeltaState, &
#ifndef NEWSTATE
constitutive_sizeDotState, & constitutive_sizeDotState, &
constitutive_state, & constitutive_state, &
constitutive_deltaState constitutive_deltaState
@ -3380,14 +3381,12 @@ logical function crystallite_stateJump(g,i,e)
mySizeDotState mySizeDotState
crystallite_stateJump = .false. if (constitutive_collectDeltaState(crystallite_Tstar_v(1:6,g,i,e), g,i,e)) then
#ifndef NEWSTATE
call constitutive_collectDeltaState(crystallite_Tstar_v(1:6,g,i,e), g,i,e)
#endif
#ifdef NEWSTATE #ifdef NEWSTATE
mySizeDotState = plasticState(mappingConstitutive(2,g,i,e))%sizeDotState mySizeDotState = plasticState(mappingConstitutive(2,g,i,e))%sizeDotState
if( any(plasticState(mappingConstitutive(2,g,i,e))%deltaState(:,mappingConstitutive(1,g,i,e)) & if( any(plasticState(mappingConstitutive(2,g,i,e))%deltaState(:,mappingConstitutive(1,g,i,e)) &
/= plasticState(mappingConstitutive(2,g,i,e))%deltaState(:,mappingConstitutive(1,g,i,e)))) then ! NaN occured in dotState /= plasticState(mappingConstitutive(2,g,i,e))%deltaState(:,mappingConstitutive(1,g,i,e)))) then ! NaN occured in deltaState
crystallite_stateJump = .false.
return return
endif endif
plasticState(mappingConstitutive(2,g,i,e))%state(1:mySizeDotState,mappingConstitutive(1,g,i,e)) = & plasticState(mappingConstitutive(2,g,i,e))%state(1:mySizeDotState,mappingConstitutive(1,g,i,e)) = &
@ -3397,6 +3396,7 @@ logical function crystallite_stateJump(g,i,e)
mySizeDotState = constitutive_sizeDotState(g,i,e) mySizeDotState = constitutive_sizeDotState(g,i,e)
if (any(constitutive_deltaState(g,i,e)%p(1:mySizeDotState) & if (any(constitutive_deltaState(g,i,e)%p(1:mySizeDotState) &
/= constitutive_deltaState(g,i,e)%p(1:mySizeDotState))) then /= constitutive_deltaState(g,i,e)%p(1:mySizeDotState))) then
crystallite_stateJump = .false.
return return
endif endif
@ -3414,6 +3414,7 @@ logical function crystallite_stateJump(g,i,e)
endif endif
#endif #endif
#endif #endif
endif
crystallite_stateJump = .true. crystallite_stateJump = .true.