We are hiring ! See our job offers.
https://github.com/cran/ReacTran
Revision 9100f830886add1b0881d43e25f1e88da3fdf95f authored by Karline Soetaert on 15 March 2011, 00:00:00 UTC, committed by Gabor Csardi on 15 March 2011, 00:00:00 UTC
1 parent e114557
Raw File
Tip revision: 9100f830886add1b0881d43e25f1e88da3fdf95f authored by Karline Soetaert on 15 March 2011, 00:00:00 UTC
version 1.3.1
Tip revision: 9100f83
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)
}

back to top