removed redundant crystallite_temperature/heat and materialpoint_heat and using temperature from the thermal module

This commit is contained in:
Pratheek Shanthraj 2014-10-10 12:28:57 +00:00
parent 3aebd66efb
commit ba65d04bb3
5 changed files with 46 additions and 131 deletions

View File

@ -99,7 +99,7 @@ subroutine CPFEM_initAll(temperature,el,ip)
call lattice_init
call material_init
call constitutive_init
call crystallite_init(temperature) ! (have to) use temperature of first ip for whole model
call crystallite_init
call homogenization_init
call CPFEM_init
#if defined(Marc4DAMASK) || defined(Abaqus)
@ -324,8 +324,7 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature, dt, elFE, ip)
crystallite_dPdF0, &
crystallite_dPdF, &
crystallite_Tstar0_v, &
crystallite_Tstar_v, &
crystallite_temperature
crystallite_Tstar_v
use homogenization, only: &
materialpoint_F, &
materialpoint_F0, &
@ -492,7 +491,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature, dt, elFE, ip)
!* If no parallel execution is required, there is no need to collect FEM input
if (.not. parallelExecution) then
crystallite_temperature(ip,elCP) = temperature
materialpoint_F0(1:3,1:3,ip,elCP) = ffn
materialpoint_F(1:3,1:3,ip,elCP) = ffn1
@ -503,7 +501,6 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature, dt, elFE, ip)
CPFEM_cs(1:6,ip,elCP) = rnd * CPFEM_odd_stress
CPFEM_dcsde(1:6,1:6,ip,elCP) = CPFEM_odd_jacobian * math_identity2nd(6)
#endif
crystallite_temperature(ip,elCP) = temperature
materialpoint_F0(1:3,1:3,ip,elCP) = ffn
materialpoint_F(1:3,1:3,ip,elCP) = ffn1
CPFEM_calc_done = .false.

View File

@ -799,8 +799,6 @@ subroutine utilities_constitutiveResponse(F_lastInc,F,temperature,timeinc,&
CPFEM_COLLECT, &
CPFEM_CALCRESULTS, &
CPFEM_AGERESULTS
use crystallite, only: &
crystallite_temperature
use homogenization, only: &
materialpoint_F0, &
materialpoint_F, &
@ -840,7 +838,6 @@ subroutine utilities_constitutiveResponse(F_lastInc,F,temperature,timeinc,&
call CPFEM_general(CPFEM_COLLECT,F_lastInc(1:3,1:3,1,1,1),F(1:3,1:3,1,1,1), &
temperature,timeinc,1_pInt,1_pInt)
crystallite_temperature = temperature
materialpoint_F = reshape(F,[3,3,1,product(grid)])
call debug_reset()

View File

@ -418,7 +418,7 @@ end function constitutive_homogenizedC
!--------------------------------------------------------------------------------------------------
!> @brief calls microstructure function of the different constitutive models
!--------------------------------------------------------------------------------------------------
subroutine constitutive_microstructure(temperature, Tstar_v, Fe, Fp, ipc, ip, el)
subroutine constitutive_microstructure(Tstar_v, Fe, Fp, ipc, ip, el)
use prec, only: &
pReal
use material, only: &
@ -450,26 +450,23 @@ subroutine constitutive_microstructure(temperature, Tstar_v, Fe, Fp, ipc, ip, el
ipc, & !< grain number
ip, & !< integration point number
el !< element number
real(pReal), intent(in) :: &
temperature
real(pReal), intent(in), dimension(6) :: &
Tstar_v !< 2nd Piola Kirchhoff stress tensor (Mandel)
real(pReal), intent(in), dimension(3,3) :: &
Fe, & !< elastic deformation gradient
Fp !< plastic deformation gradient
real(pReal) :: damage, Tstar_v_effective(6)
real(pReal) :: &
damage, &
Tstar_v_effective(6)
damage = constitutive_getDamage(ipc,ip,el)
Tstar_v_effective = Tstar_v/(damage*damage)
select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_DISLOTWIN_ID)
call constitutive_dislotwin_microstructure(temperature,ipc,ip,el)
call constitutive_dislotwin_microstructure(constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_DISLOKMC_ID)
call constitutive_dislokmc_microstructure(temperature,ipc,ip,el)
call constitutive_dislokmc_microstructure(constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_TITANMOD_ID)
call constitutive_titanmod_microstructure (temperature,ipc,ip,el)
call constitutive_titanmod_microstructure (constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_NONLOCAL_ID)
call constitutive_nonlocal_microstructure (Fe,Fp, ip,el)
@ -477,6 +474,8 @@ subroutine constitutive_microstructure(temperature, Tstar_v, Fe, Fp, ipc, ip, el
select case (phase_damage(material_phase(ipc,ip,el)))
case (LOCAL_DAMAGE_BRITTLE_ID)
damage = constitutive_getDamage(ipc,ip,el)
Tstar_v_effective = Tstar_v/(damage*damage)
call damage_brittle_microstructure(Tstar_v_effective, Fe, ipc, ip, el)
case (LOCAL_DAMAGE_DUCTILE_ID)
call damage_ductile_microstructure(ipc, ip, el)
@ -489,7 +488,7 @@ end subroutine constitutive_microstructure
!--------------------------------------------------------------------------------------------------
!> @brief contains the constitutive equation for calculating the velocity gradient
!--------------------------------------------------------------------------------------------------
subroutine constitutive_LpAndItsTangent(Lp, dLp_dTstar, Tstar_v, temperature, ipc, ip, el)
subroutine constitutive_LpAndItsTangent(Lp, dLp_dTstar, Tstar_v, ipc, ip, el)
use prec, only: &
pReal
use math, only: &
@ -524,8 +523,6 @@ subroutine constitutive_LpAndItsTangent(Lp, dLp_dTstar, Tstar_v, temperature, ip
ipc, & !< grain number
ip, & !< integration point number
el !< element number
real(pReal), intent(in) :: &
Temperature
real(pReal), intent(in), dimension(6) :: &
Tstar_v !< 2nd Piola-Kirchhoff stress
real(pReal), intent(out), dimension(3,3) :: &
@ -546,13 +543,13 @@ subroutine constitutive_LpAndItsTangent(Lp, dLp_dTstar, Tstar_v, temperature, ip
case (PLASTICITY_PHENOPOWERLAW_ID)
call constitutive_phenopowerlaw_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,ipc,ip,el)
case (PLASTICITY_NONLOCAL_ID)
call constitutive_nonlocal_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,temperature,ip,el)
call constitutive_nonlocal_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,constitutive_getTemperature(ipc,ip,el),ip,el)
case (PLASTICITY_DISLOTWIN_ID)
call constitutive_dislotwin_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,temperature,ipc,ip,el)
call constitutive_dislotwin_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_DISLOKMC_ID)
call constitutive_dislokmc_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,temperature,ipc,ip,el)
call constitutive_dislokmc_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_TITANMOD_ID)
call constitutive_titanmod_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,temperature,ipc,ip,el)
call constitutive_titanmod_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v_effective,constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
end select
@ -641,7 +638,7 @@ end subroutine constitutive_hooke_TandItsTangent
!--------------------------------------------------------------------------------------------------
!> @brief contains the constitutive equation for calculating the rate of change of microstructure
!--------------------------------------------------------------------------------------------------
subroutine constitutive_collectDotState(Tstar_v, Lp, FeArray, FpArray, Temperature, subdt, subfracArray,&
subroutine constitutive_collectDotState(Tstar_v, Lp, FeArray, FpArray, subdt, subfracArray,&
ipc, ip, el)
use prec, only: &
pReal, &
@ -696,7 +693,6 @@ subroutine constitutive_collectDotState(Tstar_v, Lp, FeArray, FpArray, Temperatu
ip, & !< integration point number
el !< element number
real(pReal), intent(in) :: &
Temperature, &
subdt !< timestep
real(pReal), intent(in), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
subfracArray !< subfraction of timestep
@ -721,14 +717,14 @@ subroutine constitutive_collectDotState(Tstar_v, Lp, FeArray, FpArray, Temperatu
case (PLASTICITY_PHENOPOWERLAW_ID)
call constitutive_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
case (PLASTICITY_DISLOTWIN_ID)
call constitutive_dislotwin_dotState (Tstar_v,Temperature,ipc,ip,el)
call constitutive_dislotwin_dotState (Tstar_v,constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_DISLOKMC_ID)
call constitutive_dislokmc_dotState (Tstar_v,Temperature,ipc,ip,el)
call constitutive_dislokmc_dotState (Tstar_v,constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_TITANMOD_ID)
call constitutive_titanmod_dotState (Tstar_v,Temperature,ipc,ip,el)
call constitutive_titanmod_dotState (Tstar_v,constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_NONLOCAL_ID)
call constitutive_nonlocal_dotState (Tstar_v,FeArray,FpArray,Temperature, subdt, &
subfracArray,ip,el)
call constitutive_nonlocal_dotState (Tstar_v,FeArray,FpArray,constitutive_getTemperature(ipc,ip,el), &
subdt,subfracArray,ip,el)
end select
select case (phase_damage(material_phase(ipc,ip,el)))
@ -1021,7 +1017,7 @@ end function constitutive_getTemperature
!--------------------------------------------------------------------------------------------------
!> @brief returns array of constitutive results
!--------------------------------------------------------------------------------------------------
function constitutive_postResults(Tstar_v, FeArray, temperature, ipc, ip, el)
function constitutive_postResults(Tstar_v, FeArray, ipc, ip, el)
use prec, only: &
pReal
use mesh, only: &
@ -1084,8 +1080,6 @@ function constitutive_postResults(Tstar_v, FeArray, temperature, ipc, ip, el)
real(pReal), dimension(plasticState(material_phase(ipc,ip,el))%sizePostResults) :: &
constitutive_postResults
#endif
real(pReal), intent(in) :: &
temperature
real(pReal), intent(in), dimension(3,3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
FeArray !< elastic deformation gradient
real(pReal), intent(in), dimension(6) :: &
@ -1110,10 +1104,10 @@ function constitutive_postResults(Tstar_v, FeArray, temperature, ipc, ip, el)
constitutive_phenopowerlaw_postResults(Tstar_v_effective,ipc,ip,el)
case (PLASTICITY_DISLOTWIN_ID)
constitutive_postResults(startPos:endPos) = &
constitutive_dislotwin_postResults(Tstar_v_effective,Temperature,ipc,ip,el)
constitutive_dislotwin_postResults(Tstar_v_effective,constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_DISLOKMC_ID)
constitutive_postResults(startPos:endPos) = &
constitutive_dislokmc_postResults(Tstar_v_effective,Temperature,ipc,ip,el)
constitutive_dislokmc_postResults(Tstar_v_effective,constitutive_getTemperature(ipc,ip,el),ipc,ip,el)
case (PLASTICITY_NONLOCAL_ID)
constitutive_postResults(startPos:endPos) = &
constitutive_nonlocal_postResults (Tstar_v_effective,FeArray,ip,el)

View File

@ -24,10 +24,6 @@ module crystallite
integer(pInt), dimension(:,:), allocatable, private :: &
crystallite_sizePostResult !< description not available
real(pReal), dimension(:,:), allocatable, public :: &
crystallite_temperature !< temperature (same on all components on one IP)
real(pReal), dimension(:,:,:), allocatable, public, protected :: &
crystallite_heat !< heat source
real(pReal), dimension(:,:,:), allocatable, public :: &
crystallite_dt !< requested time increment of each grain
real(pReal), dimension(:,:,:), allocatable, private :: &
@ -91,7 +87,6 @@ module crystallite
grainrotationx_ID, &
grainrotationy_ID, &
grainrotationz_ID, &
heat_ID, &
orientation_ID, &
grainrotation_ID, &
eulerangles_ID, &
@ -132,7 +127,7 @@ contains
!--------------------------------------------------------------------------------------------------
!> @brief allocates and initialize per grain variables
!--------------------------------------------------------------------------------------------------
subroutine crystallite_init(temperature)
subroutine crystallite_init
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
use debug, only: &
debug_info, &
@ -180,7 +175,6 @@ subroutine crystallite_init(temperature)
constitutive_microstructure ! derived (shortcut) quantities of given state
implicit none
real(pReal), intent(in) :: temperature
integer(pInt), parameter :: &
FILEUNIT = 200_pInt, &
MAXNCHUNKS = 2_pInt
@ -222,8 +216,6 @@ subroutine crystallite_init(temperature)
nMax = mesh_maxNipNeighbors
allocate(crystallite_temperature(iMax,eMax), source=temperature)
allocate(crystallite_heat(gMax,iMax,eMax), source=0.0_pReal)
allocate(crystallite_Tstar0_v(6,gMax,iMax,eMax), source=0.0_pReal)
allocate(crystallite_partionedTstar0_v(6,gMax,iMax,eMax), source=0.0_pReal)
allocate(crystallite_subTstar0_v(6,gMax,iMax,eMax), source=0.0_pReal)
@ -313,8 +305,6 @@ subroutine crystallite_init(temperature)
crystallite_outputID(output,section) = grainrotationy_ID
case ('grainrotationz')
crystallite_outputID(output,section) = grainrotationx_ID
case ('heat')
crystallite_outputID(output,section) = heat_ID
case ('orientation')
crystallite_outputID(output,section) = orientation_ID
case ('grainrotation')
@ -355,7 +345,7 @@ subroutine crystallite_init(temperature)
do i = 1_pInt,material_Ncrystallite
do j = 1_pInt,crystallite_Noutput(i)
select case(crystallite_outputID(j,i))
case(phase_ID,texture_ID,volume_ID,grainrotationx_ID,grainrotationy_ID,grainrotationz_ID,heat_ID)
case(phase_ID,texture_ID,volume_ID,grainrotationx_ID,grainrotationy_ID,grainrotationz_ID)
mySize = 1_pInt
case(orientation_ID,grainrotation_ID) ! orientation as quaternion, or deviation from initial grain orientation in axis-angle form (angle in degrees)
mySize = 4_pInt
@ -429,7 +419,7 @@ subroutine crystallite_init(temperature)
myNgrains = homogenization_Ngrains(mesh_element(3,e))
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
do g = 1_pInt,myNgrains
call constitutive_microstructure(temperature, &
call constitutive_microstructure( &
crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e),g,i,e) ! update dependent state variables to be consistent with basic states
@ -444,8 +434,6 @@ subroutine crystallite_init(temperature)
!--------------------------------------------------------------------------------------------------
! debug output
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
write(6,'(a35,1x,7(i8,1x))') 'crystallite_temperature: ', shape(crystallite_temperature)
write(6,'(a35,1x,7(i8,1x))') 'crystallite_heat: ', shape(crystallite_heat)
write(6,'(a35,1x,7(i8,1x))') 'crystallite_Fe: ', shape(crystallite_Fe)
write(6,'(a35,1x,7(i8,1x))') 'crystallite_Fp: ', shape(crystallite_Fp)
write(6,'(a35,1x,7(i8,1x))') 'crystallite_Lp: ', shape(crystallite_Lp)
@ -1107,7 +1095,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
do g = 1_pInt,myNgrains
call constitutive_TandItsTangent(junk,dSdFe,crystallite_Fe(1:3,1:3,g,i,e),g,i,e) ! call constitutive law to calculate 2nd Piola-Kirchhoff stress and its derivative
call constitutive_LpAndItsTangent(junk,temp_99,crystallite_Tstar_v(1:6,g,i,e), &
crystallite_temperature(i,e),g,i,e)
g,i,e)
dLpdS = reshape(temp_99,shape=[3,3,3,3])
rhs_3333 = 0.0_pReal
forall(p=1_pInt:3_pInt, o=1_pInt:3_pInt) &
@ -1367,24 +1355,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco)
endif jacobianMethod
endif computeJacobian
!why not OMP?
elementLooping12: do e = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Ngrains(mesh_element(3,e))
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) ! iterate over IPs of this element to be processed
do g = 1,myNgrains
crystallite_heat(g,i,e) = 0.98_pReal* &
abs(math_mul33xx33(math_Mandel6to33(crystallite_Tstar_v(1:6,g,i,e)), &
crystallite_Lp(1:3,1:3,g,i,e)))
! constitutive_localDamage(g,i,e) = &
! 1.0_pReal* &
! sum(math_Mandel6to33(crystallite_Tstar_v(1:6,g,i,e)/constitutive_gradientDamage(g,i,e))* &
! (math_mul33x33(math_transpose33(crystallite_Fe(1:3,1:3,g,i,e)), &
! crystallite_Fe(1:3,1:3,g,i,e))-math_I3))/4.0_pReal + &
! 0.0_pReal* &
! sum(abs(math_mul33x33(math_transpose33(crystallite_Fp(1:3,1:3,g,i,e)), &
! crystallite_Fp(1:3,1:3,g,i,e))-math_I3)/2.0_pReal)
enddo
enddo
enddo elementLooping12
end subroutine crystallite_stressAndItsTangent
@ -1475,7 +1445,7 @@ subroutine crystallite_integrateStateRK4()
if (crystallite_todo(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
!$OMP ENDDO
@ -1582,8 +1552,7 @@ subroutine crystallite_integrateStateRK4()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
call constitutive_microstructure(crystallite_temperature(i,e), &
crystallite_Tstar_v(1:6,g,i,e), &
call constitutive_microstructure(crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
@ -1616,7 +1585,7 @@ subroutine crystallite_integrateStateRK4()
if (crystallite_todo(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
timeStepFraction(n)*crystallite_subdt(g,i,e), & ! fraction of original timestep
crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@ -1788,7 +1757,7 @@ subroutine crystallite_integrateStateRKCK45()
if (crystallite_todo(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
!$OMP ENDDO
@ -1900,8 +1869,7 @@ subroutine crystallite_integrateStateRKCK45()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
call constitutive_microstructure(crystallite_temperature(i,e), &
crystallite_Tstar_v(1:6,g,i,e), &
call constitutive_microstructure(crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
@ -1936,7 +1904,7 @@ subroutine crystallite_integrateStateRKCK45()
if (crystallite_todo(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
C(stage)*crystallite_subdt(g,i,e), & ! fraction of original timestep
crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@ -2149,8 +2117,7 @@ subroutine crystallite_integrateStateRKCK45()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
call constitutive_microstructure(crystallite_temperature(i,e), &
crystallite_Tstar_v(1:6,g,i,e), &
call constitutive_microstructure(crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
@ -2301,7 +2268,7 @@ subroutine crystallite_integrateStateAdaptiveEuler()
if (crystallite_todo(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
!$OMP ENDDO
@ -2383,8 +2350,7 @@ subroutine crystallite_integrateStateAdaptiveEuler()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
call constitutive_microstructure(crystallite_temperature(i,e), &
crystallite_Tstar_v(1:6,g,i,e), &
call constitutive_microstructure(crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
@ -2421,7 +2387,7 @@ subroutine crystallite_integrateStateAdaptiveEuler()
if (crystallite_todo(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
!$OMP ENDDO
@ -2634,7 +2600,7 @@ eIter = FEsolving_execElem(1:2)
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
!$OMP ENDDO
@ -2720,8 +2686,7 @@ eIter = FEsolving_execElem(1:2)
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
call constitutive_microstructure(crystallite_temperature(i,e), &
crystallite_Tstar_v(1:6,g,i,e), &
call constitutive_microstructure(crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
@ -2902,7 +2867,7 @@ subroutine crystallite_integrateStateFPI()
if (crystallite_todo(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@ -2968,8 +2933,7 @@ subroutine crystallite_integrateStateFPI()
!$OMP DO PRIVATE(p,c)
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
call constitutive_microstructure(crystallite_temperature(i,e), &
crystallite_Tstar_v(1:6,g,i,e), &
call constitutive_microstructure(crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), g, i, e) ! update dependent state variables to be consistent with basic states
p = mappingConstitutive(2,g,i,e)
@ -3015,7 +2979,7 @@ subroutine crystallite_integrateStateFPI()
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_Fp, &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
!$OMP ENDDO
@ -3497,7 +3461,7 @@ logical function crystallite_integrateStress(&
endif
call constitutive_LpAndItsTangent(Lp_constitutive, dLp_dT_constitutive, Tstar_v, &
crystallite_temperature(i,e), g, i, e)
g, i, e)
if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then
call system_clock(count=tock,count_rate=tickrate,count_max=maxticks)
@ -3866,9 +3830,6 @@ function crystallite_postResults(ipc, ip, el)
detF = math_det33(crystallite_partionedF(1:3,1:3,ipc,ip,el)) ! V_current = det(F) * V_reference
crystallite_postResults(c+1) = detF * mesh_ipVolume(ip,el) &
/ homogenization_Ngrains(mesh_element(3,el)) ! grain volume (not fraction but absolute)
case (heat_ID)
mySize = 1_pInt
crystallite_postResults(c+1) = crystallite_heat(ipc,ip,el) ! heat production
case (orientation_ID)
mySize = 4_pInt
crystallite_postResults(c+1:c+mySize) = crystallite_orientation(1:4,ipc,ip,el) ! grain orientation as quaternion
@ -3953,7 +3914,7 @@ function crystallite_postResults(ipc, ip, el)
if (size(crystallite_postResults)-c > 0_pInt) &
crystallite_postResults(c+1:size(crystallite_postResults)) = &
constitutive_postResults(crystallite_Tstar_v(1:6,ipc,ip,el), crystallite_Fe, &
crystallite_temperature(ip,el), ipc, ip, el)
ipc, ip, el)
end function crystallite_postResults

View File

@ -27,8 +27,6 @@ module homogenization
materialpoint_sizeResults, &
homogenization_maxSizePostResults, &
field_maxSizePostResults
real(pReal), dimension(:,:), allocatable, public, protected :: &
materialpoint_heat
real(pReal), dimension(:,:,:,:), allocatable, private :: &
materialpoint_subF0, & !< def grad of IP at beginning of homogenization increment
@ -79,7 +77,6 @@ module homogenization
homogenization_partitionDeformation, &
homogenization_updateState, &
homogenization_averageStressAndItsTangent, &
homogenization_averageHeat, &
homogenization_postResults
contains
@ -262,7 +259,6 @@ subroutine homogenization_init()
!--------------------------------------------------------------------------------------------------
! allocate and initialize global variables
allocate(materialpoint_heat(mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_dPdF(3,3,3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
allocate(materialpoint_F0(3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
materialpoint_F0 = spread(spread(math_I3,3,mesh_maxNips),4,mesh_NcpElems) ! initialize to identity
@ -335,7 +331,6 @@ subroutine homogenization_init()
write(6,'(a32,1x,7(i8,1x))') 'materialpoint_subF0: ', shape(materialpoint_subF0)
write(6,'(a32,1x,7(i8,1x))') 'materialpoint_subF: ', shape(materialpoint_subF)
write(6,'(a32,1x,7(i8,1x))') 'materialpoint_P: ', shape(materialpoint_P)
write(6,'(a32,1x,7(i8,1x))') 'materialpoint_heat: ', shape(materialpoint_heat)
write(6,'(a32,1x,7(i8,1x))') 'materialpoint_subFrac: ', shape(materialpoint_subFrac)
write(6,'(a32,1x,7(i8,1x))') 'materialpoint_subStep: ', shape(materialpoint_subStep)
write(6,'(a32,1x,7(i8,1x))') 'materialpoint_subdt: ', shape(materialpoint_subdt)
@ -384,7 +379,6 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
use crystallite, only: &
crystallite_heat, &
crystallite_F0, &
crystallite_Fp0, &
crystallite_Fp, &
@ -665,7 +659,6 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
elementLooping4: do e = FEsolving_execElem(1),FEsolving_execElem(2)
IpLooping4: do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
call homogenization_averageStressAndItsTangent(i,e)
materialpoint_heat(i,e) = homogenization_averageHeat(i,e)
enddo IpLooping4
enddo elementLooping4
!$OMP END PARALLEL DO
@ -899,33 +892,6 @@ subroutine homogenization_averageStressAndItsTangent(ip,el)
end subroutine homogenization_averageStressAndItsTangent
!--------------------------------------------------------------------------------------------------
!> @brief derive average heat from constituent quantities (does not depend on choosen
!! homogenization scheme)
!--------------------------------------------------------------------------------------------------
real(pReal) function homogenization_averageHeat(ip,el)
use mesh, only: &
mesh_element
use material, only: &
homogenization_Ngrains
use crystallite, only: &
crystallite_heat
implicit none
integer(pInt), intent(in) :: &
ip, & !< integration point number
el !< element number
integer(pInt) :: &
Ngrains
!--------------------------------------------------------------------------------------------------
! computing the average heat
Ngrains = homogenization_Ngrains(mesh_element(3,el))
homogenization_averageHeat= sum(crystallite_heat(1:Ngrains,ip,el))/real(Ngrains,pReal)
end function homogenization_averageHeat
!--------------------------------------------------------------------------------------------------
!> @brief Returns average specific heat at each integration point
!--------------------------------------------------------------------------------------------------