fluctuations proportional to thermal equilibrium concentration

This commit is contained in:
Pratheek Shanthraj 2015-08-03 11:08:59 +00:00
parent a01d7d8d66
commit 5b57ea7d16
1 changed files with 15 additions and 3 deletions

View File

@ -27,7 +27,8 @@ module source_vacancy_thermalfluc
source_vacancy_thermalfluc_Noutput !< number of outputs per instance of this damage source_vacancy_thermalfluc_Noutput !< number of outputs per instance of this damage
real(pReal), dimension(:), allocatable, private :: & real(pReal), dimension(:), allocatable, private :: &
source_vacancy_thermalfluc_amplitude source_vacancy_thermalfluc_amplitude, &
source_vacancy_thermalfluc_normVacancyEnergy
public :: & public :: &
source_vacancy_thermalfluc_init, & source_vacancy_thermalfluc_init, &
@ -60,6 +61,8 @@ subroutine source_vacancy_thermalfluc_init(fileUnit)
IO_error, & IO_error, &
IO_timeStamp, & IO_timeStamp, &
IO_EOF IO_EOF
use lattice, only: &
lattice_vacancyFormationEnergy
use material, only: & use material, only: &
phase_source, & phase_source, &
phase_Nsources, & phase_Nsources, &
@ -114,6 +117,7 @@ subroutine source_vacancy_thermalfluc_init(fileUnit)
source_vacancy_thermalfluc_output = '' source_vacancy_thermalfluc_output = ''
allocate(source_vacancy_thermalfluc_Noutput(maxNinstance), source=0_pInt) allocate(source_vacancy_thermalfluc_Noutput(maxNinstance), source=0_pInt)
allocate(source_vacancy_thermalfluc_amplitude(maxNinstance), source=0.0_pReal) allocate(source_vacancy_thermalfluc_amplitude(maxNinstance), source=0.0_pReal)
allocate(source_vacancy_thermalfluc_normVacancyEnergy(maxNinstance), source=0.0_pReal)
rewind(fileUnit) rewind(fileUnit)
phase = 0_pInt phase = 0_pInt
@ -150,6 +154,8 @@ subroutine source_vacancy_thermalfluc_init(fileUnit)
if (any(phase_source(:,phase) == SOURCE_vacancy_thermalfluc_ID)) then if (any(phase_source(:,phase) == SOURCE_vacancy_thermalfluc_ID)) then
NofMyPhase=count(material_phase==phase) NofMyPhase=count(material_phase==phase)
instance = source_vacancy_thermalfluc_instance(phase) instance = source_vacancy_thermalfluc_instance(phase)
source_vacancy_thermalfluc_normVacancyEnergy(instance) = &
lattice_vacancyFormationEnergy(phase)/1.3806488e-23_pReal
sourceOffset = source_vacancy_thermalfluc_offset(phase) sourceOffset = source_vacancy_thermalfluc_offset(phase)
sizeDotState = 1_pInt sizeDotState = 1_pInt
@ -207,7 +213,7 @@ subroutine source_vacancy_thermalfluc_deltaState(ipc, ip, el)
call random_number(randNo) call random_number(randNo)
sourceState(phase)%p(sourceOffset)%deltaState(1,constituent) = & sourceState(phase)%p(sourceOffset)%deltaState(1,constituent) = &
randNo - sourceState(phase)%p(sourceOffset)%state(1,constituent) randNo - 0.5_pReal - sourceState(phase)%p(sourceOffset)%state(1,constituent)
end subroutine source_vacancy_thermalfluc_deltaState end subroutine source_vacancy_thermalfluc_deltaState
@ -217,6 +223,9 @@ end subroutine source_vacancy_thermalfluc_deltaState
subroutine source_vacancy_thermalfluc_getRateAndItsTangent(CvDot, dCvDot_dCv, ipc, ip, el) subroutine source_vacancy_thermalfluc_getRateAndItsTangent(CvDot, dCvDot_dCv, ipc, ip, el)
use material, only: & use material, only: &
mappingConstitutive, & mappingConstitutive, &
material_homog, &
temperature, &
thermalMapping, &
sourceState sourceState
implicit none implicit none
@ -234,7 +243,10 @@ subroutine source_vacancy_thermalfluc_getRateAndItsTangent(CvDot, dCvDot_dCv, ip
instance = source_vacancy_thermalfluc_instance(phase) instance = source_vacancy_thermalfluc_instance(phase)
sourceOffset = source_vacancy_thermalfluc_offset(phase) sourceOffset = source_vacancy_thermalfluc_offset(phase)
CvDot = source_vacancy_thermalfluc_amplitude(instance)*(sourceState(phase)%p(sourceOffset)%state0(2,constituent) - 0.5_pReal) CvDot = source_vacancy_thermalfluc_amplitude(instance)* &
sourceState(phase)%p(sourceOffset)%state0(2,constituent)* &
exp(-source_vacancy_thermalfluc_normVacancyEnergy(instance)/ &
temperature(material_homog(ip,el))%p(thermalMapping(material_homog(ip,el))%p(ip,el)))
dCvDot_dCv = 0.0_pReal dCvDot_dCv = 0.0_pReal
end subroutine source_vacancy_thermalfluc_getRateAndItsTangent end subroutine source_vacancy_thermalfluc_getRateAndItsTangent