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
|
2020-02-29 15:40:23 +05:30
|
|
|
real(pReal) :: &
|
|
|
|
T_ref
|
2020-02-29 16:51:03 +05:30
|
|
|
real(pReal), dimension(3,3,3) :: &
|
2020-09-23 04:46:12 +05:30
|
|
|
A = 0.0_pReal
|
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
|
|
|
|
2020-10-28 02:03:30 +05:30
|
|
|
integer :: Ninstances,p,i,k
|
2020-08-15 19:32:10 +05:30
|
|
|
class(tNode), pointer :: &
|
|
|
|
phases, &
|
|
|
|
phase, &
|
2021-05-06 12:17:30 +05:30
|
|
|
mech, &
|
2020-08-15 19:32:10 +05:30
|
|
|
kinematics, &
|
2020-12-19 22:13:37 +05:30
|
|
|
kinematic_type
|
|
|
|
|
2021-02-13 23:27:41 +05:30
|
|
|
print'(/,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-05-06 12:17:30 +05:30
|
|
|
print'(a,i2)', ' # phases: ',Ninstances; flush(IO_STDOUT)
|
2020-10-28 02:03:30 +05:30
|
|
|
if(Ninstances == 0) return
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2020-09-13 14:09:17 +05:30
|
|
|
phases => config_material%get('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
|
|
|
|
if(any(myKinematics(:,p))) kinematics_thermal_expansion_instance(p) = count(myKinematics(:,1:p))
|
2020-12-19 22:13:37 +05:30
|
|
|
phase => phases%get(p)
|
2020-08-15 19:32:10 +05:30
|
|
|
if(count(myKinematics(:,p)) == 0) cycle
|
2021-05-06 12:17:30 +05:30
|
|
|
mech => phase%get('mechanical')
|
|
|
|
kinematics => mech%get('eigen')
|
2020-08-15 19:32:10 +05:30
|
|
|
do k = 1, kinematics%length
|
|
|
|
if(myKinematics(k,p)) then
|
|
|
|
associate(prm => param(kinematics_thermal_expansion_instance(p)))
|
2021-06-24 12:39:37 +05:30
|
|
|
kinematic_type => kinematics%get(k)
|
|
|
|
|
|
|
|
prm%T_ref = kinematic_type%get_asFloat('T_ref', defaultVal=0.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)
|
|
|
|
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)
|
|
|
|
endif
|
|
|
|
do i=1, size(prm%A,3)
|
|
|
|
prm%A(1:3,1:3,i) = lattice_applyLatticeSymmetry33(prm%A(1:3,1:3,i),phase_lattice(p))
|
|
|
|
enddo
|
2020-08-15 19:32:10 +05:30
|
|
|
end associate
|
|
|
|
endif
|
2020-02-29 17:27:19 +05:30
|
|
|
enddo
|
2019-02-23 01:07:41 +05:30
|
|
|
enddo
|
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
|
2020-02-28 14:55:07 +05:30
|
|
|
|
2021-05-24 00:32:35 +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)))
|
2021-01-27 04:36:41 +05:30
|
|
|
Li = dot_T * ( &
|
2021-05-24 01:29:15 +05:30
|
|
|
prm%A(1:3,1:3,1)*(T - prm%T_ref)**0 & ! 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
|
2021-01-27 04:36:41 +05:30
|
|
|
) / &
|
|
|
|
(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. &
|
|
|
|
)
|
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
|