thermal dependent C

This commit is contained in:
Sharan Roongta 2021-11-24 22:51:14 +01:00
parent 2ae8b4a9f5
commit 35f20811cb
2 changed files with 36 additions and 17 deletions

@ -1 +1 @@
Subproject commit 76bb51348de75207d483d369628670e5ae51dca9 Subproject commit 7cae6f6fb6daca513fefbce21e4f07ab36fd3c78

View File

@ -1,7 +1,7 @@
submodule(phase:mechanical) elastic submodule(phase:mechanical) elastic
type :: tParameters type :: tParameters
real(pReal) :: & real(pReal),dimension(3) :: &
C_11 = 0.0_pReal, & C_11 = 0.0_pReal, &
C_12 = 0.0_pReal, & C_12 = 0.0_pReal, &
C_13 = 0.0_pReal, & C_13 = 0.0_pReal, &
@ -28,7 +28,7 @@ module subroutine elastic_init(phases)
phase, & phase, &
mech, & mech, &
elastic elastic
logical :: thermal_active
print'(/,1x,a)', '<<<+- phase:mechanical:elastic init -+>>>' print'(/,1x,a)', '<<<+- phase:mechanical:elastic init -+>>>'
print'(/,1x,a)', '<<<+- phase:mechanical:elastic:Hooke init -+>>>' print'(/,1x,a)', '<<<+- phase:mechanical:elastic:Hooke init -+>>>'
@ -45,15 +45,33 @@ module subroutine elastic_init(phases)
associate(prm => param(ph)) associate(prm => param(ph))
prm%C_11 = elastic%get_asFloat('C_11') prm%C_11(1) = elastic%get_asFloat('C_11')
prm%C_12 = elastic%get_asFloat('C_12') prm%C_11(2) = elastic%get_asFloat('C_11,T', defaultVal=0.0_pReal)
prm%C_44 = elastic%get_asFloat('C_44') 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 if (any(phase_lattice(ph) == ['hP','tI'])) then
prm%C_13 = elastic%get_asFloat('C_13') prm%C_13(1) = elastic%get_asFloat('C_13')
prm%C_33 = elastic%get_asFloat('C_33') 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 end if
if (phase_lattice(ph) == 'tI') prm%C_66 = elastic%get_asFloat('C_66')
end associate end associate
end do end do
@ -70,20 +88,21 @@ module function elastic_C66(ph,en) result(C66)
ph, & ph, &
en en
real(pReal), dimension(6,6) :: C66 real(pReal), dimension(6,6) :: C66
real(pReal) :: T
associate(prm => param(ph)) associate(prm => param(ph))
C66 = 0.0_pReal C66 = 0.0_pReal
C66(1,1) = prm%C_11 T = thermal_T(ph,en)
C66(1,2) = prm%C_12 C66(1,1) = prm%C_11(1) + prm%C_11(2)*T + prm%C_11(3)*T**2
C66(4,4) = prm%C_44 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 if (any(phase_lattice(ph) == ['hP','tI'])) then
C66(1,3) = prm%C_13 C66(1,3) = prm%C_13(1) + prm%C_13(2)*T + prm%C_13(3)*T**2
C66(3,3) = prm%C_33 C66(3,3) = prm%C_33(1) + prm%C_33(2)*T + prm%C_33(3)*T**2
end if 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)) C66 = lattice_symmetrize_C66(C66,phase_lattice(ph))