Corrected CPFEM: assignment of constitutive_state and _state0 consistent with homogenization_Ngrains (what is actually needed), instead of homogenization_maxMgrains

This commit is contained in:
Luc Hantcherli 2009-07-02 08:57:35 +00:00
parent 4aed2ade80
commit 1c35103524
1 changed files with 19 additions and 12 deletions

View File

@ -90,10 +90,12 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
use mesh, only: mesh_init, & use mesh, only: mesh_init, &
mesh_FEasCP, & mesh_FEasCP, &
mesh_NcpElems, & mesh_NcpElems, &
mesh_maxNips mesh_maxNips, &
mesh_element
use lattice, only: lattice_init use lattice, only: lattice_init
use material, only: material_init, & use material, only: material_init, &
homogenization_maxNgrains homogenization_maxNgrains, &
homogenization_Ngrains
use constitutive, only: constitutive_init,& use constitutive, only: constitutive_init,&
constitutive_state0,constitutive_state constitutive_state0,constitutive_state
use crystallite, only: crystallite_init, & use crystallite, only: crystallite_init, &
@ -142,6 +144,8 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
real(pReal), dimension (3,3,3,3) :: H, & real(pReal), dimension (3,3,3,3) :: H, &
H_sym H_sym
integer(pInt) cp_en, & ! crystal plasticity element number integer(pInt) cp_en, & ! crystal plasticity element number
e, &
g, &
i, & i, &
j, & j, &
k, & k, &
@ -196,15 +200,18 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
crystallite_F0 = crystallite_partionedF ! crystallite deformation (_subF is perturbed...) crystallite_F0 = crystallite_partionedF ! crystallite deformation (_subF is perturbed...)
crystallite_Fp0 = crystallite_Fp ! crystallite plastic deformation crystallite_Fp0 = crystallite_Fp ! crystallite plastic deformation
crystallite_Lp0 = crystallite_Lp ! crystallite plastic velocity crystallite_Lp0 = crystallite_Lp ! crystallite plastic velocity
forall ( i = 1:homogenization_maxNgrains, & do e = 1,mesh_NcpElems
j = 1:mesh_maxNips, & do g = 1,homogenization_Ngrains(mesh_element(3,e))
k = 1:mesh_NcpElems ) & do i = 1,mesh_maxNips
constitutive_state0(i,j,k)%p = constitutive_state(i,j,k)%p ! microstructure of crystallites constitutive_state0(g,i,e)%p = constitutive_state(g,i,e)%p ! microstructure of crystallites
write(6,'(a10,/,4(3(f10.3,x),/))') 'aged state',constitutive_state(1,1,1)%p/1e6 enddo
do j = 1,mesh_maxNips enddo
do k = 1,mesh_NcpElems enddo
if (homogenization_sizeState(j,k) > 0_pInt) & write(6,'(a10,/,4(3(f10.3,x),/))') 'aged state',constitutive_state(1,1,1)%p/1e6
homogenization_state0(j,k)%p = homogenization_state(j,k)%p ! internal state of homogenization scheme do e = 1,mesh_NcpElems
do i = 1,mesh_maxNips
if (homogenization_sizeState(i,e) > 0_pInt) &
homogenization_state0(i,e)%p = homogenization_state(i,e)%p ! internal state of homogenization scheme
enddo enddo
enddo enddo
endif endif