programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions/Subroutines
diftnv.f90 File Reference

This function adds the explicit part of the diffusion terms with a symmetric tensor diffusivity for a transport equation of a vector field $ \vect{\varia} $. More...

Functions/Subroutines

subroutine diftnv (idtvar, ivar, nswrgp, imligp, ircflp, inc, imrgra, ivisep, ippu, iwarnp, epsrgp, climgp, relaxp, thetap, pvar, pvara, coefav, coefbv, cofafv, cofbfv, viscf, viscb, secvif, rhs)
 

Detailed Description

This function adds the explicit part of the diffusion terms with a symmetric tensor diffusivity for a transport equation of a vector field $ \vect{\varia} $.

More precisely, the right hand side $ \vect{Rhs} $ is updated as follows:

\[ \vect{Rhs} = \vect{Rhs} - \sum_{\fij \in \Facei{\celli}} \left( - \tens{\mu}_\fij \gradt_\fij \vect{\varia} \cdot \vect{S}_\ij \right) \]

Remark: if ivisep = 1, then we also take $ \mu \transpose{\gradt\vect{\varia}} + \lambda \trace{\gradt\vect{\varia}} $, where $ \lambda $ is the secondary viscosity, i.e. usually $ -\frac{2}{3} \mu $.

Warning:

Function/Subroutine Documentation

subroutine diftnv ( integer  idtvar,
integer  ivar,
integer  nswrgp,
integer  imligp,
integer  ircflp,
integer  inc,
integer  imrgra,
integer  ivisep,
integer  ippu,
integer  iwarnp,
double precision  epsrgp,
double precision  climgp,
double precision  relaxp,
double precision  thetap,
double precision, dimension (3 ,ncelet)  pvar,
double precision, dimension (3 ,ncelet)  pvara,
double precision, dimension(3 ,nfabor)  coefav,
double precision, dimension(3,3,nfabor)  coefbv,
double precision, dimension(3 ,nfabor)  cofafv,
double precision, dimension(3,3,nfabor)  cofbfv,
double precision, dimension (3,3,nfac)  viscf,
double precision, dimension (nfabor)  viscb,
double precision, dimension(nfac)  secvif,
double precision, dimension(3,ncelet)  rhs 
)
Parameters
[in]idtvarindicator of the temporal scheme
[in]ivarindex of the current variable
[in]nswrgpnumber of reconstruction sweeps for the gradients
[in]imligpclipping gradient method
  • < 0 no clipping
  • = 0 thank to neighbooring gradients
  • = 1 thank to the mean gradient
[in]ircflpindicator
  • 1 flux reconstruction,
  • 0 otherwise
[in]incindicator
  • 0 when solving an increment
  • 1 otherwise
[in]imrgraindicator
  • 0 iterative gradient
  • 1 least square gradient
[in]ivisepindicator to take $ \divv \left(\mu \gradt \transpose{\vect{a}} \right) -2/3 \grad\left( \mu \dive \vect{a} \right)$
  • 1 take into account,
[in]ippuindex of the variable for post-processing
[in]iwarnpverbosity
[in]epsrgprelative precision for the gradient reconstruction
[in]climgpclipping coeffecient for the computation of the gradient
[in]relaxpcoefficient of relaxation
[in]thetapweightening coefficient for the theta-schema,
  • thetap = 0: explicit scheme
  • thetap = 0.5: time-centred scheme (mix between Crank-Nicolson and Adams-Bashforth)
  • thetap = 1: implicit scheme
[in]pvarsolved variable (current time step)
[in]pvarasolved variable (previous time step)
[in]coefavboundary condition array for the variable (Explicit part)
[in]coefbvboundary condition array for the variable (Impplicit part)
[in]cofafvboundary condition array for the diffusion of the variable (Explicit part)
[in]cofbfvboundary condition array for the diffusion of the variable (Implicit part)
[in]viscf$ \tens{\mu}_\fij \dfrac{S_\fij}{\ipf \jpf} $ at interior faces for the r.h.s.
[in]viscb$ \dfrac{S_\fib}{\ipf \centf} $ at border faces for the r.h.s.
[in]secvifsecondary viscosity at interior faces
[in,out]rhsright hand side $ \vect{Rhs} $