Skip to content

Commit

Permalink
FAME now accepts exponential down parameter as power function.
Browse files Browse the repository at this point in the history
In recent literature it is common to account for the temperature dependence
of the exponential down parameter with a simple power law of the form

dEdown = alpha * (T / T0)^n

Often the value of n is 0.8-1.0, which implies a pretty significant
temperature effect. This commit enables FAME to read and use the
three-parameter power law expression above.
  • Loading branch information
jwallen committed Jul 6, 2011
1 parent eb748a5 commit 14308f9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
24 changes: 17 additions & 7 deletions source/fame/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,30 @@ subroutine readInput(net, Tlist, Plist, Tmin, Tmax, Pmin, Pmax, &
line = readMeaningfulLine()
call getFirstToken(line, token)
if (index(token, 'singleexpdown') /= 0) then
call processQuantity(line, units, net%bathGas%dEdown)
! Next three lines are alpha, T0, and n
line = readMeaningfulLine()
call processQuantity(line, units, net%bathGas%dEdown%alpha)
if (index(units(1:6), 'kj/mol') /= 0) then
net%bathGas%dEdown = net%bathGas%dEdown * 1000
net%bathGas%dEdown%alpha = net%bathGas%dEdown%alpha * 1000
elseif (index(units(1:7), 'cal/mol') /= 0) then
net%bathGas%dEdown = net%bathGas%dEdown * 4.184
net%bathGas%dEdown%alpha = net%bathGas%dEdown%alpha * 4.184
elseif (index(units(1:8), 'kcal/mol') /= 0) then
net%bathGas%dEdown = net%bathGas%dEdown * 4184
net%bathGas%dEdown%alpha = net%bathGas%dEdown%alpha * 4184
elseif (index(units(1:5), 'cm^-1') /= 0) then
net%bathGas%dEdown = net%bathGas%dEdown * 2.9979e10 * 6.626e-34 * 6.022e23
net%bathGas%dEdown%alpha = net%bathGas%dEdown%alpha * 2.9979e10 * 6.626e-34 * 6.022e23
elseif (index(units(1:5), 'j/mol') == 0) then
write (0, fmt='(a)') 'Invalid units for single exponential down parameter.'
write (0, fmt='(a)') 'Invalid units for single exponential down alpha parameter.'
stop
end if
line = readMeaningfulLine()
call processQuantity(line, units, net%bathGas%dEdown%T0)
if (index(units(1:5), 'k') == 0) then
write (0, fmt='(a)') 'Invalid units for single exponential down T0 parameter.'
stop
end if
write (1,fmt=*) "dEdown =", net%bathGas%dEdown, "J/mol"
line = readMeaningfulLine()
call getFirstToken(line, token)
read(token, *), net%bathGas%dEdown%n
else
write (0, fmt='(a)') 'Invalid collisional transfer probability model specification. Should be "SingleExpDown".'
stop
Expand Down
11 changes: 9 additions & 2 deletions source/fame/network.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,18 @@ module NetworkModule

implicit none

! dEdown = alpha * (T / T0)^n
type DeltaEDown
real(8) :: alpha
real(8) :: T0
real(8) :: n
end type

type GeneralData
real(8) :: molWt ! The molecular weight of the bath gas in kg/mol
real(8) :: sigma ! The Lennard-Jones sigma parameter of the bath gas in m
real(8) :: eps ! The Lennard-Jones epsilon parameter of the bath gas in J
real(8) :: dEdown ! Average energy transferred in a deactivating collision in J/mol
type(DeltaEDown) :: dEdown ! Average energy transferred in a deactivating collision in J/mol
end type

type SpectralData
Expand Down Expand Up @@ -1054,7 +1061,7 @@ subroutine network_applyApproximateMethod(net, nIsom, nReac, nProd, &
end do

! Average energy transferred in a deactivating collision
dEdown = net%bathGas%dEdown
dEdown = net%bathGas%dEdown%alpha * (T / net%bathGas%dEdown%T0) ** net%bathGas%dEdown%n

if (method == 1) then ! Modified strong collision

Expand Down

0 comments on commit 14308f9

Please sign in to comment.