= Solution
Use $\nu=Re^{-1}>0$, $\kappa=Pe^{-1}>0$, $\mathbf U=\overline{\mathbf u}+\mathbf u$, and $\Theta=\overline\theta+\theta$. Work along a sufficiently regular direct trajectory satisfying the given constraints. The zero spatial mean of the <scalar field> is conserved by <incompressible flow>, impermeable walls and zero scalar flux, so minimizing $J=(\Theta(T),\Theta(T))$ is equivalent to minimizing <scalar variance>, up to the fixed domain volume.
The printed functional fixes the initial state to a candidate $\mathbf u_0$; it contains no term that enforces its <kinetic energy>. For the optimization over that candidate, add the real <Lagrange multiplier> constraint
$$
\mathcal L_E=\mathcal L-\lambda\left[\frac12(\mathbf u_0,\mathbf u_0)-E_0\right].
$$
Equivalently, one can restrict all control variations to the <sphere in a normed vector space> of fixed <kinetic energy>. This term changes the initial-control optimality condition, not the interior adjoint equations.
Let $\mathbf v=\delta\mathbf u$, $\sigma=\delta\theta$ and $\pi=\delta p$. <Linearization> of the momentum and <scalar transport> residuals gives
$$
\delta F_u=\partial_t\mathbf v+\mathbf U\cdot\nabla\mathbf v
+\mathbf v\cdot\nabla\mathbf U+Ri_B\sigma\hat{\mathbf y}
+\nabla\pi-\nu\Delta\mathbf v,
$$
$$
\delta F_\theta=\partial_t\sigma+\mathbf U\cdot\nabla\sigma
+\mathbf v\cdot\nabla\Theta-\kappa\Delta\sigma.
$$
Both appearances of the perturbation <velocity> in the nonlinear momentum term have been differentiated. In particular, the coefficient is the <gradient> of the total <velocity>, not just the base shear.
For the negative-constraint convention of the functional, <integration by parts> gives the interior coefficients of $\mathbf v,\sigma,\pi$ as
$$
\begin{aligned}
A_u&=\partial_t\mathbf u^\dagger+\mathbf U\cdot\nabla\mathbf u^\dagger
-(\nabla\mathbf U)^T\mathbf u^\dagger+\nabla p^\dagger
+\nu\Delta\mathbf u^\dagger-\theta^\dagger\nabla\Theta,\\
A_\theta&=\partial_t\theta^\dagger+\mathbf U\cdot\nabla\theta^\dagger
+\kappa\Delta\theta^\dagger-Ri_Bu_y^\dagger,\\
A_p&=\nabla\cdot\mathbf u^\dagger.
\end{aligned}
$$
Thus the <adjoint equations for Boussinesq scalar mixing> are
$$
\boxed{A_u=0,\qquad A_\theta=0,\qquad \nabla\cdot\mathbf u^\dagger=0.}
$$
The transpose is essential: the $j$th component of $(\nabla\mathbf U)^T\mathbf u^\dagger$ is $\sum_i u_i^\dagger\partial_jU_i$. The coupling $-\theta^\dagger\nabla\Theta$ transposes advection of the scalar by a <velocity> perturbation; $-Ri_Bu_y^\dagger$ transposes <buoyancy> feedback. Dropping the latter would give a <passive scalar> adjoint, not the <active scalar> problem.
These equations are integrated backward, not forward. If $\tau=T-t$, they read
$$
\partial_\tau\mathbf u^\dagger=\mathbf U\cdot\nabla\mathbf u^\dagger
-(\nabla\mathbf U)^T\mathbf u^\dagger+\nabla p^\dagger
+\nu\Delta\mathbf u^\dagger-\theta^\dagger\nabla\Theta,
$$
$$
\partial_\tau\theta^\dagger=\mathbf U\cdot\nabla\theta^\dagger
+\kappa\Delta\theta^\dagger-Ri_Bu_y^\dagger,
$$
with direct coefficients evaluated at $t=T-\tau$. Both terms from the <diffusion equation> now have the usual forward sign in $\tau$. A <direct-adjoint looping> method stores or reconstructs the forward trajectory, solves these equations backward, and uses the initial adjoint as the control <gradient>. The endpoint and fixed-energy conditions below give necessary conditions for a local optimizer, not a global optimality theorem.
Back to article page