\section{Transport adjoint}


\def\A{{S}}
\def\B{{D}}
\def\V{{\cal V}}
\def\ta{t_s}
\def\tb{t_d}
\def\M{M}
\def\Mc{M^{\mathsf{ex.}}}
\def\ME{\mathcal{M}}
\def\MEc{\mathcal{M}^{\mathsf{ex.}}}
\def\q{c}
\def\m{q}
\def\S{\xi}
\def\aaa{{(\bf A)}}
\def\bbb{{(\bf B)}}
\def\C{\epsilon}
\def\cbar{\bar{c}}
\def\exbar{\bar{\epsilon}}
\def\exrbar{\bar{\epsilon}^*}
\def\grad{\vec{\mbox{grad}}}

\def\der#1\def\ex{\epsilon}
\def\ex{\epsilon}
\def\exr{\epsilon^*}
\def\xe{$^{133}$Xe }
\def\ba{${ ^{140}}$Ba }
\def\dix#1{10$^{#1}$}
\def\microbq{$\mu$Bq }
\def\m#1{$^{-#1}$}

% #2{\frac{\partial #1}{\partial #2}}
\def\dep#1{\left(#1\right)}
\def\depb#1{\left[#1\right]}
\def\dem{1/2}
\def\eq#1{Eq.~\ref{eq:#1}}
\def\fg#1{Fig.~\ref{fg:#1}}
\def\sec#1{Section~\ref{sec:#1}}
\def\dq{{\dep{\delta q}}}

\def\S{S}
\def\D{D}
\def\ts{t_s}
\def\td{t_d}
\def\vs{V_s}
\def\vd{V_d}
\def\ms{M_s}
\def\md{M_d}
\def\M{M}
\def\Mc{M^{\mathsf{ex.}}}
\def\ME{\mathcal{M}}
\def\MEc{\mathcal{M}^{\mathsf{ex.}}}
\def\c{c}
\def\q{q}
\def\dt#1{\frac{\partial #1}{\partial t}}
\def\C{\epsilon}
\def\k{\kappa}
\def\l{\lambda}
\def\g{\gamma}
\def\se{\sigma}
\def\pe{\pi}

\def\div#1{\mbox{div}\dep{#1}}
\def\divrhov#1{\div\dep\rho\vec{V}#1}
\def\drhodt#1{\frac{\partial \rho #1}{\partial t}}

\subsection{Adjoint derivation}

\def\cout{J}


We are now going to use the adjoint method
in order to derive the results of the previous section.
The measurement performed in the detector which,
for any solution $c$ of \eq{direct}, can be written as
\begin{equation}\label{eq:cout}
\cout=\int_{\Omega\times\tau} \rho \mu c  \ \dxdt
\end{equation}
depends linearly on the concentration $c$, which itself depends
linearly not only on the emission $\sigma$ but also on the possible lateral
inflow of tracer. That inflow occurs along the {\em inflow
boundary} $\domegai$ of the physical domain $\Omega$ under
consideration, \ie\  along the part of the boundary $\domega$
along which the velocity $\V$ is directed towards the interior of
$\Omega$ ($\V.\n<0$ where $\n$ is the unit outward normal vector).

The adjoint method defines a general approach to explicitly determine the 
link between any observable quantity (here $J$) and any input parameter
(here the source and lateral inflow of tracers).
It is implemented here as follows.
Equation~(\ref{eq:direct}) is introduced in  \eq{cout} as
\begin{eqnarray}
\cout&=&\int_{\Omega\times\tau} \rho \mu c \  \dxdt\nonumber
\\\label{eq:adjun}
&-&\int_{\Omega\times\tau} \rho c^* \depb{\dt{c}+\V.\grad c
+\lambda c-\sigma}\ \dxdt
\end{eqnarray}
where the function $c^*\dep{\x,t}$ (which is basically a Lagrange multiplier)
is to be defined.

Let us transform through integration by parts the advective part in
\eq{adjun}:
\begin{eqnarray}\label{eq:adjdeux}
I&=&\int_{\Omega\times\tau} \rho c^* \depb{\dt{c}+\V.\grad c} \dxdt\\
 &=&\int_{\Omega}\depb{\rho c^* c}_{t_i}^{t_f} \dx\nonumber
+\int_\tau \depb{\rho\V c^* c.\n}_{\domega} dt\\
&-& \int_{\Omega\times\tau} c \depb{\dt{\rho c^*}+\div{\rho\V c^*}}\dxdt
\end{eqnarray}

One recognizes here the conservative flux form of
the continuity equation for $c^*$ which can be transformed into
its advective form by using the continuity equation
\begin{equation}\label{eq:conserv}
\dt{\rho}+\div{\rho \V}=0
\end{equation}
so that, after rearangement of terms,
\begin{eqnarray}\label{eq:adjtrois}
\cout&=&\int_{\Omega\times\tau} \rho c^* \sigma \ \dxdt\nonumber\\
 &-&\int_{\Omega}\depb{\rho c^* c}_{t_i}^{t_f} \dx
-\int_\tau \depb{\rho\V c^*  c.\n}_{\domega} dt\nonumber\\
&+&\int_{\Omega\times\tau} \rho c \depb{\dt{c^*}+\V.\grad c^*-\lambda c^*+\mu}
\ \dxdt
\end{eqnarray}

By taking for $c^*$ the solution of \eq{retro} defined by the condition
that $c^*=0$ at time $t_f$ and along the outflow boundary
$\domegao$ ($\V.\n>0$), we finally obtain
\begin{equation}\label{eq:adjquatre}
\cout=
 \int_{\Omega} {\rho c^* c}_{|_{t_i}} \dx
-\int_\tau \depb{\rho\V c^*  c.\n}_{{\domega}_i} dt
+\int_{\Omega\times\tau} \rho  c^*  \sigma \ \dxdt
\end{equation}
which explicitly expresses $\cout$ as a function of the initial condition
$c$ at $t_i$, of the tracer inflow $\rho\V c.\n_{|\domegai}$ and
of the tracer emission $\sigma$. 
The corresponding multiplicative factors 
depend linearly on the adjoint variable $c^*$, which turns out to be identical
to the {\em retro-tracer} concentration introduced in the previous section.

In the more general case of a nonlinear evolution equation and/or
observable, it would have been necessary
\cite[as shown for instance by ][]{Tala:87} to consider first order
perturbations $\delta c$, $\delta\sigma$ and $\delta J$ in place
of $c$, $\sigma$ and $\cout$. The analogue of \eq{adjquatre} would
then provide local
sensitivities of $J$ with respect to input parameters. Those
sensitivities would still depend linearly on the adjoint variable.

Coming back to our original problem,
with a tracer injected at time $\ts$ (with
$c=0$ before time $\ts$) and no lateral inflow of tracer,
\eq{adjquatre} reduces to
\begin{equation}
\cout=\int_{\Omega\times\tau}\rho\mu c\dxdt=
            \int_{\Omega\times\tau}\rho \sigma c^*\dxdt
\end{equation}
which completes the mathematical proof or the reciprocity principle
(\ref{eq:princip1}).



Note that with exactly the same algebra, it can be shown that for a conservative
tracer ($\lambda=0$ and $\depb{\rho\V c.\n}_{{\domega}_i}=0$),
and for times at which no emission nor measurement occurs, 
\begin{equation}
\frac{d}{dt} \int_{\Omega} \rho c c^* \dx=0
\end{equation}
At any time, $\int_{\Omega} \rho c c^* \dxdt$ is an evaluation of
the measurement as a combination of the distribution
of tracer coming from the source $S$
and of the distribution of the air which will be
sampled later on at time $\td$ in the detector.

It is seen that the advective equation
\begin{equation}
\frac{\partial c}{\partial t}+\V.\grad\ c=0
\end{equation}
is identical with its own adjoint with respect to the air-weighted scalar
product~(\ref{eq:scalarproduct}).
That property directly results from the conservation of the mass of air.
It was mentioned by \cite{Tala:87} that, if a linear evolution equation
conserves a scalar product in time,  then that equation is identical
with its adjoint with respect to the conserved scalar product.
The proof is as follows. 
\def\scalg#1{\left[#1\right]}
Let us consider an equation of the form
\begin{equation}\label{eq:directg}
\frac{d c }{dt}=Lc
\end{equation}
where $c$ is a state vector and $L$ a linear operator. The adjoint
equation of \eq{directg} with respect to a given scalar product
$\scalg{ , }$ reads
\begin{equation}\label{eq:adjointg}
-\frac{d c^*}{dt}=L^*c^*
\end{equation}
Let us assume that the scalar product is conserved by \eq{directg}
meaning that for any solution $c$ of \eq{directg}, the quantity
$\scalg{c,c}$ is constant in time, so that
\begin{eqnarray}
0
&=&\frac{d}{dt}\scalg{c,c}\\
&=&\scalg{\frac{dc}{dt},c}+\scalg{c,\frac{dc}{dt}}\\
&=&\scalg{Lc,c}+\scalg{c,Lc}\\
&=&\scalg{\dep{L+L^*}c,c}
\end{eqnarray}
Thus, being true for any $c$, implies $L+L^*=0$,
which shows that \eq{directg} and \eq{adjointg} are identical.

In the case of pure advection, the tracer massic concentration $c$ is conserved
for any air mass element $dm=\rho\dx$. This means
that the quantity $\int\rho c^2\dx$ where the integral is taken over a 
given mass of air, is conserved in time. It results that the advection equation
is self adjoint with respect to the scalar product (\ref{eq:scalarproduct}).

In the adjoint derivation above, it is the presence of the density $\rho$ in
the second integral in \eq{adjun} which allows to take advantage of the
conservation of mass (\ref{eq:conserv}) and to obtain the exact symmetry between
\eq{retro} and \eq{direct}.




