new crystallite output "grainrotationX", "grainrotationY", "grainrotationZ" that gives the deviation of the initial orientation in degrees around the sample reference x/y/z axis, while "grainrotation" still gives the same as axis angle pair in crystal coordinates

This commit is contained in:
Christoph Kords 2013-01-16 08:45:41 +00:00
parent 7ac7d1a657
commit 8a45a90775
2 changed files with 36 additions and 12 deletions

View File

@ -75,7 +75,10 @@ crystallite 2
(output) volume
(output) orientation # quaternion
(output) eulerangles # orientation as Bunge triple
(output) grainrotation # deviation from initial orientation as axis (1-3) and angle in degree (4)
(output) grainrotation # deviation from initial orientation as axis (1-3) and angle in degree (4) in crystal reference coordinates
(output) grainrotationx # deviation from initial orientation as angle in degrees around sample reference x axis
(output) grainrotationy # deviation from initial orientation as angle in degrees around sample reference y axis
(output) grainrotationz # deviation from initial orientation as angle in degrees around sample reference z axis
(output) f # deformation gradient tensor; synonyms: "defgrad"
(output) fe # elastic deformation gradient tensor
(output) fp # plastic deformation gradient tensor

View File

@ -69,7 +69,7 @@ module crystallite
crystallite_subTstar0_v, & !< 2nd Piola-Kirchhoff stress vector at start of crystallite inc
crystallite_orientation, & !< orientation as quaternion
crystallite_orientation0, & !< initial orientation as quaternion
crystallite_rotation !< grain rotation away from initial orientation as axis-angle (in degrees)
crystallite_rotation !< grain rotation away from initial orientation as axis-angle (in degrees) in crystal reference frame
real(pReal), dimension (:,:,:,:,:), allocatable :: &
crystallite_Fe, & !< current "elastic" def grad (end of converged time step)
crystallite_subFe0,& !< "elastic" def grad at start of crystallite inc
@ -280,7 +280,7 @@ subroutine crystallite_init(Temperature)
do i = 1_pInt,material_Ncrystallite
do j = 1_pInt,crystallite_Noutput(i)
select case(crystallite_output(j,i))
case('phase','texture','volume')
case('phase','texture','volume','grainrotationx','grainrotationy','grainrotationz')
mySize = 1_pInt
case('orientation','grainrotation') ! orientation as quaternion, or deviation from initial grain orientation in axis-angle form (angle in degrees)
mySize = 4_pInt
@ -3497,7 +3497,9 @@ function crystallite_postResults(&
math_det33, &
math_I3, &
inDeg, &
math_Mandel6to33
math_Mandel6to33, &
math_qMul, &
math_qConj
use mesh, only: mesh_element, &
mesh_ipVolume
use material, only: microstructure_crystallite, &
@ -3523,6 +3525,7 @@ function crystallite_postResults(&
!*** local variables ***!
real(pReal), dimension(3,3) :: Ee
real(pReal), dimension(4) :: rotation
real(pReal) detF
integer(pInt) o,c,crystID,mySize
@ -3554,8 +3557,26 @@ function crystallite_postResults(&
crystallite_postResults(c+1:c+mySize) = inDeg * math_QuaternionToEuler(crystallite_orientation(1:4,g,i,e)) ! grain orientation as Euler angles in degree
case ('grainrotation')
mySize = 4_pInt
crystallite_postResults(c+1:c+mySize) = math_QuaternionToAxisAngle(crystallite_rotation(1:4,g,i,e)) ! grain rotation away from initial orientation as axis-angle
crystallite_postResults(c+1:c+mySize) = math_QuaternionToAxisAngle(crystallite_rotation(1:4,g,i,e)) ! grain rotation away from initial orientation as axis-angle in crystal reference coordinates
crystallite_postResults(c+4) = inDeg * crystallite_postResults(c+4) ! angle in degree
case ('grainrotationx')
mySize = 1_pInt
rotation = math_QuaternionToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,g,i,e), &
crystallite_rotation(1:4,g,i,e)), &
math_qConj(crystallite_orientation(1:4,g,i,e)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
crystallite_postResults(c+1) = inDeg * rotation(1) * rotation(4) ! angle in degree
case ('grainrotationy')
mySize = 1_pInt
rotation = math_QuaternionToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,g,i,e), &
crystallite_rotation(1:4,g,i,e)), &
math_qConj(crystallite_orientation(1:4,g,i,e)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
crystallite_postResults(c+1) = inDeg * rotation(2) * rotation(4) ! angle in degree
case ('grainrotationz')
mySize = 1_pInt
rotation = math_QuaternionToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,g,i,e), &
crystallite_rotation(1:4,g,i,e)), &
math_qConj(crystallite_orientation(1:4,g,i,e)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
crystallite_postResults(c+1) = inDeg * rotation(3) * rotation(4) ! angle in degree
! remark: tensor output is of the form 11,12,13, 21,22,23, 31,32,33
! thus row index i is slow, while column index j is fast. reminder: "row is slow"