Merge branch '108_fix-thermalexpansion' into 'development'
bugix: change of behavior See merge request damask/DAMASK!513
This commit is contained in:
commit
368f4b2ed3
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 5598ec4892b0921fccf63e8570f9fcd8e0365716
|
Subproject commit 419ba7b6f6989a14e0c91c1f1f6621daf8215b71
|
|
@ -8,10 +8,9 @@ submodule(phase:eigen) thermalexpansion
|
||||||
integer, dimension(:), allocatable :: kinematics_thermal_expansion_instance
|
integer, dimension(:), allocatable :: kinematics_thermal_expansion_instance
|
||||||
|
|
||||||
type :: tParameters
|
type :: tParameters
|
||||||
real(pReal) :: &
|
type(tPolynomial) :: &
|
||||||
T_ref
|
A_11, &
|
||||||
real(pReal), dimension(3,3,3) :: &
|
A_33
|
||||||
A = 0.0_pReal
|
|
||||||
end type tParameters
|
end type tParameters
|
||||||
|
|
||||||
type(tParameters), dimension(:), allocatable :: param
|
type(tParameters), dimension(:), allocatable :: param
|
||||||
|
@ -34,7 +33,7 @@ module function thermalexpansion_init(kinematics_length) result(myKinematics)
|
||||||
phase, &
|
phase, &
|
||||||
mech, &
|
mech, &
|
||||||
kinematics, &
|
kinematics, &
|
||||||
kinematic_type
|
myConfig
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- phase:mechanical:eigen:thermalexpansion init -+>>>'
|
print'(/,1x,a)', '<<<+- phase:mechanical:eigen:thermalexpansion init -+>>>'
|
||||||
|
|
||||||
|
@ -56,21 +55,13 @@ module function thermalexpansion_init(kinematics_length) result(myKinematics)
|
||||||
do k = 1, kinematics%length
|
do k = 1, kinematics%length
|
||||||
if (myKinematics(k,p)) then
|
if (myKinematics(k,p)) then
|
||||||
associate(prm => param(kinematics_thermal_expansion_instance(p)))
|
associate(prm => param(kinematics_thermal_expansion_instance(p)))
|
||||||
kinematic_type => kinematics%get(k)
|
|
||||||
|
|
||||||
prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=T_ROOM)
|
myConfig => kinematics%get(k)
|
||||||
|
|
||||||
|
prm%A_11 = polynomial(myConfig%asDict(),'A_11','T')
|
||||||
|
if (any(phase_lattice(p) == ['hP','tI'])) &
|
||||||
|
prm%A_33 = polynomial(myConfig%asDict(),'A_33','T')
|
||||||
|
|
||||||
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,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,3) = kinematic_type%get_asFloat('A_33,T^2',defaultVal=0.0_pReal)
|
|
||||||
end if
|
|
||||||
do i=1, size(prm%A,3)
|
|
||||||
prm%A(1:3,1:3,i) = lattice_symmetrize_33(prm%A(1:3,1:3,i),phase_lattice(p))
|
|
||||||
end do
|
|
||||||
end associate
|
end associate
|
||||||
end if
|
end if
|
||||||
end do
|
end do
|
||||||
|
@ -91,22 +82,20 @@ module subroutine thermalexpansion_LiAndItsTangent(Li, dLi_dTstar, ph,me)
|
||||||
dLi_dTstar !< derivative of Li with respect to Tstar (4th-order tensor defined to be zero)
|
dLi_dTstar !< derivative of Li with respect to Tstar (4th-order tensor defined to be zero)
|
||||||
|
|
||||||
real(pReal) :: T, dot_T
|
real(pReal) :: T, dot_T
|
||||||
|
real(pReal), dimension(3,3) :: A
|
||||||
|
|
||||||
|
|
||||||
T = thermal_T(ph,me)
|
T = thermal_T(ph,me)
|
||||||
dot_T = thermal_dot_T(ph,me)
|
dot_T = thermal_dot_T(ph,me)
|
||||||
|
|
||||||
associate(prm => param(kinematics_thermal_expansion_instance(ph)))
|
associate(prm => param(kinematics_thermal_expansion_instance(ph)))
|
||||||
Li = dot_T * ( &
|
|
||||||
prm%A(1:3,1:3,1) & ! constant coefficient
|
A = 0.0_pReal
|
||||||
+ prm%A(1:3,1:3,2)*(T - prm%T_ref) & ! linear coefficient
|
A(1,1) = prm%A_11%at(T)
|
||||||
+ prm%A(1:3,1:3,3)*(T - prm%T_ref)**2 & ! quadratic coefficient
|
if (any(phase_lattice(ph) == ['hP','tI'])) A(3,3) = prm%A_33%at(T)
|
||||||
) / &
|
A = lattice_symmetrize_33(A,phase_lattice(ph))
|
||||||
(1.0_pReal &
|
Li = dot_T * A
|
||||||
+ prm%A(1:3,1:3,1)*(T - prm%T_ref) / 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
|
end associate
|
||||||
dLi_dTstar = 0.0_pReal
|
dLi_dTstar = 0.0_pReal
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ module subroutine elastic_init(phases)
|
||||||
prm%C_11 = polynomial(elastic%asDict(),'C_11','T')
|
prm%C_11 = polynomial(elastic%asDict(),'C_11','T')
|
||||||
prm%C_12 = polynomial(elastic%asDict(),'C_12','T')
|
prm%C_12 = polynomial(elastic%asDict(),'C_12','T')
|
||||||
prm%C_44 = polynomial(elastic%asDict(),'C_44','T')
|
prm%C_44 = polynomial(elastic%asDict(),'C_44','T')
|
||||||
|
|
||||||
if (any(phase_lattice(ph) == ['hP','tI'])) then
|
if (any(phase_lattice(ph) == ['hP','tI'])) then
|
||||||
prm%C_13 = polynomial(elastic%asDict(),'C_13','T')
|
prm%C_13 = polynomial(elastic%asDict(),'C_13','T')
|
||||||
prm%C_33 = polynomial(elastic%asDict(),'C_33','T')
|
prm%C_33 = polynomial(elastic%asDict(),'C_33','T')
|
||||||
|
@ -77,7 +77,7 @@ pure module function elastic_C66(ph,en) result(C66)
|
||||||
|
|
||||||
|
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
|
|
||||||
C66 = 0.0_pReal
|
C66 = 0.0_pReal
|
||||||
T = thermal_T(ph,en)
|
T = thermal_T(ph,en)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue