From 64d70d9be31add56d794cc0e1cf87f9d1d7ccffa Mon Sep 17 00:00:00 2001 From: Nikhil Prabhu Date: Mon, 15 Nov 2021 14:39:29 +0100 Subject: [PATCH 01/43] user option to have no output f_out = none --- src/grid/DAMASK_grid.f90 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 7ffa6b80a..fcfe5853c 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -223,7 +223,11 @@ program DAMASK_grid loadCases(l)%r = step_discretization%get_asFloat('r', defaultVal= 1.0_pReal) loadCases(l)%f_restart = load_step%get_asInt('f_restart', defaultVal=huge(0)) - loadCases(l)%f_out = load_step%get_asInt('f_out', defaultVal=1) + if (load_step%get_asString('f_out',defaultVal='DAMASK') == 'none') then + loadCases(l)%f_out = huge(0) + else + loadCases(l)%f_out = load_step%get_asInt('f_out', defaultVal=1) + endif loadCases(l)%estimate_rate = (load_step%get_asBool('estimate_rate',defaultVal=.true.) .and. l>1) reportAndCheck: if (worldrank == 0) then @@ -276,7 +280,8 @@ program DAMASK_grid endif print'(a,f0.3)', ' t: ', loadCases(l)%t print'(a,i0)', ' N: ', loadCases(l)%N - print'(a,i0)', ' f_out: ', loadCases(l)%f_out + if (loadCases(l)%f_out < huge(0)) & + print'(a,i0)', ' f_out: ', loadCases(l)%f_out if (loadCases(l)%f_restart < huge(0)) & print'(a,i0)', ' f_restart: ', loadCases(l)%f_restart From a6c311f41069365cc40f252fdbdb17b37a2e2c5f Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 20 Nov 2021 12:16:32 +0100 Subject: [PATCH 02/43] commented --- src/lattice.f90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 4b87fccbf..637d585e5 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -548,6 +548,8 @@ function lattice_C66_trans(Ntrans,C_parent66,lattice_target, & !-------------------------------------------------------------------------------------------------- ! elasticity matrix of the target phase in cube orientation if (lattice_target == 'hP') then + ! https://doi.org/10.1063/1.1663858 eq. (16), eq. (18), eq. (19) + ! https://doi.org/10.1016/j.actamat.2016.07.032 eq. (47), eq. (48) if (cOverA_trans < 1.0_pReal .or. cOverA_trans > 2.0_pReal) & call IO_error(131,ext_msg='lattice_C66_trans: '//trim(lattice_target)) C_bar66(1,1) = (C_parent66(1,1) + C_parent66(1,2) + 2.0_pReal*C_parent66(4,4))/2.0_pReal @@ -2091,7 +2093,7 @@ function lattice_equivalent_nu(C,assumption) result(nu) K = (C(1,1)+C(2,2)+C(3,3) +2.0_pReal*(C(1,2)+C(2,3)+C(1,3))) & / 9.0_pReal elseif(IO_lc(assumption) == 'reuss') then - call math_invert(S,error,C) + call math_invert(S,error,C) ! ToDo: correct for Voigt? if(error) error stop 'matrix inversion failed' K = 1.0_pReal & / (S(1,1)+S(2,2)+S(3,3) +2.0_pReal*(S(1,2)+S(2,3)+S(1,3))) @@ -2123,7 +2125,7 @@ function lattice_equivalent_mu(C,assumption) result(mu) mu = (1.0_pReal*(C(1,1)+C(2,2)+C(3,3)) -1.0_pReal*(C(1,2)+C(2,3)+C(1,3)) +3.0_pReal*(C(4,4)+C(5,5)+C(6,6))) & / 15.0_pReal elseif(IO_lc(assumption) == 'reuss') then - call math_invert(S,error,C) + call math_invert(S,error,C) ! ToDo: correct for Voigt? if(error) error stop 'matrix inversion failed' mu = 15.0_pReal & / (4.0_pReal*(S(1,1)+S(2,2)+S(3,3)) -4.0_pReal*(S(1,2)+S(2,3)+S(1,3)) +3.0_pReal*(S(4,4)+S(5,5)+S(6,6))) From 87100d1dce0bc2264b5e403b82ad141bd8521a27 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 20 Nov 2021 15:15:59 +0100 Subject: [PATCH 03/43] avoid conversion Voigt-6x6 to 3x3x3x3 --- src/lattice.f90 | 4 +-- src/rotations.f90 | 69 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 637d585e5..d90215c7e 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -522,7 +522,7 @@ function lattice_C66_twin(Ntwin,C66,lattice,CoverA) do i = 1, sum(Ntwin) call R%fromAxisAngle([coordinateSystem(1:3,2,i),PI],P=1) ! ToDo: Why always 180 deg? - lattice_C66_twin(1:6,1:6,i) = math_3333toVoigt66(R%rotTensor4(math_Voigt66to3333(C66))) + lattice_C66_twin(1:6,1:6,i) = R%rotStiffness(C66) enddo end function lattice_C66_twin @@ -583,7 +583,7 @@ function lattice_C66_trans(Ntrans,C_parent66,lattice_target, & do i = 1,sum(Ntrans) call R%fromMatrix(Q(1:3,1:3,i)) - lattice_C66_trans(1:6,1:6,i) = math_3333toVoigt66(R%rotTensor4(math_Voigt66to3333(C_target_unrotated66))) + lattice_C66_trans(1:6,1:6,i) = R%rotStiffness(C_target_unrotated66) enddo end function lattice_C66_trans diff --git a/src/rotations.f90 b/src/rotations.f90 index e73fb2782..d4f226065 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -75,6 +75,7 @@ module rotations procedure, public :: rotVector procedure, public :: rotTensor2 procedure, public :: rotTensor4 + procedure, public :: rotStiffness procedure, public :: misorientation procedure, public :: standardize end type rotation @@ -339,8 +340,7 @@ end function rotTensor2 !--------------------------------------------------------------------------------------------------- -!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH -!> @brief rotate a rank-4 tensor passively (default) or actively +!> @brief Rotate a rank-4 tensor passively (default) or actively. !> @details: rotation is based on rotation matrix !! ToDo: Need to check active/passive !!! !--------------------------------------------------------------------------------------------------- @@ -354,6 +354,7 @@ pure function rotTensor4(self,T,active) result(tRot) real(pReal), dimension(3,3) :: R integer :: i,j,k,l,m,n,o,p + if (present(active)) then R = merge(transpose(self%asMatrix()),self%asMatrix(),active) else @@ -371,7 +372,47 @@ end function rotTensor4 !--------------------------------------------------------------------------------------------------- -!> @brief misorientation +!> @brief Rotate a rank-4 tensor in Voigt 6x6 notation passively (default) or actively. +!> @details: https://scicomp.stackexchange.com/questions/35600 +!! ToDo: Need to check active/passive !!! +!--------------------------------------------------------------------------------------------------- +pure function rotStiffness(self,C,active) result(cRot) + + real(pReal), dimension(6,6) :: cRot + class(rotation), intent(in) :: self + real(pReal), intent(in), dimension(6,6) :: C + logical, intent(in), optional :: active + + real(pReal), dimension(3,3) :: R + real(pReal), dimension(6,6) :: M + + + if (present(active)) then + R = merge(transpose(self%asMatrix()),self%asMatrix(),active) + else + R = self%asMatrix() + endif + + M = reshape([R(1,1)**2.0_pReal, R(2,1)**2.0_pReal, R(3,1)**2.0_pReal, & + R(2,1)*R(3,1), R(1,1)*R(3,1), R(1,1)*R(2,1), & + R(1,2)**2.0_pReal, R(2,2)**2.0_pReal, R(3,2)**2.0_pReal, & + R(2,2)*R(3,2), R(1,2)*R(3,2), R(1,2)*R(2,2), & + R(1,3)**2.0_pReal, R(2,3)**2.0_pReal, R(3,3)**2.0_pReal, & + R(2,3)*R(3,3), R(1,3)*R(3,3), R(1,3)*R(2,3), & + 2.0_pReal*R(1,2)*R(1,3), 2.0_pReal*R(2,2)*R(2,3), 2.0_pReal*R(3,2)*R(3,3), & + R(2,2)*R(3,3)+R(2,3)*R(3,2), R(1,2)*R(3,3)+R(1,3)*R(3,2), R(1,2)*R(2,3)+R(1,3)*R(2,2), & + 2.0_pReal*R(1,3)*R(1,1), 2.0_pReal*R(2,3)*R(2,1), 2.0_pReal*R(3,3)*R(3,1), & + R(2,3)*R(3,1)+R(2,1)*R(3,3), R(1,3)*R(3,1)+R(1,1)*R(3,3), R(1,3)*R(2,1)+R(1,1)*R(2,3), & + 2.0_pReal*R(1,1)*R(1,2), 2.0_pReal*R(2,1)*R(2,2), 2.0_pReal*R(3,1)*R(3,2), & + R(2,1)*R(3,2)+R(2,2)*R(3,1), R(1,1)*R(3,2)+R(1,2)*R(3,1), R(1,1)*R(2,2)+R(1,2)*R(2,1)],[6,6]) + + cRot = matmul(M,matmul(C,transpose(M))) + +end function rotStiffness + + +!--------------------------------------------------------------------------------------------------- +!> @brief Misorientation. !--------------------------------------------------------------------------------------------------- pure elemental function misorientation(self,other) @@ -386,7 +427,7 @@ end function misorientation !--------------------------------------------------------------------------------------------------- !> @author Marc De Graef, Carnegie Mellon University -!> @brief convert unit quaternion to rotation matrix +!> @brief Convert unit quaternion to rotation matrix. !--------------------------------------------------------------------------------------------------- pure function qu2om(qu) result(om) @@ -395,8 +436,8 @@ pure function qu2om(qu) result(om) real(pReal) :: qq - qq = qu(1)**2-sum(qu(2:4)**2) + qq = qu(1)**2-sum(qu(2:4)**2) om(1,1) = qq+2.0_pReal*qu(2)**2 om(2,2) = qq+2.0_pReal*qu(3)**2 @@ -416,7 +457,7 @@ end function qu2om !--------------------------------------------------------------------------------------------------- !> @author Marc De Graef, Carnegie Mellon University -!> @brief convert unit quaternion to Euler angles +!> @brief Convert unit quaternion to Euler angles. !--------------------------------------------------------------------------------------------------- pure function qu2eu(qu) result(eu) @@ -425,6 +466,7 @@ pure function qu2eu(qu) result(eu) real(pReal) :: q12, q03, chi + q03 = qu(1)**2+qu(4)**2 q12 = qu(2)**2+qu(3)**2 chi = sqrt(q03*q12) @@ -1379,6 +1421,7 @@ subroutine selfTest() real(pReal), dimension(3) :: x, eu, ho, v3 real(pReal), dimension(3,3) :: om, t33 real(pReal), dimension(3,3,3,3) :: t3333 + real(pReal), dimension(6,6) :: C real :: A,B integer :: i @@ -1412,6 +1455,7 @@ subroutine selfTest() if(qu(1)<0.0_pReal) qu = qu * (-1.0_pReal) endif + if(.not. quaternion_equal(om2qu(qu2om(qu)),qu)) error stop 'om2qu/qu2om' if(.not. quaternion_equal(eu2qu(qu2eu(qu)),qu)) error stop 'eu2qu/qu2eu' if(.not. quaternion_equal(ax2qu(qu2ax(qu)),qu)) error stop 'ax2qu/qu2ax' @@ -1447,20 +1491,25 @@ subroutine selfTest() call R%fromMatrix(om) call random_number(v3) - if(all(dNeq(R%rotVector(R%rotVector(v3),active=.true.),v3,1.0e-12_pReal))) & + if (all(dNeq(R%rotVector(R%rotVector(v3),active=.true.),v3,1.0e-12_pReal))) & error stop 'rotVector' call random_number(t33) - if(all(dNeq(R%rotTensor2(R%rotTensor2(t33),active=.true.),t33,1.0e-12_pReal))) & + if (all(dNeq(R%rotTensor2(R%rotTensor2(t33),active=.true.),t33,1.0e-12_pReal))) & error stop 'rotTensor2' call random_number(t3333) - if(all(dNeq(R%rotTensor4(R%rotTensor4(t3333),active=.true.),t3333,1.0e-12_pReal))) & + if (all(dNeq(R%rotTensor4(R%rotTensor4(t3333),active=.true.),t3333,1.0e-12_pReal))) & error stop 'rotTensor4' + call random_number(C) + C = C+transpose(C) + if (any(dNeq(R%rotStiffness(C),math_3333toVoigt66(R%rotate(math_Voigt66to3333(C))),1.0e-14_pReal))) & + error stop 'rotStiffness' + call R%fromQuaternion(qu * (1.0_pReal + merge(+5.e-9_pReal,-5.e-9_pReal, mod(i,2) == 0))) ! allow reasonable tolerance for ASCII/YAML - enddo + end do contains From f6440f7f17003b8d3adac4e8e5176d62dd3702a5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 20 Nov 2021 15:18:48 +0100 Subject: [PATCH 04/43] need to check 'any', adjusted tolerance --- src/rotations.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rotations.f90 b/src/rotations.f90 index d4f226065..aeb0cb48c 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -1491,20 +1491,20 @@ subroutine selfTest() call R%fromMatrix(om) call random_number(v3) - if (all(dNeq(R%rotVector(R%rotVector(v3),active=.true.),v3,1.0e-12_pReal))) & + if (any(dNeq(R%rotVector(R%rotVector(v3),active=.true.),v3,1.0e-12_pReal))) & error stop 'rotVector' call random_number(t33) - if (all(dNeq(R%rotTensor2(R%rotTensor2(t33),active=.true.),t33,1.0e-12_pReal))) & + if (any(dNeq(R%rotTensor2(R%rotTensor2(t33),active=.true.),t33,1.0e-12_pReal))) & error stop 'rotTensor2' call random_number(t3333) - if (all(dNeq(R%rotTensor4(R%rotTensor4(t3333),active=.true.),t3333,1.0e-12_pReal))) & + if (any(dNeq(R%rotTensor4(R%rotTensor4(t3333),active=.true.),t3333,1.0e-12_pReal))) & error stop 'rotTensor4' call random_number(C) C = C+transpose(C) - if (any(dNeq(R%rotStiffness(C),math_3333toVoigt66(R%rotate(math_Voigt66to3333(C))),1.0e-14_pReal))) & + if (any(dNeq(R%rotStiffness(C),math_3333toVoigt66(R%rotate(math_Voigt66to3333(C))),1.0e-12_pReal))) & error stop 'rotStiffness' call R%fromQuaternion(qu * (1.0_pReal + merge(+5.e-9_pReal,-5.e-9_pReal, mod(i,2) == 0))) ! allow reasonable tolerance for ASCII/YAML From a857285e345ae4ef456277214cd35dedae191505 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 20 Nov 2021 22:09:01 +0100 Subject: [PATCH 05/43] backward transformation for Voigt --- src/math.f90 | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/src/math.f90 b/src/math.f90 index 2515c64d7..48c736f76 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -853,6 +853,40 @@ pure function math_66toSym3333(m66,weighted) end function math_66toSym3333 +!-------------------------------------------------------------------------------------------------- +!> @brief Convert 6 Voigt stress vector into symmetric 3x3 tensor. +!-------------------------------------------------------------------------------------------------- +pure function math_Voigt6to33_stress(sigma_tilde) result(sigma) + + real(pReal), dimension(3,3) :: sigma + real(pReal), dimension(6), intent(in) :: sigma_tilde + + + sigma = reshape([sigma_tilde(1), sigma_tilde(6), sigma_tilde(5), & + sigma_tilde(6), sigma_tilde(2), sigma_tilde(4), & + sigma_tilde(5), sigma_tilde(4), sigma_tilde(3)],[3,3]) + + +end function math_Voigt6to33_stress + + +!-------------------------------------------------------------------------------------------------- +!> @brief Convert 6 Voigt strain vector into symmetric 3x3 tensor. +!-------------------------------------------------------------------------------------------------- +pure function math_Voigt6to33_strain(epsilon_tilde) result(epsilon) + + real(pReal), dimension(3,3) :: epsilon + real(pReal), dimension(6), intent(in) :: epsilon_tilde + + + epsilon = reshape([ epsilon_tilde(1), 0.5_pReal*epsilon_tilde(6), 0.5_pReal*epsilon_tilde(5), & + 0.5_pReal*epsilon_tilde(6), epsilon_tilde(2), 0.5_pReal*epsilon_tilde(4), & + 0.5_pReal*epsilon_tilde(5), 0.5_pReal*epsilon_tilde(4), epsilon_tilde(3)],[3,3]) + + +end function math_Voigt6to33_strain + + !-------------------------------------------------------------------------------------------------- !> @brief Convert 6x6 Voigt matrix into symmetric 3x3x3x3 matrix. !-------------------------------------------------------------------------------------------------- @@ -864,12 +898,12 @@ pure function math_Voigt66to3333(m66) integer :: i,j - do i=1,6; do j=1, 6 + do i=1,6; do j=1,6 math_Voigt66to3333(MAPVOIGT(1,i),MAPVOIGT(2,i),MAPVOIGT(1,j),MAPVOIGT(2,j)) = m66(i,j) math_Voigt66to3333(MAPVOIGT(2,i),MAPVOIGT(1,i),MAPVOIGT(1,j),MAPVOIGT(2,j)) = m66(i,j) math_Voigt66to3333(MAPVOIGT(1,i),MAPVOIGT(2,i),MAPVOIGT(2,j),MAPVOIGT(1,j)) = m66(i,j) math_Voigt66to3333(MAPVOIGT(2,i),MAPVOIGT(1,i),MAPVOIGT(2,j),MAPVOIGT(1,j)) = m66(i,j) - enddo; enddo + end do; end do end function math_Voigt66to3333 From 28ff027b388917a80e0305ab66017bfd443ec59a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 20 Nov 2021 22:36:01 +0100 Subject: [PATCH 06/43] exploit symmetry for stress calculation --- src/math.f90 | 37 ++++++++++++++++++++++++++++---- src/phase_mechanical_elastic.f90 | 6 ++++-- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/math.f90 b/src/math.f90 index 48c736f76..aa81a0ed3 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -841,14 +841,14 @@ pure function math_66toSym3333(m66,weighted) w = merge(INVNRMMANDEL,1.0_pReal,weighted) else w = INVNRMMANDEL - endif + end if do i=1,6; do j=1,6 math_66toSym3333(MAPNYE(1,i),MAPNYE(2,i),MAPNYE(1,j),MAPNYE(2,j)) = w(i)*w(j)*m66(i,j) math_66toSym3333(MAPNYE(2,i),MAPNYE(1,i),MAPNYE(1,j),MAPNYE(2,j)) = w(i)*w(j)*m66(i,j) math_66toSym3333(MAPNYE(1,i),MAPNYE(2,i),MAPNYE(2,j),MAPNYE(1,j)) = w(i)*w(j)*m66(i,j) math_66toSym3333(MAPNYE(2,i),MAPNYE(1,i),MAPNYE(2,j),MAPNYE(1,j)) = w(i)*w(j)*m66(i,j) - enddo; enddo + end do; end do end function math_66toSym3333 @@ -866,7 +866,6 @@ pure function math_Voigt6to33_stress(sigma_tilde) result(sigma) sigma_tilde(6), sigma_tilde(2), sigma_tilde(4), & sigma_tilde(5), sigma_tilde(4), sigma_tilde(3)],[3,3]) - end function math_Voigt6to33_stress @@ -883,10 +882,40 @@ pure function math_Voigt6to33_strain(epsilon_tilde) result(epsilon) 0.5_pReal*epsilon_tilde(6), epsilon_tilde(2), 0.5_pReal*epsilon_tilde(4), & 0.5_pReal*epsilon_tilde(5), 0.5_pReal*epsilon_tilde(4), epsilon_tilde(3)],[3,3]) - end function math_Voigt6to33_strain +!-------------------------------------------------------------------------------------------------- +!> @brief Convert 3x3 tensor into 6 Voigt stress vector. +!-------------------------------------------------------------------------------------------------- +pure function math_33toVoigt6_stress(sigma) result(sigma_tilde) + + real(pReal), dimension(6) :: sigma_tilde + real(pReal), dimension(3,3), intent(in) :: sigma + + + sigma_tilde = [sigma(1,1), sigma(2,2), sigma(3,3), & + sigma(3,2), sigma(3,1), sigma(1,2)] + +end function math_33toVoigt6_stress + + +!-------------------------------------------------------------------------------------------------- +!> @brief Convert 3x3 tensor into 6 Voigt strain vector. +!-------------------------------------------------------------------------------------------------- +pure function math_33toVoigt6_strain(epsilon) result(epsilon_tilde) + + real(pReal), dimension(6) :: epsilon_tilde + real(pReal), dimension(3,3), intent(in) :: epsilon + + + epsilon_tilde = [ epsilon(1,1), epsilon(2,2), epsilon(3,3), & + 2.0_pReal*epsilon(3,2), 2.0_pReal*epsilon(3,1), 2.0_pReal*epsilon(1,2)] + +end function math_33toVoigt6_strain + + + !-------------------------------------------------------------------------------------------------- !> @brief Convert 6x6 Voigt matrix into symmetric 3x3x3x3 matrix. !-------------------------------------------------------------------------------------------------- diff --git a/src/phase_mechanical_elastic.f90 b/src/phase_mechanical_elastic.f90 index 5792ea3cd..bb0422bd1 100644 --- a/src/phase_mechanical_elastic.f90 +++ b/src/phase_mechanical_elastic.f90 @@ -148,15 +148,17 @@ module subroutine phase_hooke_SandItsTangents(S, dS_dFe, dS_dFi, & dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient real(pReal), dimension(3,3) :: E + real(pReal), dimension(6,6) :: C66 real(pReal), dimension(3,3,3,3) :: C integer :: & i, j - C = math_Voigt66to3333(phase_damage_C66(phase_homogenizedC66(ph,en),ph,en)) + C66 = phase_damage_C66(phase_homogenizedC66(ph,en),ph,en) + C = math_Voigt66to3333(C66) E = 0.5_pReal*(matmul(transpose(Fe),Fe)-math_I3) !< Green-Lagrange strain in unloaded configuration - S = math_mul3333xx33(C,matmul(matmul(transpose(Fi),E),Fi)) !< 2PK stress in lattice configuration in work conjugate with GL strain pulled back to lattice configuration + S = math_Voigt6to33_stress(matmul(C66,math_33toVoigt6_strain(matmul(matmul(transpose(Fi),E),Fi))))!< 2PK stress in lattice configuration in work conjugate with GL strain pulled back to lattice configuration do i =1,3; do j=1,3 dS_dFe(i,j,1:3,1:3) = matmul(Fe,matmul(matmul(Fi,C(i,j,1:3,1:3)),transpose(Fi))) !< dS_ij/dFe_kl = C_ijmn * Fi_lm * Fi_on * Fe_ko From 8797282d37df5fdedef07bd17581fec28ecc09cf Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Mon, 22 Nov 2021 17:15:22 +0100 Subject: [PATCH 07/43] added typehints for colormap module --- python/damask/_colormap.py | 94 +++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 41 deletions(-) diff --git a/python/damask/_colormap.py b/python/damask/_colormap.py index 8c897e6ab..b1970997c 100644 --- a/python/damask/_colormap.py +++ b/python/damask/_colormap.py @@ -14,6 +14,10 @@ from PIL import Image from . import util from . import Table +from typing import Sequence, Union, Optional, List, TextIO +from io import TextIOWrapper +import pathlib + _eps = 216./24389. _kappa = 24389./27. _ref_white = np.array([.95047, 1.00000, 1.08883]) # Observer = 2, Illuminant = D65 @@ -39,20 +43,20 @@ class Colormap(mpl.colors.ListedColormap): """ - def __add__(self,other): + def __add__(self, other: "Colormap") -> "Colormap": """Concatenate.""" return Colormap(np.vstack((self.colors,other.colors)), f'{self.name}+{other.name}') - def __iadd__(self,other): + def __iadd__(self, other: "Colormap") -> "Colormap": """Concatenate (in-place).""" return self.__add__(other) - def __invert__(self): + def __invert__(self) -> "Colormap": """Reverse.""" return self.reversed() - def __repr__(self): + def __repr__(self) -> "Colormap": """Show as matplotlib figure.""" fig = plt.figure(self.name,figsize=(5,.5)) ax1 = fig.add_axes([0, 0, 1, 1]) @@ -64,7 +68,11 @@ class Colormap(mpl.colors.ListedColormap): @staticmethod - def from_range(low,high,name='DAMASK colormap',N=256,model='rgb'): + def from_range(low: Sequence[float], + high: Sequence[float], + name: str = 'DAMASK colormap', + N: int = 256, + model: str = 'rgb') -> "Colormap": """ Create a perceptually uniform colormap between given (inclusive) bounds. @@ -145,7 +153,7 @@ class Colormap(mpl.colors.ListedColormap): @staticmethod - def from_predefined(name,N=256): + def from_predefined(name: str, N: int = 256) -> "Colormap": """ Select from a set of predefined colormaps. @@ -185,7 +193,10 @@ class Colormap(mpl.colors.ListedColormap): return Colormap.from_range(definition['low'],definition['high'],name,N) - def shade(self,field,bounds=None,gap=None): + def shade(self, + field: np.ndarray, + bounds: Optional[Sequence[float]] = None, + gap: Optional[np.ndarray] = None) -> Image: """ Generate PIL image of 2D field using colormap. @@ -226,7 +237,7 @@ class Colormap(mpl.colors.ListedColormap): mode='RGBA') - def reversed(self,name=None): + def reversed(self, name: str = None) -> "Colormap": """ Reverse. @@ -251,7 +262,7 @@ class Colormap(mpl.colors.ListedColormap): return Colormap(np.array(rev.colors),rev.name[:-4] if rev.name.endswith('_r_r') else rev.name) - def _get_file_handle(self,fname,extension): + def _get_file_handle(self, fname: Union[TextIOWrapper, str, pathlib.Path, None], ext: str) -> TextIO: """ Provide file handle. @@ -260,7 +271,7 @@ class Colormap(mpl.colors.ListedColormap): fname : file, str, pathlib.Path, or None Filename or filehandle, will be name of the colormap+extension if None. - extension: str + ext: str Extension of the filename. Returns @@ -269,18 +280,17 @@ class Colormap(mpl.colors.ListedColormap): File handle with write access. """ - if fname is None: - fhandle = open(self.name.replace(' ','_')+'.'+extension,'w',newline='\n') - else: - try: - fhandle = open(fname,'w',newline='\n') - except TypeError: - fhandle = fname + fname = pathlib.Path(self.name.replace(' ','_'))\ + .with_suffix(('' if ext is None or ext.startswith('.') else '.')+ext) if fname is None else fname + if isinstance(fname, (str,pathlib.Path)): + return open(fname, 'w', newline='\n') + if isinstance(fname, TextIOWrapper): + return fname - return fhandle + raise TypeError - def save_paraview(self,fname=None): + def save_paraview(self, fname: Optional[Union[TextIOWrapper, str, pathlib.Path]] = None): """ Save as JSON file for use in Paraview. @@ -291,7 +301,7 @@ class Colormap(mpl.colors.ListedColormap): consist of the name of the colormap and extension '.json'. """ - colors = [] + colors: List = [] for i,c in enumerate(np.round(self.colors,6).tolist()): colors+=[i]+c @@ -306,7 +316,7 @@ class Colormap(mpl.colors.ListedColormap): json.dump(out,self._get_file_handle(fname,'json'),indent=4) - def save_ASCII(self,fname=None): + def save_ASCII(self, fname: Union[TextIOWrapper, str, pathlib.Path] = None): """ Save as ASCII file. @@ -322,7 +332,7 @@ class Colormap(mpl.colors.ListedColormap): t.save(self._get_file_handle(fname,'txt')) - def save_GOM(self,fname=None): + def save_GOM(self, fname: Union[TextIOWrapper, str, pathlib.Path] = None): """ Save as ASCII file for use in GOM Aramis. @@ -343,7 +353,7 @@ class Colormap(mpl.colors.ListedColormap): self._get_file_handle(fname,'legend').write(GOM_str) - def save_gmsh(self,fname=None): + def save_gmsh(self, fname: Optional[Union[TextIOWrapper, str, pathlib.Path]] = None): """ Save as ASCII file for use in gmsh. @@ -362,7 +372,9 @@ class Colormap(mpl.colors.ListedColormap): @staticmethod - def _interpolate_msh(frac,low,high): + def _interpolate_msh(frac, + low: Sequence[float], + high: Sequence[float]) -> np.ndarray: """ Interpolate in Msh color space. @@ -439,31 +451,31 @@ class Colormap(mpl.colors.ListedColormap): @staticmethod - def _hsv2rgb(hsv): + def _hsv2rgb(hsv: Sequence[float]) -> np.ndarray: """H(ue) S(aturation) V(alue) to R(red) G(reen) B(lue).""" return np.array(colorsys.hsv_to_rgb(hsv[0]/360.,hsv[1],hsv[2])) @staticmethod - def _rgb2hsv(rgb): + def _rgb2hsv(rgb: Sequence[float]) -> np.ndarray: """R(ed) G(reen) B(lue) to H(ue) S(aturation) V(alue).""" h,s,v = colorsys.rgb_to_hsv(rgb[0],rgb[1],rgb[2]) return np.array([h*360,s,v]) @staticmethod - def _hsl2rgb(hsl): + def _hsl2rgb(hsl: Sequence[float]) -> np.ndarray: """H(ue) S(aturation) L(uminance) to R(red) G(reen) B(lue).""" return np.array(colorsys.hls_to_rgb(hsl[0]/360.,hsl[2],hsl[1])) @staticmethod - def _rgb2hsl(rgb): + def _rgb2hsl(rgb: Sequence[float]) -> np.ndarray: """R(ed) G(reen) B(lue) to H(ue) S(aturation) L(uminance).""" h,l,s = colorsys.rgb_to_hls(rgb[0],rgb[1],rgb[2]) return np.array([h*360,s,l]) @staticmethod - def _xyz2rgb(xyz): + def _xyz2rgb(xyz: np.ndarray) -> np.ndarray: """ CIE Xyz to R(ed) G(reen) B(lue). @@ -483,7 +495,7 @@ class Colormap(mpl.colors.ListedColormap): return np.clip(rgb,0.,1.) @staticmethod - def _rgb2xyz(rgb): + def _rgb2xyz(rgb: np.ndarray) -> np.ndarray: """ R(ed) G(reen) B(lue) to CIE Xyz. @@ -501,7 +513,7 @@ class Colormap(mpl.colors.ListedColormap): @staticmethod - def _lab2xyz(lab,ref_white=None): + def _lab2xyz(lab: np.ndarray, ref_white: np.ndarray = None) -> np.ndarray: """ CIE Lab to CIE Xyz. @@ -520,7 +532,7 @@ class Colormap(mpl.colors.ListedColormap): ])*(ref_white if ref_white is not None else _ref_white) @staticmethod - def _xyz2lab(xyz,ref_white=None): + def _xyz2lab(xyz: np.ndarray, ref_white: Optional[np.ndarray] = None) -> np.ndarray: """ CIE Xyz to CIE Lab. @@ -540,7 +552,7 @@ class Colormap(mpl.colors.ListedColormap): @staticmethod - def _lab2msh(lab): + def _lab2msh(lab: np.ndarray) -> np.ndarray: """ CIE Lab to Msh. @@ -558,7 +570,7 @@ class Colormap(mpl.colors.ListedColormap): ]) @staticmethod - def _msh2lab(msh): + def _msh2lab(msh: np.ndarray) -> np.ndarray: """ Msh to CIE Lab. @@ -575,29 +587,29 @@ class Colormap(mpl.colors.ListedColormap): ]) @staticmethod - def _lab2rgb(lab): + def _lab2rgb(lab: np.ndarray) -> np.ndarray: return Colormap._xyz2rgb(Colormap._lab2xyz(lab)) @staticmethod - def _rgb2lab(rgb): + def _rgb2lab(rgb: np.ndarray) -> np.ndarray: return Colormap._xyz2lab(Colormap._rgb2xyz(rgb)) @staticmethod - def _msh2rgb(msh): + def _msh2rgb(msh: np.ndarray) -> np.ndarray: return Colormap._lab2rgb(Colormap._msh2lab(msh)) @staticmethod - def _rgb2msh(rgb): + def _rgb2msh(rgb: np.ndarray) -> np.ndarray: return Colormap._lab2msh(Colormap._rgb2lab(rgb)) @staticmethod - def _hsv2msh(hsv): + def _hsv2msh(hsv: np.ndarray) -> np.ndarray: return Colormap._rgb2msh(Colormap._hsv2rgb(hsv)) @staticmethod - def _hsl2msh(hsl): + def _hsl2msh(hsl: np.ndarray) -> np.ndarray: return Colormap._rgb2msh(Colormap._hsl2rgb(hsl)) @staticmethod - def _xyz2msh(xyz): + def _xyz2msh(xyz: np.ndarray) -> np.ndarray: return Colormap._lab2msh(Colormap._xyz2lab(xyz)) From 3410a8d4cba00b678e55ab697717ea656be839ef Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 23 Nov 2021 16:34:50 +0100 Subject: [PATCH 08/43] follow order of imports - python standard library - third party - DAMASK internal --- python/damask/_colormap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/damask/_colormap.py b/python/damask/_colormap.py index b1970997c..0db6cb2c1 100644 --- a/python/damask/_colormap.py +++ b/python/damask/_colormap.py @@ -2,6 +2,10 @@ import os import json import functools import colorsys +from pathlib import Path +from typing import Sequence, Union, Optional, List, TextIO +from io import TextIOWrapper + import numpy as np import matplotlib as mpl @@ -14,10 +18,6 @@ from PIL import Image from . import util from . import Table -from typing import Sequence, Union, Optional, List, TextIO -from io import TextIOWrapper -import pathlib - _eps = 216./24389. _kappa = 24389./27. _ref_white = np.array([.95047, 1.00000, 1.08883]) # Observer = 2, Illuminant = D65 From 889ab8791468a746590d91c55436d6bb00e4fc98 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 23 Nov 2021 17:59:56 +0100 Subject: [PATCH 09/43] simplified and corrected - Optional not needed for 'None' argument - Use TextIO for typehints, TextIOWrapper seems to cause problems - Test for tuple/list input for public functions - internal functions that are always called with np.ndarray don't need to offer flexibility. They might work, but we don't guarantee anything. --- python/damask/_colormap.py | 44 ++++++++++++++++------------------- python/tests/test_Colormap.py | 5 ++++ 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/python/damask/_colormap.py b/python/damask/_colormap.py index 0db6cb2c1..5032d6b18 100644 --- a/python/damask/_colormap.py +++ b/python/damask/_colormap.py @@ -3,8 +3,7 @@ import json import functools import colorsys from pathlib import Path -from typing import Sequence, Union, Optional, List, TextIO -from io import TextIOWrapper +from typing import Sequence, Union, List, TextIO import numpy as np @@ -56,7 +55,7 @@ class Colormap(mpl.colors.ListedColormap): """Reverse.""" return self.reversed() - def __repr__(self) -> "Colormap": + def __repr__(self) -> str: """Show as matplotlib figure.""" fig = plt.figure(self.name,figsize=(5,.5)) ax1 = fig.add_axes([0, 0, 1, 1]) @@ -195,8 +194,8 @@ class Colormap(mpl.colors.ListedColormap): def shade(self, field: np.ndarray, - bounds: Optional[Sequence[float]] = None, - gap: Optional[np.ndarray] = None) -> Image: + bounds: Sequence[float] = None, + gap: float = None) -> Image: """ Generate PIL image of 2D field using colormap. @@ -262,7 +261,7 @@ class Colormap(mpl.colors.ListedColormap): return Colormap(np.array(rev.colors),rev.name[:-4] if rev.name.endswith('_r_r') else rev.name) - def _get_file_handle(self, fname: Union[TextIOWrapper, str, pathlib.Path, None], ext: str) -> TextIO: + def _get_file_handle(self, fname: Union[TextIO, str, Path, None], ext: str) -> TextIO: """ Provide file handle. @@ -270,7 +269,6 @@ class Colormap(mpl.colors.ListedColormap): ---------- fname : file, str, pathlib.Path, or None Filename or filehandle, will be name of the colormap+extension if None. - ext: str Extension of the filename. @@ -280,17 +278,15 @@ class Colormap(mpl.colors.ListedColormap): File handle with write access. """ - fname = pathlib.Path(self.name.replace(' ','_'))\ - .with_suffix(('' if ext is None or ext.startswith('.') else '.')+ext) if fname is None else fname - if isinstance(fname, (str,pathlib.Path)): + if fname is None: + return open(self.name.replace(' ','_')+'.'+ext, 'w', newline='\n') + elif isinstance(fname, (str, Path)): return open(fname, 'w', newline='\n') - if isinstance(fname, TextIOWrapper): + else: return fname - raise TypeError - - def save_paraview(self, fname: Optional[Union[TextIOWrapper, str, pathlib.Path]] = None): + def save_paraview(self, fname: Union[TextIO, str, Path] = None): """ Save as JSON file for use in Paraview. @@ -316,7 +312,7 @@ class Colormap(mpl.colors.ListedColormap): json.dump(out,self._get_file_handle(fname,'json'),indent=4) - def save_ASCII(self, fname: Union[TextIOWrapper, str, pathlib.Path] = None): + def save_ASCII(self, fname: Union[TextIO, str, Path] = None): """ Save as ASCII file. @@ -332,7 +328,7 @@ class Colormap(mpl.colors.ListedColormap): t.save(self._get_file_handle(fname,'txt')) - def save_GOM(self, fname: Union[TextIOWrapper, str, pathlib.Path] = None): + def save_GOM(self, fname: Union[TextIO, str, Path] = None): """ Save as ASCII file for use in GOM Aramis. @@ -353,7 +349,7 @@ class Colormap(mpl.colors.ListedColormap): self._get_file_handle(fname,'legend').write(GOM_str) - def save_gmsh(self, fname: Optional[Union[TextIOWrapper, str, pathlib.Path]] = None): + def save_gmsh(self, fname: Union[TextIO, str, Path] = None): """ Save as ASCII file for use in gmsh. @@ -373,8 +369,8 @@ class Colormap(mpl.colors.ListedColormap): @staticmethod def _interpolate_msh(frac, - low: Sequence[float], - high: Sequence[float]) -> np.ndarray: + low: np.ndarray, + high: np.ndarray) -> np.ndarray: """ Interpolate in Msh color space. @@ -451,24 +447,24 @@ class Colormap(mpl.colors.ListedColormap): @staticmethod - def _hsv2rgb(hsv: Sequence[float]) -> np.ndarray: + def _hsv2rgb(hsv: np.ndarray) -> np.ndarray: """H(ue) S(aturation) V(alue) to R(red) G(reen) B(lue).""" return np.array(colorsys.hsv_to_rgb(hsv[0]/360.,hsv[1],hsv[2])) @staticmethod - def _rgb2hsv(rgb: Sequence[float]) -> np.ndarray: + def _rgb2hsv(rgb: np.ndarray) -> np.ndarray: """R(ed) G(reen) B(lue) to H(ue) S(aturation) V(alue).""" h,s,v = colorsys.rgb_to_hsv(rgb[0],rgb[1],rgb[2]) return np.array([h*360,s,v]) @staticmethod - def _hsl2rgb(hsl: Sequence[float]) -> np.ndarray: + def _hsl2rgb(hsl: np.ndarray) -> np.ndarray: """H(ue) S(aturation) L(uminance) to R(red) G(reen) B(lue).""" return np.array(colorsys.hls_to_rgb(hsl[0]/360.,hsl[2],hsl[1])) @staticmethod - def _rgb2hsl(rgb: Sequence[float]) -> np.ndarray: + def _rgb2hsl(rgb: np.ndarray) -> np.ndarray: """R(ed) G(reen) B(lue) to H(ue) S(aturation) L(uminance).""" h,l,s = colorsys.rgb_to_hls(rgb[0],rgb[1],rgb[2]) return np.array([h*360,s,l]) @@ -532,7 +528,7 @@ class Colormap(mpl.colors.ListedColormap): ])*(ref_white if ref_white is not None else _ref_white) @staticmethod - def _xyz2lab(xyz: np.ndarray, ref_white: Optional[np.ndarray] = None) -> np.ndarray: + def _xyz2lab(xyz: np.ndarray, ref_white: np.ndarray = None) -> np.ndarray: """ CIE Xyz to CIE Lab. diff --git a/python/tests/test_Colormap.py b/python/tests/test_Colormap.py index 81bf8d2f6..46b096d19 100644 --- a/python/tests/test_Colormap.py +++ b/python/tests/test_Colormap.py @@ -77,6 +77,11 @@ class TestColormap: # xyz2msh assert np.allclose(Colormap._xyz2msh(xyz),msh,atol=1.e-6,rtol=0) + @pytest.mark.parametrize('low,high',[((0,0,0),(1,1,1)), + ([0,0,0],[1,1,1]), + (np.array([0,0,0]),np.array([1,1,1]))]) + def test_from_range_types(self,low,high): + c = Colormap.from_range(low,high) # noqa @pytest.mark.parametrize('format',['ASCII','paraview','GOM','gmsh']) @pytest.mark.parametrize('model',['rgb','hsv','hsl','xyz','lab','msh']) From 3393d32d9faee4f1ce549387155d2e83b7d499b3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 23 Nov 2021 19:42:10 +0100 Subject: [PATCH 10/43] more sensible test vor sequence arguments --- python/tests/test_Colormap.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/tests/test_Colormap.py b/python/tests/test_Colormap.py index 46b096d19..45f2cbc91 100644 --- a/python/tests/test_Colormap.py +++ b/python/tests/test_Colormap.py @@ -78,10 +78,9 @@ class TestColormap: assert np.allclose(Colormap._xyz2msh(xyz),msh,atol=1.e-6,rtol=0) @pytest.mark.parametrize('low,high',[((0,0,0),(1,1,1)), - ([0,0,0],[1,1,1]), - (np.array([0,0,0]),np.array([1,1,1]))]) + ([0,0,0],[1,1,1])]) def test_from_range_types(self,low,high): - c = Colormap.from_range(low,high) # noqa + assert Colormap.from_range(low,high) == Colormap.from_range(np.array(low),np.array(high)) @pytest.mark.parametrize('format',['ASCII','paraview','GOM','gmsh']) @pytest.mark.parametrize('model',['rgb','hsv','hsl','xyz','lab','msh']) From c23e9fb126269859b442bb50445dc0af8412305f Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 23 Nov 2021 20:34:19 +0100 Subject: [PATCH 11/43] __eq__ not implemented probably also not very much used outside tests --- python/tests/test_Colormap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/tests/test_Colormap.py b/python/tests/test_Colormap.py index 45f2cbc91..342165134 100644 --- a/python/tests/test_Colormap.py +++ b/python/tests/test_Colormap.py @@ -80,7 +80,9 @@ class TestColormap: @pytest.mark.parametrize('low,high',[((0,0,0),(1,1,1)), ([0,0,0],[1,1,1])]) def test_from_range_types(self,low,high): - assert Colormap.from_range(low,high) == Colormap.from_range(np.array(low),np.array(high)) + a = Colormap.from_range(low,high) + b = Colormap.from_range(np.array(low),np.array(high)) + assert np.all(a.colors == b.colors) @pytest.mark.parametrize('format',['ASCII','paraview','GOM','gmsh']) @pytest.mark.parametrize('model',['rgb','hsv','hsl','xyz','lab','msh']) From 150b0696271a99aa850dec40acf22221dd7cd201 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 12:24:12 +0100 Subject: [PATCH 12/43] simplify search for interaction parameters --- src/lattice.f90 | 52 ++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 0e24d1b18..dfdbf2b91 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -219,18 +219,18 @@ module lattice 2, -1, -1, 0, 0, 1, -1, 0, & -1, 2, -1, 0, -1, 0, 1, 0, & -1, -1, 2, 0, 1, -1, 0, 0, & - ! <-11.0>{11.0}/2nd order prismatic compound systems (plane normal independent of c/a-ratio) + ! <-11.0>{11.0}/2. order prismatic compound systems (plane normal independent of c/a-ratio) -1, 1, 0, 0, 1, 1, -2, 0, & 0, -1, 1, 0, -2, 1, 1, 0, & 1, 0, -1, 0, 1, -2, 1, 0, & - ! <-1-1.0>{-11.1}/1st order pyramidal systems (direction independent of c/a-ratio) + ! <-1-1.0>{-11.1}/1. order pyramidal systems (direction independent of c/a-ratio) -1, 2, -1, 0, 1, 0, -1, 1, & -2, 1, 1, 0, 0, 1, -1, 1, & -1, -1, 2, 0, -1, 1, 0, 1, & 1, -2, 1, 0, -1, 0, 1, 1, & 2, -1, -1, 0, 0, -1, 1, 1, & 1, 1, -2, 0, 1, -1, 0, 1, & - ! <11.3>{-10.1}/1st order pyramidal systems (direction independent of c/a-ratio) + ! <11.3>{-10.1}/1. order pyramidal systems (direction independent of c/a-ratio) -2, 1, 1, 3, 1, 0, -1, 1, & -1, -1, 2, 3, 1, 0, -1, 1, & -1, -1, 2, 3, 0, 1, -1, 1, & @@ -243,7 +243,7 @@ module lattice -1, 2, -1, 3, 0, -1, 1, 1, & -1, 2, -1, 3, 1, -1, 0, 1, & -2, 1, 1, 3, 1, -1, 0, 1, & - ! <11.3>{-1-1.2}/2nd order pyramidal systems + ! <11.3>{-1-1.2}/2. order pyramidal systems -1, -1, 2, 3, 1, 1, -2, 2, & 1, -2, 1, 3, -1, 2, -1, 2, & 2, -1, -1, 3, -2, 1, 1, 2, & @@ -751,22 +751,23 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( integer, dimension(HEX_NSLIP,HEX_NSLIP), parameter :: & HEX_INTERACTIONSLIPSLIP = reshape( [& + ! basal prism 2. prism pyr 1. pyr 2. pyr 1, 2, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! -----> acting (forest) - 2, 1, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | + 2, 1, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | basal 2, 2, 1, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | ! v 6, 6, 6, 4, 5, 5, 8, 8, 8, 14,14,14,14,14,14, 22,22,22,22,22,22,22,22,22,22,22,22, 32,32,32,32,32,32, & ! reacting (primary) - 6, 6, 6, 5, 4, 5, 8, 8, 8, 14,14,14,14,14,14, 22,22,22,22,22,22,22,22,22,22,22,22, 32,32,32,32,32,32, & + 6, 6, 6, 5, 4, 5, 8, 8, 8, 14,14,14,14,14,14, 22,22,22,22,22,22,22,22,22,22,22,22, 32,32,32,32,32,32, & ! prism 6, 6, 6, 5, 5, 4, 8, 8, 8, 14,14,14,14,14,14, 22,22,22,22,22,22,22,22,22,22,22,22, 32,32,32,32,32,32, & 12,12,12, 11,11,11, 9,10,10, 15,15,15,15,15,15, 23,23,23,23,23,23,23,23,23,23,23,23, 33,33,33,33,33,33, & - 12,12,12, 11,11,11, 10, 9,10, 15,15,15,15,15,15, 23,23,23,23,23,23,23,23,23,23,23,23, 33,33,33,33,33,33, & + 12,12,12, 11,11,11, 10, 9,10, 15,15,15,15,15,15, 23,23,23,23,23,23,23,23,23,23,23,23, 33,33,33,33,33,33, & ! 2. prism 12,12,12, 11,11,11, 10,10, 9, 15,15,15,15,15,15, 23,23,23,23,23,23,23,23,23,23,23,23, 33,33,33,33,33,33, & 20,20,20, 19,19,19, 18,18,18, 16,17,17,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,16,17,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,17,16,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & - 20,20,20, 19,19,19, 18,18,18, 17,17,17,16,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & + 20,20,20, 19,19,19, 18,18,18, 17,17,17,16,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & ! pyr 20,20,20, 19,19,19, 18,18,18, 17,17,17,17,16,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,17,17,17,17,16, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & @@ -776,7 +777,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,25,26,26,26,26,26,26,26,26, 35,35,35,35,35,35, & 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,25,26,26,26,26,26,26,26, 35,35,35,35,35,35, & 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,25,26,26,26,26,26,26, 35,35,35,35,35,35, & - 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,25,26,26,26,26,26, 35,35,35,35,35,35, & + 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,25,26,26,26,26,26, 35,35,35,35,35,35, & ! 1. pyr 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,26,25,26,26,26,26, 35,35,35,35,35,35, & 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,26,26,25,26,26,26, 35,35,35,35,35,35, & 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,26,26,26,25,26,26, 35,35,35,35,35,35, & @@ -786,7 +787,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 36,37,37,37,37,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,36,37,37,37,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,36,37,37,37, & - 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,36,37,37, & + 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,36,37,37, & ! 2. pyr 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,36,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,37,36 & ],shape(HEX_INTERACTIONSLIPSLIP)) !< Slip-slip interaction types for hex (onion peel naming scheme) @@ -932,31 +933,32 @@ function lattice_interaction_TwinByTwin(Ntwin,interactionValues,lattice) result( !< 3: other interaction integer, dimension(HEX_NTWIN,HEX_NTWIN), parameter :: & HEX_INTERACTIONTWINTWIN = reshape( [& + ! <-10.1>{10.2} <11.6>{-1-1.1} <10.-2>{10.1} <11.-3>{11.2} 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! -----> acting 2, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! | 2, 2, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! | - 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! v + 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! v <-10.1>{10.2} 2, 2, 2, 2, 1, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! reacting 2, 2, 2, 2, 2, 1, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & 6, 6, 6, 6, 6, 6, 4, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & 6, 6, 6, 6, 6, 6, 5, 4, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & 6, 6, 6, 6, 6, 6, 5, 5, 4, 5, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & - 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & + 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & ! <11.6>{-1-1.1} 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & 12,12,12,12,12,12, 11,11,11,11,11,11, 9,10,10,10,10,10, 15,15,15,15,15,15, & 12,12,12,12,12,12, 11,11,11,11,11,11, 10, 9,10,10,10,10, 15,15,15,15,15,15, & 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10, 9,10,10,10, 15,15,15,15,15,15, & - 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10,10, 9,10,10, 15,15,15,15,15,15, & + 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10,10, 9,10,10, 15,15,15,15,15,15, & ! <10.-2>{10.1} 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10,10,10, 9,10, 15,15,15,15,15,15, & 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10,10,10,10, 9, 15,15,15,15,15,15, & 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 16,17,17,17,17,17, & 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,16,17,17,17,17, & 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,16,17,17,17, & - 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,17,16,17,17, & + 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,17,16,17,17, & ! <11.-3>{11.2} 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,17,17,16,17, & 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,17,17,17,16 & ],shape(HEX_INTERACTIONTWINTWIN)) !< Twin-twin interaction types for hex @@ -1123,22 +1125,23 @@ function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,lattice) r integer, dimension(HEX_NTWIN,HEX_NSLIP), parameter :: & HEX_INTERACTIONSLIPTWIN = reshape( [& + ! <-10.1>{10.2} <11.6>{-1-1.1} <10.-2>{10.1} <11.-3>{11.2} 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! ----> twin (acting) - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! | + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! | basal 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! | ! v 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & ! slip (reacting) - 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & + 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & ! prism 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & - 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & + 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & ! 2.prism 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & - 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & + 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & ! pyr 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & @@ -1148,7 +1151,7 @@ function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,lattice) r 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & - 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & + 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & ! 1. pyr 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & @@ -1158,7 +1161,7 @@ function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,lattice) r 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & - 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & + 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & ! 2. pyr 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24 & ],shape(HEX_INTERACTIONSLIPTWIN)) !< Slip-twin interaction types for hex @@ -1262,31 +1265,32 @@ function lattice_interaction_TwinBySlip(Ntwin,Nslip,interactionValues,lattice) r integer, dimension(HEX_NSLIP,HEX_NTWIN), parameter :: & HEX_INTERACTIONTWINSLIP = reshape( [& + ! basal prism 2. prism pyr 1. pyr 2. pyr 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! ----> slip (acting) 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! | 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! | - 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! v + 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! v <-10.1>{10.2} 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! twin (reacting) 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & - 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & + 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & ! <11.6>{-1-1.1} 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & - 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & + 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & ! <10.-2>{10.1} 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & - 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & + 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & ! <11.-3>{11.2} 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24 & ],shape(HEX_INTERACTIONTWINSLIP)) !< Twin-slip interaction types for hex From 56bc3bc71ddc31b12b911881d30d89abba973acf Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 15:48:11 +0100 Subject: [PATCH 13/43] simplify counting, emphasize floating point values --- .../mechanical/plastic/phenopowerlaw_Mg.yaml | 17 +++++++++++++---- .../mechanical/plastic/phenopowerlaw_Ti.yaml | 6 +++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml index b29075173..88c8c4a54 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml @@ -23,7 +23,16 @@ f_sat_sl-tw: 10.0 h_0_sl-sl: 500.0e+6 h_0_tw-tw: 50.0e+6 h_0_tw-sl: 150.0e+6 -h_sl-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -h_tw-tw: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -h_tw-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -h_sl-tw: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] +h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0] +h_tw-tw: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] +h_tw-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0] +h_sl-tw: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0] diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml index 804cf4541..ea2257ab3 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml @@ -20,4 +20,8 @@ xi_inf_sl: [568.e+6, 150.e+7, 0.0, 0.0, 3420.e+6] # L. Wang et al. : # xi_0_sl: [127.e+6, 96.e+6, 0.0, 0.0, 240.e+6] -h_sl-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] +h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] From 719996f285c313832e19aa41fb063576b9d0b2d5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 15:52:38 +0100 Subject: [PATCH 14/43] trailing definitions not needed --- .../config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml index ea2257ab3..a54b0fa72 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml @@ -8,7 +8,7 @@ references: https://doi.org/10.1016/j.actamat.2017.05.015 output: [gamma_sl] -N_sl: [3, 3, 0, 0, 12] # basal, 1. prism, -, -, 2. pyr +N_sl: [3, 3, 0, 0, 12] # basal, 1. prism, -, -, 1. pyr n_sl: 20 a_sl: 2.0 dot_gamma_0_sl: 0.001 @@ -23,5 +23,4 @@ xi_inf_sl: [568.e+6, 150.e+7, 0.0, 0.0, 3420.e+6] h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] From 757ba4dba298dd6239cbba44b34da161feb50011 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 17:26:58 +0100 Subject: [PATCH 15/43] in-line with pathlib.Path --- python/damask/_colormap.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/damask/_colormap.py b/python/damask/_colormap.py index 5032d6b18..22e44a43c 100644 --- a/python/damask/_colormap.py +++ b/python/damask/_colormap.py @@ -261,7 +261,7 @@ class Colormap(mpl.colors.ListedColormap): return Colormap(np.array(rev.colors),rev.name[:-4] if rev.name.endswith('_r_r') else rev.name) - def _get_file_handle(self, fname: Union[TextIO, str, Path, None], ext: str) -> TextIO: + def _get_file_handle(self, fname: Union[TextIO, str, Path, None], suffix: str) -> TextIO: """ Provide file handle. @@ -269,7 +269,7 @@ class Colormap(mpl.colors.ListedColormap): ---------- fname : file, str, pathlib.Path, or None Filename or filehandle, will be name of the colormap+extension if None. - ext: str + suffix: str Extension of the filename. Returns @@ -279,7 +279,7 @@ class Colormap(mpl.colors.ListedColormap): """ if fname is None: - return open(self.name.replace(' ','_')+'.'+ext, 'w', newline='\n') + return open(self.name.replace(' ','_')+suffix, 'w', newline='\n') elif isinstance(fname, (str, Path)): return open(fname, 'w', newline='\n') else: @@ -309,7 +309,7 @@ class Colormap(mpl.colors.ListedColormap): 'RGBPoints':colors }] - json.dump(out,self._get_file_handle(fname,'json'),indent=4) + json.dump(out,self._get_file_handle(fname,'.json'),indent=4) def save_ASCII(self, fname: Union[TextIO, str, Path] = None): @@ -325,7 +325,7 @@ class Colormap(mpl.colors.ListedColormap): """ labels = {'RGBA':4} if self.colors.shape[1] == 4 else {'RGB': 3} t = Table(self.colors,labels,f'Creator: {util.execution_stamp("Colormap")}') - t.save(self._get_file_handle(fname,'txt')) + t.save(self._get_file_handle(fname,'.txt')) def save_GOM(self, fname: Union[TextIO, str, Path] = None): @@ -346,7 +346,7 @@ class Colormap(mpl.colors.ListedColormap): + ' '.join([f' 0 {c[0]} {c[1]} {c[2]} 255 1' for c in reversed((self.colors*255).astype(int))]) \ + '\n' - self._get_file_handle(fname,'legend').write(GOM_str) + self._get_file_handle(fname,'.legend').write(GOM_str) def save_gmsh(self, fname: Union[TextIO, str, Path] = None): @@ -364,7 +364,7 @@ class Colormap(mpl.colors.ListedColormap): gmsh_str = 'View.ColorTable = {\n' \ +'\n'.join([f'{c[0]},{c[1]},{c[2]},' for c in self.colors[:,:3]*255]) \ +'\n}\n' - self._get_file_handle(fname,'msh').write(gmsh_str) + self._get_file_handle(fname,'.msh').write(gmsh_str) @staticmethod From 97ffb8c88e9bf7c41b3be9af07837d032c475c13 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 19:17:47 +0100 Subject: [PATCH 16/43] guide the user + needed for consistent indentation (make YAMLlint happy) --- .../mechanical/plastic/phenopowerlaw_Mg.yaml | 26 +++++++++---------- .../mechanical/plastic/phenopowerlaw_Ti.yaml | 7 +++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml index 88c8c4a54..4c5021545 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml @@ -23,16 +23,16 @@ f_sat_sl-tw: 10.0 h_0_sl-sl: 500.0e+6 h_0_tw-tw: 50.0e+6 h_0_tw-sl: 150.0e+6 -h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0] -h_tw-tw: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] -h_tw-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0] -h_sl-tw: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0] +h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, + -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, + -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, + +1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, + +1.0, 1.0] # unused entries are indicated by -1.0 +h_tw-tw: [+1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, + -1.0, 1.0] # unused entries are indicated by -1.0 +h_tw-sl: [+1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, + -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, + +1.0, -1.0, 1.0, -1.0] # unused entries are indicated by -1.0 +h_sl-tw: [+1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, + -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, + +1.0, -1.0, 1.0] # unused entries are indicated by -1.0 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml index a54b0fa72..85fd2ee8e 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml @@ -20,7 +20,6 @@ xi_inf_sl: [568.e+6, 150.e+7, 0.0, 0.0, 3420.e+6] # L. Wang et al. : # xi_0_sl: [127.e+6, 96.e+6, 0.0, 0.0, 240.e+6] -h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] +h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, + -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, + +1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0] # unused entries are indicated by -1.0 From 3cae915e4744d32497dfc559738e7f08d8a1b434 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 21:12:13 +0100 Subject: [PATCH 17/43] not needed a = [] is already a list --- python/damask/_colormap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/_colormap.py b/python/damask/_colormap.py index 22e44a43c..40aab652c 100644 --- a/python/damask/_colormap.py +++ b/python/damask/_colormap.py @@ -3,7 +3,7 @@ import json import functools import colorsys from pathlib import Path -from typing import Sequence, Union, List, TextIO +from typing import Sequence, Union, TextIO import numpy as np @@ -297,7 +297,7 @@ class Colormap(mpl.colors.ListedColormap): consist of the name of the colormap and extension '.json'. """ - colors: List = [] + colors = [] for i,c in enumerate(np.round(self.colors,6).tolist()): colors+=[i]+c From 35f20811cbec1dc111ccff6b885fd6841934a930 Mon Sep 17 00:00:00 2001 From: Sharan Roongta Date: Wed, 24 Nov 2021 22:51:14 +0100 Subject: [PATCH 18/43] thermal dependent C --- PRIVATE | 2 +- src/phase_mechanical_elastic.f90 | 51 ++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/PRIVATE b/PRIVATE index 76bb51348..7cae6f6fb 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 76bb51348de75207d483d369628670e5ae51dca9 +Subproject commit 7cae6f6fb6daca513fefbce21e4f07ab36fd3c78 diff --git a/src/phase_mechanical_elastic.f90 b/src/phase_mechanical_elastic.f90 index 1b39f51ee..e2999d96f 100644 --- a/src/phase_mechanical_elastic.f90 +++ b/src/phase_mechanical_elastic.f90 @@ -1,7 +1,7 @@ submodule(phase:mechanical) elastic type :: tParameters - real(pReal) :: & + real(pReal),dimension(3) :: & C_11 = 0.0_pReal, & C_12 = 0.0_pReal, & C_13 = 0.0_pReal, & @@ -28,7 +28,7 @@ module subroutine elastic_init(phases) phase, & mech, & elastic - + logical :: thermal_active print'(/,1x,a)', '<<<+- phase:mechanical:elastic init -+>>>' print'(/,1x,a)', '<<<+- phase:mechanical:elastic:Hooke init -+>>>' @@ -45,15 +45,33 @@ module subroutine elastic_init(phases) associate(prm => param(ph)) - prm%C_11 = elastic%get_asFloat('C_11') - prm%C_12 = elastic%get_asFloat('C_12') - prm%C_44 = elastic%get_asFloat('C_44') - + prm%C_11(1) = elastic%get_asFloat('C_11') + prm%C_11(2) = elastic%get_asFloat('C_11,T', defaultVal=0.0_pReal) + prm%C_11(3) = elastic%get_asFloat('C_11,T^2',defaultVal=0.0_pReal) + + prm%C_12(1) = elastic%get_asFloat('C_12') + prm%C_12(2) = elastic%get_asFloat('C_12,T', defaultVal=0.0_pReal) + prm%C_12(3) = elastic%get_asFloat('C_12,T^2',defaultVal=0.0_pReal) + + prm%C_44(1) = elastic%get_asFloat('C_44') + prm%C_44(2) = elastic%get_asFloat('C_44,T', defaultVal=0.0_pReal) + prm%C_44(3) = elastic%get_asFloat('C_44,T^2',defaultVal=0.0_pReal) + if (any(phase_lattice(ph) == ['hP','tI'])) then - prm%C_13 = elastic%get_asFloat('C_13') - prm%C_33 = elastic%get_asFloat('C_33') + prm%C_13(1) = elastic%get_asFloat('C_13') + prm%C_13(2) = elastic%get_asFloat('C_13,T', defaultVal=0.0_pReal) + prm%C_13(3) = elastic%get_asFloat('C_13,T^2',defaultVal=0.0_pReal) + + prm%C_33(1) = elastic%get_asFloat('C_33') + prm%C_33(2) = elastic%get_asFloat('C_33,T', defaultVal=0.0_pReal) + prm%C_33(3) = elastic%get_asFloat('C_33,T^2',defaultVal=0.0_pReal) + end if + + if (phase_lattice(ph) == 'tI') then + prm%C_66(1) = elastic%get_asFloat('C_66') + prm%C_66(2) = elastic%get_asFloat('C_66,T', defaultVal=0.0_pReal) + prm%C_66(3) = elastic%get_asFloat('C_66,T^2',defaultVal=0.0_pReal) end if - if (phase_lattice(ph) == 'tI') prm%C_66 = elastic%get_asFloat('C_66') end associate end do @@ -70,20 +88,21 @@ module function elastic_C66(ph,en) result(C66) ph, & en real(pReal), dimension(6,6) :: C66 - + real(pReal) :: T associate(prm => param(ph)) C66 = 0.0_pReal - C66(1,1) = prm%C_11 - C66(1,2) = prm%C_12 - C66(4,4) = prm%C_44 + T = thermal_T(ph,en) + C66(1,1) = prm%C_11(1) + prm%C_11(2)*T + prm%C_11(3)*T**2 + C66(1,2) = prm%C_12(1) + prm%C_12(2)*T + prm%C_12(3)*T**2 + C66(4,4) = prm%C_44(1) + prm%C_44(2)*T + prm%C_44(3)*T**2 if (any(phase_lattice(ph) == ['hP','tI'])) then - C66(1,3) = prm%C_13 - C66(3,3) = prm%C_33 + C66(1,3) = prm%C_13(1) + prm%C_13(2)*T + prm%C_13(3)*T**2 + C66(3,3) = prm%C_33(1) + prm%C_33(2)*T + prm%C_33(3)*T**2 end if - if (phase_lattice(ph) == 'tI') C66(6,6) = prm%C_66 + if (phase_lattice(ph) == 'tI') C66(6,6) = prm%C_66(1) + prm%C_66(2)*T + prm%C_66(3)*T**2 C66 = lattice_symmetrize_C66(C66,phase_lattice(ph)) From 0cf78da46d6c6ceb03914cd3e3f9a3dcaee688b6 Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 25 Nov 2021 04:21:18 +0100 Subject: [PATCH 19/43] [skip ci] updated version information after successful test of v3.0.0-alpha5-164-gdc993bc6f --- python/damask/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/VERSION b/python/damask/VERSION index bc442df02..44b22368f 100644 --- a/python/damask/VERSION +++ b/python/damask/VERSION @@ -1 +1 @@ -v3.0.0-alpha5-155-gbf76d9f3a +v3.0.0-alpha5-164-gdc993bc6f From bc30248b95a4fbcf8070fd9e0aa94af7d1355950 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 25 Nov 2021 06:12:55 +0100 Subject: [PATCH 20/43] 0K is not a good reference --- src/phase_mechanical_eigen_thermalexpansion.f90 | 2 +- src/phase_mechanical_plastic_dislotwin.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phase_mechanical_eigen_thermalexpansion.f90 b/src/phase_mechanical_eigen_thermalexpansion.f90 index 1c08140ae..e48e56672 100644 --- a/src/phase_mechanical_eigen_thermalexpansion.f90 +++ b/src/phase_mechanical_eigen_thermalexpansion.f90 @@ -58,7 +58,7 @@ module function thermalexpansion_init(kinematics_length) result(myKinematics) associate(prm => param(kinematics_thermal_expansion_instance(p))) kinematic_type => kinematics%get(k) - prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=0.0_pReal) + prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=300.0_pReal) prm%A(1,1,1) = kinematic_type%get_asFloat('A_11') prm%A(1,1,2) = kinematic_type%get_asFloat('A_11,T',defaultVal=0.0_pReal) diff --git a/src/phase_mechanical_plastic_dislotwin.f90 b/src/phase_mechanical_plastic_dislotwin.f90 index 10522737c..c26dc2a32 100644 --- a/src/phase_mechanical_plastic_dislotwin.f90 +++ b/src/phase_mechanical_plastic_dislotwin.f90 @@ -31,7 +31,7 @@ submodule(phase:plastic) dislotwin delta_G = 1.0_pReal, & !< Free energy difference between austensite and martensite i_tr = 1.0_pReal, & !< adjustment parameter to calculate MFP for transformation h = 1.0_pReal, & !< Stack height of hex nucleus - T_ref = 0.0_pReal, & + T_ref = 300.0_pReal, & a_cI = 1.0_pReal, & a_cF = 1.0_pReal real(pReal), dimension(2) :: & From e9418672907ccd5974ac568bd939ddf8880a71b2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 25 Nov 2021 06:21:56 +0100 Subject: [PATCH 21/43] single source of truth --- src/commercialFEM_fileList.f90 | 1 + src/constants.f90 | 15 +++++++++++++++ src/phase.f90 | 1 + src/phase_mechanical_eigen_thermalexpansion.f90 | 2 +- src/phase_mechanical_plastic_dislotungsten.f90 | 3 --- src/phase_mechanical_plastic_dislotwin.f90 | 5 +---- src/phase_mechanical_plastic_nonlocal.f90 | 3 --- 7 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 src/constants.f90 diff --git a/src/commercialFEM_fileList.f90 b/src/commercialFEM_fileList.f90 index e1d53ca83..e67149dea 100644 --- a/src/commercialFEM_fileList.f90 +++ b/src/commercialFEM_fileList.f90 @@ -4,6 +4,7 @@ !> @details List of files needed by MSC.Marc !-------------------------------------------------------------------------------------------------- #include "parallelization.f90" +#include "constants.f90" #include "IO.f90" #include "YAML_types.f90" #include "YAML_parse.f90" diff --git a/src/constants.f90 b/src/constants.f90 new file mode 100644 index 000000000..5a5f44875 --- /dev/null +++ b/src/constants.f90 @@ -0,0 +1,15 @@ +!-------------------------------------------------------------------------------------------------- +!> @author Martin Diehl, KU Leuven +!> @brief physical constants +!-------------------------------------------------------------------------------------------------- +module constants + use prec + + implicit none + public + + real(pReal), parameter :: & + T_ROOM = 300.0_pReal, & !< Room temperature in K + kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin + +end module constants diff --git a/src/phase.f90 b/src/phase.f90 index 22c35416b..214b0f5fa 100644 --- a/src/phase.f90 +++ b/src/phase.f90 @@ -5,6 +5,7 @@ !-------------------------------------------------------------------------------------------------- module phase use prec + use constants use math use rotations use IO diff --git a/src/phase_mechanical_eigen_thermalexpansion.f90 b/src/phase_mechanical_eigen_thermalexpansion.f90 index e48e56672..b62db88ef 100644 --- a/src/phase_mechanical_eigen_thermalexpansion.f90 +++ b/src/phase_mechanical_eigen_thermalexpansion.f90 @@ -58,7 +58,7 @@ module function thermalexpansion_init(kinematics_length) result(myKinematics) associate(prm => param(kinematics_thermal_expansion_instance(p))) kinematic_type => kinematics%get(k) - prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=300.0_pReal) + prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=T_ROOM) prm%A(1,1,1) = kinematic_type%get_asFloat('A_11') prm%A(1,1,2) = kinematic_type%get_asFloat('A_11,T',defaultVal=0.0_pReal) diff --git a/src/phase_mechanical_plastic_dislotungsten.f90 b/src/phase_mechanical_plastic_dislotungsten.f90 index 102e009fe..1db4107e4 100644 --- a/src/phase_mechanical_plastic_dislotungsten.f90 +++ b/src/phase_mechanical_plastic_dislotungsten.f90 @@ -7,9 +7,6 @@ !-------------------------------------------------------------------------------------------------- submodule(phase:plastic) dislotungsten - real(pReal), parameter :: & - kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin - type :: tParameters real(pReal) :: & D = 1.0_pReal, & !< grain size diff --git a/src/phase_mechanical_plastic_dislotwin.f90 b/src/phase_mechanical_plastic_dislotwin.f90 index c26dc2a32..304d36345 100644 --- a/src/phase_mechanical_plastic_dislotwin.f90 +++ b/src/phase_mechanical_plastic_dislotwin.f90 @@ -9,9 +9,6 @@ !-------------------------------------------------------------------------------------------------- submodule(phase:plastic) dislotwin - real(pReal), parameter :: & - kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin - type :: tParameters real(pReal) :: & Q_cl = 1.0_pReal, & !< activation energy for dislocation climb @@ -31,7 +28,7 @@ submodule(phase:plastic) dislotwin delta_G = 1.0_pReal, & !< Free energy difference between austensite and martensite i_tr = 1.0_pReal, & !< adjustment parameter to calculate MFP for transformation h = 1.0_pReal, & !< Stack height of hex nucleus - T_ref = 300.0_pReal, & + T_ref = T_ROOM, & a_cI = 1.0_pReal, & a_cF = 1.0_pReal real(pReal), dimension(2) :: & diff --git a/src/phase_mechanical_plastic_nonlocal.f90 b/src/phase_mechanical_plastic_nonlocal.f90 index f53a16042..a0199d253 100644 --- a/src/phase_mechanical_plastic_nonlocal.f90 +++ b/src/phase_mechanical_plastic_nonlocal.f90 @@ -19,9 +19,6 @@ submodule(phase:plastic) nonlocal type(tGeometry), dimension(:), allocatable :: geom - real(pReal), parameter :: & - kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin - ! storage order of dislocation types integer, dimension(*), parameter :: & sgl = [1,2,3,4,5,6,7,8] !< signed (single) From fb8c515a98ac7169fb456a2154b2e849e08adec5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 25 Nov 2021 11:52:52 +0100 Subject: [PATCH 22/43] capitalize constants not sure whether we should make exceptions for k_B and T_room --- python/damask/_colormap.py | 19 +++++++++---------- src/constants.f90 | 2 +- ...phase_mechanical_plastic_dislotungsten.f90 | 4 ++-- src/phase_mechanical_plastic_dislotwin.f90 | 12 ++++++------ src/phase_mechanical_plastic_nonlocal.f90 | 12 ++++++------ 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/python/damask/_colormap.py b/python/damask/_colormap.py index 40aab652c..3060e99e0 100644 --- a/python/damask/_colormap.py +++ b/python/damask/_colormap.py @@ -5,7 +5,6 @@ import colorsys from pathlib import Path from typing import Sequence, Union, TextIO - import numpy as np import matplotlib as mpl if os.name == 'posix' and 'DISPLAY' not in os.environ: @@ -17,9 +16,9 @@ from PIL import Image from . import util from . import Table -_eps = 216./24389. -_kappa = 24389./27. -_ref_white = np.array([.95047, 1.00000, 1.08883]) # Observer = 2, Illuminant = D65 +_EPS = 216./24389. +_KAPPA = 24389./27. +_REF_WHITE = np.array([.95047, 1.00000, 1.08883]) # Observer = 2, Illuminant = D65 # ToDo (if needed) # - support alpha channel (paraview/ASCII/input) @@ -522,10 +521,10 @@ class Colormap(mpl.colors.ListedColormap): f_z = (lab[0]+16.)/116. - lab[2]/200. return np.array([ - f_x**3. if f_x**3. > _eps else (116.*f_x-16.)/_kappa, - ((lab[0]+16.)/116.)**3 if lab[0]>_kappa*_eps else lab[0]/_kappa, - f_z**3. if f_z**3. > _eps else (116.*f_z-16.)/_kappa - ])*(ref_white if ref_white is not None else _ref_white) + f_x**3. if f_x**3. > _EPS else (116.*f_x-16.)/_KAPPA, + ((lab[0]+16.)/116.)**3 if lab[0]>_KAPPA*_EPS else lab[0]/_KAPPA, + f_z**3. if f_z**3. > _EPS else (116.*f_z-16.)/_KAPPA + ])*(ref_white if ref_white is not None else _REF_WHITE) @staticmethod def _xyz2lab(xyz: np.ndarray, ref_white: np.ndarray = None) -> np.ndarray: @@ -537,8 +536,8 @@ class Colormap(mpl.colors.ListedColormap): http://www.brucelindbloom.com/index.html?Eqn_Lab_to_XYZ.html """ - ref_white = ref_white if ref_white is not None else _ref_white - f = np.where(xyz/ref_white > _eps,(xyz/ref_white)**(1./3.),(_kappa*xyz/ref_white+16.)/116.) + ref_white = ref_white if ref_white is not None else _REF_WHITE + f = np.where(xyz/ref_white > _EPS,(xyz/ref_white)**(1./3.),(_KAPPA*xyz/ref_white+16.)/116.) return np.array([ 116.0 * f[1] - 16.0, diff --git a/src/constants.f90 b/src/constants.f90 index 5a5f44875..dd26ce78c 100644 --- a/src/constants.f90 +++ b/src/constants.f90 @@ -10,6 +10,6 @@ module constants real(pReal), parameter :: & T_ROOM = 300.0_pReal, & !< Room temperature in K - kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin + K_B = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin end module constants diff --git a/src/phase_mechanical_plastic_dislotungsten.f90 b/src/phase_mechanical_plastic_dislotungsten.f90 index 1db4107e4..1dab5dfd4 100644 --- a/src/phase_mechanical_plastic_dislotungsten.f90 +++ b/src/phase_mechanical_plastic_dislotungsten.f90 @@ -341,7 +341,7 @@ module subroutine dislotungsten_dotState(Mp,T,ph,en) dot_rho_dip_formation = merge(2.0_pReal*(d_hat-prm%d_caron)*stt%rho_mob(:,en)*dot%gamma_sl(:,en)/prm%b_sl, & 0.0_pReal, & prm%dipoleformation) - v_cl = (3.0_pReal*mu*prm%D_0*exp(-prm%Q_cl/(kB*T))*prm%f_at/(2.0_pReal*PI*kB*T)) & + v_cl = (3.0_pReal*mu*prm%D_0*exp(-prm%Q_cl/(K_B*T))*prm%f_at/(2.0_pReal*PI*K_B*T)) & * (1.0_pReal/(d_hat+prm%d_caron)) dot_rho_dip_climb = (4.0_pReal*v_cl*stt%rho_dip(:,en))/(d_hat-prm%d_caron) ! ToDo: Discuss with Franz: Stress dependency? end where @@ -472,7 +472,7 @@ pure subroutine kinetics(Mp,T,ph,en, & if (present(tau_pos_out)) tau_pos_out = tau_pos if (present(tau_neg_out)) tau_neg_out = tau_neg - associate(BoltzmannRatio => prm%Q_s/(kB*T), & + associate(BoltzmannRatio => prm%Q_s/(K_B*T), & b_rho_half => stt%rho_mob(:,en) * prm%b_sl * 0.5_pReal, & effectiveLength => dst%Lambda_sl(:,en) - prm%w) diff --git a/src/phase_mechanical_plastic_dislotwin.f90 b/src/phase_mechanical_plastic_dislotwin.f90 index 304d36345..034b3f503 100644 --- a/src/phase_mechanical_plastic_dislotwin.f90 +++ b/src/phase_mechanical_plastic_dislotwin.f90 @@ -594,7 +594,7 @@ module subroutine dislotwin_LpAndItsTangent(Lp,dLp_dMp,Mp,T,ph,en) shearBandingContribution: if (dNeq0(prm%v_sb)) then - E_kB_T = prm%E_sb/(kB*T) + E_kB_T = prm%E_sb/(K_B*T) call math_eigh33(eigValues,eigVectors,Mp) ! is Mp symmetric by design? do i = 1,6 @@ -691,8 +691,8 @@ module subroutine dislotwin_dotState(Mp,T,ph,en) * (prm%Gamma_sf(1) + prm%Gamma_sf(2) * T) / (mu*prm%b_sl(i)), & 1.0_pReal, & prm%ExtendedDislocations) - v_cl = 2.0_pReal*prm%omega*b_d**2.0_pReal*exp(-prm%Q_cl/(kB*T)) & - * (exp(abs(sigma_cl)*prm%b_sl(i)**3.0_pReal/(kB*T)) - 1.0_pReal) + v_cl = 2.0_pReal*prm%omega*b_d**2.0_pReal*exp(-prm%Q_cl/(K_B*T)) & + * (exp(abs(sigma_cl)*prm%b_sl(i)**3.0_pReal/(K_B*T)) - 1.0_pReal) dot_rho_dip_climb(i) = 4.0_pReal*v_cl*stt%rho_dip(i,en) & / (d_hat-prm%d_caron(i)) @@ -904,7 +904,7 @@ pure subroutine kinetics_sl(Mp,T,ph,en, & significantStress: where(tau_eff > tol_math_check) stressRatio = tau_eff/prm%tau_0 StressRatio_p = stressRatio** prm%p - Q_kB_T = prm%Q_sl/(kB*T) + Q_kB_T = prm%Q_sl/(K_B*T) v_wait_inverse = exp(Q_kB_T*(1.0_pReal-StressRatio_p)** prm%q) & / prm%v_0 v_run_inverse = prm%B/(tau_eff*prm%b_sl) @@ -977,7 +977,7 @@ pure subroutine kinetics_tw(Mp,T,dot_gamma_sl,ph,en,& Ndot0=(abs(dot_gamma_sl(s1))*(stt%rho_mob(s2,en)+stt%rho_dip(s2,en))+& abs(dot_gamma_sl(s2))*(stt%rho_mob(s1,en)+stt%rho_dip(s1,en)))/& (prm%L_tw*prm%b_sl(i))*& - (1.0_pReal-exp(-prm%V_cs/(kB*T)*(dst%tau_r_tw(i,en)-tau(i)))) + (1.0_pReal-exp(-prm%V_cs/(K_B*T)*(dst%tau_r_tw(i,en)-tau(i)))) else Ndot0=0.0_pReal end if @@ -1046,7 +1046,7 @@ pure subroutine kinetics_tr(Mp,T,dot_gamma_sl,ph,en,& Ndot0=(abs(dot_gamma_sl(s1))*(stt%rho_mob(s2,en)+stt%rho_dip(s2,en))+& abs(dot_gamma_sl(s2))*(stt%rho_mob(s1,en)+stt%rho_dip(s1,en)))/& (prm%L_tr*prm%b_sl(i))*& - (1.0_pReal-exp(-prm%V_cs/(kB*T)*(dst%tau_r_tr(i,en)-tau(i)))) + (1.0_pReal-exp(-prm%V_cs/(K_B*T)*(dst%tau_r_tr(i,en)-tau(i)))) else Ndot0=0.0_pReal end if diff --git a/src/phase_mechanical_plastic_nonlocal.f90 b/src/phase_mechanical_plastic_nonlocal.f90 index a0199d253..09c5f4d0f 100644 --- a/src/phase_mechanical_plastic_nonlocal.f90 +++ b/src/phase_mechanical_plastic_nonlocal.f90 @@ -1091,9 +1091,9 @@ module subroutine nonlocal_dotState(Mp, Temperature,timestep, & ! thermally activated annihilation of edge dipoles by climb rhoDotThermalAnnihilation = 0.0_pReal - D_SD = prm%D_0 * exp(-prm%Q_cl / (kB * Temperature)) ! eq. 3.53 + D_SD = prm%D_0 * exp(-prm%Q_cl / (K_B * Temperature)) ! eq. 3.53 v_climb = D_SD * mu * prm%V_at & - / (PI * (1.0_pReal-nu) * (dUpper(:,1) + dLower(:,1)) * kB * Temperature) ! eq. 3.54 + / (PI * (1.0_pReal-nu) * (dUpper(:,1) + dLower(:,1)) * K_B * Temperature) ! eq. 3.54 forall (s = 1:prm%sum_N_sl, dUpper(s,1) > dLower(s,1)) & rhoDotThermalAnnihilation(s,9) = max(- 4.0_pReal * rhoDip(s,1) * v_climb(s) / (dUpper(s,1) - dLower(s,1)), & - rhoDip(s,1) / timestep - rhoDotAthermalAnnihilation(s,9) & @@ -1668,9 +1668,9 @@ pure subroutine kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, tauThreshold, c, T, activationEnergy_P = criticalStress_P * activationVolume_P tauRel_P = min(1.0_pReal, tauEff / criticalStress_P) tPeierls = 1.0_pReal / prm%nu_a & - * exp(activationEnergy_P / (kB * T) & + * exp(activationEnergy_P / (K_B * T) & * (1.0_pReal - tauRel_P**prm%p)**prm%q) - dtPeierls_dtau = merge(tPeierls * prm%p * prm%q * activationVolume_P / (kB * T) & + dtPeierls_dtau = merge(tPeierls * prm%p * prm%q * activationVolume_P / (K_B * T) & * (1.0_pReal - tauRel_P**prm%p)**(prm%q-1.0_pReal) * tauRel_P**(prm%p-1.0_pReal), & 0.0_pReal, & tauEff < criticalStress_P) @@ -1682,8 +1682,8 @@ pure subroutine kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, tauThreshold, c, T, criticalStress_S = prm%Q_sol / activationVolume_S tauRel_S = min(1.0_pReal, tauEff / criticalStress_S) tSolidSolution = 1.0_pReal / prm%nu_a & - * exp(prm%Q_sol / (kB * T)* (1.0_pReal - tauRel_S**prm%p)**prm%q) - dtSolidSolution_dtau = merge(tSolidSolution * prm%p * prm%q * activationVolume_S / (kB * T) & + * exp(prm%Q_sol / (K_B * T)* (1.0_pReal - tauRel_S**prm%p)**prm%q) + dtSolidSolution_dtau = merge(tSolidSolution * prm%p * prm%q * activationVolume_S / (K_B * T) & * (1.0_pReal - tauRel_S**prm%p)**(prm%q-1.0_pReal)* tauRel_S**(prm%p-1.0_pReal), & 0.0_pReal, & tauEff < criticalStress_S) From 271bb8df88eca90b9968ff31e6ae44867ed3ec10 Mon Sep 17 00:00:00 2001 From: Sharan Roongta Date: Thu, 25 Nov 2021 14:51:31 +0100 Subject: [PATCH 23/43] being consistent --- PRIVATE | 2 +- ...hase_mechanical_eigen_thermalexpansion.f90 | 2 +- src/phase_mechanical_elastic.f90 | 36 +++++++++++++++---- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/PRIVATE b/PRIVATE index 7cae6f6fb..e5c897781 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 7cae6f6fb6daca513fefbce21e4f07ab36fd3c78 +Subproject commit e5c8977814ea8afca021fad2181dbb2a986bea70 diff --git a/src/phase_mechanical_eigen_thermalexpansion.f90 b/src/phase_mechanical_eigen_thermalexpansion.f90 index b62db88ef..d03ea0eb2 100644 --- a/src/phase_mechanical_eigen_thermalexpansion.f90 +++ b/src/phase_mechanical_eigen_thermalexpansion.f90 @@ -98,7 +98,7 @@ module subroutine thermalexpansion_LiAndItsTangent(Li, dLi_dTstar, ph,me) associate(prm => param(kinematics_thermal_expansion_instance(ph))) Li = dot_T * ( & - prm%A(1:3,1:3,1)*(T - prm%T_ref)**0 & ! constant coefficient + prm%A(1:3,1:3,1)*1.0_pReal & ! constant coefficient + prm%A(1:3,1:3,2)*(T - prm%T_ref)**1 & ! linear coefficient + prm%A(1:3,1:3,3)*(T - prm%T_ref)**2 & ! quadratic coefficient ) / & diff --git a/src/phase_mechanical_elastic.f90 b/src/phase_mechanical_elastic.f90 index e2999d96f..9e5c2653c 100644 --- a/src/phase_mechanical_elastic.f90 +++ b/src/phase_mechanical_elastic.f90 @@ -8,6 +8,8 @@ submodule(phase:mechanical) elastic C_33 = 0.0_pReal, & C_44 = 0.0_pReal, & C_66 = 0.0_pReal + real(pReal) :: & + T_ref end type tParameters type(tParameters), allocatable, dimension(:) :: param @@ -45,6 +47,8 @@ module subroutine elastic_init(phases) associate(prm => param(ph)) + prm%T_ref = elastic%get_asFloat('T_ref', defaultVal=T_ROOM) + prm%C_11(1) = elastic%get_asFloat('C_11') prm%C_11(2) = elastic%get_asFloat('C_11,T', defaultVal=0.0_pReal) prm%C_11(3) = elastic%get_asFloat('C_11,T^2',defaultVal=0.0_pReal) @@ -93,16 +97,36 @@ module function elastic_C66(ph,en) result(C66) associate(prm => param(ph)) C66 = 0.0_pReal T = thermal_T(ph,en) - C66(1,1) = prm%C_11(1) + prm%C_11(2)*T + prm%C_11(3)*T**2 - C66(1,2) = prm%C_12(1) + prm%C_12(2)*T + prm%C_12(3)*T**2 - C66(4,4) = prm%C_44(1) + prm%C_44(2)*T + prm%C_44(3)*T**2 + + C66(1,1) = prm%C_11(1)* 1.0_pReal & + + prm%C_11(2)*(T - prm%T_ref)**1 & + + prm%C_11(3)*(T - prm%T_ref)**2 + + C66(1,2) = prm%C_12(1)* 1.0_pReal & + + prm%C_12(2)*(T - prm%T_ref)**1 & + + prm%C_12(3)*(T - prm%T_ref)**2 + + C66(4,4) = prm%C_44(1)*1.0_pReal & + + prm%C_44(2)*(T - prm%T_ref)**1 & + + prm%C_44(3)*(T - prm%T_ref)**2 + if (any(phase_lattice(ph) == ['hP','tI'])) then - C66(1,3) = prm%C_13(1) + prm%C_13(2)*T + prm%C_13(3)*T**2 - C66(3,3) = prm%C_33(1) + prm%C_33(2)*T + prm%C_33(3)*T**2 + C66(1,3) = prm%C_13(1)*1.0_pReal & + + prm%C_13(2)*(T - prm%T_ref)**1 & + + prm%C_13(3)*(T - prm%T_ref)**2 + + C66(3,3) = prm%C_33(1)*1.0_pReal & + + prm%C_33(2)*(T - prm%T_ref)**1 & + + prm%C_33(3)*(T - prm%T_ref)**2 + end if - if (phase_lattice(ph) == 'tI') C66(6,6) = prm%C_66(1) + prm%C_66(2)*T + prm%C_66(3)*T**2 + if (phase_lattice(ph) == 'tI') then + C66(6,6) = prm%C_66(1)*1.0_pReal & + + prm%C_66(2)*(T - prm%T_ref)**1 & + + prm%C_66(3)*(T - prm%T_ref)**2 + end if C66 = lattice_symmetrize_C66(C66,phase_lattice(ph)) From 72c717d51dc50a491801ed03bd47e994e193334e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 25 Nov 2021 15:37:13 +0100 Subject: [PATCH 24/43] simplified/correct type --- src/phase_mechanical_eigen_thermalexpansion.f90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/phase_mechanical_eigen_thermalexpansion.f90 b/src/phase_mechanical_eigen_thermalexpansion.f90 index d03ea0eb2..3c7654dc9 100644 --- a/src/phase_mechanical_eigen_thermalexpansion.f90 +++ b/src/phase_mechanical_eigen_thermalexpansion.f90 @@ -98,14 +98,14 @@ module subroutine thermalexpansion_LiAndItsTangent(Li, dLi_dTstar, ph,me) associate(prm => param(kinematics_thermal_expansion_instance(ph))) Li = dot_T * ( & - prm%A(1:3,1:3,1)*1.0_pReal & ! constant coefficient - + prm%A(1:3,1:3,2)*(T - prm%T_ref)**1 & ! linear coefficient - + prm%A(1:3,1:3,3)*(T - prm%T_ref)**2 & ! quadratic coefficient + prm%A(1:3,1:3,1) & ! constant coefficient + + prm%A(1:3,1:3,2)*(T - prm%T_ref)**1.0_pReal & ! linear coefficient + + prm%A(1:3,1:3,3)*(T - prm%T_ref)**2.0_pReal & ! quadratic coefficient ) / & (1.0_pReal & - + prm%A(1:3,1:3,1)*(T - prm%T_ref)**1 / 1. & - + prm%A(1:3,1:3,2)*(T - prm%T_ref)**2 / 2. & - + prm%A(1:3,1:3,3)*(T - prm%T_ref)**3 / 3. & + + prm%A(1:3,1:3,1)*(T - prm%T_ref)**1.0_pReal / 1.0_pReal & + + prm%A(1:3,1:3,2)*(T - prm%T_ref)**2.0_pReal / 2.0_pReal & + + prm%A(1:3,1:3,3)*(T - prm%T_ref)**3.0_pReal / 3.0_pReal & ) end associate dLi_dTstar = 0.0_pReal From 5ba59dead236dfed58654feb9dde1c2ff694a0dc Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 25 Nov 2021 14:07:41 -0500 Subject: [PATCH 25/43] polish --- .../phase/mechanical/plastic/phenopowerlaw_Mg.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml index 4c5021545..9b06f92d9 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml @@ -6,12 +6,12 @@ references: output: [xi_sl, xi_tw] -N_sl: [3, 3, 0, 6, 0, 6] # basal, 1. prism, -, 1. pyr, -, 2. pyr -N_tw: [6, 0, 6] # tension, -, compression +N_sl: [3, 3, 0, 6, 0, 6] # basal, prism, -, 1. pyr, -, 2. pyr +N_tw: [6, 0, 6] # tension, -, compression -xi_0_sl: [10.e+6, 55.e+6, 0., 60.e+6, 0., 60.e+6] +xi_0_sl: [10.e+6, 55.e+6, 0., 60.e+6, 0., 60.e+6] xi_inf_sl: [40.e+6, 135.e+6, 0., 150.e+6, 0., 150.e+6] -xi_0_tw: [40.e+6, 0., 60.e+6] +xi_0_tw: [40.e+6, 0., 60.e+6] a_sl: 2.25 dot_gamma_0_sl: 0.001 @@ -21,7 +21,7 @@ n_tw: 20 f_sat_sl-tw: 10.0 h_0_sl-sl: 500.0e+6 -h_0_tw-tw: 50.0e+6 +h_0_tw-tw: 50.0e+6 h_0_tw-sl: 150.0e+6 h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, From 51a36119a89a8fb40fc9f412a2f6cacfcc78df04 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 25 Nov 2021 14:08:19 -0500 Subject: [PATCH 26/43] clarify slip plane for (first) pyr --- src/lattice.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index dfdbf2b91..9c51a6d98 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -751,7 +751,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( integer, dimension(HEX_NSLIP,HEX_NSLIP), parameter :: & HEX_INTERACTIONSLIPSLIP = reshape( [& - ! basal prism 2. prism pyr 1. pyr 2. pyr + ! basal prism 2. prism 1. pyr 1. pyr 2. pyr 1, 2, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! -----> acting (forest) 2, 1, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | basal 2, 2, 1, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | @@ -767,7 +767,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( 20,20,20, 19,19,19, 18,18,18, 16,17,17,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,16,17,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,17,16,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & - 20,20,20, 19,19,19, 18,18,18, 17,17,17,16,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & ! pyr + 20,20,20, 19,19,19, 18,18,18, 17,17,17,16,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & ! 1. pyr 20,20,20, 19,19,19, 18,18,18, 17,17,17,17,16,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,17,17,17,17,16, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & @@ -1141,7 +1141,7 @@ function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,lattice) r 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & - 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & ! pyr + 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & ! 1. pyr 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & @@ -1265,7 +1265,7 @@ function lattice_interaction_TwinBySlip(Ntwin,Nslip,interactionValues,lattice) r integer, dimension(HEX_NSLIP,HEX_NTWIN), parameter :: & HEX_INTERACTIONTWINSLIP = reshape( [& - ! basal prism 2. prism pyr 1. pyr 2. pyr + ! basal prism 2. prism 1. pyr 1. pyr 2. pyr 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! ----> slip (acting) 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! | 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! | From bfc6b69ee2b8f10845ac6527bee1b039ba98ca6a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 25 Nov 2021 20:52:22 +0100 Subject: [PATCH 27/43] integer exponents: faster and shorter --- src/grid/grid_mech_FEM.f90 | 6 ++-- src/grid/spectral_utilities.f90 | 32 +++++++++---------- src/homogenization_mechanical_RGC.f90 | 2 +- src/lattice.f90 | 12 +++---- src/math.f90 | 2 +- ...hase_mechanical_eigen_thermalexpansion.f90 | 10 +++--- src/phase_mechanical_plastic_nonlocal.f90 | 18 +++++------ src/rotations.f90 | 2 +- 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/grid/grid_mech_FEM.f90 b/src/grid/grid_mech_FEM.f90 index 9befd7ade..e1dc3dabe 100644 --- a/src/grid/grid_mech_FEM.f90 +++ b/src/grid/grid_mech_FEM.f90 @@ -697,9 +697,9 @@ subroutine formJacobian(da_local,x_local,Jac_pre,Jac,dummy,ierr) !-------------------------------------------------------------------------------------------------- ! applying boundary conditions - diag = (C_volAvg(1,1,1,1)/delta(1)**2.0_pReal + & - C_volAvg(2,2,2,2)/delta(2)**2.0_pReal + & - C_volAvg(3,3,3,3)/delta(3)**2.0_pReal)*detJ + diag = (C_volAvg(1,1,1,1)/delta(1)**2 + & + C_volAvg(2,2,2,2)/delta(2)**2 + & + C_volAvg(3,3,3,3)/delta(3)**2)*detJ call MatZeroRowsColumns(Jac,size(rows),rows,diag,PETSC_NULL_VEC,PETSC_NULL_VEC,ierr) CHKERRQ(ierr) call DMGetGlobalVector(da_local,coordinates,ierr); CHKERRQ(ierr) diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 89ce9a314..3d1776925 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -578,22 +578,22 @@ real(pReal) function utilities_divergenceRMS() do k = 1, grid3; do j = 1, grid(2) do i = 2, grid1Red -1 ! Has somewhere a conj. complex counterpart. Therefore count it twice. utilities_divergenceRMS = utilities_divergenceRMS & - + 2.0_pReal*(sum (real(matmul(tensorField_fourier(1:3,1:3,i,j,k),& ! (sqrt(real(a)**2 + aimag(a)**2))**2 = real(a)**2 + aimag(a)**2. do not take square root and square again - conjg(-xi1st(1:3,i,j,k))*rescaledGeom))**2.0_pReal)& ! --> sum squared L_2 norm of vector + + 2.0_pReal*(sum (real(matmul(tensorField_fourier(1:3,1:3,i,j,k), & ! (sqrt(real(a)**2 + aimag(a)**2))**2 = real(a)**2 + aimag(a)**2. do not take square root and square again + conjg(-xi1st(1:3,i,j,k))*rescaledGeom))**2) & ! --> sum squared L_2 norm of vector +sum(aimag(matmul(tensorField_fourier(1:3,1:3,i,j,k),& - conjg(-xi1st(1:3,i,j,k))*rescaledGeom))**2.0_pReal)) + conjg(-xi1st(1:3,i,j,k))*rescaledGeom))**2)) enddo utilities_divergenceRMS = utilities_divergenceRMS & ! these two layers (DC and Nyquist) do not have a conjugate complex counterpart (if grid(1) /= 1) + sum( real(matmul(tensorField_fourier(1:3,1:3,1 ,j,k), & - conjg(-xi1st(1:3,1,j,k))*rescaledGeom))**2.0_pReal) & + conjg(-xi1st(1:3,1,j,k))*rescaledGeom))**2) & + sum(aimag(matmul(tensorField_fourier(1:3,1:3,1 ,j,k), & - conjg(-xi1st(1:3,1,j,k))*rescaledGeom))**2.0_pReal) & + conjg(-xi1st(1:3,1,j,k))*rescaledGeom))**2) & + sum( real(matmul(tensorField_fourier(1:3,1:3,grid1Red,j,k), & - conjg(-xi1st(1:3,grid1Red,j,k))*rescaledGeom))**2.0_pReal) & + conjg(-xi1st(1:3,grid1Red,j,k))*rescaledGeom))**2) & + sum(aimag(matmul(tensorField_fourier(1:3,1:3,grid1Red,j,k), & - conjg(-xi1st(1:3,grid1Red,j,k))*rescaledGeom))**2.0_pReal) + conjg(-xi1st(1:3,grid1Red,j,k))*rescaledGeom))**2) enddo; enddo - if (grid(1) == 1) utilities_divergenceRMS = utilities_divergenceRMS * 0.5_pReal ! counted twice in case of grid(1) == 1 + if (grid(1) == 1) utilities_divergenceRMS = utilities_divergenceRMS * 0.5_pReal ! counted twice in case of grid(1) == 1 call MPI_Allreduce(MPI_IN_PLACE,utilities_divergenceRMS,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD,ierr) if (ierr /=0) error stop 'MPI error' utilities_divergenceRMS = sqrt(utilities_divergenceRMS) * wgt ! RMS in real space calculated with Parsevals theorem from Fourier space @@ -630,7 +630,7 @@ real(pReal) function utilities_curlRMS() -tensorField_fourier(l,1,i,j,k)*xi1st(2,i,j,k)*rescaledGeom(2)) enddo utilities_curlRMS = utilities_curlRMS & - +2.0_pReal*sum(curl_fourier%re**2.0_pReal+curl_fourier%im**2.0_pReal) ! Has somewhere a conj. complex counterpart. Therefore count it twice. + +2.0_pReal*sum(curl_fourier%re**2+curl_fourier%im**2) ! Has somewhere a conj. complex counterpart. Therefore count it twice. enddo do l = 1, 3 curl_fourier = (+tensorField_fourier(l,3,1,j,k)*xi1st(2,1,j,k)*rescaledGeom(2) & @@ -641,7 +641,7 @@ real(pReal) function utilities_curlRMS() -tensorField_fourier(l,1,1,j,k)*xi1st(2,1,j,k)*rescaledGeom(2)) enddo utilities_curlRMS = utilities_curlRMS & - + sum(curl_fourier%re**2.0_pReal + curl_fourier%im**2.0_pReal) ! this layer (DC) does not have a conjugate complex counterpart (if grid(1) /= 1) + + sum(curl_fourier%re**2 + curl_fourier%im**2) ! this layer (DC) does not have a conjugate complex counterpart (if grid(1) /= 1) do l = 1, 3 curl_fourier = (+tensorField_fourier(l,3,grid1Red,j,k)*xi1st(2,grid1Red,j,k)*rescaledGeom(2) & -tensorField_fourier(l,2,grid1Red,j,k)*xi1st(3,grid1Red,j,k)*rescaledGeom(3)) @@ -651,13 +651,13 @@ real(pReal) function utilities_curlRMS() -tensorField_fourier(l,1,grid1Red,j,k)*xi1st(2,grid1Red,j,k)*rescaledGeom(2)) enddo utilities_curlRMS = utilities_curlRMS & - + sum(curl_fourier%re**2.0_pReal + curl_fourier%im**2.0_pReal) ! this layer (Nyquist) does not have a conjugate complex counterpart (if grid(1) /= 1) + + sum(curl_fourier%re**2 + curl_fourier%im**2) ! this layer (Nyquist) does not have a conjugate complex counterpart (if grid(1) /= 1) enddo; enddo call MPI_Allreduce(MPI_IN_PLACE,utilities_curlRMS,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD,ierr) if (ierr /=0) error stop 'MPI error' utilities_curlRMS = sqrt(utilities_curlRMS) * wgt - if (grid(1) == 1) utilities_curlRMS = utilities_curlRMS * 0.5_pReal ! counted twice in case of grid(1) == 1 + if (grid(1) == 1) utilities_curlRMS = utilities_curlRMS * 0.5_pReal ! counted twice in case of grid(1) == 1 end function utilities_curlRMS @@ -836,13 +836,13 @@ subroutine utilities_constitutiveResponse(P,P_av,C_volAvg,C_minmaxAvg,& dPdF_min = huge(1.0_pReal) dPdF_norm_min = huge(1.0_pReal) do i = 1, product(grid(1:2))*grid3 - if (dPdF_norm_max < sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2.0_pReal)) then + if (dPdF_norm_max < sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2)) then dPdF_max = homogenization_dPdF(1:3,1:3,1:3,1:3,i) - dPdF_norm_max = sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2.0_pReal) + dPdF_norm_max = sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2) endif - if (dPdF_norm_min > sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2.0_pReal)) then + if (dPdF_norm_min > sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2)) then dPdF_min = homogenization_dPdF(1:3,1:3,1:3,1:3,i) - dPdF_norm_min = sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2.0_pReal) + dPdF_norm_min = sum(homogenization_dPdF(1:3,1:3,1:3,1:3,i)**2) endif enddo diff --git a/src/homogenization_mechanical_RGC.f90 b/src/homogenization_mechanical_RGC.f90 index 76676726a..76ff8cab5 100644 --- a/src/homogenization_mechanical_RGC.f90 +++ b/src/homogenization_mechanical_RGC.f90 @@ -546,7 +546,7 @@ module function RGC_updateState(P,F,avgF,dt,dPdF,ce) result(doneAndHappy) do k = 1,3; do l = 1,3 nDef(i,j) = nDef(i,j) - nVect(k)*gDef(i,l)*math_LeviCivita(j,k,l) ! compute the interface mismatch tensor from the jump of deformation gradient end do; end do - nDefNorm = nDefNorm + nDef(i,j)**2.0_pReal ! compute the norm of the mismatch tensor + nDefNorm = nDefNorm + nDef(i,j)**2 ! compute the norm of the mismatch tensor end do; end do nDefNorm = max(nDefToler,sqrt(nDefNorm)) ! approximation to zero mismatch if mismatch is zero (singularity) nMis(abs(intFace(1)),iGrain) = nMis(abs(intFace(1)),iGrain) + nDefNorm ! total amount of mismatch experienced by the grain (at all six interfaces) diff --git a/src/lattice.f90 b/src/lattice.f90 index 0e24d1b18..a6ff89a9b 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -473,13 +473,13 @@ function lattice_characteristicShear_Twin(Ntwin,lattice,CoverA) result(character p = sum(HEX_NTWINSYSTEM(1:f-1))+s select case(HEX_SHEARTWIN(p)) ! from Christian & Mahajan 1995 p.29 case (1) ! <-10.1>{10.2} - characteristicShear(a) = (3.0_pReal-cOverA**2.0_pReal)/sqrt(3.0_pReal)/CoverA + characteristicShear(a) = (3.0_pReal-cOverA**2)/sqrt(3.0_pReal)/CoverA case (2) ! <11.6>{-1-1.1} characteristicShear(a) = 1.0_pReal/cOverA case (3) ! <10.-2>{10.1} - characteristicShear(a) = (4.0_pReal*cOverA**2.0_pReal-9.0_pReal)/sqrt(48.0_pReal)/cOverA + characteristicShear(a) = (4.0_pReal*cOverA**2-9.0_pReal)/sqrt(48.0_pReal)/cOverA case (4) ! <11.-3>{11.2} - characteristicShear(a) = 2.0_pReal*(cOverA**2.0_pReal-2.0_pReal)/3.0_pReal/cOverA + characteristicShear(a) = 2.0_pReal*(cOverA**2-2.0_pReal)/3.0_pReal/cOverA end select case default call IO_error(137,ext_msg='lattice_characteristicShear_Twin: '//trim(lattice)) @@ -558,11 +558,11 @@ function lattice_C66_trans(Ntrans,C_parent66,lattice_target, & C_bar66(1,4) = (C_parent66(1,1) - C_parent66(1,2) - 2.0_pReal*C_parent66(4,4)) /(3.0_pReal*sqrt(2.0_pReal)) C_target_unrotated66 = 0.0_pReal - C_target_unrotated66(1,1) = C_bar66(1,1) - C_bar66(1,4)**2.0_pReal/C_bar66(4,4) - C_target_unrotated66(1,2) = C_bar66(1,2) + C_bar66(1,4)**2.0_pReal/C_bar66(4,4) + C_target_unrotated66(1,1) = C_bar66(1,1) - C_bar66(1,4)**2/C_bar66(4,4) + C_target_unrotated66(1,2) = C_bar66(1,2) + C_bar66(1,4)**2/C_bar66(4,4) C_target_unrotated66(1,3) = C_bar66(1,3) C_target_unrotated66(3,3) = C_bar66(3,3) - C_target_unrotated66(4,4) = C_bar66(4,4) - C_bar66(1,4)**2.0_pReal/(0.5_pReal*(C_bar66(1,1) - C_bar66(1,2))) + C_target_unrotated66(4,4) = C_bar66(4,4) - C_bar66(1,4)**2/(0.5_pReal*(C_bar66(1,1) - C_bar66(1,2))) C_target_unrotated66 = lattice_symmetrize_C66(C_target_unrotated66,'hP') elseif (lattice_target == 'cI') then if (a_bcc <= 0.0_pReal .or. a_fcc <= 0.0_pReal) & diff --git a/src/math.f90 b/src/math.f90 index 5d2609237..42874dcb7 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -924,7 +924,7 @@ real(pReal) function math_sampleGaussVar(mu, sigma, width) do call random_number(rnd) scatter = width_ * (2.0_pReal * rnd(1) - 1.0_pReal) - if (rnd(2) <= exp(-0.5_pReal * scatter ** 2.0_pReal)) exit ! test if scattered value is drawn + if (rnd(2) <= exp(-0.5_pReal * scatter**2)) exit ! test if scattered value is drawn enddo math_sampleGaussVar = scatter * sigma diff --git a/src/phase_mechanical_eigen_thermalexpansion.f90 b/src/phase_mechanical_eigen_thermalexpansion.f90 index 3c7654dc9..a7e798b88 100644 --- a/src/phase_mechanical_eigen_thermalexpansion.f90 +++ b/src/phase_mechanical_eigen_thermalexpansion.f90 @@ -99,13 +99,13 @@ module subroutine thermalexpansion_LiAndItsTangent(Li, dLi_dTstar, ph,me) associate(prm => param(kinematics_thermal_expansion_instance(ph))) Li = dot_T * ( & prm%A(1:3,1:3,1) & ! constant coefficient - + prm%A(1:3,1:3,2)*(T - prm%T_ref)**1.0_pReal & ! linear coefficient - + prm%A(1:3,1:3,3)*(T - prm%T_ref)**2.0_pReal & ! quadratic coefficient + + prm%A(1:3,1:3,2)*(T - prm%T_ref)**1 & ! linear coefficient + + prm%A(1:3,1:3,3)*(T - prm%T_ref)**2 & ! quadratic coefficient ) / & (1.0_pReal & - + prm%A(1:3,1:3,1)*(T - prm%T_ref)**1.0_pReal / 1.0_pReal & - + prm%A(1:3,1:3,2)*(T - prm%T_ref)**2.0_pReal / 2.0_pReal & - + prm%A(1:3,1:3,3)*(T - prm%T_ref)**3.0_pReal / 3.0_pReal & + + prm%A(1:3,1:3,1)*(T - prm%T_ref)**1 / 1.0_pReal & + + prm%A(1:3,1:3,2)*(T - prm%T_ref)**2 / 2.0_pReal & + + prm%A(1:3,1:3,3)*(T - prm%T_ref)**3 / 3.0_pReal & ) end associate dLi_dTstar = 0.0_pReal diff --git a/src/phase_mechanical_plastic_nonlocal.f90 b/src/phase_mechanical_plastic_nonlocal.f90 index 09c5f4d0f..6bd648eaa 100644 --- a/src/phase_mechanical_plastic_nonlocal.f90 +++ b/src/phase_mechanical_plastic_nonlocal.f90 @@ -620,7 +620,7 @@ module subroutine nonlocal_dependentState(ph, en, ip, el) * spread(( 1.0_pReal - prm%f_F & + prm%f_F & * log(0.35_pReal * prm%b_sl * sqrt(max(stt%rho_forest(:,en),prm%rho_significant))) & - / log(0.35_pReal * prm%b_sl * 1e6_pReal))** 2.0_pReal,2,prm%sum_N_sl) + / log(0.35_pReal * prm%b_sl * 1e6_pReal))**2,2,prm%sum_N_sl) else myInteractionMatrix = prm%h_sl_sl end if @@ -646,7 +646,7 @@ module subroutine nonlocal_dependentState(ph, en, ip, el) rhoExcess(1,:) = rho_edg_delta rhoExcess(2,:) = rho_scr_delta - FVsize = geom(ph)%V_0(en) ** (1.0_pReal/3.0_pReal) + FVsize = geom(ph)%V_0(en)**(1.0_pReal/3.0_pReal) !* loop through my neighborhood and get the connection vectors (in lattice frame) and the excess densities @@ -1304,10 +1304,10 @@ function rhoDotFlux(timestep,ph,en,ip,el) * math_inner(m(1:3,s,t), normal_neighbor2me) * area ! positive line length that wants to enter through this interface where (compatibility(c,:,s,n,ip,el) > 0.0_pReal) & rhoDotFlux(:,t) = rhoDotFlux(1:ns,t) & - + lineLength/IPvolume(ip,el)*compatibility(c,:,s,n,ip,el)**2.0_pReal ! transferring to equally signed mobile dislocation type + + lineLength/IPvolume(ip,el)*compatibility(c,:,s,n,ip,el)**2 ! transferring to equally signed mobile dislocation type where (compatibility(c,:,s,n,ip,el) < 0.0_pReal) & rhoDotFlux(:,topp) = rhoDotFlux(:,topp) & - + lineLength/IPvolume(ip,el)*compatibility(c,:,s,n,ip,el)**2.0_pReal ! transferring to opposite signed mobile dislocation type + + lineLength/IPvolume(ip,el)*compatibility(c,:,s,n,ip,el)**2 ! transferring to opposite signed mobile dislocation type end if end do @@ -1336,7 +1336,7 @@ function rhoDotFlux(timestep,ph,en,ip,el) c = (t + 1) / 2 if (v0(s,t) * math_inner(m(1:3,s,t), normal_me2neighbor) > 0.0_pReal ) then ! flux from en to my neighbor == leaving flux for en (might also be a pure flux from my mobile density to dead density if interface not at all transmissive) if (v0(s,t) * neighbor_v0(s,t) >= 0.0_pReal) then ! no sign change in flux density - transmissivity = sum(compatibility(c,:,s,n,ip,el)**2.0_pReal) ! overall transmissivity from this slip system to my neighbor + transmissivity = sum(compatibility(c,:,s,n,ip,el)**2) ! overall transmissivity from this slip system to my neighbor else ! sign change in flux density means sign change in stress which does not allow for dislocations to arive at the neighbor transmissivity = 0.0_pReal end if @@ -1663,7 +1663,7 @@ pure subroutine kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, tauThreshold, c, T, !* Peierls contribution tauEff = max(0.0_pReal, abs(tauNS(s)) - tauThreshold(s)) lambda_P = prm%b_sl(s) - activationVolume_P = prm%w *prm%b_sl(s)**3.0_pReal + activationVolume_P = prm%w *prm%b_sl(s)**3 criticalStress_P = prm%peierlsStress(s,c) activationEnergy_P = criticalStress_P * activationVolume_P tauRel_P = min(1.0_pReal, tauEff / criticalStress_P) @@ -1678,7 +1678,7 @@ pure subroutine kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, tauThreshold, c, T, ! Contribution from solid solution strengthening tauEff = abs(tau(s)) - tauThreshold(s) lambda_S = prm%b_sl(s) / sqrt(prm%c_sol) - activationVolume_S = prm%f_sol * prm%b_sl(s)**3.0_pReal / sqrt(prm%c_sol) + activationVolume_S = prm%f_sol * prm%b_sl(s)**3 / sqrt(prm%c_sol) criticalStress_S = prm%Q_sol / activationVolume_S tauRel_S = min(1.0_pReal, tauEff / criticalStress_S) tSolidSolution = 1.0_pReal / prm%nu_a & @@ -1694,8 +1694,8 @@ pure subroutine kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, tauThreshold, c, T, v(s) = sign(1.0_pReal,tau(s)) & / (tPeierls / lambda_P + tSolidSolution / lambda_S + prm%B /(prm%b_sl(s) * tauEff)) - dv_dtau(s) = v(s)**2.0_pReal * (dtSolidSolution_dtau / lambda_S + prm%B / (prm%b_sl(s) * tauEff**2.0_pReal)) - dv_dtauNS(s) = v(s)**2.0_pReal * dtPeierls_dtau / lambda_P + dv_dtau(s) = v(s)**2 * (dtSolidSolution_dtau / lambda_S + prm%B / (prm%b_sl(s) * tauEff**2)) + dv_dtauNS(s) = v(s)**2 * dtPeierls_dtau / lambda_P end if end do diff --git a/src/rotations.f90 b/src/rotations.f90 index e73fb2782..105ca34dd 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -1099,7 +1099,7 @@ pure function ho2ax(ho) result(ax) +0.000003953714684212874_pReal, -0.00000036555001439719544_pReal ] ! normalize h and store the magnitude - hmag_squared = sum(ho**2.0_pReal) + hmag_squared = sum(ho**2) if (dEq0(hmag_squared)) then ax = [ 0.0_pReal, 0.0_pReal, 1.0_pReal, 0.0_pReal ] else From b88ab1af4874b33ba7cd6cca3559f3cdf9dfc6be Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 12:24:12 +0100 Subject: [PATCH 28/43] simplify search for interaction parameters --- src/lattice.f90 | 52 ++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index 0e24d1b18..dfdbf2b91 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -219,18 +219,18 @@ module lattice 2, -1, -1, 0, 0, 1, -1, 0, & -1, 2, -1, 0, -1, 0, 1, 0, & -1, -1, 2, 0, 1, -1, 0, 0, & - ! <-11.0>{11.0}/2nd order prismatic compound systems (plane normal independent of c/a-ratio) + ! <-11.0>{11.0}/2. order prismatic compound systems (plane normal independent of c/a-ratio) -1, 1, 0, 0, 1, 1, -2, 0, & 0, -1, 1, 0, -2, 1, 1, 0, & 1, 0, -1, 0, 1, -2, 1, 0, & - ! <-1-1.0>{-11.1}/1st order pyramidal systems (direction independent of c/a-ratio) + ! <-1-1.0>{-11.1}/1. order pyramidal systems (direction independent of c/a-ratio) -1, 2, -1, 0, 1, 0, -1, 1, & -2, 1, 1, 0, 0, 1, -1, 1, & -1, -1, 2, 0, -1, 1, 0, 1, & 1, -2, 1, 0, -1, 0, 1, 1, & 2, -1, -1, 0, 0, -1, 1, 1, & 1, 1, -2, 0, 1, -1, 0, 1, & - ! <11.3>{-10.1}/1st order pyramidal systems (direction independent of c/a-ratio) + ! <11.3>{-10.1}/1. order pyramidal systems (direction independent of c/a-ratio) -2, 1, 1, 3, 1, 0, -1, 1, & -1, -1, 2, 3, 1, 0, -1, 1, & -1, -1, 2, 3, 0, 1, -1, 1, & @@ -243,7 +243,7 @@ module lattice -1, 2, -1, 3, 0, -1, 1, 1, & -1, 2, -1, 3, 1, -1, 0, 1, & -2, 1, 1, 3, 1, -1, 0, 1, & - ! <11.3>{-1-1.2}/2nd order pyramidal systems + ! <11.3>{-1-1.2}/2. order pyramidal systems -1, -1, 2, 3, 1, 1, -2, 2, & 1, -2, 1, 3, -1, 2, -1, 2, & 2, -1, -1, 3, -2, 1, 1, 2, & @@ -751,22 +751,23 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( integer, dimension(HEX_NSLIP,HEX_NSLIP), parameter :: & HEX_INTERACTIONSLIPSLIP = reshape( [& + ! basal prism 2. prism pyr 1. pyr 2. pyr 1, 2, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! -----> acting (forest) - 2, 1, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | + 2, 1, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | basal 2, 2, 1, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | ! v 6, 6, 6, 4, 5, 5, 8, 8, 8, 14,14,14,14,14,14, 22,22,22,22,22,22,22,22,22,22,22,22, 32,32,32,32,32,32, & ! reacting (primary) - 6, 6, 6, 5, 4, 5, 8, 8, 8, 14,14,14,14,14,14, 22,22,22,22,22,22,22,22,22,22,22,22, 32,32,32,32,32,32, & + 6, 6, 6, 5, 4, 5, 8, 8, 8, 14,14,14,14,14,14, 22,22,22,22,22,22,22,22,22,22,22,22, 32,32,32,32,32,32, & ! prism 6, 6, 6, 5, 5, 4, 8, 8, 8, 14,14,14,14,14,14, 22,22,22,22,22,22,22,22,22,22,22,22, 32,32,32,32,32,32, & 12,12,12, 11,11,11, 9,10,10, 15,15,15,15,15,15, 23,23,23,23,23,23,23,23,23,23,23,23, 33,33,33,33,33,33, & - 12,12,12, 11,11,11, 10, 9,10, 15,15,15,15,15,15, 23,23,23,23,23,23,23,23,23,23,23,23, 33,33,33,33,33,33, & + 12,12,12, 11,11,11, 10, 9,10, 15,15,15,15,15,15, 23,23,23,23,23,23,23,23,23,23,23,23, 33,33,33,33,33,33, & ! 2. prism 12,12,12, 11,11,11, 10,10, 9, 15,15,15,15,15,15, 23,23,23,23,23,23,23,23,23,23,23,23, 33,33,33,33,33,33, & 20,20,20, 19,19,19, 18,18,18, 16,17,17,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,16,17,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,17,16,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & - 20,20,20, 19,19,19, 18,18,18, 17,17,17,16,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & + 20,20,20, 19,19,19, 18,18,18, 17,17,17,16,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & ! pyr 20,20,20, 19,19,19, 18,18,18, 17,17,17,17,16,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,17,17,17,17,16, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & @@ -776,7 +777,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,25,26,26,26,26,26,26,26,26, 35,35,35,35,35,35, & 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,25,26,26,26,26,26,26,26, 35,35,35,35,35,35, & 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,25,26,26,26,26,26,26, 35,35,35,35,35,35, & - 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,25,26,26,26,26,26, 35,35,35,35,35,35, & + 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,25,26,26,26,26,26, 35,35,35,35,35,35, & ! 1. pyr 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,26,25,26,26,26,26, 35,35,35,35,35,35, & 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,26,26,25,26,26,26, 35,35,35,35,35,35, & 30,30,30, 29,29,29, 28,28,28, 27,27,27,27,27,27, 26,26,26,26,26,26,26,26,26,25,26,26, 35,35,35,35,35,35, & @@ -786,7 +787,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 36,37,37,37,37,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,36,37,37,37,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,36,37,37,37, & - 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,36,37,37, & + 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,36,37,37, & ! 2. pyr 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,36,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,37,36 & ],shape(HEX_INTERACTIONSLIPSLIP)) !< Slip-slip interaction types for hex (onion peel naming scheme) @@ -932,31 +933,32 @@ function lattice_interaction_TwinByTwin(Ntwin,interactionValues,lattice) result( !< 3: other interaction integer, dimension(HEX_NTWIN,HEX_NTWIN), parameter :: & HEX_INTERACTIONTWINTWIN = reshape( [& + ! <-10.1>{10.2} <11.6>{-1-1.1} <10.-2>{10.1} <11.-3>{11.2} 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! -----> acting 2, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! | 2, 2, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! | - 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! v + 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! v <-10.1>{10.2} 2, 2, 2, 2, 1, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & ! reacting 2, 2, 2, 2, 2, 1, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 13,13,13,13,13,13, & 6, 6, 6, 6, 6, 6, 4, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & 6, 6, 6, 6, 6, 6, 5, 4, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & 6, 6, 6, 6, 6, 6, 5, 5, 4, 5, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & - 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & + 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, 5, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & ! <11.6>{-1-1.1} 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 5, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 8, 8, 8, 8, 8, 8, 14,14,14,14,14,14, & 12,12,12,12,12,12, 11,11,11,11,11,11, 9,10,10,10,10,10, 15,15,15,15,15,15, & 12,12,12,12,12,12, 11,11,11,11,11,11, 10, 9,10,10,10,10, 15,15,15,15,15,15, & 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10, 9,10,10,10, 15,15,15,15,15,15, & - 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10,10, 9,10,10, 15,15,15,15,15,15, & + 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10,10, 9,10,10, 15,15,15,15,15,15, & ! <10.-2>{10.1} 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10,10,10, 9,10, 15,15,15,15,15,15, & 12,12,12,12,12,12, 11,11,11,11,11,11, 10,10,10,10,10, 9, 15,15,15,15,15,15, & 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 16,17,17,17,17,17, & 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,16,17,17,17,17, & 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,16,17,17,17, & - 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,17,16,17,17, & + 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,17,16,17,17, & ! <11.-3>{11.2} 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,17,17,16,17, & 20,20,20,20,20,20, 19,19,19,19,19,19, 18,18,18,18,18,18, 17,17,17,17,17,16 & ],shape(HEX_INTERACTIONTWINTWIN)) !< Twin-twin interaction types for hex @@ -1123,22 +1125,23 @@ function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,lattice) r integer, dimension(HEX_NTWIN,HEX_NSLIP), parameter :: & HEX_INTERACTIONSLIPTWIN = reshape( [& + ! <-10.1>{10.2} <11.6>{-1-1.1} <10.-2>{10.1} <11.-3>{11.2} 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! ----> twin (acting) - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! | + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! | basal 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! | ! v 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & ! slip (reacting) - 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & + 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & ! prism 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & - 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & + 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & ! 2.prism 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & - 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & + 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & ! pyr 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & @@ -1148,7 +1151,7 @@ function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,lattice) r 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & - 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & + 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & ! 1. pyr 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & 17,17,17,17,17,17, 18,18,18,18,18,18, 19,19,19,19,19,19, 20,20,20,20,20,20, & @@ -1158,7 +1161,7 @@ function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,lattice) r 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & - 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & + 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & ! 2. pyr 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24 & ],shape(HEX_INTERACTIONSLIPTWIN)) !< Slip-twin interaction types for hex @@ -1262,31 +1265,32 @@ function lattice_interaction_TwinBySlip(Ntwin,Nslip,interactionValues,lattice) r integer, dimension(HEX_NSLIP,HEX_NTWIN), parameter :: & HEX_INTERACTIONTWINSLIP = reshape( [& + ! basal prism 2. prism pyr 1. pyr 2. pyr 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! ----> slip (acting) 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! | 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! | - 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! v + 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! v <-10.1>{10.2} 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! twin (reacting) 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & - 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & + 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & ! <11.6>{-1-1.1} 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & 2, 2, 2, 6, 6, 6, 10,10,10, 14,14,14,14,14,14, 18,18,18,18,18,18,18,18,18,18,18,18, 22,22,22,22,22,22, & 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & - 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & + 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & ! <10.-2>{10.1} 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & 3, 3, 3, 7, 7, 7, 11,11,11, 15,15,15,15,15,15, 19,19,19,19,19,19,19,19,19,19,19,19, 23,23,23,23,23,23, & 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & - 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & + 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & ! <11.-3>{11.2} 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24, & 4, 4, 4, 8, 8, 8, 12,12,12, 16,16,16,16,16,16, 20,20,20,20,20,20,20,20,20,20,20,20, 24,24,24,24,24,24 & ],shape(HEX_INTERACTIONTWINSLIP)) !< Twin-slip interaction types for hex From 83206064101d7ca52db0a23dddea8f1a7052e6b0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 15:48:11 +0100 Subject: [PATCH 29/43] simplify counting, emphasize floating point values --- .../mechanical/plastic/phenopowerlaw_Mg.yaml | 17 +++++++++++++---- .../mechanical/plastic/phenopowerlaw_Ti.yaml | 6 +++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml index b29075173..88c8c4a54 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml @@ -23,7 +23,16 @@ f_sat_sl-tw: 10.0 h_0_sl-sl: 500.0e+6 h_0_tw-tw: 50.0e+6 h_0_tw-sl: 150.0e+6 -h_sl-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -h_tw-tw: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -h_tw-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -h_sl-tw: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] +h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0] +h_tw-tw: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] +h_tw-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0] +h_sl-tw: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0] diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml index 804cf4541..ea2257ab3 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml @@ -20,4 +20,8 @@ xi_inf_sl: [568.e+6, 150.e+7, 0.0, 0.0, 3420.e+6] # L. Wang et al. : # xi_0_sl: [127.e+6, 96.e+6, 0.0, 0.0, 240.e+6] -h_sl-sl: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] +h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] From f8b7e0917b8b4b084890dcae963f0ed8c9a7a91d Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 15:52:38 +0100 Subject: [PATCH 30/43] trailing definitions not needed --- .../config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml index ea2257ab3..a54b0fa72 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml @@ -8,7 +8,7 @@ references: https://doi.org/10.1016/j.actamat.2017.05.015 output: [gamma_sl] -N_sl: [3, 3, 0, 0, 12] # basal, 1. prism, -, -, 2. pyr +N_sl: [3, 3, 0, 0, 12] # basal, 1. prism, -, -, 1. pyr n_sl: 20 a_sl: 2.0 dot_gamma_0_sl: 0.001 @@ -23,5 +23,4 @@ xi_inf_sl: [568.e+6, 150.e+7, 0.0, 0.0, 3420.e+6] h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] From 0c520d49deaf72b8c9763668e96f1328baf3427b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 24 Nov 2021 19:17:47 +0100 Subject: [PATCH 31/43] guide the user + needed for consistent indentation (make YAMLlint happy) --- .../mechanical/plastic/phenopowerlaw_Mg.yaml | 26 +++++++++---------- .../mechanical/plastic/phenopowerlaw_Ti.yaml | 7 +++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml index 88c8c4a54..4c5021545 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml @@ -23,16 +23,16 @@ f_sat_sl-tw: 10.0 h_0_sl-sl: 500.0e+6 h_0_tw-tw: 50.0e+6 h_0_tw-sl: 150.0e+6 -h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0] -h_tw-tw: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] -h_tw-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0] -h_sl-tw: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0] +h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, + -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, + -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, + +1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, + +1.0, 1.0] # unused entries are indicated by -1.0 +h_tw-tw: [+1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, + -1.0, 1.0] # unused entries are indicated by -1.0 +h_tw-sl: [+1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, + -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, + +1.0, -1.0, 1.0, -1.0] # unused entries are indicated by -1.0 +h_sl-tw: [+1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, + -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, + +1.0, -1.0, 1.0] # unused entries are indicated by -1.0 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml index a54b0fa72..85fd2ee8e 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml @@ -20,7 +20,6 @@ xi_inf_sl: [568.e+6, 150.e+7, 0.0, 0.0, 3420.e+6] # L. Wang et al. : # xi_0_sl: [127.e+6, 96.e+6, 0.0, 0.0, 240.e+6] -h_sl-sl: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] +h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, + -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, + +1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0] # unused entries are indicated by -1.0 From 57e8c0c5ec2d15e34fd39980cd12bdd4b13601fd Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 25 Nov 2021 14:07:41 -0500 Subject: [PATCH 32/43] polish --- .../phase/mechanical/plastic/phenopowerlaw_Mg.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml index 4c5021545..9b06f92d9 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml @@ -6,12 +6,12 @@ references: output: [xi_sl, xi_tw] -N_sl: [3, 3, 0, 6, 0, 6] # basal, 1. prism, -, 1. pyr, -, 2. pyr -N_tw: [6, 0, 6] # tension, -, compression +N_sl: [3, 3, 0, 6, 0, 6] # basal, prism, -, 1. pyr, -, 2. pyr +N_tw: [6, 0, 6] # tension, -, compression -xi_0_sl: [10.e+6, 55.e+6, 0., 60.e+6, 0., 60.e+6] +xi_0_sl: [10.e+6, 55.e+6, 0., 60.e+6, 0., 60.e+6] xi_inf_sl: [40.e+6, 135.e+6, 0., 150.e+6, 0., 150.e+6] -xi_0_tw: [40.e+6, 0., 60.e+6] +xi_0_tw: [40.e+6, 0., 60.e+6] a_sl: 2.25 dot_gamma_0_sl: 0.001 @@ -21,7 +21,7 @@ n_tw: 20 f_sat_sl-tw: 10.0 h_0_sl-sl: 500.0e+6 -h_0_tw-tw: 50.0e+6 +h_0_tw-tw: 50.0e+6 h_0_tw-sl: 150.0e+6 h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, From 6cad6bc5cfc17c92b327da04ba072f9eba819d7c Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 25 Nov 2021 14:08:19 -0500 Subject: [PATCH 33/43] clarify slip plane for (first) pyr --- src/lattice.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lattice.f90 b/src/lattice.f90 index dfdbf2b91..9c51a6d98 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -751,7 +751,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( integer, dimension(HEX_NSLIP,HEX_NSLIP), parameter :: & HEX_INTERACTIONSLIPSLIP = reshape( [& - ! basal prism 2. prism pyr 1. pyr 2. pyr + ! basal prism 2. prism 1. pyr 1. pyr 2. pyr 1, 2, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! -----> acting (forest) 2, 1, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | basal 2, 2, 1, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! | @@ -767,7 +767,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,lattice) result( 20,20,20, 19,19,19, 18,18,18, 16,17,17,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,16,17,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,17,16,17,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & - 20,20,20, 19,19,19, 18,18,18, 17,17,17,16,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & ! pyr + 20,20,20, 19,19,19, 18,18,18, 17,17,17,16,17,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & ! 1. pyr 20,20,20, 19,19,19, 18,18,18, 17,17,17,17,16,17, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & 20,20,20, 19,19,19, 18,18,18, 17,17,17,17,17,16, 24,24,24,24,24,24,24,24,24,24,24,24, 34,34,34,34,34,34, & @@ -1141,7 +1141,7 @@ function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,lattice) r 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & - 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & ! pyr + 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & ! 1. pyr 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & 13,13,13,13,13,13, 14,14,14,14,14,14, 15,15,15,15,15,15, 16,16,16,16,16,16, & @@ -1265,7 +1265,7 @@ function lattice_interaction_TwinBySlip(Ntwin,Nslip,interactionValues,lattice) r integer, dimension(HEX_NSLIP,HEX_NTWIN), parameter :: & HEX_INTERACTIONTWINSLIP = reshape( [& - ! basal prism 2. prism pyr 1. pyr 2. pyr + ! basal prism 2. prism 1. pyr 1. pyr 2. pyr 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! ----> slip (acting) 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! | 1, 1, 1, 5, 5, 5, 9, 9, 9, 13,13,13,13,13,13, 17,17,17,17,17,17,17,17,17,17,17,17, 21,21,21,21,21,21, & ! | From d52a14f74f30f983efd34b6c14ce64a7dc695db0 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 26 Nov 2021 13:28:55 +0100 Subject: [PATCH 34/43] [skip ci] updated version information after successful test of v3.0.0-alpha5-172-g41d78e2c6 --- python/damask/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/VERSION b/python/damask/VERSION index 44b22368f..3bc6d0420 100644 --- a/python/damask/VERSION +++ b/python/damask/VERSION @@ -1 +1 @@ -v3.0.0-alpha5-164-gdc993bc6f +v3.0.0-alpha5-172-g41d78e2c6 From 3618482f0839de02a1c36db2865101925f707e1d Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 26 Nov 2021 17:20:05 +0100 Subject: [PATCH 35/43] testing dynamic C --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index e5c897781..21105a488 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit e5c8977814ea8afca021fad2181dbb2a986bea70 +Subproject commit 21105a488f1acbe119a76d9113a185245b45fd75 From 825eb3824bb08ce49ba8b7a78099a20fe1ad79da Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 26 Nov 2021 17:23:42 +0100 Subject: [PATCH 36/43] polishing --- PRIVATE | 2 +- src/phase_mechanical_elastic.f90 | 38 +++++++++++++++++--------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/PRIVATE b/PRIVATE index 21105a488..bc6de828c 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 21105a488f1acbe119a76d9113a185245b45fd75 +Subproject commit bc6de828cc4ee9c941b37113ca49fcf51abd3512 diff --git a/src/phase_mechanical_elastic.f90 b/src/phase_mechanical_elastic.f90 index 9e5c2653c..45abf48c1 100644 --- a/src/phase_mechanical_elastic.f90 +++ b/src/phase_mechanical_elastic.f90 @@ -91,41 +91,43 @@ module function elastic_C66(ph,en) result(C66) integer, intent(in) :: & ph, & en + real(pReal), dimension(6,6) :: C66 real(pReal) :: T + associate(prm => param(ph)) C66 = 0.0_pReal T = thermal_T(ph,en) - C66(1,1) = prm%C_11(1)* 1.0_pReal & - + prm%C_11(2)*(T - prm%T_ref)**1 & - + prm%C_11(3)*(T - prm%T_ref)**2 + C66(1,1) = prm%C_11(1) & + + prm%C_11(2)*(T - prm%T_ref)**1 & + + prm%C_11(3)*(T - prm%T_ref)**2 - C66(1,2) = prm%C_12(1)* 1.0_pReal & - + prm%C_12(2)*(T - prm%T_ref)**1 & - + prm%C_12(3)*(T - prm%T_ref)**2 + C66(1,2) = prm%C_12(1) & + + prm%C_12(2)*(T - prm%T_ref)**1 & + + prm%C_12(3)*(T - prm%T_ref)**2 - C66(4,4) = prm%C_44(1)*1.0_pReal & - + prm%C_44(2)*(T - prm%T_ref)**1 & - + prm%C_44(3)*(T - prm%T_ref)**2 + C66(4,4) = prm%C_44(1) & + + prm%C_44(2)*(T - prm%T_ref)**1 & + + prm%C_44(3)*(T - prm%T_ref)**2 if (any(phase_lattice(ph) == ['hP','tI'])) then - C66(1,3) = prm%C_13(1)*1.0_pReal & - + prm%C_13(2)*(T - prm%T_ref)**1 & - + prm%C_13(3)*(T - prm%T_ref)**2 + C66(1,3) = prm%C_13(1) & + + prm%C_13(2)*(T - prm%T_ref)**1 & + + prm%C_13(3)*(T - prm%T_ref)**2 - C66(3,3) = prm%C_33(1)*1.0_pReal & - + prm%C_33(2)*(T - prm%T_ref)**1 & - + prm%C_33(3)*(T - prm%T_ref)**2 + C66(3,3) = prm%C_33(1) & + + prm%C_33(2)*(T - prm%T_ref)**1 & + + prm%C_33(3)*(T - prm%T_ref)**2 end if if (phase_lattice(ph) == 'tI') then - C66(6,6) = prm%C_66(1)*1.0_pReal & - + prm%C_66(2)*(T - prm%T_ref)**1 & - + prm%C_66(3)*(T - prm%T_ref)**2 + C66(6,6) = prm%C_66(1) & + + prm%C_66(2)*(T - prm%T_ref)**1 & + + prm%C_66(3)*(T - prm%T_ref)**2 end if C66 = lattice_symmetrize_C66(C66,phase_lattice(ph)) From 2fbe34497ed965124637debc754d2cdbdf97cdfe Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Fri, 26 Nov 2021 14:03:15 -0500 Subject: [PATCH 37/43] integer exponents --- src/phase_mechanical_eigen_thermalexpansion.f90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/phase_mechanical_eigen_thermalexpansion.f90 b/src/phase_mechanical_eigen_thermalexpansion.f90 index 3c7654dc9..a84dd7797 100644 --- a/src/phase_mechanical_eigen_thermalexpansion.f90 +++ b/src/phase_mechanical_eigen_thermalexpansion.f90 @@ -61,11 +61,11 @@ module function thermalexpansion_init(kinematics_length) result(myKinematics) prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=T_ROOM) prm%A(1,1,1) = kinematic_type%get_asFloat('A_11') - prm%A(1,1,2) = kinematic_type%get_asFloat('A_11,T',defaultVal=0.0_pReal) + prm%A(1,1,2) = kinematic_type%get_asFloat('A_11,T', defaultVal=0.0_pReal) prm%A(1,1,3) = kinematic_type%get_asFloat('A_11,T^2',defaultVal=0.0_pReal) if (any(phase_lattice(p) == ['hP','tI'])) then prm%A(3,3,1) = kinematic_type%get_asFloat('A_33') - prm%A(3,3,2) = kinematic_type%get_asFloat('A_33,T',defaultVal=0.0_pReal) + prm%A(3,3,2) = kinematic_type%get_asFloat('A_33,T', defaultVal=0.0_pReal) prm%A(3,3,3) = kinematic_type%get_asFloat('A_33,T^2',defaultVal=0.0_pReal) end if do i=1, size(prm%A,3) @@ -99,13 +99,13 @@ module subroutine thermalexpansion_LiAndItsTangent(Li, dLi_dTstar, ph,me) associate(prm => param(kinematics_thermal_expansion_instance(ph))) Li = dot_T * ( & prm%A(1:3,1:3,1) & ! constant coefficient - + prm%A(1:3,1:3,2)*(T - prm%T_ref)**1.0_pReal & ! linear coefficient - + prm%A(1:3,1:3,3)*(T - prm%T_ref)**2.0_pReal & ! quadratic coefficient + + prm%A(1:3,1:3,2)*(T - prm%T_ref)**1 & ! linear coefficient + + prm%A(1:3,1:3,3)*(T - prm%T_ref)**2 & ! quadratic coefficient ) / & (1.0_pReal & - + prm%A(1:3,1:3,1)*(T - prm%T_ref)**1.0_pReal / 1.0_pReal & - + prm%A(1:3,1:3,2)*(T - prm%T_ref)**2.0_pReal / 2.0_pReal & - + prm%A(1:3,1:3,3)*(T - prm%T_ref)**3.0_pReal / 3.0_pReal & + + prm%A(1:3,1:3,1)*(T - prm%T_ref)**1 / 1.0_pReal & + + prm%A(1:3,1:3,2)*(T - prm%T_ref)**2 / 2.0_pReal & + + prm%A(1:3,1:3,3)*(T - prm%T_ref)**3 / 3.0_pReal & ) end associate dLi_dTstar = 0.0_pReal From 98b699359f779d6998b0f44219e376fa75d30a25 Mon Sep 17 00:00:00 2001 From: Test User Date: Sat, 27 Nov 2021 00:46:28 +0100 Subject: [PATCH 38/43] [skip ci] updated version information after successful test of v3.0.0-alpha5-191-gf32a78861 --- python/damask/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/VERSION b/python/damask/VERSION index 3bc6d0420..cbf66449a 100644 --- a/python/damask/VERSION +++ b/python/damask/VERSION @@ -1 +1 @@ -v3.0.0-alpha5-172-g41d78e2c6 +v3.0.0-alpha5-191-gf32a78861 From 5768942fa59a2bd3124728a23df7fbe0489c0dd7 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Sat, 27 Nov 2021 14:11:30 -0500 Subject: [PATCH 39/43] use simplifed logic in PRIVATE --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index f730bcb8d..b42f31813 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit f730bcb8ddd7224011e70c57d0a5c03068532d2d +Subproject commit b42f31813bb00ad36042c226adba173df59ee646 From a0e0f329fd5150ce6a4f22cf55f436fbaea92a6f Mon Sep 17 00:00:00 2001 From: Test User Date: Sun, 28 Nov 2021 03:10:26 +0100 Subject: [PATCH 40/43] [skip ci] updated version information after successful test of v3.0.0-alpha5-197-g1fc876358 --- python/damask/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/VERSION b/python/damask/VERSION index cbf66449a..6ebcf0173 100644 --- a/python/damask/VERSION +++ b/python/damask/VERSION @@ -1 +1 @@ -v3.0.0-alpha5-191-gf32a78861 +v3.0.0-alpha5-197-g1fc876358 From a531b7ccaedfcdc97ced1d715cdadbf99c2aa855 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Sun, 28 Nov 2021 12:46:26 -0500 Subject: [PATCH 41/43] transitioned remaining real exponents to int --- src/grid/spectral_utilities.f90 | 2 +- src/math.f90 | 6 +++--- src/phase_damage.f90 | 3 +-- src/phase_damage_anisobrittle.f90 | 4 ++-- src/phase_mechanical_plastic_dislotungsten.f90 | 6 +++--- src/phase_mechanical_plastic_dislotwin.f90 | 14 +++++++------- src/rotations.f90 | 2 +- 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/grid/spectral_utilities.f90 b/src/grid/spectral_utilities.f90 index 3d1776925..0c9fde2b4 100644 --- a/src/grid/spectral_utilities.f90 +++ b/src/grid/spectral_utilities.f90 @@ -578,7 +578,7 @@ real(pReal) function utilities_divergenceRMS() do k = 1, grid3; do j = 1, grid(2) do i = 2, grid1Red -1 ! Has somewhere a conj. complex counterpart. Therefore count it twice. utilities_divergenceRMS = utilities_divergenceRMS & - + 2.0_pReal*(sum (real(matmul(tensorField_fourier(1:3,1:3,i,j,k), & ! (sqrt(real(a)**2 + aimag(a)**2))**2 = real(a)**2 + aimag(a)**2. do not take square root and square again + + 2.0_pReal*(sum (real(matmul(tensorField_fourier(1:3,1:3,i,j,k), & ! (sqrt(real(a)**2 + aimag(a)**2))**2 = real(a)**2 + aimag(a)**2, i.e. do not take square root and square again conjg(-xi1st(1:3,i,j,k))*rescaledGeom))**2) & ! --> sum squared L_2 norm of vector +sum(aimag(matmul(tensorField_fourier(1:3,1:3,i,j,k),& conjg(-xi1st(1:3,i,j,k))*rescaledGeom))**2)) diff --git a/src/math.f90 b/src/math.f90 index 42874dcb7..029e069cf 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -1086,15 +1086,15 @@ function math_eigvalsh33(m) I = math_invariantsSym33(m) ! invariants are coefficients in characteristic polynomial apart for the sign of c0 and c2 in http://arxiv.org/abs/physics/0610206 - P = I(2)-I(1)**2.0_pReal/3.0_pReal ! different from http://arxiv.org/abs/physics/0610206 (this formulation was in DAMASK) + P = I(2)-I(1)**2/3.0_pReal ! different from http://arxiv.org/abs/physics/0610206 (this formulation was in DAMASK) Q = product(I(1:2))/3.0_pReal & - - 2.0_pReal/27.0_pReal*I(1)**3.0_pReal & + - 2.0_pReal/27.0_pReal*I(1)**3 & - I(3) ! different from http://arxiv.org/abs/physics/0610206 (this formulation was in DAMASK) if (all(abs([P,Q]) < TOL)) then math_eigvalsh33 = math_eigvalsh(m) else - rho=sqrt(-3.0_pReal*P**3.0_pReal)/9.0_pReal + rho=sqrt(-3.0_pReal*P**3)/9.0_pReal phi=acos(math_clip(-Q/rho*0.5_pReal,-1.0_pReal,1.0_pReal)) math_eigvalsh33 = 2.0_pReal*rho**(1.0_pReal/3.0_pReal)* & [cos( phi /3.0_pReal), & diff --git a/src/phase_damage.f90 b/src/phase_damage.f90 index 3b3ace8ab..2fa5ab9ea 100644 --- a/src/phase_damage.f90 +++ b/src/phase_damage.f90 @@ -388,8 +388,7 @@ module function phase_K_phi(co,ce) result(K) real(pReal), dimension(3,3) :: K real(pReal), parameter :: l = 1.0_pReal - K = crystallite_push33ToRef(co,ce,param(material_phaseID(co,ce))%D) & - * l**2.0_pReal + K = crystallite_push33ToRef(co,ce,param(material_phaseID(co,ce))%D) * l**2 end function phase_K_phi diff --git a/src/phase_damage_anisobrittle.f90 b/src/phase_damage_anisobrittle.f90 index f6facbe48..f193119eb 100644 --- a/src/phase_damage_anisobrittle.f90 +++ b/src/phase_damage_anisobrittle.f90 @@ -129,7 +129,7 @@ module subroutine anisobrittle_dotState(S, ph,en) traction_t = math_tensordot(S,prm%cleavage_systems(1:3,1:3,2,i)) traction_n = math_tensordot(S,prm%cleavage_systems(1:3,1:3,3,i)) - traction_crit = prm%g_crit(i)*damage_phi(ph,en)**2.0_pReal + traction_crit = prm%g_crit(i)*damage_phi(ph,en)**2 damageState(ph)%dotState(1,en) = damageState(ph)%dotState(1,en) & + prm%dot_o / prm%s_crit(i) & @@ -190,7 +190,7 @@ module subroutine damage_anisobrittle_LiAndItsTangent(Ld, dLd_dTstar, S, ph,en) dLd_dTstar = 0.0_pReal associate(prm => param(ph)) do i = 1,prm%sum_N_cl - traction_crit = prm%g_crit(i)*damage_phi(ph,en)**2.0_pReal + traction_crit = prm%g_crit(i)*damage_phi(ph,en)**2 traction_d = math_tensordot(S,prm%cleavage_systems(1:3,1:3,1,i)) if (abs(traction_d) > traction_crit + tol_math_check) then diff --git a/src/phase_mechanical_plastic_dislotungsten.f90 b/src/phase_mechanical_plastic_dislotungsten.f90 index 1dab5dfd4..c2a584ea1 100644 --- a/src/phase_mechanical_plastic_dislotungsten.f90 +++ b/src/phase_mechanical_plastic_dislotungsten.f90 @@ -166,7 +166,7 @@ module function plastic_dislotungsten_init() result(myPlasticity) prm%D = pl%get_asFloat('D') prm%D_0 = pl%get_asFloat('D_0') prm%Q_cl = pl%get_asFloat('Q_cl') - prm%f_at = pl%get_asFloat('f_at') * prm%b_sl**3.0_pReal + prm%f_at = pl%get_asFloat('f_at') * prm%b_sl**3 prm%dipoleformation = .not. pl%get_asBool('no_dipole_formation', defaultVal = .false.) @@ -498,7 +498,7 @@ pure subroutine kinetics(Mp,T,ph,en, & * StressRatio_pminus1 / prm%tau_Peierls dtk = -1.0_pReal * t_k / tau_pos - dvel = -1.0_pReal * prm%h * (dtk + dtn) / (t_n + t_k)**2.0_pReal + dvel = -1.0_pReal * prm%h * (dtk + dtn) / (t_n + t_k)**2 ddot_gamma_dtau_pos = b_rho_half * dvel else where significantPositiveTau2 @@ -528,7 +528,7 @@ pure subroutine kinetics(Mp,T,ph,en, & * StressRatio_pminus1 / prm%tau_Peierls dtk = -1.0_pReal * t_k / tau_neg - dvel = -1.0_pReal * prm%h * (dtk + dtn) / (t_n + t_k)**2.0_pReal + dvel = -1.0_pReal * prm%h * (dtk + dtn) / (t_n + t_k)**2 ddot_gamma_dtau_neg = b_rho_half * dvel else where significantNegativeTau2 diff --git a/src/phase_mechanical_plastic_dislotwin.f90 b/src/phase_mechanical_plastic_dislotwin.f90 index 034b3f503..c5e043e3f 100644 --- a/src/phase_mechanical_plastic_dislotwin.f90 +++ b/src/phase_mechanical_plastic_dislotwin.f90 @@ -691,8 +691,8 @@ module subroutine dislotwin_dotState(Mp,T,ph,en) * (prm%Gamma_sf(1) + prm%Gamma_sf(2) * T) / (mu*prm%b_sl(i)), & 1.0_pReal, & prm%ExtendedDislocations) - v_cl = 2.0_pReal*prm%omega*b_d**2.0_pReal*exp(-prm%Q_cl/(K_B*T)) & - * (exp(abs(sigma_cl)*prm%b_sl(i)**3.0_pReal/(K_B*T)) - 1.0_pReal) + v_cl = 2.0_pReal*prm%omega*b_d**2*exp(-prm%Q_cl/(K_B*T)) & + * (exp(abs(sigma_cl)*prm%b_sl(i)**3/(K_B*T)) - 1.0_pReal) dot_rho_dip_climb(i) = 4.0_pReal*v_cl*stt%rho_dip(i,en) & / (d_hat-prm%d_caron(i)) @@ -784,14 +784,14 @@ module subroutine dislotwin_dependentState(T,ph,en) + 3.0_pReal*prm%b_tr*mu/(prm%L_tr*prm%b_tr) & + prm%h*prm%delta_G/(3.0_pReal*prm%b_tr) - dst%V_tw(:,en) = (PI/4.0_pReal)*prm%t_tw*dst%Lambda_tw(:,en)**2.0_pReal - dst%V_tr(:,en) = (PI/4.0_pReal)*prm%t_tr*dst%Lambda_tr(:,en)**2.0_pReal + dst%V_tw(:,en) = (PI/4.0_pReal)*prm%t_tw*dst%Lambda_tw(:,en)**2 + dst%V_tr(:,en) = (PI/4.0_pReal)*prm%t_tr*dst%Lambda_tr(:,en)**2 - x0 = mu*prm%b_tw**2.0_pReal/(Gamma*8.0_pReal*PI)*(2.0_pReal+nu)/(1.0_pReal-nu) ! ToDo: In the paper, this is the Burgers vector for slip + x0 = mu*prm%b_tw**2/(Gamma*8.0_pReal*PI)*(2.0_pReal+nu)/(1.0_pReal-nu) ! ToDo: In the paper, this is the Burgers vector for slip dst%tau_r_tw(:,en) = mu*prm%b_tw/(2.0_pReal*PI)*(1.0_pReal/(x0+prm%x_c_tw)+cos(pi/3.0_pReal)/x0) - x0 = mu*prm%b_tr**2.0_pReal/(Gamma*8.0_pReal*PI)*(2.0_pReal+nu)/(1.0_pReal-nu) ! ToDo: In the paper, this is the Burgers vector for slip + x0 = mu*prm%b_tr**2/(Gamma*8.0_pReal*PI)*(2.0_pReal+nu)/(1.0_pReal-nu) ! ToDo: In the paper, this is the Burgers vector for slip dst%tau_r_tr(:,en) = mu*prm%b_tr/(2.0_pReal*PI)*(1.0_pReal/(x0+prm%x_c_tr)+cos(pi/3.0_pReal)/x0) end associate @@ -917,7 +917,7 @@ pure subroutine kinetics_sl(Mp,T,ph,en, & / prm%tau_0 dV_run_inverse_dTau = -1.0_pReal * v_run_inverse/tau_eff dV_dTau = -1.0_pReal * (dV_wait_inverse_dTau+dV_run_inverse_dTau) & - / (v_wait_inverse+v_run_inverse)**2.0_pReal + / (v_wait_inverse+v_run_inverse)**2 ddot_gamma_dtau = dV_dTau*stt%rho_mob(:,en)*prm%b_sl else where significantStress dot_gamma_sl = 0.0_pReal diff --git a/src/rotations.f90 b/src/rotations.f90 index 105ca34dd..7b622577f 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -578,7 +578,7 @@ pure function om2eu(om) result(eu) real(pReal) :: zeta if (dNeq(abs(om(3,3)),1.0_pReal,1.e-8_pReal)) then - zeta = 1.0_pReal/sqrt(math_clip(1.0_pReal-om(3,3)**2.0_pReal,1e-64_pReal,1.0_pReal)) + zeta = 1.0_pReal/sqrt(math_clip(1.0_pReal-om(3,3)**2,1e-64_pReal,1.0_pReal)) eu = [atan2(om(3,1)*zeta,-om(3,2)*zeta), & acos(math_clip(om(3,3),-1.0_pReal,1.0_pReal)), & atan2(om(1,3)*zeta, om(2,3)*zeta)] From 77bced998fc591248b093d836c057f5e1c85b441 Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 29 Nov 2021 10:35:09 +0100 Subject: [PATCH 42/43] [skip ci] updated version information after successful test of v3.0.0-alpha5-202-g96e4cb591 --- python/damask/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/VERSION b/python/damask/VERSION index 6ebcf0173..ab908db69 100644 --- a/python/damask/VERSION +++ b/python/damask/VERSION @@ -1 +1 @@ -v3.0.0-alpha5-197-g1fc876358 +v3.0.0-alpha5-202-g96e4cb591 From 51b7a0073449dc18e1af783d548808dd90ee17bb Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 29 Nov 2021 21:14:49 +0100 Subject: [PATCH 43/43] [skip ci] updated version information after successful test of v3.0.0-alpha5-210-g7e7098baf --- python/damask/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/VERSION b/python/damask/VERSION index ab908db69..9b4cbe87d 100644 --- a/python/damask/VERSION +++ b/python/damask/VERSION @@ -1 +1 @@ -v3.0.0-alpha5-202-g96e4cb591 +v3.0.0-alpha5-210-g7e7098baf