Span-wise direction

\[ \begin{align}\begin{aligned}\pder{\rho \uz}{t} = & \dmomadv{\vz}{\vx} \dmomadv{\vz}{\vy} \dmomadv{\vz}{\vz}\\& \dmompre{\vz}\\& \dmomdif{\vz}{\vx} \dmomdif{\vz}{\vy} \dmomdif{\vz}{\vz}\end{aligned}\end{align} \]

Advection

\[\dmomadv{\vz}{\vx}\]
src/fluid/predict/uz.c
47const double hx_xm = HXXF(i  );
48const double hx_xp = HXXF(i+1);
49const double jd_xm = JDXF(i  );
50const double jd_x0 = JDXC(i  );
51const double jd_xp = JDXF(i+1);
52const double mux_xm = + 0.5 * jd_xm / hx_xm * FLUXX(i  , j  , k-1)
53                      + 0.5 * jd_xm / hx_xm * FLUXX(i  , j  , k  );
54const double mux_xp = + 0.5 * jd_xp / hx_xp * FLUXX(i+1, j  , k-1)
55                      + 0.5 * jd_xp / hx_xp * FLUXX(i+1, j  , k  );
56const double uz_xm = + 0.5 * UZ(i-1, j  , k  )
57                     + 0.5 * UZ(i  , j  , k  );
58const double uz_xp = + 0.5 * UZ(i  , j  , k  )
59                     + 0.5 * UZ(i+1, j  , k  );
60src[cnt] -= 1. / jd_x0 * (
61    - mux_xm * uz_xm
62    + mux_xp * uz_xp
63);
\[\dmomadv{\vz}{\vy}\]
src/fluid/predict/uz.c
81const double jd = JDXC(i  );
82const double muy_ym = + 0.5 * jd / hy * FLUXY(i  , j  , k-1)
83                      + 0.5 * jd / hy * FLUXY(i  , j  , k  );
84const double muy_yp = + 0.5 * jd / hy * FLUXY(i  , j+1, k-1)
85                      + 0.5 * jd / hy * FLUXY(i  , j+1, k  );
86const double uz_ym = + 0.5 * UZ(i  , j-1, k  )
87                     + 0.5 * UZ(i  , j  , k  );
88const double uz_yp = + 0.5 * UZ(i  , j  , k  )
89                     + 0.5 * UZ(i  , j+1, k  );
90src[cnt] -= 1. / jd * (
91    - muy_ym * uz_ym
92    + muy_yp * uz_yp
93);
\[\dmomadv{\vz}{\vz}\]
src/fluid/predict/uz.c
111const double jd = JDXC(i  );
112const double muz_zm = + 0.5 * jd / hz * FLUXZ(i  , j  , k-1)
113                      + 0.5 * jd / hz * FLUXZ(i  , j  , k  );
114const double muz_zp = + 0.5 * jd / hz * FLUXZ(i  , j  , k  )
115                      + 0.5 * jd / hz * FLUXZ(i  , j  , k+1);
116const double uz_zm = + 0.5 * UZ(i  , j  , k-1)
117                     + 0.5 * UZ(i  , j  , k  );
118const double uz_zp = + 0.5 * UZ(i  , j  , k  )
119                     + 0.5 * UZ(i  , j  , k+1);
120src[cnt] -= 1. / jd * (
121    - muz_zm * uz_zm
122    + muz_zp * uz_zp
123);

Pressure-gradient

\[\dmompre{\vz}\]
src/fluid/predict/uz.c
216src[cnt] -= 1. / hz * (
217    - P(i  , j  , k-1)
218    + P(i  , j  , k  )
219);

Diffusion

\[\dmomdif{\vz}{\vx}\]
src/fluid/predict/uz.c
142const double hx_xm = HXXF(i  );
143const double hx_xp = HXXF(i+1);
144const double jd_xm = JDXF(i  );
145const double jd_x0 = JDXC(i  );
146const double jd_xp = JDXF(i+1);
147const double txz_xm = TXZ(i  , j  , k  );
148const double txz_xp = TXZ(i+1, j  , k  );
149src[cnt] += diffusivity / jd_x0 * (
150    - jd_xm / hx_xm * txz_xm
151    + jd_xp / hx_xp * txz_xp
152);
\[\dmomdif{\vz}{\vy}\]
src/fluid/predict/uz.c
170const double jd = JDXC(i  );
171const double tyz_ym = TYZ(i  , j  , k  );
172const double tyz_yp = TYZ(i  , j+1, k  );
173src[cnt] += diffusivity / jd * (
174    - jd / hy * tyz_ym
175    + jd / hy * tyz_yp
176);
\[\dmomdif{\vz}{\vz}\]
src/fluid/predict/uz.c
194const double jd = JDXC(i  );
195const double tzz_zm = TZZ(i  , j  , k-1);
196const double tzz_zp = TZZ(i  , j  , k  );
197src[cnt] += diffusivity / jd * (
198    - jd / hz * tzz_zm
199    + jd / hz * tzz_zp
200);