fixed erroneous rate calculation in updateState when time increment (subdt) was zero during initialization.

This commit is contained in:
Tias Maiti 2015-08-04 21:27:30 +00:00
parent 65d114e4f0
commit 7928ce3ac3
2 changed files with 14 additions and 5 deletions

View File

@ -226,9 +226,13 @@ function thermal_adiabatic_updateState(subdt, ip, el)
.true.]
temperature (homog)%p(thermalMapping(homog)%p(ip,el)) = T
temperatureRate(homog)%p(thermalMapping(homog)%p(ip,el)) = &
(thermalState(homog)%state(1,offset) - thermalState(homog)%subState0(1,offset))/subdt
if (subdt > tiny(0.0_pReal)) then
temperatureRate(homog)%p(thermalMapping(homog)%p(ip,el)) = &
(thermalState(homog)%state(1,offset) - thermalState(homog)%subState0(1,offset))/subdt
else
temperatureRate(homog)%p(thermalMapping(homog)%p(ip,el)) = 0.0_pReal
endif
end function thermal_adiabatic_updateState
!--------------------------------------------------------------------------------------------------

View File

@ -227,8 +227,13 @@ function vacancyflux_isochempot_updateState(subdt, ip, el)
.true.]
vacancyConc (homog)%p(vacancyfluxMapping(homog)%p(ip,el)) = Cv
vacancyConcRate(homog)%p(vacancyfluxMapping(homog)%p(ip,el)) = &
(vacancyfluxState(homog)%state(1,offset) - vacancyfluxState(homog)%subState0(1,offset))/subdt
if (subdt > tiny(0.0_pReal)) then
vacancyConcRate(homog)%p(vacancyfluxMapping(homog)%p(ip,el)) = &
(vacancyfluxState(homog)%state(1,offset) - vacancyfluxState(homog)%subState0(1,offset))/subdt
else
vacancyConcRate(homog)%p(vacancyfluxMapping(homog)%p(ip,el)) = 0.0_pReal
endif
end function vacancyflux_isochempot_updateState