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_mul33x33
|
||||
use material, only: &
|
||||
material_phase, &
|
||||
material_homog, &
|
||||
thermalMapping, &
|
||||
phase_kinematics, &
|
||||
phase_Nkinematics, &
|
||||
material_phase, &
|
||||
|
@ -665,14 +668,20 @@ pure function constitutive_initialFi(ipc, ip, el)
|
|||
constitutive_initialFi !< composite initial intermediate deformation gradient
|
||||
integer(pInt) :: &
|
||||
k !< counter in kinematics loop
|
||||
integer(pInt) :: &
|
||||
phase, &
|
||||
homog, offset
|
||||
|
||||
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
|
||||
kinematicsType: select case (phase_kinematics(k,material_phase(ipc,ip,el)))
|
||||
KinematicsLoop: do k = 1_pInt, phase_Nkinematics(phase) !< Warning: small initial strain assumption
|
||||
kinematicsType: select case (phase_kinematics(k,phase))
|
||||
case (KINEMATICS_thermal_expansion_ID) kinematicsType
|
||||
homog = material_homog(ip,el)
|
||||
offset = thermalMapping(homog)%p(ip,el)
|
||||
constitutive_initialFi = &
|
||||
constitutive_initialFi + kinematics_thermal_expansion_initialStrain(ipc, ip, el)
|
||||
constitutive_initialFi + kinematics_thermal_expansion_initialStrain(homog,phase,offset)
|
||||
end select kinematicsType
|
||||
enddo KinematicsLoop
|
||||
|
||||
|
|
|
@ -10,7 +10,11 @@ module kinematics_thermal_expansion
|
|||
|
||||
implicit none
|
||||
private
|
||||
|
||||
|
||||
!type, private :: tParameters
|
||||
! real(pReal), allocatable, dimension(:) :: &
|
||||
!end type tParameters
|
||||
|
||||
public :: &
|
||||
kinematics_thermal_expansion_init, &
|
||||
kinematics_thermal_expansion_initialStrain, &
|
||||
|
@ -43,49 +47,43 @@ subroutine kinematics_thermal_expansion_init()
|
|||
config_phase
|
||||
|
||||
implicit none
|
||||
integer(pInt) maxNinstance
|
||||
integer(pInt) :: &
|
||||
Ninstance, &
|
||||
p
|
||||
|
||||
write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_thermal_expansion_LABEL//' init -+>>>'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
|
||||
maxNinstance = int(count(phase_kinematics == KINEMATICS_thermal_expansion_ID),pInt)
|
||||
if (maxNinstance == 0_pInt) return
|
||||
Ninstance = int(count(phase_kinematics == KINEMATICS_thermal_expansion_ID),pInt)
|
||||
if (Ninstance == 0_pInt) return
|
||||
|
||||
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
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @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: &
|
||||
material_phase, &
|
||||
material_homog, &
|
||||
temperature, &
|
||||
thermalMapping
|
||||
temperature
|
||||
use lattice, only: &
|
||||
lattice_thermalExpansion33, &
|
||||
lattice_referenceTemperature
|
||||
|
||||
implicit none
|
||||
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, &
|
||||
homog, offset
|
||||
|
||||
phase = material_phase(ipc,ip,el)
|
||||
homog = material_homog(ip,el)
|
||||
offset = thermalMapping(homog)%p(ip,el)
|
||||
real(pReal), dimension(3,3) :: &
|
||||
kinematics_thermal_expansion_initialStrain !< initial thermal strain (should be small strain, though)
|
||||
|
||||
|
||||
kinematics_thermal_expansion_initialStrain = &
|
||||
(temperature(homog)%p(offset) - lattice_referenceTemperature(phase))**1 / 1. * &
|
||||
|
|
Loading…
Reference in New Issue