Repository navigation
Conversation
modified: src/chemistry/mozart/mo_usrrxt.F90
|
@fvitt, @tilmes, @lkemmons - Are these mods needed for the runs that @cecilehannay will be making? @briandobbins |
No. This is lower priority. |
jimmielin
left a comment
There was a problem hiding this comment.
Thanks @fvitt. A minor comment and a suggestion to avoid repetition.
When discussing this PR with @cacraigucar we were not sure if this was intended to go in standalone, or if a T6 mechanism input file was intended be included as well?
| scale_a = 1._r8 ! We assume there's no difference between prim/sec/tert radicals | ||
| scale_b = 1._r8 ! 1 for alkyl peroxy | ||
| fac_Ro(:) = ( fac_A(:) / (1._r8 + fac_A(:)/fac_B(:)) )*fac_F**fac_z(:) | ||
| RONO2_yield(:) = scale_a * scale_b * ( fac_Ro(:) / (1 + fac_Ro(:)) ) |
There was a problem hiding this comment.
should this be
| RONO2_yield(:) = scale_a * scale_b * ( fac_Ro(:) / (1 + fac_Ro(:)) ) | |
| RONO2_yield(:) = scale_a * scale_b * ( fac_Ro(:) / (1._r8 + fac_Ro(:)) ) |
| !----------------------------------------------------------------- | ||
| ! ... C2H5O2_NOa Temp/Pressure Dependent Nitrate Yield | ||
| !----------------------------------------------------------------- | ||
| if( usr_C2H5O2_NOn_ndx > 0 ) then | ||
| nCON = 2.0_r8 | ||
| exp_nCON = exp( nCON ) | ||
| fac_A(:) = 2.0e-22_r8 * exp_nCON * m(:,k) | ||
| fac_B(:) = 0.43_r8 * ( 300._r8 * tinv(:) )**8._r8 | ||
| fac_F = 0.41_r8 | ||
| fac_z(:) = 1._r8 / ( 1._r8 + log10( fac_A(:) / fac_B(:) )**2._r8 ) | ||
| scale_a = 1._r8 ! We assume there's no difference between prim/sec/tert radicals | ||
| scale_b = 1._r8 ! 1 for alkyl peroxy | ||
| fac_Ro(:) = ( fac_A(:) / (1._r8 + fac_A(:)/fac_B(:)) )*fac_F**fac_z(:) | ||
| RONO2_yield(:) = scale_a * scale_b * ( fac_Ro(:) / (1 + fac_Ro(:)) ) |
There was a problem hiding this comment.
Here and below for RONO2_yield there is a lot of duplication, I wonder if something like
pure function rono2_yield( nCON, m, tinv ) result( yield )
real(r8), intent(in) :: nCON ! number of C, O and N atoms in R, excluding the peroxy group
real(r8), intent(in) :: m(:) ! total atm density (/cm^3)
real(r8), intent(in) :: tinv(:) ! 1/T (1/K)
real(r8) :: yield(size(m))
real(r8), parameter :: alpha = 2.0e-22_r8 ! low-pressure yield coefficient
real(r8), parameter :: y_inf = 0.43_r8 ! high-pressure limit yield at 300 K
real(r8), parameter :: m_inf = 8._r8 ! temperature exponent of the high-pressure limit
real(r8), parameter :: fac_F = 0.41_r8 ! falloff broadening factor
real(r8) :: fac_A(size(m)), fac_B(size(m)), fac_z(size(m)), fac_Ro(size(m))
fac_A(:) = alpha * exp( nCON ) * m(:)
fac_B(:) = y_inf * ( 300._r8 * tinv(:) )**m_inf
fac_z(:) = 1._r8 / ( 1._r8 + log10( fac_A(:) / fac_B(:) )**2 )
fac_Ro(:) = ( fac_A(:) / ( 1._r8 + fac_A(:) / fac_B(:) ) ) * fac_F**fac_z(:)
yield(:) = fac_Ro(:) / ( 1._r8 + fac_Ro(:) )
end function rono2_yieldso the blocks could be simplified as
!-----------------------------------------------------------------
! ... C2H5O2 + NO, temperature/pressure dependent nitrate yield
!-----------------------------------------------------------------
if( usr_C2H5O2_NOn_ndx > 0 ) then
RONO2_yield(:) = rono2_yield( 2._r8, m(:,k), tinv(:) )
call comp_exp( exp_fac, 365._r8*tinv, ncol )
rxt(:,k,usr_C2H5O2_NOn_ndx) = 2.6e-12_r8 * exp_fac(:) * RONO2_yield(:)
rxt(:,k,usr_C2H5O2_NOa_ndx) = 2.6e-12_r8 * exp_fac(:) * ( 1._r8 - RONO2_yield(:) )
end if|
@lkemmons |
Custom (user defined) reaction rates needed for T6 chemistry mechanism development.