Shear-stress tensor

\(xx\) component

src/fluid/predict/txx.c
28const double vis_ux = + 0.5 * VISUX(i  , j  )
29                      + 0.5 * VISUX(i+1, j  );
30const double hx = HXXC(i  );
31const double dux = - UX(i  , j  )
32                   + UX(i+1, j  );
33const double lxx = 1. / hx * dux;
34TXX(i, j) = vis_ux * lxx + vis_ux * lxx;
src/fluid/predict/txx.c
42const double vis_ux = + 0.5 * VISUX(i  , j  , k  )
43                      + 0.5 * VISUX(i+1, j  , k  );
44const double hx = HXXC(i  );
45const double dux = - UX(i  , j  , k  )
46                   + UX(i+1, j  , k  );
47const double lxx = 1. / hx * dux;
48TXX(i, j, k) = vis_ux * lxx + vis_ux * lxx;

\(xy\) component

src/fluid/predict/txy.c
33const double vis_ux = + 0.5 * VISUX(i  , j-1)
34                      + 0.5 * VISUX(i  , j  );
35const double vis_uy = + 0.5 * VISUY(i-1, j  )
36                      + 0.5 * VISUY(i  , j  );
37const double hx = HXXF(i  );
38const double dux = - UX(i  , j-1)
39                   + UX(i  , j  );
40const double duy = - UY(i-1, j  )
41                   + UY(i  , j  );
42const double lxy = 1. / hy * dux;
43const double lyx = 1. / hx * duy;
44TXY(i, j) = vis_ux * lxy + vis_uy * lyx;
src/fluid/predict/txy.c
52const double vis_ux = + 0.5 * VISUX(i  , j-1, k  )
53                      + 0.5 * VISUX(i  , j  , k  );
54const double vis_uy = + 0.5 * VISUY(i-1, j  , k  )
55                      + 0.5 * VISUY(i  , j  , k  );
56const double hx = HXXF(i  );
57const double dux = - UX(i  , j-1, k  )
58                   + UX(i  , j  , k  );
59const double duy = - UY(i-1, j  , k  )
60                   + UY(i  , j  , k  );
61const double lxy = 1. / hy * dux;
62const double lyx = 1. / hx * duy;
63TXY(i, j, k) = vis_ux * lxy + vis_uy * lyx;

\(xz\) component

src/fluid/predict/txz.c
32const double vis_ux = + 0.5 * VISUX(i  , j  , k-1)
33                      + 0.5 * VISUX(i  , j  , k  );
34const double vis_uz = + 0.5 * VISUZ(i-1, j  , k  )
35                      + 0.5 * VISUZ(i  , j  , k  );
36const double hx = HXXF(i  );
37const double dux = - UX(i  , j  , k-1)
38                   + UX(i  , j  , k  );
39const double duz = - UZ(i-1, j  , k  )
40                   + UZ(i  , j  , k  );
41const double lxz = 1. / hz * dux;
42const double lzx = 1. / hx * duz;
43TXZ(i, j, k) = vis_ux * lxz + vis_uz * lzx;

\(yy\) component

src/fluid/predict/tyy.c
27const double vis_uy = + 0.5 * VISUY(i  , j  )
28                      + 0.5 * VISUY(i  , j+1);
29const double duy = - UY(i  , j  )
30                   + UY(i  , j+1);
31const double lyy = 1. / hy * duy;
32TYY(i, j) = vis_uy * lyy + vis_uy * lyy;
src/fluid/predict/tyy.c
40const double vis_uy = + 0.5 * VISUY(i  , j  , k  )
41                      + 0.5 * VISUY(i  , j+1, k  );
42const double duy = - UY(i  , j  , k  )
43                   + UY(i  , j+1, k  );
44const double lyy = 1. / hy * duy;
45TYY(i, j, k) = vis_uy * lyy + vis_uy * lyy;

\(yz\) component

src/fluid/predict/tyz.c
31const double vis_uy = + 0.5 * VISUY(i  , j  , k-1)
32                      + 0.5 * VISUY(i  , j  , k  );
33const double vis_uz = + 0.5 * VISUZ(i  , j-1, k  )
34                      + 0.5 * VISUZ(i  , j  , k  );
35const double duy = - UY(i  , j  , k-1)
36                   + UY(i  , j  , k  );
37const double duz = - UZ(i  , j-1, k  )
38                   + UZ(i  , j  , k  );
39const double lyz = 1. / hz * duy;
40const double lzy = 1. / hy * duz;
41TYZ(i, j, k) = vis_uy * lyz + vis_uz * lzy;

\(zz\) component

src/fluid/predict/tzz.c
26const double vis_uz = + 0.5 * VISUZ(i  , j  , k  )
27                      + 0.5 * VISUZ(i  , j  , k+1);
28const double duz = - UZ(i  , j  , k  )
29                   + UZ(i  , j  , k+1);
30const double lzz = 1. / hz * duz;
31TZZ(i, j, k) = vis_uz * lzz + vis_uz * lzz;