added "texture
" as possible crystallite output => reports ID for later discrimination...
This commit is contained in:
parent
b8b75edd7d
commit
7be2edb10e
|
@ -251,16 +251,12 @@ enddo
|
||||||
do i = 1,material_Ncrystallite
|
do i = 1,material_Ncrystallite
|
||||||
do j = 1,crystallite_Noutput(i)
|
do j = 1,crystallite_Noutput(i)
|
||||||
select case(crystallite_output(j,i))
|
select case(crystallite_output(j,i))
|
||||||
case('phase')
|
case('phase','texture','volume')
|
||||||
mySize = 1
|
mySize = 1
|
||||||
case('volume')
|
case('orientation','grainrotation') ! orientation as quaternion, or deviation from initial grain orientation in axis-angle form (angle in degrees)
|
||||||
mySize = 1
|
|
||||||
case('orientation') ! orientation as quaternion
|
|
||||||
mySize = 4
|
mySize = 4
|
||||||
case('eulerangles') ! Bunge Euler angles
|
case('eulerangles') ! Bunge (3-1-3) Euler angles
|
||||||
mySize = 3
|
mySize = 3
|
||||||
case('grainrotation') ! Deviation from initial grain orientation in axis-angle form (angle in degrees)
|
|
||||||
mySize = 4
|
|
||||||
case('defgrad','f','fe','fp','lp','ee','p','firstpiola','1stpiola','s','tstar','secondpiola','2ndpiola')
|
case('defgrad','f','fe','fp','lp','ee','p','firstpiola','1stpiola','s','tstar','secondpiola','2ndpiola')
|
||||||
mySize = 9
|
mySize = 9
|
||||||
case default
|
case default
|
||||||
|
@ -3037,6 +3033,7 @@ function crystallite_postResults(&
|
||||||
use material, only: microstructure_crystallite, &
|
use material, only: microstructure_crystallite, &
|
||||||
crystallite_Noutput, &
|
crystallite_Noutput, &
|
||||||
material_phase, &
|
material_phase, &
|
||||||
|
material_texture, &
|
||||||
material_volume
|
material_volume
|
||||||
use constitutive, only: constitutive_sizePostResults, &
|
use constitutive, only: constitutive_sizePostResults, &
|
||||||
constitutive_postResults
|
constitutive_postResults
|
||||||
|
@ -3070,6 +3067,9 @@ function crystallite_postResults(&
|
||||||
case ('phase')
|
case ('phase')
|
||||||
crystallite_postResults(c+1) = material_phase(g,i,e) ! phaseID of grain
|
crystallite_postResults(c+1) = material_phase(g,i,e) ! phaseID of grain
|
||||||
c = c + 1_pInt
|
c = c + 1_pInt
|
||||||
|
case ('texture')
|
||||||
|
crystallite_postResults(c+1) = material_texture(g,i,e) ! textureID of grain
|
||||||
|
c = c + 1_pInt
|
||||||
case ('volume')
|
case ('volume')
|
||||||
crystallite_postResults(c+1) = material_volume(g,i,e) ! grain volume (not fraction but absolute, right?)
|
crystallite_postResults(c+1) = material_volume(g,i,e) ! grain volume (not fraction but absolute, right?)
|
||||||
c = c + 1_pInt
|
c = c + 1_pInt
|
||||||
|
|
|
@ -70,7 +70,8 @@ real(pReal), dimension(:,:), allocatable :: &
|
||||||
real(pReal), dimension(:,:,:), allocatable :: &
|
real(pReal), dimension(:,:,:), allocatable :: &
|
||||||
material_volume ! volume of each grain,IP,element
|
material_volume ! volume of each grain,IP,element
|
||||||
integer(pInt), dimension(:,:,:), allocatable :: &
|
integer(pInt), dimension(:,:,:), allocatable :: &
|
||||||
material_phase ! phase of each grain,IP,element
|
material_phase, & ! phase (index) of each grain,IP,element
|
||||||
|
material_texture ! texture (index) of each grain,IP,element
|
||||||
real(pReal), dimension(:,:,:,:), allocatable :: &
|
real(pReal), dimension(:,:,:,:), allocatable :: &
|
||||||
material_EulerAngles ! initial orientation of each grain,IP,element
|
material_EulerAngles ! initial orientation of each grain,IP,element
|
||||||
real(pReal), dimension(:,:,:), allocatable :: &
|
real(pReal), dimension(:,:,:), allocatable :: &
|
||||||
|
@ -556,7 +557,7 @@ subroutine material_populateGrains()
|
||||||
real(pReal), dimension (:,:), allocatable :: orientationOfGrain
|
real(pReal), dimension (:,:), allocatable :: orientationOfGrain
|
||||||
real(pReal), dimension (3) :: orientation
|
real(pReal), dimension (3) :: orientation
|
||||||
real(pReal), dimension (3,3) :: symOrientation
|
real(pReal), dimension (3,3) :: symOrientation
|
||||||
integer(pInt), dimension (:), allocatable :: phaseOfGrain
|
integer(pInt), dimension (:), allocatable :: phaseOfGrain, textureOfGrain
|
||||||
integer(pInt) t,e,i,g,j,m,homog,micro,sgn
|
integer(pInt) t,e,i,g,j,m,homog,micro,sgn
|
||||||
integer(pInt) phaseID,textureID,dGrains,myNgrains,myNorientations, &
|
integer(pInt) phaseID,textureID,dGrains,myNgrains,myNorientations, &
|
||||||
grain,constituentGrain,symExtension
|
grain,constituentGrain,symExtension
|
||||||
|
@ -565,6 +566,7 @@ subroutine material_populateGrains()
|
||||||
|
|
||||||
allocate(material_volume(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; material_volume = 0.0_pReal
|
allocate(material_volume(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; material_volume = 0.0_pReal
|
||||||
allocate(material_phase(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; material_phase = 0_pInt
|
allocate(material_phase(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; material_phase = 0_pInt
|
||||||
|
allocate(material_texture(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; material_texture = 0_pInt
|
||||||
allocate(material_EulerAngles(3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; material_EulerAngles = 0.0_pReal
|
allocate(material_EulerAngles(3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; material_EulerAngles = 0.0_pReal
|
||||||
|
|
||||||
allocate(Ngrains(material_Nhomogenization,material_Nmicrostructure)); Ngrains = 0_pInt
|
allocate(Ngrains(material_Nhomogenization,material_Nmicrostructure)); Ngrains = 0_pInt
|
||||||
|
@ -587,6 +589,7 @@ subroutine material_populateGrains()
|
||||||
|
|
||||||
allocate(volumeOfGrain(maxval(Ngrains))) ! reserve memory for maximum case
|
allocate(volumeOfGrain(maxval(Ngrains))) ! reserve memory for maximum case
|
||||||
allocate(phaseOfGrain(maxval(Ngrains))) ! reserve memory for maximum case
|
allocate(phaseOfGrain(maxval(Ngrains))) ! reserve memory for maximum case
|
||||||
|
allocate(textureOfGrain(maxval(Ngrains))) ! reserve memory for maximum case
|
||||||
allocate(orientationOfGrain(3,maxval(Ngrains))) ! reserve memory for maximum case
|
allocate(orientationOfGrain(3,maxval(Ngrains))) ! reserve memory for maximum case
|
||||||
|
|
||||||
if (debug_verbosity > 0) then
|
if (debug_verbosity > 0) then
|
||||||
|
@ -643,6 +646,7 @@ subroutine material_populateGrains()
|
||||||
enddo
|
enddo
|
||||||
! ----------------------------------------------------------------------------
|
! ----------------------------------------------------------------------------
|
||||||
phaseOfGrain = 0_pInt
|
phaseOfGrain = 0_pInt
|
||||||
|
textureOfGrain = 0_pInt
|
||||||
orientationOfGrain = 0.0_pReal
|
orientationOfGrain = 0.0_pReal
|
||||||
grain = 0_pInt ! reset microstructure grain index
|
grain = 0_pInt ! reset microstructure grain index
|
||||||
|
|
||||||
|
@ -650,6 +654,7 @@ subroutine material_populateGrains()
|
||||||
phaseID = microstructure_phase(i,micro)
|
phaseID = microstructure_phase(i,micro)
|
||||||
textureID = microstructure_texture(i,micro)
|
textureID = microstructure_texture(i,micro)
|
||||||
phaseOfGrain(grain+1:grain+NgrainsOfConstituent(i)) = phaseID ! assign resp. phase
|
phaseOfGrain(grain+1:grain+NgrainsOfConstituent(i)) = phaseID ! assign resp. phase
|
||||||
|
textureOfGrain(grain+1:grain+NgrainsOfConstituent(i)) = textureID ! assign resp. texture
|
||||||
|
|
||||||
myNorientations = ceiling(float(NgrainsOfConstituent(i))/texture_symmetry(textureID)) ! max number of unique orientations (excl. symmetry)
|
myNorientations = ceiling(float(NgrainsOfConstituent(i))/texture_symmetry(textureID)) ! max number of unique orientations (excl. symmetry)
|
||||||
|
|
||||||
|
@ -707,16 +712,21 @@ subroutine material_populateGrains()
|
||||||
enddo ! constituent
|
enddo ! constituent
|
||||||
|
|
||||||
! ----------------------------------------------------------------------------
|
! ----------------------------------------------------------------------------
|
||||||
|
if (.not. microstructure_elemhomo(micro)) then ! unless element homogeneous, reshuffle grains
|
||||||
do i=1,myNgrains-1 ! walk thru grains
|
do i=1,myNgrains-1 ! walk thru grains
|
||||||
call random_number(rnd)
|
call random_number(rnd)
|
||||||
t = nint(rnd*(myNgrains-i)+i+0.5_pReal,pInt) ! select a grain in remaining list
|
t = nint(rnd*(myNgrains-i)+i+0.5_pReal,pInt) ! select a grain in remaining list
|
||||||
m = phaseOfGrain(t) ! exchange current with random
|
m = phaseOfGrain(t) ! exchange current with random
|
||||||
phaseOfGrain(t) = phaseOfGrain(i)
|
phaseOfGrain(t) = phaseOfGrain(i)
|
||||||
phaseOfGrain(i) = m
|
phaseOfGrain(i) = m
|
||||||
|
m = textureOfGrain(t) ! exchange current with random
|
||||||
|
textureOfGrain(t) = textureOfGrain(i)
|
||||||
|
textureOfGrain(i) = m
|
||||||
orientation = orientationOfGrain(:,t)
|
orientation = orientationOfGrain(:,t)
|
||||||
orientationOfGrain(:,t) = orientationOfGrain(:,i)
|
orientationOfGrain(:,t) = orientationOfGrain(:,i)
|
||||||
orientationOfGrain(:,i) = orientation
|
orientationOfGrain(:,i) = orientation
|
||||||
enddo
|
enddo
|
||||||
|
endif
|
||||||
!calc fraction after weighing with volumePerGrain
|
!calc fraction after weighing with volumePerGrain
|
||||||
!exchange in MC steps to improve result...
|
!exchange in MC steps to improve result...
|
||||||
|
|
||||||
|
@ -728,6 +738,7 @@ subroutine material_populateGrains()
|
||||||
forall (i = 1:FE_Nips(mesh_element(2,e)), g = 1:dGrains) ! loop over IPs and grains
|
forall (i = 1:FE_Nips(mesh_element(2,e)), g = 1:dGrains) ! loop over IPs and grains
|
||||||
material_volume(g,i,e) = volumeOfGrain(grain+g)
|
material_volume(g,i,e) = volumeOfGrain(grain+g)
|
||||||
material_phase(g,i,e) = phaseOfGrain(grain+g)
|
material_phase(g,i,e) = phaseOfGrain(grain+g)
|
||||||
|
material_texture(g,i,e) = textureOfGrain(grain+g)
|
||||||
material_EulerAngles(:,g,i,e) = orientationOfGrain(:,grain+g)
|
material_EulerAngles(:,g,i,e) = orientationOfGrain(:,grain+g)
|
||||||
end forall
|
end forall
|
||||||
FEsolving_execIP(2,e) = 1_pInt ! restrict calculation to first IP only, since all other results are to be copied from this
|
FEsolving_execIP(2,e) = 1_pInt ! restrict calculation to first IP only, since all other results are to be copied from this
|
||||||
|
@ -736,6 +747,7 @@ subroutine material_populateGrains()
|
||||||
forall (i = 1:FE_Nips(mesh_element(2,e)), g = 1:dGrains) ! loop over IPs and grains
|
forall (i = 1:FE_Nips(mesh_element(2,e)), g = 1:dGrains) ! loop over IPs and grains
|
||||||
material_volume(g,i,e) = volumeOfGrain(grain+(i-1)*dGrains+g)
|
material_volume(g,i,e) = volumeOfGrain(grain+(i-1)*dGrains+g)
|
||||||
material_phase(g,i,e) = phaseOfGrain(grain+(i-1)*dGrains+g)
|
material_phase(g,i,e) = phaseOfGrain(grain+(i-1)*dGrains+g)
|
||||||
|
material_texture(g,i,e) = textureOfGrain(grain+(i-1)*dGrains+g)
|
||||||
material_EulerAngles(:,g,i,e) = orientationOfGrain(:,grain+(i-1)*dGrains+g)
|
material_EulerAngles(:,g,i,e) = orientationOfGrain(:,grain+(i-1)*dGrains+g)
|
||||||
end forall
|
end forall
|
||||||
grain = grain + FE_Nips(mesh_element(2,e)) * dGrains ! wind forward by Nips*NgrainsPerIP
|
grain = grain + FE_Nips(mesh_element(2,e)) * dGrains ! wind forward by Nips*NgrainsPerIP
|
||||||
|
@ -749,6 +761,7 @@ subroutine material_populateGrains()
|
||||||
|
|
||||||
deallocate(volumeOfGrain)
|
deallocate(volumeOfGrain)
|
||||||
deallocate(phaseOfGrain)
|
deallocate(phaseOfGrain)
|
||||||
|
deallocate(textureOfGrain)
|
||||||
deallocate(orientationOfGrain)
|
deallocate(orientationOfGrain)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue