Solution (source code)

= Solution

Write $c_i=v_i-u_i$ and introduce the raw third <velocity moment> $M_{ijk}$ and the <third central velocity moment> $Q_{ijk}$:
$$
M_{ijk}=\int v_iv_jv_kf\,d^3v,\qquad \boxed{Q_{ijk}=\int c_ic_jc_kf\,d^3v.}
$$
The expansion of their product gives
$$
M_{ijk}=\rho u_iu_ju_k+u_iP_{jk}+u_jP_{ik}+u_kP_{ij}+Q_{ijk}.
$$
The <heat flux> is $q_i=Q_{ijj}/2$ for unit <mass>.

Multiply the <BGK model> by $v_iv_j$. The external <force> term is
$$
-\partial_kU\int v_iv_j\partial_{v_k}f\,d^3v=\rho(u_j\partial_iU+u_i\partial_jU).
$$
Therefore the raw second <velocity moment> satisfies
$$
\partial_t\Pi_{ij}+\partial_kM_{ijk}=-\rho(u_i\partial_jU+u_j\partial_iU)-\frac{\Pi_{ij}-\Pi_{ij}^{(0)}}{\tau}.
$$
The matching <local Maxwellian> has $\Pi_{ij}^{(0)}=\rho u_iu_j+\rho\Theta\delta_{ij}$, so
$$
\Pi_{ij}-\Pi_{ij}^{(0)}=P_{ij}-P_{ij}^{(0)},\qquad P_{ij}^{(0)}=\rho\Theta\delta_{ij}.
$$
To remove the bulk motion, let $D_t=\partial_t+u_k\partial_k$ be the <material derivative>. The <continuity equation> and the <momentum conservation> equation imply
$$
\rho D_tu_i=-\partial_kP_{ik}-\rho\partial_iU,
$$
and hence
$$
\partial_t(\rho u_iu_j)+\partial_k(\rho u_iu_ju_k)=-u_j\partial_kP_{ik}-u_i\partial_kP_{jk}-\rho(u_i\partial_jU+u_j\partial_iU).
$$
Subtract this identity from the raw second <velocity moment> equation and insert the expansion of $M_{ijk}$. The terms $u_i\partial_kP_{jk}$ and $u_j\partial_kP_{ik}$ cancel by the <product rule>. The external <force> terms also cancel, since a common acceleration changes the local <mean velocity> without directly changing the relative <velocities>. What remains is
$$
\boxed{\partial_tP_{ij}+\partial_k(u_kP_{ij}+Q_{ijk})+P_{ik}\partial_ku_j+P_{jk}\partial_ku_i=-\frac{P_{ij}-\rho\Theta\delta_{ij}}{\tau}.}
$$
The trace of the relaxation term is zero because $P_{ii}=3\rho\Theta$. Thus the <BGK model> relaxes anisotropy of the <pressure tensor> while preserving the local random <kinetic energy>. The evolution is still a <velocity-moment hierarchy>, since $Q_{ijk}$ requires further information about $f$.