fixed erroneous rate calculation in updateState when time increment (subdt) was zero during initialization.
This commit is contained in:
parent
65d114e4f0
commit
7928ce3ac3
|
@ -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
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue