cleaning
trying to find logic with less dependencies on the various mappings
This commit is contained in:
parent
69d53ed869
commit
c9fc7ea982
|
@ -649,6 +649,9 @@ pure function constitutive_initialFi(ipc, ip, el)
|
||||||
math_inv33, &
|
math_inv33, &
|
||||||
math_mul33x33
|
math_mul33x33
|
||||||
use material, only: &
|
use material, only: &
|
||||||
|
material_phase, &
|
||||||
|
material_homog, &
|
||||||
|
thermalMapping, &
|
||||||
phase_kinematics, &
|
phase_kinematics, &
|
||||||
phase_Nkinematics, &
|
phase_Nkinematics, &
|
||||||
material_phase, &
|
material_phase, &
|
||||||
|
@ -665,14 +668,20 @@ pure function constitutive_initialFi(ipc, ip, el)
|
||||||
constitutive_initialFi !< composite initial intermediate deformation gradient
|
constitutive_initialFi !< composite initial intermediate deformation gradient
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
k !< counter in kinematics loop
|
k !< counter in kinematics loop
|
||||||
|
integer(pInt) :: &
|
||||||
|
phase, &
|
||||||
|
homog, offset
|
||||||
|
|
||||||
constitutive_initialFi = math_I3
|
constitutive_initialFi = math_I3
|
||||||
|
phase = material_phase(ipc,ip,el)
|
||||||
|
|
||||||
KinematicsLoop: do k = 1_pInt, phase_Nkinematics(material_phase(ipc,ip,el)) !< Warning: small initial strain assumption
|
KinematicsLoop: do k = 1_pInt, phase_Nkinematics(phase) !< Warning: small initial strain assumption
|
||||||
kinematicsType: select case (phase_kinematics(k,material_phase(ipc,ip,el)))
|
kinematicsType: select case (phase_kinematics(k,phase))
|
||||||
case (KINEMATICS_thermal_expansion_ID) kinematicsType
|
case (KINEMATICS_thermal_expansion_ID) kinematicsType
|
||||||
|
homog = material_homog(ip,el)
|
||||||
|
offset = thermalMapping(homog)%p(ip,el)
|
||||||
constitutive_initialFi = &
|
constitutive_initialFi = &
|
||||||
constitutive_initialFi + kinematics_thermal_expansion_initialStrain(ipc, ip, el)
|
constitutive_initialFi + kinematics_thermal_expansion_initialStrain(homog,phase,offset)
|
||||||
end select kinematicsType
|
end select kinematicsType
|
||||||
enddo KinematicsLoop
|
enddo KinematicsLoop
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@ module kinematics_thermal_expansion
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
|
!type, private :: tParameters
|
||||||
|
! real(pReal), allocatable, dimension(:) :: &
|
||||||
|
!end type tParameters
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
kinematics_thermal_expansion_init, &
|
kinematics_thermal_expansion_init, &
|
||||||
kinematics_thermal_expansion_initialStrain, &
|
kinematics_thermal_expansion_initialStrain, &
|
||||||
|
@ -43,49 +47,43 @@ subroutine kinematics_thermal_expansion_init()
|
||||||
config_phase
|
config_phase
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt) maxNinstance
|
integer(pInt) :: &
|
||||||
|
Ninstance, &
|
||||||
|
p
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_thermal_expansion_LABEL//' init -+>>>'
|
write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_thermal_expansion_LABEL//' init -+>>>'
|
||||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
|
|
||||||
maxNinstance = int(count(phase_kinematics == KINEMATICS_thermal_expansion_ID),pInt)
|
Ninstance = int(count(phase_kinematics == KINEMATICS_thermal_expansion_ID),pInt)
|
||||||
if (maxNinstance == 0_pInt) return
|
if (Ninstance == 0_pInt) return
|
||||||
|
|
||||||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
||||||
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
||||||
|
|
||||||
! ToDo: this subroutine should read in lattice_thermal_expansion. No need to make it a global array
|
do p = 1_pInt, size(phase_kinematics)
|
||||||
|
if (all(phase_kinematics(:,p) /= KINEMATICS_thermal_expansion_ID)) cycle
|
||||||
|
enddo
|
||||||
|
|
||||||
end subroutine kinematics_thermal_expansion_init
|
end subroutine kinematics_thermal_expansion_init
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief report initial thermal strain based on current temperature deviation from reference
|
!> @brief report initial thermal strain based on current temperature deviation from reference
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure function kinematics_thermal_expansion_initialStrain(ipc, ip, el)
|
pure function kinematics_thermal_expansion_initialStrain(homog,phase,offset)
|
||||||
use material, only: &
|
use material, only: &
|
||||||
material_phase, &
|
temperature
|
||||||
material_homog, &
|
|
||||||
temperature, &
|
|
||||||
thermalMapping
|
|
||||||
use lattice, only: &
|
use lattice, only: &
|
||||||
lattice_thermalExpansion33, &
|
lattice_thermalExpansion33, &
|
||||||
lattice_referenceTemperature
|
lattice_referenceTemperature
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: &
|
integer(pInt), intent(in) :: &
|
||||||
ipc, & !< grain number
|
|
||||||
ip, & !< integration point number
|
|
||||||
el !< element number
|
|
||||||
real(pReal), dimension(3,3) :: &
|
|
||||||
kinematics_thermal_expansion_initialStrain !< initial thermal strain (should be small strain, though)
|
|
||||||
integer(pInt) :: &
|
|
||||||
phase, &
|
phase, &
|
||||||
homog, offset
|
homog, offset
|
||||||
|
real(pReal), dimension(3,3) :: &
|
||||||
|
kinematics_thermal_expansion_initialStrain !< initial thermal strain (should be small strain, though)
|
||||||
|
|
||||||
phase = material_phase(ipc,ip,el)
|
|
||||||
homog = material_homog(ip,el)
|
|
||||||
offset = thermalMapping(homog)%p(ip,el)
|
|
||||||
|
|
||||||
kinematics_thermal_expansion_initialStrain = &
|
kinematics_thermal_expansion_initialStrain = &
|
||||||
(temperature(homog)%p(offset) - lattice_referenceTemperature(phase))**1 / 1. * &
|
(temperature(homog)%p(offset) - lattice_referenceTemperature(phase))**1 / 1. * &
|
||||||
|
|
Loading…
Reference in New Issue