From d69f386547d6f1170a9d6f49a14e3e914cf6f8e3 Mon Sep 17 00:00:00 2001
From: Ian Jauslin <ian.jauslin@rutgers.edu>
Date: Fri, 31 Mar 2023 15:40:15 -0400
Subject: Doc: reversible equation

---
 docs/nstrophy_doc/nstrophy_doc.tex | 177 ++++++++++++++++++++++++-------------
 1 file changed, 116 insertions(+), 61 deletions(-)

(limited to 'docs/nstrophy_doc/nstrophy_doc.tex')

diff --git a/docs/nstrophy_doc/nstrophy_doc.tex b/docs/nstrophy_doc/nstrophy_doc.tex
index 35c42ec..ae571ef 100644
--- a/docs/nstrophy_doc/nstrophy_doc.tex
+++ b/docs/nstrophy_doc/nstrophy_doc.tex
@@ -22,38 +22,45 @@
 \subsection{Irreversible equation}
 \indent Consider the incompressible Navier-Stokes equation in 2 dimensions
 \begin{equation}
-  \partial_tu=\nu\Delta u+g-(u\cdot\nabla)u,\quad
-  \nabla\cdot u=0
+  \partial_tU=\nu\Delta U+G-(U\cdot\nabla)U,\quad
+  \nabla\cdot U=0
   \label{ins}
 \end{equation}
-in which $g$ is the forcing term and $w$ is the pressure.
-We take periodic boundary conditions, so, at every given time, $u(t,\cdot)$ is a function on the torus $\mathbb T^2:=\mathbb R^2/(L\mathbb Z)^2$. We represent $u(t,\cdot)$ using its Fourier series
+in which $G$ is the forcing term.
+We take periodic boundary conditions, so, at every given time, $U(t,\cdot)$ is a function on the torus $\mathbb T^2:=\mathbb R^2/(L\mathbb Z)^2$. We represent $U(t,\cdot)$ using its Fourier series
 \begin{equation}
-  \hat u_k(t):=\frac1{L^2}\int_{\mathbb T^2}dx\ e^{i\frac{2\pi}L kx}u(t,x)
+  \hat U_k(t):=\frac1{L^2}\int_{\mathbb T^2}dx\ e^{i\frac{2\pi}L kx}U(t,x)
 \end{equation}
 for $k\in\mathbb Z^2$, and rewrite~\-(\ref{ins}) as
 \begin{equation}
-  \partial_t\hat u_k=
-  -\frac{4\pi^2}{L^2}\nu k^2\hat u_k+\hat g_k
+  \partial_t\hat U_k=
+  -\frac{4\pi^2}{L^2}\nu k^2\hat U_k+\hat G_k
   -i\frac{2\pi}L\sum_{\displaystyle\mathop{\scriptstyle p,q\in\mathbb Z^2}_{p+q=k}}
-  (q\cdot\hat u_p)\hat u_q
+  (q\cdot\hat U_p)\hat U_q
   ,\quad
-  k\cdot\hat u_k=0
+  k\cdot\hat U_k=0
   \label{ins_k}
 \end{equation}
 We then reduce the equation to a scalar one, by writing
 \begin{equation}
-  \hat u_k=\frac{i2\pi k^\perp}{L|k|}\hat\varphi_k\equiv\frac{i2\pi}{L|k|}(-k_y\hat\varphi_k,k_x\hat\varphi_k)
+  \hat U_k=\frac{i2\pi k^\perp}{L|k|}\hat u_k\equiv\frac{i2\pi}{L|k|}(-k_y\hat u_k,k_x\hat u_k)
+  \label{udef}
 \end{equation}
 in terms of which, multiplying both sides of the equation by $\frac L{i2\pi}\frac{k^\perp}{|k|}$,
 \begin{equation}
-  \partial_t\hat \varphi_k=
-  -\frac{4\pi^2}{L^2}\nu k^2\hat \varphi_k+\frac{Lk^\perp}{2i\pi|k|}\cdot\hat g_k
+  \partial_t\hat u_k=
+  -\frac{4\pi^2}{L^2}\nu k^2\hat u_k
+  +\hat g_k
   +\frac{4\pi^2}{L^2|k|}\sum_{\displaystyle\mathop{\scriptstyle p,q\in\mathbb Z^2}_{p+q=k}}
-  \frac{(q\cdot p^\perp)(k^\perp\cdot q^\perp)}{|q||p|}\hat\varphi_p\hat\varphi_q
-  .
+  \frac{(q\cdot p^\perp)(k^\perp\cdot q^\perp)}{|q||p|}\hat u_p\hat u_q
   \label{ins_k}
 \end{equation}
+with
+\begin{equation}
+  \hat g_k:=\frac{Lk^\perp}{2i\pi|k|}\cdot\hat G_k
+  .
+  \label{gdef}
+\end{equation}
 Furthermore
 \begin{equation}
   (q\cdot p^\perp)(k^\perp\cdot q^\perp)
@@ -62,14 +69,14 @@ Furthermore
 \end{equation}
 and $q\cdot p^\perp$ is antisymmetric under exchange of $q$ and $p$. Therefore,
 \begin{equation}
-  \partial_t\hat \varphi_k=
-  -\frac{4\pi^2}{L^2}\nu k^2\hat \varphi_k+\frac{Lk^\perp}{2i\pi|k|}\cdot\hat g_k
+  \partial_t\hat u_k=
+  -\frac{4\pi^2}{L^2}\nu k^2\hat u_k+\hat g_k
   +\frac{4\pi^2}{L^2|k|}\sum_{\displaystyle\mathop{\scriptstyle p,q\in\mathbb Z^2}_{p+q=k}}
-  \frac{(q\cdot p^\perp)|q|}{|p|}\hat\varphi_p\hat\varphi_q
+  \frac{(q\cdot p^\perp)|q|}{|p|}\hat u_p\hat u_q
   .
   \label{ins_k}
 \end{equation}
-We truncate the Fourier modes and assume that $\hat\varphi_k=0$ if $|k_1|>K_1$ or $|k_2|>K_2$. Let
+We truncate the Fourier modes and assume that $\hat u_k=0$ if $|k_1|>K_1$ or $|k_2|>K_2$. Let
 \begin{equation}
   \mathcal K:=\{(k_1,k_2),\ |k_1|\leqslant K_1,\ |k_2|\leqslant K_2\}
   .
@@ -78,9 +85,10 @@ We truncate the Fourier modes and assume that $\hat\varphi_k=0$ if $|k_1|>K_1$ o
 
 \point{\bf FFT}. We compute the last term in~\-(\ref{ins_k})
 \begin{equation}
-  T(\hat\varphi,k):=
+  T(\hat u,k):=
   \sum_{\displaystyle\mathop{\scriptstyle p,q\in\mathbb Z^2}_{p+q=k}}
-  \frac{(q\cdot p^\perp)|q|}{|p|}\hat\varphi_q\hat\varphi_p
+  \frac{(q\cdot p^\perp)|q|}{|p|}\hat u_q\hat u_p
+  \label{T}
 \end{equation}
 using a fast Fourier transform, defined as
 \begin{equation}
@@ -99,12 +107,12 @@ in which $\mathcal F^*$ is defined like $\mathcal F$ but with the opposite phase
 
 \indent The condition $p+q=k$ can be rewritten as
 \begin{equation}
-  T(\hat\varphi,k)
+  T(\hat u,k)
   =
   \sum_{p,q\in\mathcal K}
   \frac1{N_1N_2}
   \sum_{n\in\mathcal N}e^{-\frac{2i\pi}{N_1}n_1(p_1+q_1-k_1)-\frac{2i\pi}{N_2}n_2(p_2+q_2-k_2)}
-  (q\cdot p^\perp)\frac{|q|}{|p|}\hat\varphi_q\hat\varphi_p
+  (q\cdot p^\perp)\frac{|q|}{|p|}\hat u_q\hat u_p
 \end{equation}
 provided
 \begin{equation}
@@ -113,16 +121,16 @@ provided
 Indeed, $\sum_{n_i=0}^{N_i}e^{-\frac{2i\pi}{N_i}n_im_i}$ vanishes unless $m_i=0\%N_i$ (in which $\%N_i$ means `modulo $N_i$'), and, if $p,q,k\in\mathcal K$, then $|p_i+q_i-k_i|\leqslant3K_i$, so, as long as $N_i>3K_i$, then $(p_i+q_i-k_i)=0\%N_i$ implies $p_i+q_i=k_i$.
 Therefore,
 \begin{equation}
-  T(\hat\varphi,k)
+  T(\hat u,k)
   =
   \textstyle
   \frac1{N_1N_2}
   \mathcal F^*\left(
-    \mathcal F\left(\frac{p_x\hat\varphi_p}{|p|}\right)(n)
-    \mathcal F\left(q_y|q|\hat\varphi_q\right)(n)
+    \mathcal F\left(\frac{p_x\hat u_p}{|p|}\right)(n)
+    \mathcal F\left(q_y|q|\hat u_q\right)(n)
     -
-    \mathcal F\left(\frac{p_y\hat\varphi_p}{|p|}\right)(n)
-    \mathcal F\left(q_x|q|\hat\varphi_q\right)(n)
+    \mathcal F\left(\frac{p_y\hat u_p}{|p|}\right)(n)
+    \mathcal F\left(q_x|q|\hat u_q\right)(n)
   \right)(k)
 \end{equation}
 \bigskip
@@ -130,32 +138,32 @@ Therefore,
 \point{\bf Energy}.
 We define the energy as
 \begin{equation}
-  E(t)=\frac12\int\frac{dx}{L^2}\ u^2(t,x)=\frac12\sum_{k\in\mathbb Z^2}|\hat u_k|^2
+  E(t)=\frac12\int\frac{dx}{L^2}\ U^2(t,x)=\frac12\sum_{k\in\mathbb Z^2}|\hat U_k|^2
   .
 \end{equation}
 We have
 \begin{equation}
-  \partial_t E=\int\frac{dx}{L^2}\ u\partial tu
+  \partial_t E=\int\frac{dx}{L^2}\ U\partial tU
   =
-  \nu\int\frac{dx}{L^2}\ u\Delta u
-  +\int\frac{dx}{L^2}\ ug
-  -\int\frac{dx}{L^2}\ u(u\cdot\nabla)u
+  \nu\int\frac{dx}{L^2}\ U\Delta U
+  +\int\frac{dx}{L^2}\ UG
+  -\int\frac{dx}{L^2}\ U(U\cdot\nabla)U
   .
 \end{equation}
 Since we have periodic boundary conditions,
 \begin{equation}
-  \int dx\ u\Delta u=-\int dx\ |\nabla u|^2
+  \int dx\ U\Delta U=-\int dx\ |\nabla U|^2
   .
 \end{equation}
 Furthermore,
 \begin{equation}
-  I:=\int dx\ u(u\cdot\nabla)u
-  =\sum_{i,j=1,2}\int dx\ u_iu_j\partial_ju_i
+  I:=\int dx\ U(U\cdot\nabla)U
+  =\sum_{i,j=1,2}\int dx\ U_iU_j\partial_jU_i
   =
-  -\sum_{i,j=1,2}\int dx\ (\partial_ju_i)u_ju_i
-  -\sum_{i,j=1,2}\int dx\ u_i(\partial_ju_j)u_i
+  -\sum_{i,j=1,2}\int dx\ (\partial_jU_i)U_jU_i
+  -\sum_{i,j=1,2}\int dx\ U_i(\partial_jU_j)U_i
 \end{equation}
-and since $\nabla\cdot u=0$,
+and since $\nabla\cdot U=0$,
 \begin{equation}
   I
   =
@@ -165,64 +173,64 @@ and so $I=0$.
 Thus,
 \begin{equation}
   \partial_t E=
-  \int\frac{dx}{L^2}\ \left(-\nu|\nabla u|^2+ug\right)
+  \int\frac{dx}{L^2}\ \left(-\nu|\nabla U|^2+UG\right)
   =
-  \sum_{k\in\mathbb Z^2}\left(-\frac{4\pi^2}{L^2}\nu k^2|\hat u_k|^2+\hat u_{-k}\hat g_k\right)
+  \sum_{k\in\mathbb Z^2}\left(-\frac{4\pi^2}{L^2}\nu k^2|\hat U_k|^2+\hat U_{-k}\hat G_k\right)
   .
 \end{equation}
 Furthermore,
 \begin{equation}
-  \sum_{k\in\mathbb Z^2}k^2|\hat u_k|^2\geqslant
-  \sum_{k\in\mathbb Z^2}|\hat u_k|^2-|\hat u_0|^2
-  =2E-|\hat u_0|^2
+  \sum_{k\in\mathbb Z^2}k^2|\hat U_k|^2\geqslant
+  \sum_{k\in\mathbb Z^2}|\hat U_k|^2-|\hat U_0|^2
+  =2E-|\hat U_0|^2
 \end{equation}
 so
 \begin{equation}
-  \partial_t E\leqslant -\frac{8\pi^2}{L^2}\nu E+\frac{4\pi^2}{L^2}\nu\hat u_0^2+\sum_{k\in\mathbb Z^2}\hat u_{-k}\hat g_k
+  \partial_t E\leqslant -\frac{8\pi^2}{L^2}\nu E+\frac{4\pi^2}{L^2}\nu\hat U_0^2+\sum_{k\in\mathbb Z^2}\hat U_{-k}\hat G_k
   \leqslant
-  -\frac{8\pi^2}{L^2}\nu E+\frac{4\pi^2}{L^2}\nu\hat u_0^2+
-  \|\hat g\|_2\sqrt{2E}
+  -\frac{8\pi^2}{L^2}\nu E+\frac{4\pi^2}{L^2}\nu\hat U_0^2+
+  \|\hat G\|_2\sqrt{2E}
   .
 \end{equation}
-In particular, if $\hat u_0=0$ (which corresponds to keeping the center of mass fixed),
+In particular, if $\hat U_0=0$ (which corresponds to keeping the center of mass fixed),
 \begin{equation}
-  \partial_t E\leqslant -\frac{8\pi^2}{L^2}\nu E+\|\hat g\|_2\sqrt{2E}
+  \partial_t E\leqslant -\frac{8\pi^2}{L^2}\nu E+\|\hat G\|_2\sqrt{2E}
   .
 \end{equation}
-Now, if $\frac{8\pi^2}{L^2}\nu\sqrt E<\sqrt2\|\hat g\|_2$, then
+Now, if $\frac{8\pi^2}{L^2}\nu\sqrt E<\sqrt2\|\hat G\|_2$, then
 \begin{equation}
-  \frac{\partial_t E}{-\frac{8\pi^2}{L^2}\nu E+\|\hat g\|_2\sqrt{2E}}\leqslant1
+  \frac{\partial_t E}{-\frac{8\pi^2}{L^2}\nu E+\|\hat G\|_2\sqrt{2E}}\leqslant1
 \end{equation}
 and so
 \begin{equation}
-  \frac{\log(1-\frac{8\pi^2\nu}{L^2\sqrt2\|\hat g\|_2}\sqrt{E(t)})}{-\frac{4\pi^2}{L^2}\nu}\leqslant t+
-  \frac{\log(1-\frac{8\pi^2\nu}{L^2\sqrt2\|\hat g\|_2}\sqrt{E(0)})}{-\frac{4\pi^2}{L^2}\nu}
+  \frac{\log(1-\frac{8\pi^2\nu}{L^2\sqrt2\|\hat G\|_2}\sqrt{E(t)})}{-\frac{4\pi^2}{L^2}\nu}\leqslant t+
+  \frac{\log(1-\frac{8\pi^2\nu}{L^2\sqrt2\|\hat G\|_2}\sqrt{E(0)})}{-\frac{4\pi^2}{L^2}\nu}
 \end{equation}
 and
 \begin{equation}
   E(t)
   \leqslant
   \left(
-    \frac{L^2\sqrt2\|\hat g\|_2}{8\pi^2\nu}(1-e^{-\frac{4\pi^2}{L^2}\nu t})
+    \frac{L^2\sqrt2\|\hat G\|_2}{8\pi^2\nu}(1-e^{-\frac{4\pi^2}{L^2}\nu t})
     +e^{-\frac{4\pi^2}{L^2}\nu t}\sqrt{E(0)}
   \right)^2
   .
 \end{equation}
-If $\frac{8\pi^2}{L^2}\nu\sqrt E>\sqrt2\|\hat g\|_2$,
+If $\frac{8\pi^2}{L^2}\nu\sqrt E>\sqrt2\|\hat G\|_2$,
 \begin{equation}
-  \frac{\partial_t E}{-\frac{8\pi^2}{L^2}\nu E+\|\hat g\|_2\sqrt{2E}}\geqslant1
+  \frac{\partial_t E}{-\frac{8\pi^2}{L^2}\nu E+\|\hat G\|_2\sqrt{2E}}\geqslant1
 \end{equation}
 and so
 \begin{equation}
-  \frac{\log(\frac{8\pi^2\nu}{L^2\sqrt2\|\hat g\|_2}\sqrt{E(t)}-1)}{-\frac{4\pi^2}{L^2}\nu}\geqslant t+
-  \frac{\log(\frac{8\pi^2\nu}{L^2\sqrt2\|\hat g\|_2}\sqrt{E(0)})-1}{-\frac{4\pi^2}{L^2}\nu}
+  \frac{\log(\frac{8\pi^2\nu}{L^2\sqrt2\|\hat G\|_2}\sqrt{E(t)}-1)}{-\frac{4\pi^2}{L^2}\nu}\geqslant t+
+  \frac{\log(\frac{8\pi^2\nu}{L^2\sqrt2\|\hat G\|_2}\sqrt{E(0)})-1}{-\frac{4\pi^2}{L^2}\nu}
 \end{equation}
 and
 \begin{equation}
   E(t)
   \leqslant
   \left(
-    \frac{L^2\sqrt2\|\hat g\|_2}{8\pi^2\nu}(1-e^{-\frac{4\pi^2}{L^2}\nu t})
+    \frac{L^2\sqrt2\|\hat G\|_2}{8\pi^2\nu}(1-e^{-\frac{4\pi^2}{L^2}\nu t})
     +e^{-\frac{4\pi^2}{L^2}\nu t}\sqrt{E(0)}
   \right)^2
   .
@@ -232,17 +240,64 @@ and
 \point{\bf Enstrophy}.
 The enstrophy is defined as
 \begin{equation}
-  \mathcal En(t)=\int\frac{dx}{L^2}\ |\nabla u|^2
-  =\frac{4\pi^2}{L^2}\sum_{k\in\mathbb Z^2}k^2|\hat u_k|^2
+  \mathcal En(t)=\int\frac{dx}{L^2}\ |\nabla U|^2
+  =\frac{4\pi^2}{L^2}\sum_{k\in\mathbb Z^2}k^2|\hat U_k|^2
   .
 \end{equation}
 \bigskip
 
 \point{\bf Numerical instability}.
 In order to prevent the algorithm from blowing up, it is necessary to impose the reality of $u(x)$ by hand, otherwise, truncation errors build up, and lead to divergences.
-It is sufficient to ensure that the convolution term $T(\hat\varphi,k)$ satifies $T(\hat\varphi,-k)=T(\hat\varphi,k)^*$.
+It is sufficient to ensure that the convolution term $T(\hat u,k)$ satisfies $T(\hat u,-k)=T(\hat u,k)^*$.
 After imposing this condition, the algorithm no longer blows up, but it is still unstable (for instance, increasing $K_1$ or $K_2$ leads to very different results).
 
+\subsection{Reversible equation}
+\indent The reversible equation is similar to\-~(\ref{ins}) but instead of fixing the viscosity, we fix the enstrophy\-~\cite{Ga22}.
+It is defined directly in Fourier space:
+\begin{equation}
+  \partial_t\hat U_k=
+  -\frac{4\pi^2}{L^2}\alpha(\hat U) k^2\hat U_k+\hat G_k
+  -i\frac{2\pi}L\sum_{\displaystyle\mathop{\scriptstyle p,q\in\mathbb Z^2}_{p+q=k}}
+  (q\cdot\hat U_p)\hat U_q
+  ,\quad
+  k\cdot\hat U_k=0
+\end{equation}
+where $\alpha$ is chosen such that the enstrophy is constant.
+In terms of $\hat u$\-~(\ref{udef}), (\ref{gdef}), (\ref{T}):
+\begin{equation}
+  \partial_t\hat u_k=
+  -\frac{4\pi^2}{L^2}\alpha(\hat u) k^2\hat u_k
+  +\hat g_k
+  +\frac{4\pi^2}{L^2|k|}T(\hat u,k)
+  .
+  \label{rns_k}
+\end{equation}
+To compute $\alpha$, we use the constancy of the enstrophy:
+\begin{equation}
+  \sum_{k\in\mathbb Z^2}k^2\hat U_k\cdot\partial_t\hat U_k
+  =0
+\end{equation}
+which, in terms of $\hat u$ is
+\begin{equation}
+  \sum_{k\in\mathbb Z^2}k^2\hat u_k\partial_t\hat u_k
+  =0
+\end{equation}
+that is
+\begin{equation}
+  \frac{4\pi^2}{L^2}\alpha(\hat u)\sum_{k\in\mathbb Z^2}k^4\hat u_k^2
+  =
+  \sum_{k\in\mathbb Z^2}k^2\hat u_k\hat g_k
+  +\frac{4\pi^2}{L^2}\sum_{k\in\mathbb Z^2}|k|\hat u_kT(\hat u,k)
+\end{equation}
+and so
+\begin{equation}
+  \alpha(\hat u)
+  =\frac{\frac{L^2}{4\pi^2}\sum_k k^2\hat u_k\hat g_k+\sum_k|k|\hat u_kT(\hat u,k)}{\sum_kk^4\hat u_k^2}
+  .
+\end{equation}
+
+
+
 \vfill
 \eject
 
-- 
cgit v1.2.3-70-g09d2

