again corrections. but this version must work.
This commit is contained in:
parent
414050303b
commit
9026cc4016
|
@ -86,6 +86,7 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
cycleCounter, &
|
||||
theInc, &
|
||||
theTime, &
|
||||
theDelta, &
|
||||
FEsolving_execElem, &
|
||||
FEsolving_execIP
|
||||
use math, only: math_init, &
|
||||
|
@ -98,7 +99,9 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
use mesh, only: mesh_init, &
|
||||
mesh_FEasCP, &
|
||||
mesh_NcpElems, &
|
||||
mesh_maxNips
|
||||
mesh_maxNips, &
|
||||
mesh_element, &
|
||||
FE_Nips
|
||||
use lattice, only: lattice_init
|
||||
use material, only: material_init, &
|
||||
homogenization_maxNgrains, &
|
||||
|
@ -107,8 +110,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
constitutive_state0,constitutive_state
|
||||
use crystallite, only: crystallite_init, &
|
||||
crystallite_F0, &
|
||||
crystallite_rexParm, &
|
||||
crystallite_critVal, &
|
||||
crystallite_partionedF, &
|
||||
crystallite_Fp0, &
|
||||
crystallite_Fp, &
|
||||
|
@ -163,7 +164,8 @@ subroutine CPFEM_general(mode, ffn, ffn1, Temperature, dt, element, IP, cauchySt
|
|||
k, &
|
||||
l, &
|
||||
m, &
|
||||
n
|
||||
n, &
|
||||
e
|
||||
logical updateJaco ! flag indicating if JAcobian has to be updated
|
||||
|
||||
!*** global variables ***!
|
||||
|
|
|
@ -310,7 +310,7 @@ return
|
|||
endfunction
|
||||
|
||||
|
||||
subroutine constitutive_microstructure(Temperature,Fe,Fp,ipc,ip,el)
|
||||
subroutine constitutive_microstructure(Temperature,Tstar_v,Fe,Fp,ipc,ip,el)
|
||||
!*********************************************************************
|
||||
!* This function calculates from state needed variables *
|
||||
!* INPUT: *
|
||||
|
|
|
@ -1230,9 +1230,17 @@ integer(pInt) myInstance, & ! current
|
|||
neighboring_ip, & ! integration point of my neighbor
|
||||
c, & ! character of dislocation
|
||||
n, & ! index of my current neighbor
|
||||
opposite_n, & ! index of my opposite neighbor
|
||||
opposite_ip, & ! ip of my opposite neighbor
|
||||
opposite_el, & ! element index of my opposite neighbor
|
||||
t, & ! type of dislocation
|
||||
s, & ! index of my current slip system
|
||||
sLattice ! index of my current slip system according to lattice order
|
||||
real(pReal), dimension(constitutive_nonlocal_totalNslip(phase_constitutionInstance(material_phase(g,ip,el))),8) :: &
|
||||
rhoSgl, & ! current single dislocation densities (positive/negative screw and edge without dipoles)
|
||||
previousRhoSgl, & ! previous single dislocation densities (positive/negative screw and edge without dipoles)
|
||||
totalRhoDotSgl, & ! total rate of change of single dislocation densities
|
||||
thisRhoDotSgl ! rate of change of single dislocation densities for this mechanism
|
||||
real(pReal), dimension(constitutive_nonlocal_totalNslip(phase_constitutionInstance(material_phase(g,ip,el))),4) :: &
|
||||
fluxdensity, & ! flux density at central material point
|
||||
neighboring_fluxdensity, &! flux density at neighbroing material point
|
||||
|
|
|
@ -291,8 +291,7 @@ subroutine crystallite_init(Temperature)
|
|||
write(6,'(a35,x,7(i5,x))') 'crystallite_subTstar0_v: ', shape(crystallite_subTstar0_v)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_dPdF: ', shape(crystallite_dPdF)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_fallbackdPdF: ', shape(crystallite_fallbackdPdF)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_R: ', shape(crystallite_R)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_eulerangles: ', shape(crystallite_eulerangles)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_orientation: ', shape(crystallite_orientation)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_misorientation: ', shape(crystallite_misorientation)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_dt: ', shape(crystallite_dt)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_subdt: ', shape(crystallite_subdt)
|
||||
|
@ -300,11 +299,12 @@ subroutine crystallite_init(Temperature)
|
|||
write(6,'(a35,x,7(i5,x))') 'crystallite_subStep: ', shape(crystallite_subStep)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_localConstitution: ', shape(crystallite_localConstitution)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_requested: ', shape(crystallite_requested)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_onTrack: ', shape(crystallite_onTrack)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_todo: ', shape(crystallite_todo)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_converged: ', shape(crystallite_converged)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_stateConverged: ', shape(crystallite_stateConverged)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_temperatureConverged: ', shape(crystallite_temperatureConverged)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_todo: ', shape(crystallite_todo)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_sizePostResults: ', shape(crystallite_sizePostResults)
|
||||
write(6,'(a35,x,7(i5,x))') 'crystallite_sizePostResult: ', shape(crystallite_sizePostResult)
|
||||
write(6,*)
|
||||
write(6,*) 'Number of nonlocal grains: ',count(.not. crystallite_localConstitution)
|
||||
call flush(6)
|
||||
|
@ -333,8 +333,14 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
pert_Fg, &
|
||||
pert_method, &
|
||||
nState, &
|
||||
nCryst
|
||||
nCryst, &
|
||||
iJacoStiffness
|
||||
use debug, only: debugger, &
|
||||
selectiveDebugger, &
|
||||
verboseDebugger, &
|
||||
debug_e, &
|
||||
debug_i, &
|
||||
debug_g, &
|
||||
debug_CrystalliteLoopDistribution, &
|
||||
debug_CrystalliteStateLoopDistribution, &
|
||||
debug_StiffnessStateLoopDistribution
|
||||
|
@ -345,8 +351,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
math_Mandel6to33, &
|
||||
math_Mandel33to6, &
|
||||
math_I3, &
|
||||
math_Plain3333to99, &
|
||||
math_EulerToR
|
||||
math_Plain3333to99
|
||||
use FEsolving, only: FEsolving_execElem, &
|
||||
FEsolving_execIP, &
|
||||
theInc, &
|
||||
|
@ -380,8 +385,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
|
||||
!*** local variables ***!
|
||||
real(pReal) myTemperature, & ! local copy of the temperature
|
||||
myPert, & ! perturbation with correct sign
|
||||
rexCritStrain ! perturbation with correct sign
|
||||
myPert ! perturbation with correct sign
|
||||
real(pReal), dimension(3,3) :: invFp, & ! inverse of the plastic deformation gradient
|
||||
Fe_guess, & ! guess for elastic deformation gradient
|
||||
Tstar ! 2nd Piola-Kirchhoff stress tensor
|
||||
|
@ -397,7 +401,8 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
myNgrains, &
|
||||
mySizeState, &
|
||||
mySizeDotState
|
||||
integer(pInt), dimension(2,9) :: kl
|
||||
integer(pInt), dimension(2,9,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
|
||||
kl
|
||||
logical onTrack, & ! flag indicating whether we are still on track
|
||||
temperatureConverged, & ! flag indicating if temperature converged
|
||||
stateConverged, & ! flag indicating if state converged
|
||||
|
@ -407,7 +412,8 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
real(pReal), dimension(constitutive_maxSizeDotState) :: delta_dotState1, & ! difference between current and previous dotstate
|
||||
delta_dotState2 ! difference between previousDotState and previousDotState2
|
||||
real(pReal) dot_prod12, &
|
||||
dot_prod22
|
||||
dot_prod22, &
|
||||
formerSubStep
|
||||
real(pReal), dimension(3,3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
|
||||
storedF, &
|
||||
storedFp, &
|
||||
|
@ -426,6 +432,9 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
logical, dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
|
||||
storedConvergenceFlag
|
||||
logical, dimension(3,3) :: mask
|
||||
logical forceLocalStiffnessCalculation ! flag indicating that stiffness calculation is always done locally
|
||||
forceLocalStiffnessCalculation = .false.
|
||||
|
||||
|
||||
! ------ initialize to starting condition ------
|
||||
|
||||
|
@ -452,7 +461,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
crystallite_subFp0(:,:,g,i,e) = crystallite_partionedFp0(:,:,g,i,e) ! ...plastic def grad
|
||||
crystallite_subLp0(:,:,g,i,e) = crystallite_partionedLp0(:,:,g,i,e) ! ...plastic velocity grad
|
||||
crystallite_subF0(:,:,g,i,e) = crystallite_partionedF0(:,:,g,i,e) ! ...def grad
|
||||
crystallite_subTstar0_v(:,g,i,e) = crystallite_partionedTstar0_v(:,g,i,e) ! ...2nd PK stress
|
||||
crystallite_subTstar0_v(:,g,i,e) = crystallite_partionedTstar0_v(:,g,i,e) !...2nd PK stress
|
||||
|
||||
crystallite_subFrac(g,i,e) = 0.0_pReal
|
||||
crystallite_subStep(g,i,e) = 1.0_pReal/subStepSizeCryst
|
||||
|
@ -464,6 +473,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
|
|||
enddo
|
||||
!$OMPEND PARALLEL DO
|
||||
|
||||
|
||||
! --+>> crystallite loop <<+--
|
||||
|
||||
NiterationCrystallite = 0_pInt
|
||||
|
|
|
@ -48,14 +48,14 @@ subroutine homogenization_RGC_init(&
|
|||
)
|
||||
|
||||
use prec, only: pInt, pReal
|
||||
use math, only: math_Mandel3333to66, math_Voigt66to3333
|
||||
use mesh, only: mesh_maxNips,mesh_NcpElems
|
||||
use math, only: math_Mandel3333to66, math_Voigt66to3333,math_I3,math_sampleRandomOri,math_EulerToR,inRad
|
||||
use mesh, only: mesh_maxNips,mesh_NcpElems,mesh_element,FE_Nips
|
||||
use IO
|
||||
use material
|
||||
integer(pInt), intent(in) :: file
|
||||
integer(pInt), parameter :: maxNchunks = 4
|
||||
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
||||
integer(pInt) section, maxNinstance, i,j,k,l, output, mySize
|
||||
integer(pInt) section, maxNinstance, i,j,k,l,e, output, mySize, myInstance
|
||||
character(len=64) tag
|
||||
character(len=1024) line
|
||||
|
||||
|
@ -69,14 +69,14 @@ subroutine homogenization_RGC_init(&
|
|||
|
||||
allocate(homogenization_RGC_sizeState(maxNinstance)); homogenization_RGC_sizeState = 0_pInt
|
||||
allocate(homogenization_RGC_sizePostResults(maxNinstance)); homogenization_RGC_sizePostResults = 0_pInt
|
||||
allocate(homogenization_RGC_sizePostResult(maxval(homogenization_Noutput), &
|
||||
maxNinstance)); homogenization_RGC_sizePostResult = 0_pInt
|
||||
allocate(homogenization_RGC_Ngrains(3,maxNinstance)); homogenization_RGC_Ngrains = 0_pInt
|
||||
allocate(homogenization_RGC_ciAlpha(maxNinstance)); homogenization_RGC_ciAlpha = 0.0_pReal
|
||||
allocate(homogenization_RGC_xiAlpha(maxNinstance)); homogenization_RGC_xiAlpha = 0.0_pReal
|
||||
allocate(homogenization_RGC_dAlpha(3,maxNinstance)); homogenization_RGC_dAlpha = 0.0_pReal
|
||||
allocate(homogenization_RGC_angles(3,maxNinstance)); homogenization_RGC_angles = 400.0_pReal
|
||||
allocate(homogenization_RGC_output(maxval(homogenization_Noutput),maxNinstance)); homogenization_RGC_output = ''
|
||||
allocate(homogenization_RGC_sizePostResult(maxval(homogenization_Noutput),maxNinstance))
|
||||
homogenization_RGC_sizePostResult = 0_pInt
|
||||
allocate(homogenization_RGC_orientation(3,3,mesh_maxNips,mesh_NcpElems))
|
||||
forall (i = 1:mesh_maxNips,e = 1:mesh_NcpElems)
|
||||
homogenization_RGC_orientation(:,:,i,e) = math_I3
|
||||
|
@ -148,10 +148,6 @@ subroutine homogenization_RGC_init(&
|
|||
enddo
|
||||
|
||||
100 do i = 1,maxNinstance ! sanity checks
|
||||
write(6,*)
|
||||
write(6,*) '<<<+- homogenization_RGC init -+>>>'
|
||||
write(6,*) '$Id$'
|
||||
write(6,*)
|
||||
write(6,'(a15,x,i4)') 'instance: ', i
|
||||
write(6,*)
|
||||
write(6,'(a25,3(x,i8))') 'cluster size: ',(homogenization_RGC_Ngrains(j,i),j=1,3)
|
||||
|
@ -187,6 +183,8 @@ subroutine homogenization_RGC_init(&
|
|||
endif
|
||||
enddo
|
||||
|
||||
|
||||
|
||||
homogenization_RGC_sizeState(i) &
|
||||
= 3*(homogenization_RGC_Ngrains(1,i)-1)*homogenization_RGC_Ngrains(2,i)*homogenization_RGC_Ngrains(3,i) &
|
||||
+ 3*homogenization_RGC_Ngrains(1,i)*(homogenization_RGC_Ngrains(2,i)-1)*homogenization_RGC_Ngrains(3,i) &
|
||||
|
|
|
@ -253,7 +253,7 @@ subroutine numerics_init()
|
|||
write(6,'(a24,x,e8.1)') 'rMax_RGC: ',relMax_RGC
|
||||
write(6,'(a24,x,e8.1)') 'perturbPenalty_RGC: ',pPert_RGC
|
||||
write(6,'(a24,x,e8.1)') 'relevantMismatch_RGC: ',xSmoo_RGC
|
||||
write(6,'(a24,x,e8.1)') 'viscosityrate_RGC: ',ratePower_RGC
|
||||
write(6,'(a24,x,e8.1)') 'viscosityrate_RGC: ',viscPower_RGC
|
||||
write(6,'(a24,x,e8.1)') 'viscositymodulus_RGC: ',viscModus_RGC
|
||||
write(6,'(a24,x,e8.1)') 'maxrelaxation_RGC: ',maxdRelax_RGC
|
||||
write(6,'(a24,x,e8.1)') 'maxVolDiscrepancy_RGC:',maxVolDiscr_RGC
|
||||
|
|
Loading…
Reference in New Issue