PLUTO  4.0
 All Data Structures Files Functions Variables Enumerations Macros Pages
Functions
viscous_flux.c File Reference

Compute viscosity fluxes. More...

#include "pluto.h"

Functions

void ViscousFlux (Data_Arr V, real **ViF, real **ViS, double **dcoeff, int beg, int end, Grid *grid)
 Computes viscous fluxes and source terms for the HD/MHD equations.
 

Function Documentation

void ViscousFlux ( Data_Arr  V,
real **  ViF,
real **  ViS,
double **  dcoeff,
int  beg,
int  end,
Grid grid 
)
Parameters
[in]Vdata array containing cell-centered quantities
[in,out]ViFpointer to viscous fluxes
[in,out]ViSpointer to viscous source terms
[in,out]dcoeffpointer to diffusion coefficient for dt calculation
[in]beginteger, index for loop beg
[in]endinteger, index for loop end
[in]gridpointer to array of Grid structures
Returns
This function has no return value.

Calculates the stress tensor components (at the i+1/2 face of each cell) and adds explicit viscous terms to the energy and momentum equation. It is called in the during the sweep integrators. The stress tensor is given by

\[ T = \left( \begin{array}{ccc} T_{xx} & T_{xy} & T_{xz} \\ T_{yx} & T_{yy} & T_{yz} \\ T_{zx} & T_{zy} & T_{zz} \end{array}\right) \]

where $ T_{ij} = T_{ji}$ and the components are given by

$ T_{ij} = 2\,m\,e(ij) + (l - 2/3 m) \nabla\cdot {\bf V}\, \delta_{ij} $

where $ e(ij)= e_{ij}/(h_ih_j)$ and $ e_{ij} = 0.5( V_{i;j} + V_{j;i} ) $ whereas m,l are the first and second parameter of viscosity respectively

Author
Petros Tzeferacos (petro.nosp@m.s.tz.nosp@m.efera.nosp@m.cos@.nosp@m.ph.un.nosp@m.ito..nosp@m.it) & Andrea Mignone
Date
Nov 10th, 2010