remove dotTemperature (returned always 0 anyway) to make it easier to replace it with a heating rate funtction

remove potentially dangerous short circuiting in homogenization files
added doxygen comment for nonlocal (giving the functions a name)
fixed wrong definition of maxnchungs introcuded into dislotwin with last commit, causes trouble with hex
This commit is contained in:
Martin Diehl 2013-10-09 06:12:16 +00:00
parent 82faf74363
commit ed47d25adc
10 changed files with 148 additions and 404 deletions

View File

@ -919,34 +919,6 @@ end subroutine constitutive_collectDeltaState
!> @brief contains the constitutive equation for calculating the rate of change of microstructure !> @brief contains the constitutive equation for calculating the rate of change of microstructure
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
real(pReal) function constitutive_dotTemperature(Tstar_v,Temperature,ipc,ip,el) real(pReal) function constitutive_dotTemperature(Tstar_v,Temperature,ipc,ip,el)
use prec, only: &
pLongInt
use debug, only: &
debug_cumDotTemperatureCalls, &
debug_cumDotTemperatureTicks, &
debug_level, &
debug_constitutive, &
debug_levelBasic
use material, only: &
phase_plasticity, &
material_phase
use constitutive_none, only: &
constitutive_none_dotTemperature, &
constitutive_none_label
use constitutive_j2, only: &
constitutive_j2_dotTemperature, &
constitutive_j2_label
use constitutive_phenopowerlaw, only: &
constitutive_phenopowerlaw_dotTemperature, &
constitutive_phenopowerlaw_label
use constitutive_titanmod, only: &
constitutive_titanmod_dotTemperature, &
constitutive_titanmod_label
use constitutive_dislotwin, only: constitutive_dislotwin_dotTemperature, &
constitutive_dislotwin_label
use constitutive_nonlocal, only: constitutive_nonlocal_dotTemperature, &
constitutive_nonlocal_label
implicit none implicit none
integer(pInt), intent(in) :: & integer(pInt), intent(in) :: &
ipc, & !< grain number ipc, & !< grain number
@ -956,46 +928,7 @@ real(pReal) function constitutive_dotTemperature(Tstar_v,Temperature,ipc,ip,el)
Temperature Temperature
real(pReal), intent(in), dimension(6) :: & real(pReal), intent(in), dimension(6) :: &
Tstar_v !< 2nd Piola-Kirchhoff stress Tstar_v !< 2nd Piola-Kirchhoff stress
integer(pLongInt) :: & constitutive_dotTemperature = 0.0_pReal
tick, tock, &
tickrate, &
maxticks
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
call system_clock(count=tick,count_rate=tickrate,count_max=maxticks)
select case (phase_plasticity(material_phase(ipc,ip,el)))
case (constitutive_none_label)
constitutive_dotTemperature = constitutive_none_dotTemperature(Tstar_v,Temperature,constitutive_state,ipc,ip,el)
case (constitutive_j2_label)
constitutive_dotTemperature = constitutive_j2_dotTemperature(Tstar_v,Temperature,constitutive_state,ipc,ip,el)
case (constitutive_phenopowerlaw_label)
constitutive_dotTemperature = constitutive_phenopowerlaw_dotTemperature(Tstar_v,Temperature,constitutive_state,ipc,ip,el)
case (constitutive_titanmod_label)
constitutive_dotTemperature = constitutive_titanmod_dotTemperature(Tstar_v,Temperature,constitutive_state,ipc,ip,el)
case (constitutive_dislotwin_label)
constitutive_dotTemperature = constitutive_dislotwin_dotTemperature(Tstar_v,Temperature,constitutive_state,ipc,ip,el)
case (constitutive_nonlocal_label)
constitutive_dotTemperature = constitutive_nonlocal_dotTemperature(Tstar_v,Temperature,constitutive_state,ipc,ip,el)
end select
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then
call system_clock(count=tock,count_rate=tickrate,count_max=maxticks)
!$OMP CRITICAL (debugTimingDotTemperature)
debug_cumDotTemperatureCalls = debug_cumDotTemperatureCalls + 1_pInt
debug_cumDotTemperatureTicks = debug_cumDotTemperatureTicks + tock-tick
!$OMP FLUSH (debug_cumDotTemperatureTicks)
if (tock < tick) debug_cumDotTemperatureTicks = debug_cumDotTemperatureTicks + maxticks
!$OMP END CRITICAL (debugTimingDotTemperature)
endif
end function constitutive_dotTemperature end function constitutive_dotTemperature

View File

@ -159,7 +159,6 @@ use prec, only: &
constitutive_dislotwin_LpAndItsTangent, & constitutive_dislotwin_LpAndItsTangent, &
constitutive_dislotwin_dotState, & constitutive_dislotwin_dotState, &
constitutive_dislotwin_deltaState, & constitutive_dislotwin_deltaState, &
constitutive_dislotwin_dotTemperature, &
constitutive_dislotwin_postResults constitutive_dislotwin_postResults
contains contains
@ -189,8 +188,8 @@ subroutine constitutive_dislotwin_init(file)
implicit none implicit none
integer(pInt), intent(in) :: file integer(pInt), intent(in) :: file
integer(pInt), parameter :: maxNchunks = 21_pInt integer(pInt), parameter :: MAXNCHUNKS = LATTICE_maxNinteraction + 1_pInt
integer(pInt), dimension(1+2*maxNchunks) :: positions integer(pInt), dimension(1+2*MAXNCHUNKS) :: positions
integer(pInt), dimension(7) :: configNchunks integer(pInt), dimension(7) :: configNchunks
integer(pInt) :: section = 0_pInt, maxNinstance,mySize=0_pInt,structID,maxTotalNslip,maxTotalNtwin,& integer(pInt) :: section = 0_pInt, maxNinstance,mySize=0_pInt,structID,maxTotalNslip,maxTotalNtwin,&
f,i,j,k,l,m,n,o,p,q,r,s,ns,nt, & f,i,j,k,l,m,n,o,p,q,r,s,ns,nt, &
@ -200,12 +199,12 @@ subroutine constitutive_dislotwin_init(file)
character(len=65536) :: tag character(len=65536) :: tag
character(len=65536) :: line = '' ! to start initialized character(len=65536) :: line = '' ! to start initialized
write(6,'(/,a)') ' <<<+- constitutive_'//trim(constitutive_dislotwin_LABEL)//' init -+>>>' write(6,'(/,a)') ' <<<+- constitutive_'//CONSTITUTIVE_DISLOTWIN_label//' init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'
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_plasticity == constitutive_dislotwin_label),pInt) maxNinstance = int(count(phase_plasticity == CONSTITUTIVE_DISLOTWIN_label),pInt)
if (maxNinstance == 0_pInt) return if (maxNinstance == 0_pInt) return
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) & if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
@ -343,9 +342,9 @@ subroutine constitutive_dislotwin_init(file)
cycle cycle
endif endif
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if statemen). It's not safe in Fortran if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if statemen). It's not safe in Fortran
if (phase_plasticity(section) == constitutive_dislotwin_LABEL) then ! one of my sections if (trim(phase_plasticity(section)) == CONSTITUTIVE_DISLOTWIN_label) then ! one of my sections
i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase
positions = IO_stringPos(line,maxNchunks) positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
select case(tag) select case(tag)
case ('plasticity', 'elasticity') case ('plasticity', 'elasticity')
@ -384,7 +383,7 @@ subroutine constitutive_dislotwin_init(file)
constitutive_dislotwin_Cslip_66(6,6,i) = IO_floatValue(line,positions,2_pInt) constitutive_dislotwin_Cslip_66(6,6,i) = IO_floatValue(line,positions,2_pInt)
case ('nslip') case ('nslip')
if (positions(1) < 1_pInt + Nchunks_SlipFamilies) then if (positions(1) < 1_pInt + Nchunks_SlipFamilies) then
call IO_warning(50_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_LABEL//')') call IO_warning(50_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_label//')')
endif endif
Nchunks_SlipFamilies = positions(1) - 1_pInt Nchunks_SlipFamilies = positions(1) - 1_pInt
do j = 1_pInt, Nchunks_SlipFamilies do j = 1_pInt, Nchunks_SlipFamilies
@ -392,7 +391,7 @@ subroutine constitutive_dislotwin_init(file)
enddo enddo
case ('ntwin') case ('ntwin')
if (positions(1) < 1_pInt + Nchunks_TwinFamilies) then if (positions(1) < 1_pInt + Nchunks_TwinFamilies) then
call IO_warning(51_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_LABEL//')') call IO_warning(51_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_label//')')
endif endif
Nchunks_TwinFamilies = positions(1) - 1_pInt Nchunks_TwinFamilies = positions(1) - 1_pInt
do j = 1_pInt, Nchunks_TwinFamilies do j = 1_pInt, Nchunks_TwinFamilies
@ -470,28 +469,28 @@ subroutine constitutive_dislotwin_init(file)
constitutive_dislotwin_CAtomicVolume(i) = IO_floatValue(line,positions,2_pInt) constitutive_dislotwin_CAtomicVolume(i) = IO_floatValue(line,positions,2_pInt)
case ('interaction_slipslip','interactionslipslip') case ('interaction_slipslip','interactionslipslip')
if (positions(1) < 1_pInt + Nchunks_SlipSlip) then if (positions(1) < 1_pInt + Nchunks_SlipSlip) then
call IO_error(213_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_LABEL//')') call IO_error(213_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_label//')')
endif endif
do j = 1_pInt, Nchunks_SlipSlip do j = 1_pInt, Nchunks_SlipSlip
constitutive_dislotwin_interaction_SlipSlip(j,i) = IO_floatValue(line,positions,1_pInt+j) constitutive_dislotwin_interaction_SlipSlip(j,i) = IO_floatValue(line,positions,1_pInt+j)
enddo enddo
case ('interaction_sliptwin','interactionsliptwin') case ('interaction_sliptwin','interactionsliptwin')
if (positions(1) < 1_pInt + Nchunks_SlipTwin) then if (positions(1) < 1_pInt + Nchunks_SlipTwin) then
call IO_error(213_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_LABEL//')') call IO_error(213_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_label//')')
endif endif
do j = 1_pInt, Nchunks_SlipTwin do j = 1_pInt, Nchunks_SlipTwin
constitutive_dislotwin_interaction_SlipTwin(j,i) = IO_floatValue(line,positions,1_pInt+j) constitutive_dislotwin_interaction_SlipTwin(j,i) = IO_floatValue(line,positions,1_pInt+j)
enddo enddo
case ('interaction_twinslip','interactiontwinslip') case ('interaction_twinslip','interactiontwinslip')
if (positions(1) < 1_pInt + Nchunks_TwinSlip) then if (positions(1) < 1_pInt + Nchunks_TwinSlip) then
call IO_error(213_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_LABEL//')') call IO_error(213_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_label//')')
endif endif
do j = 1_pInt, Nchunks_TwinSlip do j = 1_pInt, Nchunks_TwinSlip
constitutive_dislotwin_interaction_TwinSlip(j,i) = IO_floatValue(line,positions,1_pInt+j) constitutive_dislotwin_interaction_TwinSlip(j,i) = IO_floatValue(line,positions,1_pInt+j)
enddo enddo
case ('interaction_twintwin','interactiontwintwin') case ('interaction_twintwin','interactiontwintwin')
if (positions(1) < 1_pInt + Nchunks_TwinTwin) then if (positions(1) < 1_pInt + Nchunks_TwinTwin) then
call IO_error(213_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_LABEL//')') call IO_error(213_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_label//')')
endif endif
do j = 1_pInt, Nchunks_TwinTwin do j = 1_pInt, Nchunks_TwinTwin
constitutive_dislotwin_interaction_TwinTwin(j,i) = IO_floatValue(line,positions,1_pInt+j) constitutive_dislotwin_interaction_TwinTwin(j,i) = IO_floatValue(line,positions,1_pInt+j)
@ -507,7 +506,7 @@ subroutine constitutive_dislotwin_init(file)
case ('qedgepersbsystem') case ('qedgepersbsystem')
constitutive_dislotwin_sbQedge(i) = IO_floatValue(line,positions,2_pInt) constitutive_dislotwin_sbQedge(i) = IO_floatValue(line,positions,2_pInt)
case default case default
call IO_error(210_pInt,ext_msg=trim(tag)//' ('//constitutive_dislotwin_label//')') call IO_error(210_pInt,ext_msg=trim(tag)//' ('//CONSTITUTIVE_DISLOTWIN_label//')')
end select end select
endif endif
endif endif
@ -520,46 +519,46 @@ subroutine constitutive_dislotwin_init(file)
if (structID < 1_pInt) call IO_error(205_pInt,el=i) if (structID < 1_pInt) call IO_error(205_pInt,el=i)
if (sum(constitutive_dislotwin_Nslip(:,i)) < 0_pInt) call IO_error(211_pInt,el=i,ext_msg='Nslip (' & if (sum(constitutive_dislotwin_Nslip(:,i)) < 0_pInt) call IO_error(211_pInt,el=i,ext_msg='Nslip (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (sum(constitutive_dislotwin_Ntwin(:,i)) < 0_pInt) call IO_error(211_pInt,el=i,ext_msg='Ntwin (' & if (sum(constitutive_dislotwin_Ntwin(:,i)) < 0_pInt) call IO_error(211_pInt,el=i,ext_msg='Ntwin (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
do f = 1_pInt,lattice_maxNslipFamily do f = 1_pInt,lattice_maxNslipFamily
if (constitutive_dislotwin_Nslip(f,i) > 0_pInt) then if (constitutive_dislotwin_Nslip(f,i) > 0_pInt) then
if (constitutive_dislotwin_rhoEdge0(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='rhoEdge0 (' & if (constitutive_dislotwin_rhoEdge0(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='rhoEdge0 (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_rhoEdgeDip0(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='rhoEdgeDip0 (' & if (constitutive_dislotwin_rhoEdgeDip0(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='rhoEdgeDip0 (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_burgersPerSlipFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='slipBurgers (' & if (constitutive_dislotwin_burgersPerSlipFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='slipBurgers (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_v0PerSlipFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='v0 (' & if (constitutive_dislotwin_v0PerSlipFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='v0 (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
endif endif
enddo enddo
do f = 1_pInt,lattice_maxNtwinFamily do f = 1_pInt,lattice_maxNtwinFamily
if (constitutive_dislotwin_Ntwin(f,i) > 0_pInt) then if (constitutive_dislotwin_Ntwin(f,i) > 0_pInt) then
if (constitutive_dislotwin_burgersPerTwinFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='twinburgers (' & if (constitutive_dislotwin_burgersPerTwinFamily(f,i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='twinburgers (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_Ndot0PerTwinFamily(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='ndot0 (' & if (constitutive_dislotwin_Ndot0PerTwinFamily(f,i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='ndot0 (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
endif endif
enddo enddo
if (constitutive_dislotwin_CAtomicVolume(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='cAtomicVolume (' & if (constitutive_dislotwin_CAtomicVolume(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='cAtomicVolume (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_D0(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='D0 (' & if (constitutive_dislotwin_D0(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='D0 (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_Qsd(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='Qsd (' & if (constitutive_dislotwin_Qsd(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='Qsd (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_SFE_0K(i) == 0.0_pReal .and. & if (constitutive_dislotwin_SFE_0K(i) == 0.0_pReal .and. &
constitutive_dislotwin_dSFE_dT(i) == 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='SFE (' & constitutive_dislotwin_dSFE_dT(i) == 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='SFE (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_aTolRho(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='aTolRho (' & if (constitutive_dislotwin_aTolRho(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='aTolRho (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_aTolTwinFrac(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='aTolTwinFrac (' & if (constitutive_dislotwin_aTolTwinFrac(i) <= 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='aTolTwinFrac (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_sbResistance(i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='sbResistance (' & if (constitutive_dislotwin_sbResistance(i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='sbResistance (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
if (constitutive_dislotwin_sbVelocity(i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='sbVelocity (' & if (constitutive_dislotwin_sbVelocity(i) < 0.0_pReal) call IO_error(211_pInt,el=i,ext_msg='sbVelocity (' &
//constitutive_dislotwin_label//')') //CONSTITUTIVE_DISLOTWIN_label//')')
!* Determine total number of active slip or twin systems !* Determine total number of active slip or twin systems
constitutive_dislotwin_Nslip(:,i) = min(lattice_NslipSystem(:,structID),constitutive_dislotwin_Nslip(:,i)) constitutive_dislotwin_Nslip(:,i) = min(lattice_NslipSystem(:,structID),constitutive_dislotwin_Nslip(:,i))
@ -654,7 +653,7 @@ subroutine constitutive_dislotwin_init(file)
case('sb_eigenvectors') case('sb_eigenvectors')
mySize = 9_pInt mySize = 9_pInt
case default case default
call IO_error(212_pInt,ext_msg=constitutive_dislotwin_output(o,i)//' ('//constitutive_dislotwin_label//')') call IO_error(212_pInt,ext_msg=constitutive_dislotwin_output(o,i)//' ('//CONSTITUTIVE_DISLOTWIN_label//')')
end select end select
if (mySize > 0_pInt) then ! any meaningful output found if (mySize > 0_pInt) then ! any meaningful output found
@ -1568,35 +1567,6 @@ pure function constitutive_dislotwin_deltaState(Tstar_v,temperature,state,ipc,ip
end function constitutive_dislotwin_deltaState end function constitutive_dislotwin_deltaState
!--------------------------------------------------------------------------------------------------
!> @brief calculates the rate of change of temperature
!> @details dummy function, returns 0.0
!--------------------------------------------------------------------------------------------------
real(pReal) pure function constitutive_dislotwin_dotTemperature(Tstar_v,temperature,state,ipc,ip,el)
use prec, only: &
p_vec
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains
implicit none
real(pReal), dimension(6), intent(in) :: &
Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: &
temperature !< temperature at integration point
integer(pInt), intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
state !< microstructure state
constitutive_dislotwin_dotTemperature = 0.0_pReal
end function constitutive_dislotwin_dotTemperature
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of constitutive results !> @brief return array of constitutive results

View File

@ -84,7 +84,6 @@ module constitutive_j2
constitutive_j2_LpAndItsTangent, & constitutive_j2_LpAndItsTangent, &
constitutive_j2_dotState, & constitutive_j2_dotState, &
constitutive_j2_deltaState, & constitutive_j2_deltaState, &
constitutive_j2_dotTemperature, &
constitutive_j2_postResults constitutive_j2_postResults
contains contains
@ -128,7 +127,7 @@ subroutine constitutive_j2_init(myFile)
tag = '', & tag = '', &
line = '' ! to start initialized line = '' ! to start initialized
write(6,'(/,a)') ' <<<+- constitutive_'//trim(CONSTITUTIVE_J2_label)//' init -+>>>' write(6,'(/,a)') ' <<<+- constitutive_'//CONSTITUTIVE_J2_label//' init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
@ -196,7 +195,7 @@ subroutine constitutive_j2_init(myFile)
cycle ! skip to next line cycle ! skip to next line
endif endif
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
if (phase_plasticity(section) == CONSTITUTIVE_J2_label) then ! one of my sections if (trim(phase_plasticity(section)) == CONSTITUTIVE_J2_label) then ! one of my sections
i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase
positions = IO_stringPos(line,MAXNCHUNKS) positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
@ -594,36 +593,6 @@ pure function constitutive_j2_deltaState(Tstar_v,temperature,state,ipc,ip,el)
end function constitutive_j2_deltaState end function constitutive_j2_deltaState
!--------------------------------------------------------------------------------------------------
!> @brief calculates the rate of change of temperature
!> @details dummy function, returns 0.0
!--------------------------------------------------------------------------------------------------
real(pReal) pure function constitutive_j2_dotTemperature(Tstar_v,temperature,state,ipc,ip,el)
use prec, only: &
p_vec
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains
implicit none
real(pReal), dimension(6), intent(in) :: &
Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: &
temperature !< temperature at integration point
integer(pInt), intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
state !< microstructure state
constitutive_j2_dotTemperature = 0.0_pReal
end function constitutive_j2_dotTemperature
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of constitutive results !> @brief return array of constitutive results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -56,7 +56,6 @@ module constitutive_none
constitutive_none_LpAndItsTangent, & constitutive_none_LpAndItsTangent, &
constitutive_none_dotState, & constitutive_none_dotState, &
constitutive_none_deltaState, & constitutive_none_deltaState, &
constitutive_none_dotTemperature, &
constitutive_none_postResults constitutive_none_postResults
contains contains
@ -100,7 +99,7 @@ subroutine constitutive_none_init(myFile)
tag = '', & tag = '', &
line = '' ! to start initialized line = '' ! to start initialized
write(6,'(/,a)') ' <<<+- constitutive_'//trim(CONSTITUTIVE_NONE_label)//' init -+>>>' write(6,'(/,a)') ' <<<+- constitutive_'//CONSTITUTIVE_NONE_label//' init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
@ -137,7 +136,7 @@ subroutine constitutive_none_init(myFile)
cycle cycle
endif endif
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
if (phase_plasticity(section) == CONSTITUTIVE_NONE_label) then ! one of my sections if (trim(phase_plasticity(section)) == CONSTITUTIVE_NONE_label) then ! one of my sections
i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase
positions = IO_stringPos(line,MAXNCHUNKS) positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
@ -388,36 +387,6 @@ function constitutive_none_deltaState(Tstar_v,temperature,state,ipc,ip,el)
end function constitutive_none_deltaState end function constitutive_none_deltaState
!--------------------------------------------------------------------------------------------------
!> @brief calculates the rate of change of temperature
!> @details dummy function, returns 0.0
!--------------------------------------------------------------------------------------------------
real(pReal) pure function constitutive_none_dotTemperature(Tstar_v,temperature,state,ipc,ip,el)
use prec, only: &
p_vec
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains
implicit none
real(pReal), dimension(6), intent(in) :: &
Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: &
temperature !< temperature at integration point
integer(pInt), intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
state !< microstructure state
constitutive_none_dotTemperature = 0.0_pReal
end function constitutive_none_dotTemperature
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of constitutive results !> @brief return array of constitutive results
!> @details dummy function, returns 0.0 !> @details dummy function, returns 0.0

View File

@ -205,7 +205,6 @@ constitutive_nonlocal_microstructure, &
constitutive_nonlocal_LpAndItsTangent, & constitutive_nonlocal_LpAndItsTangent, &
constitutive_nonlocal_dotState, & constitutive_nonlocal_dotState, &
constitutive_nonlocal_deltaState, & constitutive_nonlocal_deltaState, &
constitutive_nonlocal_dotTemperature, &
constitutive_nonlocal_updateCompatibility, & constitutive_nonlocal_updateCompatibility, &
constitutive_nonlocal_postResults constitutive_nonlocal_postResults
@ -216,9 +215,10 @@ constitutive_nonlocal_dislocationstress
CONTAINS CONTAINS
!************************************** !--------------------------------------------------------------------------------------------------
!* Module initialization * !> @brief module initialization
!************************************** !> @details reads in material parameters, allocates arrays, and does sanity checks
!--------------------------------------------------------------------------------------------------
subroutine constitutive_nonlocal_init(myFile) subroutine constitutive_nonlocal_init(myFile)
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment) use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
@ -255,7 +255,7 @@ use lattice
integer(pInt), intent(in) :: myFile integer(pInt), intent(in) :: myFile
!*** local variables !*** local variables
integer(pInt), parameter :: MAXNCHUNKS = lattice_maxNinteraction + 1_pInt integer(pInt), parameter :: MAXNCHUNKS = LATTICE_maxNinteraction + 1_pInt
integer(pInt), & integer(pInt), &
dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions
integer(pInt), dimension(7) :: configNchunks integer(pInt), dimension(7) :: configNchunks
@ -281,19 +281,16 @@ integer(pInt) :: section = 0_pInt, &
character(len=65536) tag character(len=65536) tag
character(len=65536) :: line = '' ! to start initialized character(len=65536) :: line = '' ! to start initialized
write(6,*) write(6,'(/,a)') ' <<<+- constitutive_'//CONSTITUTIVE_NONLOCAL_label//' init -+>>>'
write(6,*) '<<<+- constitutive_',trim(CONSTITUTIVE_NONLOCAL_LABEL),' init -+>>>' write(6,'(a)') ' $Id$'
write(6,*) '$Id$' write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(a16,a)') ' Current time : ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
maxNinstance = int(count(phase_plasticity == CONSTITUTIVE_NONLOCAL_LABEL),pInt) maxNinstance = int(count(phase_plasticity == CONSTITUTIVE_NONLOCAL_LABEL),pInt)
if (maxNinstance == 0) return ! we don't have to do anything if there's no instance for this constitutive law if (maxNinstance == 0) return ! we don't have to do anything if there's no instance for this constitutive law
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
write(6,'(a16,1x,i5)') '# instances:',maxNinstance write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
write(6,*)
endif
!*** memory allocation for global variables !*** memory allocation for global variables
@ -433,7 +430,7 @@ do while (trim(line) /= '#EOF#')
cycle cycle
endif endif
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if statemen). It's not safe in Fortran if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if statemen). It's not safe in Fortran
if (phase_plasticity(section) == CONSTITUTIVE_NONLOCAL_LABEL) then ! one of my sections if (trim(phase_plasticity(section)) == CONSTITUTIVE_NONLOCAL_LABEL) then ! one of my sections
i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase
positions = IO_stringPos(line,MAXNCHUNKS) positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
@ -1038,13 +1035,13 @@ do i = 1,maxNinstance
enddo enddo
endsubroutine end subroutine constitutive_nonlocal_init
!********************************************************************* !--------------------------------------------------------------------------------------------------
!* initial microstructural state (just the "basic" states) * !> @brief sets the initial microstructural state for a given instance of this plasticity
!********************************************************************* !--------------------------------------------------------------------------------------------------
subroutine constitutive_nonlocal_stateInit(state) subroutine constitutive_nonlocal_stateInit(state)
use IO, only: IO_error use IO, only: IO_error
@ -1167,13 +1164,13 @@ do matID = 1_pInt,maxNinstance
endif endif
enddo enddo
endsubroutine end subroutine constitutive_nonlocal_stateInit
!********************************************************************* !--------------------------------------------------------------------------------------------------
!* absolute state tolerance * !> @brief sets the relevant state values for a given instance of this plasticity
!********************************************************************* !--------------------------------------------------------------------------------------------------
pure function constitutive_nonlocal_aTolState(matID) pure function constitutive_nonlocal_aTolState(matID)
implicit none implicit none
@ -1198,13 +1195,13 @@ forall (c = 1_pInt:2_pInt) &
constitutive_nonlocal_aTolState(iRhoD(1:ns,c,matID)) = aTolRho(matID) constitutive_nonlocal_aTolState(iRhoD(1:ns,c,matID)) = aTolRho(matID)
constitutive_nonlocal_aTolState(iGamma(1:ns,matID)) = aTolShear(matID) constitutive_nonlocal_aTolState(iGamma(1:ns,matID)) = aTolShear(matID)
endfunction end function constitutive_nonlocal_aTolState
!********************************************************************* !--------------------------------------------------------------------------------------------------
!* calculates homogenized elacticity matrix * !> @brief returns the homogenized elasticity matrix
!********************************************************************* !--------------------------------------------------------------------------------------------------
pure function constitutive_nonlocal_homogenizedC(state,g,ip,el) pure function constitutive_nonlocal_homogenizedC(state,g,ip,el)
use mesh, only: mesh_NcpElems, & use mesh, only: mesh_NcpElems, &
@ -1230,13 +1227,12 @@ matID = phase_plasticityInstance(material_phase(g,ip,el))
constitutive_nonlocal_homogenizedC = Cslip66(1:6,1:6,matID) constitutive_nonlocal_homogenizedC = Cslip66(1:6,1:6,matID)
endfunction end function constitutive_nonlocal_homogenizedC
!--------------------------------------------------------------------------------------------------
!********************************************************************* !> @brief calculates quantities characterizing the microstructure
!* calculates quantities characterizing the microstructure * !--------------------------------------------------------------------------------------------------
!*********************************************************************
subroutine constitutive_nonlocal_microstructure(state, Temperature, Fe, Fp, gr, ip, el) subroutine constitutive_nonlocal_microstructure(state, Temperature, Fe, Fp, gr, ip, el)
use IO, only: & use IO, only: &
@ -1547,13 +1543,12 @@ state(gr,ip,el)%p(iTauB(1:ns,instance)) = tauBack
endif endif
#endif #endif
endsubroutine end subroutine constitutive_nonlocal_microstructure
!--------------------------------------------------------------------------------------------------
!********************************************************************* !> @brief calculates kinetics
!* calculates kinetics * !--------------------------------------------------------------------------------------------------
!*********************************************************************
subroutine constitutive_nonlocal_kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, & subroutine constitutive_nonlocal_kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, &
tauThreshold, c, Temperature, g, ip, el) tauThreshold, c, Temperature, g, ip, el)
@ -1711,13 +1706,12 @@ endif
endif endif
#endif #endif
endsubroutine end subroutine constitutive_nonlocal_kinetics
!--------------------------------------------------------------------------------------------------
!********************************************************************* !> @brief calculates plastic velocity gradient and its tangent
!* calculates plastic velocity gradient and its tangent * !--------------------------------------------------------------------------------------------------
!*********************************************************************
subroutine constitutive_nonlocal_LpAndItsTangent(Lp, dLp_dTstar99, Tstar_v, Temperature, state, g, ip, el) subroutine constitutive_nonlocal_LpAndItsTangent(Lp, dLp_dTstar99, Tstar_v, Temperature, state, g, ip, el)
use math, only: math_Plain3333to99, & use math, only: math_Plain3333to99, &
@ -1912,13 +1906,12 @@ dLp_dTstar99 = math_Plain3333to99(dLp_dTstar3333)
endif endif
#endif #endif
endsubroutine end subroutine constitutive_nonlocal_LpAndItsTangent
!--------------------------------------------------------------------------------------------------
!********************************************************************* !> @brief (instantaneous) incremental change of microstructure
!* incremental change of microstructure * !--------------------------------------------------------------------------------------------------
!*********************************************************************
subroutine constitutive_nonlocal_deltaState(deltaState, state, Tstar_v, Temperature, g,ip,el) subroutine constitutive_nonlocal_deltaState(deltaState, state, Tstar_v, Temperature, g,ip,el)
use debug, only: debug_level, & use debug, only: debug_level, &
@ -2103,13 +2096,13 @@ forall (s = 1:ns, c = 1_pInt:2_pInt) &
endif endif
#endif #endif
endsubroutine end subroutine constitutive_nonlocal_deltaState
!********************************************************************* !--------------------------------------------------------------------------------------------------
!* rate of change of microstructure * !> @brief calculates the rate of change of microstructure
!********************************************************************* !--------------------------------------------------------------------------------------------------
function constitutive_nonlocal_dotState(Tstar_v, Fe, Fp, Temperature, state, state0, timestep, subfrac, g,ip,el) function constitutive_nonlocal_dotState(Tstar_v, Fe, Fp, Temperature, state, state0, timestep, subfrac, g,ip,el)
use prec, only: DAMASK_NaN use prec, only: DAMASK_NaN
@ -2719,7 +2712,7 @@ else
constitutive_nonlocal_dotState(iGamma(s,matID)) = sum(gdot(s,1:4)) constitutive_nonlocal_dotState(iGamma(s,matID)) = sum(gdot(s,1:4))
endif endif
endfunction end function constitutive_nonlocal_dotState
@ -2897,39 +2890,7 @@ enddo ! neighbor cycle
compatibility(1:2,1:ns,1:ns,1:Nneighbors,i,e) = my_compatibility compatibility(1:2,1:ns,1:ns,1:Nneighbors,i,e) = my_compatibility
endsubroutine end subroutine constitutive_nonlocal_updateCompatibility
!*********************************************************************
!* rate of change of temperature *
!*********************************************************************
pure function constitutive_nonlocal_dotTemperature(Tstar_v,Temperature,state,g,ip,el)
use mesh, only: mesh_NcpElems, &
mesh_maxNips
use material, only: homogenization_maxNgrains
implicit none
!* input variables
integer(pInt), intent(in) :: g, & ! current grain ID
ip, & ! current integration point
el ! current element
real(pReal), intent(in) :: Temperature ! temperature
real(pReal), dimension(6), intent(in) :: Tstar_v ! 2nd Piola-Kirchhoff stress in Mandel notation
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
state ! microstructural state
!* output variables
real(pReal) constitutive_nonlocal_dotTemperature ! evolution of Temperature
!* local variables
constitutive_nonlocal_dotTemperature = 0.0_pReal
endfunction
!********************************************************************* !*********************************************************************
@ -3280,7 +3241,7 @@ ipLoop: do neighbor_ip = 1_pInt,FE_Nips(FE_geomtype(mesh_element(2,neighbor_el))
endif endif
endfunction end function constitutive_nonlocal_dislocationstress
!********************************************************************* !*********************************************************************

View File

@ -106,7 +106,6 @@ module constitutive_phenopowerlaw
constitutive_phenopowerlaw_LpAndItsTangent, & constitutive_phenopowerlaw_LpAndItsTangent, &
constitutive_phenopowerlaw_dotState, & constitutive_phenopowerlaw_dotState, &
constitutive_phenopowerlaw_deltaState, & constitutive_phenopowerlaw_deltaState, &
constitutive_phenopowerlaw_dotTemperature, &
constitutive_phenopowerlaw_postResults constitutive_phenopowerlaw_postResults
contains contains
@ -134,7 +133,7 @@ subroutine constitutive_phenopowerlaw_init(myFile)
implicit none implicit none
integer(pInt), intent(in) :: myFile integer(pInt), intent(in) :: myFile
integer(pInt), parameter :: MAXNCHUNKS = lattice_maxNinteraction + 1_pInt integer(pInt), parameter :: MAXNCHUNKS = LATTICE_maxNinteraction + 1_pInt
integer(pInt), dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions integer(pInt), dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions
integer(pInt), dimension(7) :: configNchunks integer(pInt), dimension(7) :: configNchunks
integer(pInt) :: & integer(pInt) :: &
@ -148,7 +147,7 @@ subroutine constitutive_phenopowerlaw_init(myFile)
tag = '', & tag = '', &
line = '' ! to start initialized line = '' ! to start initialized
write(6,'(/,a)') ' <<<+- constitutive_'//trim(CONSTITUTIVE_PHENOPOWERLAW_label)//' init -+>>>' write(6,'(/,a)') ' <<<+- constitutive_'//CONSTITUTIVE_PHENOPOWERLAW_label//' init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
@ -259,7 +258,7 @@ subroutine constitutive_phenopowerlaw_init(myFile)
cycle ! skip to next line cycle ! skip to next line
endif endif
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
if (phase_plasticity(section) == CONSTITUTIVE_PHENOPOWERLAW_label) then ! one of my sections if (trim(phase_plasticity(section)) == CONSTITUTIVE_PHENOPOWERLAW_label) then ! one of my sections
i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase
positions = IO_stringPos(line,MAXNCHUNKS) positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
@ -1066,36 +1065,6 @@ pure function constitutive_phenopowerlaw_deltaState(Tstar_v,temperature,state,ip
end function constitutive_phenopowerlaw_deltaState end function constitutive_phenopowerlaw_deltaState
!--------------------------------------------------------------------------------------------------
!> @brief calculates the rate of change of temperature
!> @details dummy function, returns 0.0
!--------------------------------------------------------------------------------------------------
real(pReal) pure function constitutive_phenopowerlaw_dotTemperature(Tstar_v,temperature,state,ipc,ip,el)
use prec, only: &
p_vec
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains
implicit none
real(pReal), dimension(6), intent(in) :: &
Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: &
temperature !< temperature at integration point
integer(pInt), intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
state
constitutive_phenopowerlaw_dotTemperature = 0.0_pReal
end function constitutive_phenopowerlaw_dotTemperature
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of constitutive results !> @brief return array of constitutive results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -190,7 +190,6 @@ module constitutive_titanmod
constitutive_titanmod_LpAndItsTangent, & constitutive_titanmod_LpAndItsTangent, &
constitutive_titanmod_dotState, & constitutive_titanmod_dotState, &
constitutive_titanmod_deltaState, & constitutive_titanmod_deltaState, &
constitutive_titanmod_dotTemperature, &
constitutive_titanmod_postResults, & constitutive_titanmod_postResults, &
constitutive_titanmod_homogenizedC, & constitutive_titanmod_homogenizedC, &
constitutive_titanmod_aTolState constitutive_titanmod_aTolState
@ -220,7 +219,7 @@ subroutine constitutive_titanmod_init(myFile)
implicit none implicit none
integer(pInt), intent(in) :: myFile integer(pInt), intent(in) :: myFile
integer(pInt), parameter :: MAXNCHUNKS = 21_pInt integer(pInt), parameter :: MAXNCHUNKS = LATTICE_maxNinteraction + 1_pInt
integer(pInt), dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions integer(pInt), dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions
integer(pInt), dimension(7) :: configNchunks integer(pInt), dimension(7) :: configNchunks
integer(pInt) :: & integer(pInt) :: &
@ -230,15 +229,15 @@ subroutine constitutive_titanmod_init(myFile)
s, s1, s2, & s, s1, s2, &
t, t1, t2, & t, t1, t2, &
ns, nt, & ns, nt, &
Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, & Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, &
Nchunks_SlipFamilies, Nchunks_TwinFamilies, & Nchunks_SlipFamilies, Nchunks_TwinFamilies, &
mySize, structID, & mySize, structID, &
maxTotalNslip,maxTotalNtwin, maxNinstance maxTotalNslip,maxTotalNtwin, maxNinstance
character(len=65536) :: & character(len=65536) :: &
tag = '', & tag = '', &
line = '' ! to start initialized line = '' ! to start initialized
write(6,'(/,a)') ' <<<+- constitutive_'//trim(CONSTITUTIVE_TITANMOD_label)//' init -+>>>' write(6,'(/,a)') ' <<<+- constitutive_'//CONSTITUTIVE_TITANMOD_label//' init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
@ -407,7 +406,7 @@ subroutine constitutive_titanmod_init(myFile)
cycle ! skip to next line cycle ! skip to next line
endif endif
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
if (phase_plasticity(section) == CONSTITUTIVE_TITANMOD_label) then ! one of my sections if (trim(phase_plasticity(section)) == CONSTITUTIVE_TITANMOD_label) then ! one of my sections
i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase
positions = IO_stringPos(line,MAXNCHUNKS) positions = IO_stringPos(line,MAXNCHUNKS)
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
@ -1739,36 +1738,6 @@ pure function constitutive_titanmod_deltaState(Tstar_v,temperature,state,ipc,ip,
end function constitutive_titanmod_deltaState end function constitutive_titanmod_deltaState
!--------------------------------------------------------------------------------------------------
!> @brief calculates the rate of change of temperature
!> @details dummy function, returns 0.0
!--------------------------------------------------------------------------------------------------
real(pReal) pure function constitutive_titanmod_dotTemperature(Tstar_v,temperature,state,ipc,ip,el)
use prec, only: &
p_vec
use mesh, only: &
mesh_NcpElems, &
mesh_maxNips
use material, only: &
homogenization_maxNgrains
implicit none
real(pReal), dimension(6), intent(in) :: &
Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation
real(pReal), intent(in) :: &
temperature !< temperature at integration point
integer(pInt), intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
state !< microstructure state
constitutive_titanmod_dotTemperature = 0.0_pReal
end function constitutive_titanmod_dotTemperature
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of constitutive results !> @brief return array of constitutive results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -33,7 +33,7 @@ module homogenization_RGC
implicit none implicit none
private private
character (len=*), parameter, public :: & character (len=*), parameter, public :: &
homogenization_RGC_label = 'rgc' HOMOGENIZATION_RGC_label = 'rgc'
integer(pInt), dimension(:), allocatable, public :: & integer(pInt), dimension(:), allocatable, public :: &
homogenization_RGC_sizeState, & homogenization_RGC_sizeState, &
homogenization_RGC_sizePostResults homogenization_RGC_sizePostResults
@ -111,12 +111,12 @@ subroutine homogenization_RGC_init(myFile)
character(len=65536) :: tag character(len=65536) :: tag
character(len=65536) :: line = '' character(len=65536) :: line = ''
write(6,'(/,3a)') ' <<<+- homogenization_',trim(homogenization_RGC_label),' init -+>>>' write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_RGC_label//' init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'
write(6,'(a16,a)') ' Current time : ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
maxNinstance = int(count(homogenization_type == homogenization_RGC_label),pInt) maxNinstance = int(count(homogenization_type == HOMOGENIZATION_RGC_label),pInt)
if (maxNinstance == 0_pInt) return if (maxNinstance == 0_pInt) return
allocate(homogenization_RGC_sizeState(maxNinstance)); homogenization_RGC_sizeState = 0_pInt allocate(homogenization_RGC_sizeState(maxNinstance)); homogenization_RGC_sizeState = 0_pInt
@ -147,38 +147,40 @@ subroutine homogenization_RGC_init(myFile)
section = section + 1_pInt section = section + 1_pInt
output = 0_pInt ! reset output counter output = 0_pInt ! reset output counter
endif endif
if (section > 0_pInt .and. homogenization_type(section) == homogenization_RGC_label) then ! one of my sections if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
i = homogenization_typeInstance(section) ! which instance of my type is present homogenization if (trim(homogenization_type(section)) == HOMOGENIZATION_RGC_label) then ! one of my sections
positions = IO_stringPos(line,maxNchunks) i = homogenization_typeInstance(section) ! which instance of my type is present homogenization
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key positions = IO_stringPos(line,maxNchunks)
select case(tag) tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
case ('(output)') select case(tag)
output = output + 1_pInt case ('(output)')
homogenization_RGC_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt)) output = output + 1_pInt
case ('clustersize') homogenization_RGC_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt))
homogenization_RGC_Ngrains(1,i) = IO_intValue(line,positions,2_pInt) case ('clustersize')
homogenization_RGC_Ngrains(2,i) = IO_intValue(line,positions,3_pInt) homogenization_RGC_Ngrains(1,i) = IO_intValue(line,positions,2_pInt)
homogenization_RGC_Ngrains(3,i) = IO_intValue(line,positions,4_pInt) homogenization_RGC_Ngrains(2,i) = IO_intValue(line,positions,3_pInt)
case ('scalingparameter') homogenization_RGC_Ngrains(3,i) = IO_intValue(line,positions,4_pInt)
homogenization_RGC_xiAlpha(i) = IO_floatValue(line,positions,2_pInt) case ('scalingparameter')
case ('overproportionality') homogenization_RGC_xiAlpha(i) = IO_floatValue(line,positions,2_pInt)
homogenization_RGC_ciAlpha(i) = IO_floatValue(line,positions,2_pInt) case ('overproportionality')
case ('grainsize') homogenization_RGC_ciAlpha(i) = IO_floatValue(line,positions,2_pInt)
homogenization_RGC_dAlpha(1,i) = IO_floatValue(line,positions,2_pInt) case ('grainsize')
homogenization_RGC_dAlpha(2,i) = IO_floatValue(line,positions,3_pInt) homogenization_RGC_dAlpha(1,i) = IO_floatValue(line,positions,2_pInt)
homogenization_RGC_dAlpha(3,i) = IO_floatValue(line,positions,4_pInt) homogenization_RGC_dAlpha(2,i) = IO_floatValue(line,positions,3_pInt)
case ('clusterorientation') homogenization_RGC_dAlpha(3,i) = IO_floatValue(line,positions,4_pInt)
homogenization_RGC_angles(1,i) = IO_floatValue(line,positions,2_pInt) case ('clusterorientation')
homogenization_RGC_angles(2,i) = IO_floatValue(line,positions,3_pInt) homogenization_RGC_angles(1,i) = IO_floatValue(line,positions,2_pInt)
homogenization_RGC_angles(3,i) = IO_floatValue(line,positions,4_pInt) homogenization_RGC_angles(2,i) = IO_floatValue(line,positions,3_pInt)
end select homogenization_RGC_angles(3,i) = IO_floatValue(line,positions,4_pInt)
end select
endif
endif endif
enddo enddo
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! assigning cluster orientations ! assigning cluster orientations
elementLooping: do e = 1_pInt,mesh_NcpElems elementLooping: do e = 1_pInt,mesh_NcpElems
if (homogenization_type(mesh_element(3,e)) == homogenization_RGC_label) then if (homogenization_type(mesh_element(3,e)) == HOMOGENIZATION_RGC_label) then
myInstance = homogenization_typeInstance(mesh_element(3,e)) myInstance = homogenization_typeInstance(mesh_element(3,e))
if (all (homogenization_RGC_angles(:,myInstance) >= 399.9_pReal)) then if (all (homogenization_RGC_angles(:,myInstance) >= 399.9_pReal)) then
homogenization_RGC_orientation(1:3,1:3,1,e) = math_EulerToR(math_sampleRandomOri()) homogenization_RGC_orientation(1:3,1:3,1,e) = math_EulerToR(math_sampleRandomOri())

View File

@ -30,7 +30,7 @@ module homogenization_isostrain
implicit none implicit none
private private
character (len=*), parameter, public :: & character (len=*), parameter, public :: &
homogenization_isostrain_label = 'isostrain' HOMOGENIZATION_ISOSTRAIN_label = 'isostrain'
integer(pInt), dimension(:), allocatable, public :: & integer(pInt), dimension(:), allocatable, public :: &
homogenization_isostrain_sizeState, & homogenization_isostrain_sizeState, &
@ -72,12 +72,12 @@ subroutine homogenization_isostrain_init(myFile)
tag = '', & tag = '', &
line = '' ! to start initialized line = '' ! to start initialized
write(6,'(/,a)') ' <<<+- homogenization_'//trim(homogenization_isostrain_label)//' init -+>>>' write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_ISOSTRAIN_label//' init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'
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 = count(homogenization_type == homogenization_isostrain_label) maxNinstance = count(homogenization_type == HOMOGENIZATION_ISOSTRAIN_label)
if (maxNinstance == 0) return if (maxNinstance == 0) return
allocate(homogenization_isostrain_sizeState(maxNinstance)) ; homogenization_isostrain_sizeState = 0_pInt allocate(homogenization_isostrain_sizeState(maxNinstance)) ; homogenization_isostrain_sizeState = 0_pInt
@ -104,19 +104,21 @@ subroutine homogenization_isostrain_init(myFile)
section = section + 1_pInt section = section + 1_pInt
output = 0_pInt ! reset output counter output = 0_pInt ! reset output counter
endif endif
if (section > 0 .and. homogenization_type(section) == homogenization_isostrain_label) then ! one of my sections if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
i = homogenization_typeInstance(section) ! which instance of my type is present homogenization if (trim(homogenization_type(section)) == HOMOGENIZATION_ISOSTRAIN_label) then ! one of my sections
positions = IO_stringPos(line,maxNchunks) i = homogenization_typeInstance(section) ! which instance of my type is present homogenization
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key positions = IO_stringPos(line,maxNchunks)
select case(tag) tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
case ('(output)') select case(tag)
output = output + 1_pInt case ('(output)')
homogenization_isostrain_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt)) output = output + 1_pInt
case ('ngrains') homogenization_isostrain_output(output,i) = IO_lc(IO_stringValue(line,positions,2_pInt))
homogenization_isostrain_Ngrains(i) = IO_intValue(line,positions,2_pInt) case ('ngrains')
case ('mapping') homogenization_isostrain_Ngrains(i) = IO_intValue(line,positions,2_pInt)
homogenization_isostrain_mapping(i) = IO_lc(IO_stringValue(line,positions,2_pInt)) case ('mapping')
end select homogenization_isostrain_mapping(i) = IO_lc(IO_stringValue(line,positions,2_pInt))
end select
endif
endif endif
enddo enddo

View File

@ -33,12 +33,12 @@ module lattice
implicit none implicit none
private private
integer(pInt), parameter, public :: & integer(pInt), parameter, public :: &
lattice_maxNslipFamily = 6_pInt, & !< max # of slip system families over lattice structures LATTICE_maxNslipFamily = 6_pInt, & !< max # of slip system families over lattice structures
lattice_maxNtwinFamily = 4_pInt, & !< max # of twin system families over lattice structures LATTICE_maxNtwinFamily = 4_pInt, & !< max # of twin system families over lattice structures
lattice_maxNslip = 33_pInt, & !< max # of slip systems over lattice structures LATTICE_maxNslip = 33_pInt, & !< max # of slip systems over lattice structures
lattice_maxNtwin = 24_pInt, & !< max # of twin systems over lattice structures LATTICE_maxNtwin = 24_pInt, & !< max # of twin systems over lattice structures
lattice_maxNinteraction = 42_pInt, & !< max # of interaction types (in hardening matrix part) LATTICE_maxNinteraction = 42_pInt, & !< max # of interaction types (in hardening matrix part)
lattice_maxNnonSchmid = 6_pInt !< max # of non schmid contributions over lattice structures LATTICE_maxNnonSchmid = 6_pInt !< max # of non schmid contributions over lattice structures
integer(pInt), allocatable, dimension(:,:), protected, public :: & integer(pInt), allocatable, dimension(:,:), protected, public :: &
lattice_NslipSystem, & !< total # of slip systems in each family lattice_NslipSystem, & !< total # of slip systems in each family