https://github.com/cran/ReacTran
Raw File
Tip revision: 6a2a464424c6eaca2ee6747a2ff1fc6e15105936 authored by Karline Soetaert on 24 December 2014, 00:00 UTC
version 1.4.2
Tip revision: 6a2a464
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