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
|
j = j + 1_pInt
|
||||||
c_reduced(k,j) = temp99_Real(n,m)
|
c_reduced(k,j) = temp99_Real(n,m)
|
||||||
endif; enddo; endif; enddo
|
endif; enddo; endif; enddo
|
||||||
|
|
||||||
call math_invert(size_reduced, c_reduced, s_reduced, errmatinv) ! invert reduced stiffness
|
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')
|
if(errmatinv) call IO_error(error_ID=400_pInt,ext_msg='utilities_maskedCompliance')
|
||||||
temp99_Real = 0.0_pReal ! fill up compliance with zeros
|
temp99_Real = 0.0_pReal ! fill up compliance with zeros
|
||||||
|
@ -917,7 +918,7 @@ end subroutine utilities_fourierVectorDivergence
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief calculates constitutive response
|
!> @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)
|
P,C_volAvg,C_minmaxAvg,P_av,forwardData,rotation_BC)
|
||||||
use debug, only: &
|
use debug, only: &
|
||||||
debug_reset, &
|
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)
|
min_dPdF_norm = sum(materialpoint_dPdF(1:3,1:3,1:3,1:3,1,k)**2.0_pReal)
|
||||||
endif
|
endif
|
||||||
end do
|
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,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)
|
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
|
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 MPI_Allreduce(MPI_IN_PLACE,C_volAvg,81,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr)
|
||||||
|
|
||||||
call debug_info()
|
call debug_info()
|
||||||
|
|
|
@ -438,20 +438,16 @@ subroutine crystallite_init
|
||||||
call crystallite_orientations()
|
call crystallite_orientations()
|
||||||
crystallite_orientation0 = crystallite_orientation ! store initial orientations for calculation of grain rotations
|
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)
|
!$OMP PARALLEL DO PRIVATE(myNgrains)
|
||||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
myNgrains = homogenization_Ngrains(mesh_element(3,e))
|
myNgrains = homogenization_Ngrains(mesh_element(3,e))
|
||||||
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
|
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
|
||||||
do g = 1_pInt,myNgrains
|
do g = 1_pInt,myNgrains
|
||||||
!***dirty way to pass orientation to constitutive module
|
!***dirty way to pass orientation to constitutive module
|
||||||
call constitutive_microstructure( &
|
call constitutive_microstructure(crystallite_orientation, &
|
||||||
crystallite_orientation, &
|
crystallite_Fe(1:3,1:3,g,i,e), &
|
||||||
crystallite_Fe(1:3,1:3,g,i,e), &
|
crystallite_Fp(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
|
||||||
g,i,e) ! update dependent state variables to be consistent with basic states
|
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
@ -654,8 +650,10 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
||||||
if (iand(debug_level(debug_crystallite),debug_levelSelective) /= 0_pInt &
|
if (iand(debug_level(debug_crystallite),debug_levelSelective) /= 0_pInt &
|
||||||
.and. FEsolving_execElem(1) <= debug_e &
|
.and. FEsolving_execElem(1) <= debug_e &
|
||||||
.and. debug_e <= FEsolving_execElem(2)) then
|
.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
|
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 ', &
|
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))
|
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', &
|
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))
|
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', &
|
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))
|
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
|
endif
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -673,7 +673,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
||||||
endif
|
endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
! calculate new subStep and new subFrac
|
! calculate new subStep and new subFrac
|
||||||
materialpoint_subFrac(i,e) = materialpoint_subFrac(i,e) + materialpoint_subStep(i,e)
|
materialpoint_subFrac(i,e) = materialpoint_subFrac(i,e) + materialpoint_subStep(i,e)
|
||||||
!$OMP FLUSH(materialpoint_subFrac)
|
!$OMP FLUSH(materialpoint_subFrac)
|
||||||
|
@ -686,18 +686,25 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
|
||||||
! wind forward grain starting point of...
|
! wind forward grain starting point of...
|
||||||
crystallite_partionedF0(1:3,1:3,1:myNgrains,i,e) = &
|
crystallite_partionedF0(1:3,1:3,1:myNgrains,i,e) = &
|
||||||
crystallite_partionedF(1:3,1:3,1:myNgrains,i,e) ! ...def grads
|
crystallite_partionedF(1:3,1:3,1:myNgrains,i,e) ! ...def grads
|
||||||
|
|
||||||
crystallite_partionedFp0(1:3,1:3,1:myNgrains,i,e) = &
|
crystallite_partionedFp0(1:3,1:3,1:myNgrains,i,e) = &
|
||||||
crystallite_Fp(1:3,1:3,1:myNgrains,i,e) ! ...plastic def grads
|
crystallite_Fp(1:3,1:3,1:myNgrains,i,e) ! ...plastic def grads
|
||||||
|
|
||||||
crystallite_partionedLp0(1:3,1:3,1:myNgrains,i,e) = &
|
crystallite_partionedLp0(1:3,1:3,1:myNgrains,i,e) = &
|
||||||
crystallite_Lp(1:3,1:3,1:myNgrains,i,e) ! ...plastic velocity grads
|
crystallite_Lp(1:3,1:3,1:myNgrains,i,e) ! ...plastic velocity grads
|
||||||
|
|
||||||
crystallite_partionedFi0(1:3,1:3,1:myNgrains,i,e) = &
|
crystallite_partionedFi0(1:3,1:3,1:myNgrains,i,e) = &
|
||||||
crystallite_Fi(1:3,1:3,1:myNgrains,i,e) ! ...intermediate def grads
|
crystallite_Fi(1:3,1:3,1:myNgrains,i,e) ! ...intermediate def grads
|
||||||
|
|
||||||
crystallite_partionedLi0(1:3,1:3,1:myNgrains,i,e) = &
|
crystallite_partionedLi0(1:3,1:3,1:myNgrains,i,e) = &
|
||||||
crystallite_Li(1:3,1:3,1:myNgrains,i,e) ! ...intermediate velocity grads
|
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_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_dPdF(1:3,1:3,1:3,1:3,1:myNgrains,i,e) ! ...stiffness
|
||||||
|
|
||||||
crystallite_partionedTstar0_v(1:6,1:myNgrains,i,e) = &
|
crystallite_partionedTstar0_v(1:6,1:myNgrains,i,e) = &
|
||||||
crystallite_Tstar_v(1:6,1:myNgrains,i,e) ! ...2nd PK stress
|
crystallite_Tstar_v(1:6,1:myNgrains,i,e) ! ...2nd PK stress
|
||||||
|
|
||||||
do g = 1,myNgrains
|
do g = 1,myNgrains
|
||||||
plasticState (mappingConstitutive(2,g,i,e))%partionedState0(:,mappingConstitutive(1,g,i,e)) = &
|
plasticState (mappingConstitutive(2,g,i,e))%partionedState0(:,mappingConstitutive(1,g,i,e)) = &
|
||||||
plasticState (mappingConstitutive(2,g,i,e))%state( :,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))
|
sourceState(mappingConstitutive(2,g,i,e))%p(mySource)%state( :,mappingConstitutive(1,g,i,e))
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
forall(i = FEsolving_execIP(1,e):FEsolving_execIP(2,e), &
|
||||||
homogState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
homogState(mappingHomogenization(2,i,e))%sizeState > 0_pInt) &
|
||||||
homogState(mappingHomogenization(2,i,e))%subState0(:,mappingHomogenization(1,i,e)) = &
|
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_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) &
|
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)
|
= sum(crystallite_dPdF(1:3,1:3,1:3,1:3,1:1,ip,el),5)
|
||||||
|
|
||||||
case (HOMOGENIZATION_ISOSTRAIN_ID) chosenHomogenization
|
case (HOMOGENIZATION_ISOSTRAIN_ID) chosenHomogenization
|
||||||
call homogenization_isostrain_averageStressAndItsTangent(&
|
call homogenization_isostrain_averageStressAndItsTangent(&
|
||||||
materialpoint_P(1:3,1:3,ip,el), &
|
materialpoint_P(1:3,1:3,ip,el), &
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
!> @author Chen Zhang, Michigan State University
|
!> @author Chen Zhang, Michigan State University
|
||||||
!> @brief material subroutine for phenomenological crystal plasticity formulation using a powerlaw
|
!> @brief material subroutine for phenomenological crystal plasticity formulation using a powerlaw
|
||||||
!! fitting
|
!... fitting
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module plastic_phenoplus
|
module plastic_phenoplus
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
|
@ -830,7 +830,7 @@ subroutine plastic_phenoplus_microstructure(orientation,ipc,ip,el)
|
||||||
ns = plastic_phenoplus_totalNslip(instance)
|
ns = plastic_phenoplus_totalNslip(instance)
|
||||||
nt = plastic_phenoplus_totalNtwin(instance)
|
nt = plastic_phenoplus_totalNtwin(instance)
|
||||||
offset_acshear_slip = ns + nt + 2_pInt
|
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
|
!***gather my accumulative shear from palsticState
|
||||||
findMyShear: do j = 1_pInt,ns
|
findMyShear: do j = 1_pInt,ns
|
||||||
|
@ -876,6 +876,7 @@ subroutine plastic_phenoplus_microstructure(orientation,ipc,ip,el)
|
||||||
2.0_pReal * &
|
2.0_pReal * &
|
||||||
(kappa_max - 1.0_pReal) * &
|
(kappa_max - 1.0_pReal) * &
|
||||||
(1.0_pReal - mprimeavg)
|
(1.0_pReal - mprimeavg)
|
||||||
|
|
||||||
enddo loopMySlip
|
enddo loopMySlip
|
||||||
|
|
||||||
end subroutine plastic_phenoplus_microstructure
|
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)* &
|
((abs(tau_slip_neg)/(plasticState(ph)%state(j, of)* &
|
||||||
plasticState(ph)%state(j+index_kappa, of))) & !?should we make it direction aware
|
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)
|
**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
|
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)
|
(gdot_slip_pos+gdot_slip_neg)*lattice_Sslip(1:3,1:3,1,index_myFamily+i,ph)
|
||||||
|
|
Loading…
Reference in New Issue