R/fiadeiro.R

Defines functions fiadeiro

Documented in fiadeiro

##==============================================================================
## 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)
}

Try the ReacTran package in your browser

Any scripts or data that you put into this service are public.

ReacTran documentation built on Dec. 18, 2019, 3:12 a.m.