just a test
This commit is contained in:
parent
90195fe1c8
commit
3ef451824c
|
@ -116,7 +116,7 @@
|
|||
real(pReal) ffn(3,3), ffn1(3,3), Temperature, CPFEM_dt, CPFEM_stress(CPFEM_ngens), CPFEM_jaco(CPFEM_ngens,CPFEM_ngens)
|
||||
logical CPFEM_stress_recovery
|
||||
!
|
||||
|
||||
Temperature = 293.0_pReal
|
||||
! calculate only every second cycle
|
||||
if(mod(CPFEM_cn,2)==0) then
|
||||
! really calculate only in first call of new cycle and when in stress recovery
|
||||
|
@ -151,6 +151,7 @@ if(mod(CPFEM_cn,2)==0) then
|
|||
! this shall be done in a parallel loop in the future
|
||||
do e=1,mesh_NcpElems
|
||||
do i=1,FE_Nips(FE_mapElemtype(mesh_element(2,e)))
|
||||
write(6,*) 'Debut', e,i
|
||||
call CPFEM_stressIP(CPFEM_cn, CPFEM_dt, i, e)
|
||||
enddo
|
||||
enddo
|
||||
|
@ -329,8 +330,11 @@ if(mod(CPFEM_cn,2)==0) then
|
|||
real(pReal), dimension(6,6) :: dcs_de
|
||||
real(pReal), dimension(constitutive_Nstatevars(grain,CPFEM_in,cp_en)) :: state_old,state_new,state_pert
|
||||
|
||||
write(6,*)
|
||||
write(6,*) 'SOLUTION'
|
||||
call CPFEM_timeIntegration(msg,Fp_new,Fe_new,Tstar_v,state_new, & ! def gradients and PK2 at end of time step
|
||||
dt,cp_en,CPFEM_in,grain,Fg_new,Fp_old,state_old)
|
||||
|
||||
if (msg /= 'ok') return
|
||||
cs = CPFEM_CauchyStress(Tstar_v,Fe_new) ! Cauchy stress
|
||||
|
||||
|
@ -343,6 +347,8 @@ if(mod(CPFEM_cn,2)==0) then
|
|||
Fg_pert = Fg_new+matmul(E_pert,Fg_old) ! perturbated Fg
|
||||
Tstar_v_pert = Tstar_v ! initial guess from end of time step
|
||||
state_pert = state_new ! initial guess from end of time step
|
||||
write(6,*)
|
||||
write(6,*) 'CONSISTENT TANGENT', i
|
||||
call CPFEM_timeIntegration(msg,Fp_pert,Fe_pert,Tstar_v_pert,state_pert, &
|
||||
dt,cp_en,CPFEM_in,grain,Fg_pert,Fp_old,state_old)
|
||||
if (msg /= 'ok') then
|
||||
|
@ -354,6 +360,14 @@ if(mod(CPFEM_cn,2)==0) then
|
|||
enddo
|
||||
endif
|
||||
|
||||
write(6,*) 'OPERATEUR TANGENTE'
|
||||
write(6,*) dcs_de(1,:)
|
||||
write(6,*) dcs_de(2,:)
|
||||
write(6,*) dcs_de(3,:)
|
||||
write(6,*) dcs_de(4,:)
|
||||
write(6,*) dcs_de(5,:)
|
||||
write(6,*) dcs_de(6,:)
|
||||
|
||||
return
|
||||
|
||||
END SUBROUTINE
|
||||
|
@ -426,6 +440,7 @@ state: do ! outer iteration: state
|
|||
iStress = 0_pInt
|
||||
stress: do ! inner iteration: stress
|
||||
iStress = iStress+1
|
||||
write(6,*) 'istate,istress', istate, istress
|
||||
if (iStress > nStress) then ! too many loops required
|
||||
msg = 'limit stress iteration'
|
||||
return
|
||||
|
@ -447,6 +462,9 @@ stress: do ! inner iteration: stress
|
|||
dTstar_v=0.5*dTstar_v
|
||||
cycle
|
||||
endif
|
||||
write(6,*) 'Tstar_v', Tstar_v
|
||||
write(6,*) 'dTstar_v', dTstar_v
|
||||
!write(6,*) 'norm stress', maxval(abs(Rstress/maxval(abs(Tstar_v))))
|
||||
if (iStress > 1 .and. &
|
||||
(maxval(abs(Tstar_v)) < abstol_Stress .or. maxval(abs(Rstress/maxval(abs(Tstar_v)))) < reltol_Stress)) exit stress
|
||||
|
||||
|
@ -478,10 +496,9 @@ stress: do ! inner iteration: stress
|
|||
dTstar_v = matmul(invJacobi,Rstress) ! correction to Tstar
|
||||
Rstress_old=Rstress
|
||||
Tstar_v = Tstar_v-dTstar_v
|
||||
! write(999,*) Tstar_v, dTstar_v, Rstress
|
||||
|
||||
|
||||
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(CPFEM_in,cp_en),grain,CPFEM_in,cp_en) ! evolution of microstructure
|
||||
Rstate = state_new - (state_old+dstate)
|
||||
|
@ -489,10 +506,11 @@ stress: do ! inner iteration: stress
|
|||
forall (i=1:constitutive_Nstatevars(grain,CPFEM_in,cp_en), state_new(i)/=0.0_pReal) &
|
||||
RstateS(i) = Rstate(i)/state_new(i)
|
||||
state_new = state_old+dstate
|
||||
|
||||
write(6,*) 'norm state', maxval(abs(RstateS))
|
||||
if (maxval(abs(RstateS)) < reltol_State) exit state
|
||||
|
||||
enddo state
|
||||
! write(6,*) 'istate', istate
|
||||
! write(999,*) 'Tstar_v raus', Tstar_v
|
||||
! write(999,*)
|
||||
|
||||
|
|
Loading…
Reference in New Issue