43 lines
758 B
Fortran
43 lines
758 B
Fortran
module m_chemistry
|
|
|
|
use m_parameters
|
|
|
|
implicit none
|
|
|
|
contains
|
|
|
|
real function rate_1step (yr, theta)
|
|
|
|
real, intent(in) :: yr
|
|
real, intent(in) :: theta
|
|
|
|
real :: y
|
|
real :: t_reduce
|
|
|
|
y=yr
|
|
if(yr.lt.0.) y=0.
|
|
if(yr.gt.1.) y=1.
|
|
|
|
t_reduce=theta
|
|
if(theta.lt.0.) t_reduce=0.
|
|
if(theta.gt.1.) t_reduce=1.
|
|
|
|
if (t_reduce.gt.c_ref) then
|
|
|
|
rate_1step = pre*y*exp(-ac/(1.+bc*t_reduce))
|
|
|
|
else if (t_reduce.le.c_cut) then
|
|
|
|
rate_1step = min_wr
|
|
|
|
else
|
|
|
|
rate_1step = &
|
|
((refwr-min_wr)*exp(prof_wr*(t_reduce-c_ref)) + min_wr - refwr*exp(prof_wr*(c_cut-c_ref))) &
|
|
/ (1.-exp(prof_wr*(c_cut-c_ref)))
|
|
|
|
endif
|
|
|
|
end function rate_1step
|
|
|
|
end module m_chemistry
|