added pheno+ module
modify crystallite microstructure call to pass orientations
This commit is contained in:
parent
121c471455
commit
484a34b7f1
|
@ -819,6 +819,7 @@ function utilities_maskedCompliance(rot_BC,mask_stress,C)
|
|||
j = j + 1_pInt
|
||||
c_reduced(k,j) = temp99_Real(n,m)
|
||||
endif; enddo; endif; enddo
|
||||
|
||||
call math_invert(size_reduced, c_reduced, s_reduced, errmatinv) ! invert reduced stiffness
|
||||
if(errmatinv) call IO_error(error_ID=400_pInt,ext_msg='utilities_maskedCompliance')
|
||||
temp99_Real = 0.0_pReal ! fill up compliance with zeros
|
||||
|
@ -917,7 +918,7 @@ end subroutine utilities_fourierVectorDivergence
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief calculates constitutive response
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine utilities_constitutiveResponse(F_lastInc,F,timeinc,&
|
||||
subroutine utilities_constitutiveResponse(F_lastInc,F,timeinc, &
|
||||
P,C_volAvg,C_minmaxAvg,P_av,forwardData,rotation_BC)
|
||||
use debug, only: &
|
||||
debug_reset, &
|
||||
|
@ -1022,11 +1023,13 @@ subroutine utilities_constitutiveResponse(F_lastInc,F,timeinc,&
|
|||
min_dPdF_norm = sum(materialpoint_dPdF(1:3,1:3,1:3,1:3,1,k)**2.0_pReal)
|
||||
endif
|
||||
end do
|
||||
|
||||
call MPI_Allreduce(MPI_IN_PLACE,max_dPdF,81,MPI_DOUBLE,MPI_MAX,PETSC_COMM_WORLD,ierr)
|
||||
call MPI_Allreduce(MPI_IN_PLACE,min_dPdF,81,MPI_DOUBLE,MPI_MIN,PETSC_COMM_WORLD,ierr)
|
||||
C_minmaxAvg = 0.5_pReal*(max_dPdF + min_dPdF)
|
||||
|
||||
C_minmaxAvg = 0.5_pReal*(max_dPdF + min_dPdF)
|
||||
C_volAvg = sum(sum(materialpoint_dPdF,dim=6),dim=5) * wgt
|
||||
|
||||
call MPI_Allreduce(MPI_IN_PLACE,C_volAvg,81,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
||||
|
||||
call debug_info()
|
||||
|
|
|
@ -438,20 +438,16 @@ subroutine crystallite_init
|
|||
call crystallite_orientations()
|
||||
crystallite_orientation0 = crystallite_orientation ! store initial orientations for calculation of grain rotations
|
||||
|
||||
!***some debugging statement here
|
||||
!write(6,*) 'CZ: before crystallite initialization'
|
||||
|
||||
!$OMP PARALLEL DO PRIVATE(myNgrains)
|
||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||
myNgrains = homogenization_Ngrains(mesh_element(3,e))
|
||||
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
|
||||
do g = 1_pInt,myNgrains
|
||||
!***dirty way to pass orientation to constitutive module
|
||||
call constitutive_microstructure( &
|
||||
crystallite_orientation, &
|
||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||
g,i,e) ! update dependent state variables to be consistent with basic states
|
||||
call constitutive_microstructure(crystallite_orientation, &
|
||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||
g,i,e) ! update dependent state variables to be consistent with basic states
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
@ -654,8 +650,10 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
if (iand(debug_level(debug_crystallite),debug_levelSelective) /= 0_pInt &
|
||||
.and. FEsolving_execElem(1) <= debug_e &
|
||||
.and. debug_e <= FEsolving_execElem(2)) then
|
||||
write(6,'(/,a,i8,1x,a,i8,a,1x,i2,1x,i3)') '<< CRYST >> values at el (elFE) ip g ', &
|
||||
write(6,'(/,a,i8,1x,a,i8,a,1x,i2,1x,i3)') '<< CRYST >> boundary values at el (elFE) ip g ', &
|
||||
debug_e,'(',mesh_element(1,debug_e), ')',debug_i, debug_g
|
||||
write(6,'(a,/,3(12x,3(f14.9,1x)/))') '<< CRYST >> F ', &
|
||||
math_transpose33(crystallite_partionedF(1:3,1:3,debug_g,debug_i,debug_e))
|
||||
write(6,'(a,/,3(12x,3(f14.9,1x)/))') '<< CRYST >> F0 ', &
|
||||
math_transpose33(crystallite_partionedF0(1:3,1:3,debug_g,debug_i,debug_e))
|
||||
write(6,'(a,/,3(12x,3(f14.9,1x)/))') '<< CRYST >> Fp0', &
|
||||
|
@ -666,8 +664,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
math_transpose33(crystallite_partionedLp0(1:3,1:3,debug_g,debug_i,debug_e))
|
||||
write(6,'(a,/,3(12x,3(f14.9,1x)/))') '<< CRYST >> Li0', &
|
||||
math_transpose33(crystallite_partionedLi0(1:3,1:3,debug_g,debug_i,debug_e))
|
||||
write(6,'(a,/,3(12x,3(f14.9,1x)/))') '<< CRYST >> F ', &
|
||||
math_transpose33(crystallite_partionedF(1:3,1:3,debug_g,debug_i,debug_e))
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -673,7 +673,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
|||
endif
|
||||
#endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!---------------------------------------------------------------------------------------------------
|
||||
! calculate new subStep and new subFrac
|
||||
materialpoint_subFrac(i,e) = materialpoint_subFrac(i,e) + materialpoint_subStep(i,e)
|
||||
!$OMP FLUSH(materialpoint_subFrac)
|
||||
|
@ -686,18 +686,25 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
|||
! wind forward grain starting point of...
|
||||
crystallite_partionedF0(1:3,1:3,1:myNgrains,i,e) = &
|
||||
crystallite_partionedF(1:3,1:3,1:myNgrains,i,e) ! ...def grads
|
||||
|
||||
crystallite_partionedFp0(1:3,1:3,1:myNgrains,i,e) = &
|
||||
crystallite_Fp(1:3,1:3,1:myNgrains,i,e) ! ...plastic def grads
|
||||
|
||||
crystallite_partionedLp0(1:3,1:3,1:myNgrains,i,e) = &
|
||||
crystallite_Lp(1:3,1:3,1:myNgrains,i,e) ! ...plastic velocity grads
|
||||
|
||||
crystallite_partionedFi0(1:3,1:3,1:myNgrains,i,e) = &
|
||||
crystallite_Fi(1:3,1:3,1:myNgrains,i,e) ! ...intermediate def grads
|
||||
|
||||
crystallite_partionedLi0(1:3,1:3,1:myNgrains,i,e) = &
|
||||
crystallite_Li(1:3,1:3,1:myNgrains,i,e) ! ...intermediate velocity grads
|
||||
|
||||
crystallite_partioneddPdF0(1:3,1:3,1:3,1:3,1:myNgrains,i,e) = &
|
||||
crystallite_dPdF(1:3,1:3,1:3,1:3,1:myNgrains,i,e) ! ...stiffness
|
||||
|
||||
crystallite_partionedTstar0_v(1:6,1:myNgrains,i,e) = &
|
||||
crystallite_Tstar_v(1:6,1:myNgrains,i,e) ! ...2nd PK stress
|
||||
|
||||
do g = 1,myNgrains
|
||||
plasticState (mappingConstitutive(2,g,i,e))%partionedState0(:,mappingConstitutive(1,g,i,e)) = &
|
||||
plasticState (mappingConstitutive(2,g,i,e))%state( :,mappingConstitutive(1,g,i,e))
|
||||
|
@ -706,6 +713,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
|||
sourceState(mappingConstitutive(2,g,i,e))%p(mySource)%state( :,mappingConstitutive(1,g,i,e))
|
||||
enddo
|
||||
enddo
|
||||
|
||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||
homogState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||
homogState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
||||
|
@ -1225,6 +1233,7 @@ subroutine homogenization_averageStressAndItsTangent(ip,el)
|
|||
materialpoint_P(1:3,1:3,ip,el) = sum(crystallite_P(1:3,1:3,1:1,ip,el),3)
|
||||
materialpoint_dPdF(1:3,1:3,1:3,1:3,ip,el) &
|
||||
= sum(crystallite_dPdF(1:3,1:3,1:3,1:3,1:1,ip,el),5)
|
||||
|
||||
case (HOMOGENIZATION_ISOSTRAIN_ID) chosenHomogenization
|
||||
call homogenization_isostrain_averageStressAndItsTangent(&
|
||||
materialpoint_P(1:3,1:3,ip,el), &
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
||||
!> @author Chen Zhang, Michigan State University
|
||||
!> @brief material subroutine for phenomenological crystal plasticity formulation using a powerlaw
|
||||
!! fitting
|
||||
!... fitting
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module plastic_phenoplus
|
||||
use prec, only: &
|
||||
|
@ -830,7 +830,7 @@ subroutine plastic_phenoplus_microstructure(orientation,ipc,ip,el)
|
|||
ns = plastic_phenoplus_totalNslip(instance)
|
||||
nt = plastic_phenoplus_totalNtwin(instance)
|
||||
offset_acshear_slip = ns + nt + 2_pInt
|
||||
kappa_max = ns + nt + 2_pInt + ns + nt !location of kappa in plasticState
|
||||
index_kappa = ns + nt + 2_pInt + ns + nt !location of kappa in plasticState
|
||||
|
||||
!***gather my accumulative shear from palsticState
|
||||
findMyShear: do j = 1_pInt,ns
|
||||
|
@ -876,6 +876,7 @@ subroutine plastic_phenoplus_microstructure(orientation,ipc,ip,el)
|
|||
2.0_pReal * &
|
||||
(kappa_max - 1.0_pReal) * &
|
||||
(1.0_pReal - mprimeavg)
|
||||
|
||||
enddo loopMySlip
|
||||
|
||||
end subroutine plastic_phenoplus_microstructure
|
||||
|
@ -980,6 +981,14 @@ subroutine plastic_phenoplus_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,ipc,ip,el)
|
|||
((abs(tau_slip_neg)/(plasticState(ph)%state(j, of)* &
|
||||
plasticState(ph)%state(j+index_kappa, of))) & !?should we make it direction aware
|
||||
**plastic_phenoplus_n_slip(instance))*sign(1.0_pReal,tau_slip_neg)
|
||||
!***in case for future use
|
||||
! gdot_slip_pos = 0.5_pReal*plastic_phenoplus_gdot0_slip(instance)* &
|
||||
! ((abs(tau_slip_pos)/(plasticState(ph)%state(j, of))) & !in-place modification of gdot
|
||||
! **plastic_phenoplus_n_slip(instance))*sign(1.0_pReal,tau_slip_pos)
|
||||
|
||||
! gdot_slip_neg = 0.5_pReal*plastic_phenoplus_gdot0_slip(instance)* &
|
||||
! ((abs(tau_slip_neg)/(plasticState(ph)%state(j, of))) & !?should we make it direction aware
|
||||
! **plastic_phenoplus_n_slip(instance))*sign(1.0_pReal,tau_slip_neg)
|
||||
|
||||
Lp = Lp + (1.0_pReal-plasticState(ph)%state(index_F,of))*& ! 1-F
|
||||
(gdot_slip_pos+gdot_slip_neg)*lattice_Sslip(1:3,1:3,1,index_myFamily+i,ph)
|
||||
|
|
Loading…
Reference in New Issue