diff --git a/PRIVATE b/PRIVATE index f76f92caa..127a96032 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit f76f92caa726a625b052c998325e0595c5bc5b22 +Subproject commit 127a96032d491b26cee29c81a3183e804afa4dbd diff --git a/examples/config/phase/mechanical/eigen/thermalexpansion_Al.yaml b/examples/config/phase/mechanical/eigen/thermalexpansion_Al.yaml index 1876141f6..aa132609e 100644 --- a/examples/config/phase/mechanical/eigen/thermalexpansion_Al.yaml +++ b/examples/config/phase/mechanical/eigen/thermalexpansion_Al.yaml @@ -1,5 +1,5 @@ type: thermalexpansion references: - en.wikipedia.org/wiki/Thermal_expansion -A_11: [23.1e-6] +A_11: 23.1e-6 T_ref: 293.15 diff --git a/examples/config/phase/mechanical/eigen/thermalexpansion_Au.yaml b/examples/config/phase/mechanical/eigen/thermalexpansion_Au.yaml index 5d8030e1e..34e71a1bc 100644 --- a/examples/config/phase/mechanical/eigen/thermalexpansion_Au.yaml +++ b/examples/config/phase/mechanical/eigen/thermalexpansion_Au.yaml @@ -1,5 +1,5 @@ type: thermalexpansion references: - en.wikipedia.org/wiki/Thermal_expansion -A_11: [14e-6] +A_11: 14e-6 T_ref: 293.15 diff --git a/examples/config/phase/mechanical/eigen/thermalexpansion_C35E.yaml b/examples/config/phase/mechanical/eigen/thermalexpansion_C35E.yaml index dea09aa43..64d772512 100644 --- a/examples/config/phase/mechanical/eigen/thermalexpansion_C35E.yaml +++ b/examples/config/phase/mechanical/eigen/thermalexpansion_C35E.yaml @@ -1,5 +1,7 @@ type: thermalexpansion references: - en.wikipedia.org/wiki/Thermal_expansion, fitted from image description -A_11: [12.70371e-6, 7.54e-9, -1.0e-11] +A_11: 12.70371e-6 +A_11,T: 7.54e-9 +A_11,T^2: -1.0e-11 T_ref: 273.0 diff --git a/examples/config/phase/mechanical/eigen/thermalexpansion_Cu.yaml b/examples/config/phase/mechanical/eigen/thermalexpansion_Cu.yaml index 3eb41aa90..ea09c7fb3 100644 --- a/examples/config/phase/mechanical/eigen/thermalexpansion_Cu.yaml +++ b/examples/config/phase/mechanical/eigen/thermalexpansion_Cu.yaml @@ -1,5 +1,5 @@ type: thermalexpansion references: - en.wikipedia.org/wiki/Thermal_expansion -A_11: [17e-6] +A_11: 17e-6 T_ref: 293.15 diff --git a/examples/config/phase/mechanical/eigen/thermalexpansion_Fe.yaml b/examples/config/phase/mechanical/eigen/thermalexpansion_Fe.yaml index f36250490..b104e36f5 100644 --- a/examples/config/phase/mechanical/eigen/thermalexpansion_Fe.yaml +++ b/examples/config/phase/mechanical/eigen/thermalexpansion_Fe.yaml @@ -1,5 +1,5 @@ type: thermalexpansion references: - en.wikipedia.org/wiki/Thermal_expansion -A_11: [11.8e-6] +A_11: 11.8e-6 T_ref: 293.15 diff --git a/examples/config/phase/mechanical/eigen/thermalexpansion_W.yaml b/examples/config/phase/mechanical/eigen/thermalexpansion_W.yaml index a6d069bd3..d223cdd7d 100644 --- a/examples/config/phase/mechanical/eigen/thermalexpansion_W.yaml +++ b/examples/config/phase/mechanical/eigen/thermalexpansion_W.yaml @@ -1,5 +1,5 @@ type: thermalexpansion references: - en.wikipedia.org/wiki/Thermal_expansion -A_11: [4.5e-6] +A_11: 4.5e-6 T_ref: 293.15 diff --git a/examples/config/phase/mechanical/eigen/thermalexpansion_X20Cr13.yaml b/examples/config/phase/mechanical/eigen/thermalexpansion_X20Cr13.yaml index 7842b9d6d..f7c55d485 100644 --- a/examples/config/phase/mechanical/eigen/thermalexpansion_X20Cr13.yaml +++ b/examples/config/phase/mechanical/eigen/thermalexpansion_X20Cr13.yaml @@ -1,5 +1,6 @@ type: thermalexpansion references: - en.wikipedia.org/wiki/Thermal_expansion, fitted from image description -A_11: [11.365e-6, 5.0e-9] +A_11: 11.365e-6 +A_11,T: 5.0e-9 T_ref: 273.0 diff --git a/src/phase_mechanical_eigen_thermalexpansion.f90 b/src/phase_mechanical_eigen_thermalexpansion.f90 index 3cfeb2f06..dba02d70e 100644 --- a/src/phase_mechanical_eigen_thermalexpansion.f90 +++ b/src/phase_mechanical_eigen_thermalexpansion.f90 @@ -29,7 +29,6 @@ module function thermalexpansion_init(kinematics_length) result(myKinematics) logical, dimension(:,:), allocatable :: myKinematics integer :: Ninstances,p,i,k - real(pReal), dimension(:), allocatable :: temp class(tNode), pointer :: & phases, & phase, & @@ -57,25 +56,26 @@ module function thermalexpansion_init(kinematics_length) result(myKinematics) do k = 1, kinematics%length if(myKinematics(k,p)) then associate(prm => param(kinematics_thermal_expansion_instance(p))) - kinematic_type => kinematics%get(k) + 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=0.0_pReal) - ! read up to three parameters (constant, linear, quadratic with T) - temp = kinematic_type%get_as1dFloat('A_11') - prm%A(1,1,1:size(temp)) = temp - temp = kinematic_type%get_as1dFloat('A_33',defaultVal=[(0.0_pReal, i=1,size(temp))],requiredSize=size(temp)) - prm%A(3,3,1:size(temp)) = temp - do i=1, size(prm%A,3) - prm%A(1:3,1:3,i) = lattice_applyLatticeSymmetry33(prm%A(1:3,1:3,i),& - phase%get_asString('lattice')) - enddo + 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 end associate endif enddo enddo - end function thermalexpansion_init