https://github.com/cran/ReacTran
Tip revision: e1d00078210e32e7c6be83abec96f24e1c50b5f9 authored by Karline Soetaert on 12 June 2013, 00:00:00 UTC
version 1.4.1
version 1.4.1
Tip revision: e1d0007
fiadeiro.R
##==============================================================================
## The Fiadeiro and Veronis scheme: advective finite difference weights (AFDW)
##==============================================================================
fiadeiro <- function(v, D, dx.aux=NULL, grid=list(dx.aux=dx.aux)) {
Pe <- abs(v)*grid$dx.aux/D
sigma <- (1+(1/tanh(Pe)-1/Pe))/2
return(sigma)
}