2015-05-28 22:32:23 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @author Pratheek Shanthraj, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @brief material subroutine incorporating kinematics resulting from thermal expansion
|
|
|
|
!> @details to be done
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2021-02-13 23:27:41 +05:30
|
|
|
submodule(phase:eigen) thermalexpansion
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2020-02-29 14:06:42 +05:30
|
|
|
integer, dimension(:), allocatable :: kinematics_thermal_expansion_instance
|
|
|
|
|
2019-05-17 02:44:47 +05:30
|
|
|
type :: tParameters
|
2022-02-02 22:15:13 +05:30
|
|
|
type(tPolynomial) :: &
|
2022-11-18 11:44:05 +05:30
|
|
|
Alpha_11, &
|
|
|
|
Alpha_33
|
2019-02-23 01:07:41 +05:30
|
|
|
end type tParameters
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2019-02-23 01:07:41 +05:30
|
|
|
type(tParameters), dimension(:), allocatable :: param
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2015-05-28 22:32:23 +05:30
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @brief module initialization
|
|
|
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2021-02-13 23:11:30 +05:30
|
|
|
module function thermalexpansion_init(kinematics_length) result(myKinematics)
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2020-12-19 22:13:37 +05:30
|
|
|
integer, intent(in) :: kinematics_length
|
2020-08-15 19:32:10 +05:30
|
|
|
logical, dimension(:,:), allocatable :: myKinematics
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2022-02-05 23:02:17 +05:30
|
|
|
integer :: Ninstances, p, k
|
2022-10-25 21:39:36 +05:30
|
|
|
type(tList), pointer :: &
|
|
|
|
kinematics
|
|
|
|
type(tDict), pointer :: &
|
2020-08-15 19:32:10 +05:30
|
|
|
phases, &
|
|
|
|
phase, &
|
2022-10-25 21:39:36 +05:30
|
|
|
mech
|
|
|
|
|
2020-12-19 22:13:37 +05:30
|
|
|
|
2021-11-15 23:05:44 +05:30
|
|
|
print'(/,1x,a)', '<<<+- phase:mechanical:eigen:thermalexpansion init -+>>>'
|
2020-08-15 19:32:10 +05:30
|
|
|
|
2021-05-06 12:17:30 +05:30
|
|
|
myKinematics = kinematics_active('thermalexpansion',kinematics_length)
|
2020-10-28 02:03:30 +05:30
|
|
|
Ninstances = count(myKinematics)
|
2021-11-15 23:05:44 +05:30
|
|
|
print'(/,a,i2)', ' # phases: ',Ninstances; flush(IO_STDOUT)
|
|
|
|
if (Ninstances == 0) return
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2022-10-25 21:39:36 +05:30
|
|
|
phases => config_material%get_dict('phase')
|
2020-10-28 02:03:30 +05:30
|
|
|
allocate(param(Ninstances))
|
2020-08-15 19:32:10 +05:30
|
|
|
allocate(kinematics_thermal_expansion_instance(phases%length), source=0)
|
|
|
|
|
|
|
|
do p = 1, phases%length
|
2021-11-15 23:05:44 +05:30
|
|
|
if (any(myKinematics(:,p))) kinematics_thermal_expansion_instance(p) = count(myKinematics(:,1:p))
|
2022-10-25 21:39:36 +05:30
|
|
|
phase => phases%get_dict(p)
|
2021-11-15 23:05:44 +05:30
|
|
|
if (count(myKinematics(:,p)) == 0) cycle
|
2022-10-25 21:39:36 +05:30
|
|
|
mech => phase%get_dict('mechanical')
|
|
|
|
kinematics => mech%get_list('eigen')
|
2020-08-15 19:32:10 +05:30
|
|
|
do k = 1, kinematics%length
|
2021-11-15 23:05:44 +05:30
|
|
|
if (myKinematics(k,p)) then
|
2020-08-15 19:32:10 +05:30
|
|
|
associate(prm => param(kinematics_thermal_expansion_instance(p)))
|
2022-02-02 22:15:13 +05:30
|
|
|
|
2022-11-18 11:44:05 +05:30
|
|
|
prm%Alpha_11 = polynomial(kinematics%get_dict(k),'Alpha_11','T')
|
2022-02-02 22:15:13 +05:30
|
|
|
if (any(phase_lattice(p) == ['hP','tI'])) &
|
2022-11-18 11:44:05 +05:30
|
|
|
prm%Alpha_33 = polynomial(kinematics%get_dict(k),'Alpha_33','T')
|
2020-08-15 19:32:10 +05:30
|
|
|
end associate
|
2021-11-15 23:05:44 +05:30
|
|
|
end if
|
|
|
|
end do
|
|
|
|
end do
|
2015-05-28 22:32:23 +05:30
|
|
|
|
2021-02-13 23:11:30 +05:30
|
|
|
end function thermalexpansion_init
|
2015-05-28 22:32:23 +05:30
|
|
|
|
2019-02-23 01:07:41 +05:30
|
|
|
|
2015-05-28 22:32:23 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-06-26 15:14:17 +05:30
|
|
|
!> @brief constitutive equation for calculating the velocity gradient
|
2015-05-28 22:32:23 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2021-01-27 01:22:48 +05:30
|
|
|
module subroutine thermalexpansion_LiAndItsTangent(Li, dLi_dTstar, ph,me)
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2021-01-24 15:49:10 +05:30
|
|
|
integer, intent(in) :: ph, me
|
2019-02-23 01:07:41 +05:30
|
|
|
real(pReal), intent(out), dimension(3,3) :: &
|
2019-06-16 00:02:53 +05:30
|
|
|
Li !< thermal velocity gradient
|
2019-02-23 01:07:41 +05:30
|
|
|
real(pReal), intent(out), dimension(3,3,3,3) :: &
|
2019-06-16 00:02:53 +05:30
|
|
|
dLi_dTstar !< derivative of Li with respect to Tstar (4th-order tensor defined to be zero)
|
2020-02-29 14:06:42 +05:30
|
|
|
|
2021-01-24 15:49:10 +05:30
|
|
|
real(pReal) :: T, dot_T
|
2022-11-18 11:44:05 +05:30
|
|
|
real(pReal), dimension(3,3) :: Alpha
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2021-11-15 23:05:44 +05:30
|
|
|
|
2021-01-27 04:36:41 +05:30
|
|
|
T = thermal_T(ph,me)
|
|
|
|
dot_T = thermal_dot_T(ph,me)
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2021-01-24 15:49:10 +05:30
|
|
|
associate(prm => param(kinematics_thermal_expansion_instance(ph)))
|
2022-02-02 22:15:13 +05:30
|
|
|
|
2022-11-18 11:44:05 +05:30
|
|
|
Alpha = 0.0_pReal
|
|
|
|
Alpha(1,1) = prm%Alpha_11%at(T)
|
|
|
|
if (any(phase_lattice(ph) == ['hP','tI'])) Alpha(3,3) = prm%Alpha_33%at(T)
|
|
|
|
Alpha = lattice_symmetrize_33(Alpha,phase_lattice(ph))
|
|
|
|
Li = dot_T * Alpha
|
2022-02-02 22:15:13 +05:30
|
|
|
|
2021-05-24 01:29:15 +05:30
|
|
|
end associate
|
2020-02-28 14:55:07 +05:30
|
|
|
dLi_dTstar = 0.0_pReal
|
|
|
|
|
2021-01-27 01:22:48 +05:30
|
|
|
end subroutine thermalexpansion_LiAndItsTangent
|
2015-05-28 22:32:23 +05:30
|
|
|
|
2021-01-26 05:50:45 +05:30
|
|
|
end submodule thermalexpansion
|