fixed bug in J2 related to new state.

make clean now deletes old marc compilations
This commit is contained in:
Martin Diehl 2014-07-23 08:23:56 +00:00
parent 42032cbc25
commit ab9f36cfe7
3 changed files with 18 additions and 20 deletions

View File

@ -514,4 +514,4 @@ clean:
@rm -rf *.o
@rm -rf *.mod
@rm -rf *.exe
@rm -rf *.marc

View File

@ -301,26 +301,28 @@ subroutine constitutive_j2_init(fileUnit)
case default
end select
if (mySize > 0_pInt) then ! any meaningful output found
outputFound: if (mySize > 0_pInt) then
constitutive_j2_sizePostResult(o,instance) = mySize
constitutive_j2_sizePostResults(instance) = &
constitutive_j2_sizePostResults(instance) + mySize
endif
endif outputFound
enddo outputsLoop
!--------------------------------------------------------------------------------------------------
! allocate state arrays
sizeState = 1_pInt
plasticState(phase)%sizeState = sizeState
sizeDotState = sizeState
plasticState(phase)%sizeState = sizeState
plasticState(phase)%sizeDotState = sizeDotState
plasticState(phase)%sizePostResults = constitutive_j2_sizePostResults(instance)
allocate(plasticState(phase)%aTolState (sizeState),source=constitutive_j2_aTolResistance(instance))
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase),source=constitutive_j2_tau0(instance))
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%state (sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%aTolState ( sizeState),&
source=constitutive_j2_aTolResistance(instance))
allocate(plasticState(phase)%state0 ( sizeState,NofMyPhase),&
source=constitutive_j2_tau0(instance))
allocate(plasticState(phase)%partionedState0 ( sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%subState0 ( sizeState,NofMyPhase),source=0.0_pReal)
allocate(plasticState(phase)%state ( 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_backup (sizeDotState,NofMyPhase),source=0.0_pReal)
if (any(numerics_integrator == 1_pInt)) then
@ -431,8 +433,6 @@ subroutine constitutive_j2_dotState(Tstar_v,ipc,ip,el)
phase_plasticityInstance
implicit none
real(pReal) :: &
tempState
real(pReal), dimension(6), intent(in):: &
Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
integer(pInt), intent(in) :: &
@ -487,13 +487,13 @@ subroutine constitutive_j2_dotState(Tstar_v,ipc,ip,el)
)
endif
hardening = ( constitutive_j2_h0(instance) + constitutive_j2_h0_slopeLnRate(instance) * log(gamma_dot) ) &
* abs( 1.0_pReal - tempState/saturation )**constitutive_j2_a(instance) &
* abs( 1.0_pReal - plasticState(ph)%state(1,of)/saturation )**constitutive_j2_a(instance) &
* sign(1.0_pReal, 1.0_pReal - plasticState(ph)%state(1,of)/saturation)
else
hardening = 0.0_pReal
endif
plasticState(ph)%dotState(1,of) = hardening * gamma_dot !!!!!!!!!!!!!check if dostate
plasticState(ph)%dotState(1,of) = hardening * gamma_dot
end subroutine constitutive_j2_dotState

View File

@ -505,16 +505,14 @@ subroutine constitutive_phenopowerlaw_init(fileUnit)
enddo outputsLoop
!--------------------------------------------------------------------------------------------------
! allocate state arrays
sizeState = constitutive_phenopowerlaw_totalNslip(instance)+ &
constitutive_phenopowerlaw_totalNtwin(instance)+ &
2_pInt + &
constitutive_phenopowerlaw_totalNslip(instance)+ &
constitutive_phenopowerlaw_totalNtwin(instance) ! s_slip, s_twin, sum(gamma), sum(f), accshear_slip, accshear_twin
sizeState = constitutive_phenopowerlaw_totalNslip(instance) * 2_pInt & ! s_slip, accshear_slip
+ constitutive_phenopowerlaw_totalNtwin(instance) * 2_pInt & ! s_twin, accshear_twin
+ 2_pInt ! sum(gamma) + sum(f)
sizeDotState = sizeState
plasticState(phase)%sizeState = sizeState
plasticState(phase)%sizeDotState = sizeDotState
plasticState(phase)%sizePostResults = constitutive_phenopowerlaw_sizePostResults(instance)
allocate(plasticState(phase)%aTolState ( sizeState), source=0.0_pReal)
allocate(plasticState(phase)%aTolState ( sizeState), source=0.0_pReal)
allocate(plasticState(phase)%state0 ( sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%partionedState0 ( sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 ( sizeState,NofMyPhase), source=0.0_pReal)