CPFEM_Temperature is now a function of the element number and the integration point number

This commit is contained in:
Luc Hantcherli 2007-10-16 17:08:06 +00:00
parent ea65703f83
commit b0279435e3
1 changed files with 8 additions and 7 deletions

View File

@ -10,7 +10,7 @@
! ****************************************************************
! *** General variables for the material behaviour calculation ***
! ****************************************************************
real(pReal) CPFEM_Temperature
real(pReal), dimension (:,:), allocatable :: CPFEM_Temperature
real(pReal), dimension (:,:,:), allocatable :: CPFEM_stress_all
real(pReal), dimension (:,:,:,:), allocatable :: CPFEM_jacobi_all
real(pReal), dimension (:,:,:,:), allocatable :: CPFEM_ffn_all
@ -45,7 +45,7 @@
integer(pInt) e,i,g
!
! *** mpie.marc parameters ***
CPFEM_Temperature = 0.0_pReal
allocate(CPFEM_Temperature (mesh_maxNips,mesh_NcpElems)) ; CPFEM_Temperature = 0.0_pReal
allocate(CPFEM_ffn_all (3,3,mesh_maxNips,mesh_NcpElems)) ; CPFEM_ffn_all = 0.0_pReal
allocate(CPFEM_ffn1_all (3,3,mesh_maxNips,mesh_NcpElems)) ; CPFEM_ffn1_all = 0.0_pReal
allocate(CPFEM_stress_all( 6,mesh_maxNips,mesh_NcpElems)) ; CPFEM_stress_all = 0.0_pReal
@ -71,6 +71,7 @@
! *** Output to MARC output file ***
write(6,*)
write(6,*) 'Arrays allocated:'
write(6,*) 'CPFEM_Temperature: ', shape(CPFEM_Temperature)
write(6,*) 'CPFEM_ffn_all: ', shape(CPFEM_ffn_all)
write(6,*) 'CPFEM_ffn1_all: ', shape(CPFEM_ffn1_all)
write(6,*) 'CPFEM_stress_all: ', shape(CPFEM_stress_all)
@ -131,7 +132,7 @@
endif
cp_en = mesh_FEasCP('elem',CPFEM_en)
CPFEM_Temperature = Temperature
CPFEM_Temperature(CPFEM_in, cp_en) = Temperature
CPFEM_ffn_all(:,:,CPFEM_in, cp_en) = ffn
CPFEM_ffn1_all(:,:,CPFEM_in, cp_en) = ffn1
call CPFEM_stressIP(CPFEM_cn, CPFEM_dt, cp_en, CPFEM_in)
@ -241,7 +242,7 @@
endif
CPFEM_results(1:3,grain,CPFEM_in,cp_en) = math_RtoEuler(transpose(R))*inDeg ! orientation
CPFEM_results(4:3+constitutive_Nresults(grain,CPFEM_in,cp_en),grain,CPFEM_in,cp_en) = &
constitutive_post_results(Tstar_v,state(:,i_then),CPFEM_dt,CPFEM_Temperature,grain,CPFEM_in,cp_en)
constitutive_post_results(Tstar_v,state(:,i_then),CPFEM_dt,CPFEM_Temperature(CPFEM_in,cp_en),grain,CPFEM_in,cp_en)
! ---- contribute to IP result ----
volfrac = constitutive_matVolFrac(grain,CPFEM_in,cp_en)*constitutive_texVolFrac(grain,CPFEM_in,cp_en)
@ -385,7 +386,7 @@ state: do ! outer iteration: state
msg = 'limit state iteration'
return
endif
call constitutive_Microstructure(state_new,CPFEM_Temperature,grain,CPFEM_in,cp_en)
call constitutive_Microstructure(state_new,CPFEM_Temperature(CPFEM_in,cp_en),grain,CPFEM_in,cp_en)
iStress = 0_pInt
stress: do ! inner iteration: stress
iStress = iStress+1
@ -395,7 +396,7 @@ stress: do ! inner iteration: stress
endif
p_hydro=(Tstar_v(1)+Tstar_v(2)+Tstar_v(3))/3.0_pReal
forall(i=1:3) Tstar_v(i)=Tstar_v(i)-p_hydro
call constitutive_LpAndItsTangent(Lp,dLp,Tstar_v,state_new,CPFEM_Temperature,grain,CPFEM_in,cp_en)
call constitutive_LpAndItsTangent(Lp,dLp,Tstar_v,state_new,CPFEM_Temperature(CPFEM_in,cp_en),grain,CPFEM_in,cp_en)
B = math_I3-dt*Lp
! B = B / math_det3x3(B)**(1.0_pReal/3.0_pReal)
AB = matmul(A,B)
@ -446,7 +447,7 @@ stress: do ! inner iteration: stress
enddo stress
! write(6,*) 'istress', istress
Tstar_v = 0.5_pReal*matmul(C_66,math_Mandel33to6(matmul(transpose(B),AB)-math_I3))
dstate = dt*constitutive_dotState(Tstar_v,state_new,CPFEM_Temperature,grain,CPFEM_in,cp_en) ! evolution of microstructure
dstate = dt*constitutive_dotState(Tstar_v,state_new,CPFEM_Temperature(CPFEM_in,cp_en),grain,CPFEM_in,cp_en) ! evolution of microstructure
Rstate = state_new - (state_old+dstate)
RstateS = 0.0_pReal
forall (i=1:constitutive_Nstatevars(grain,CPFEM_in,cp_en), state_new(i)/=0.0_pReal) &