% $Id: notes.tex,v 1.21 2021/04/24 14:03:22 brandenb Exp $
%\documentclass{article}
\documentclass[twocolumn]{article}
\setlength{\textwidth}{160mm}
\setlength{\oddsidemargin}{-0mm}
\setlength{\textheight}{220mm}
\setlength{\topmargin}{-8mm}
\usepackage{graphicx,natbib,bm,url,color}
\graphicspath{{./fig/}{./png/}}
\thispagestyle{empty}
\input macros
\def\red{\textcolor{red}}
\def\blue{\textcolor{blue}}
\title{Gravitational waves from hydrodynamic instabilities}
\author{}
\date{\today,~ $ $Revision: 1.21 $ $}
\begin{document}
\maketitle

The compressible Navier-Stokes equation with an isothermal
equation of state can be written in the form
\begin{equation}
\frac{\partial\uu}{\partial t}=-\nab\left(h+\half\uu^2\right)
-\oo\times\uu+\ff+\FF_{\rm visc},
\end{equation}
\begin{equation}
\frac{\partial h}{\partial t}=-\uu\cdot\nab h-\cs^2\nab\cdot\uu,
\end{equation}
where
\begin{equation}
\FF_{\rm visc}=\nu\left(\nabla\uu^2+\nab\nab\cdot\uu+2\SSSS\cdot\nab\ln\rho\right)
\end{equation}
is the viscous force.

\section{Stationary forcing}

%\begin{itemize}\itemsep-0.2mm
%\item
%\end{itemize}

We adopt a generalized ABC-flow forcing
\begin{equation}
\ff=\frac{f_0}{\cal N}\pmatrix{
C\sin kz + \sigma B\cos ky \cr
A\sin kx + \sigma C\cos kz \cr
B\sin ky + \sigma A\cos kx }
\end{equation}
where ${\cal N}^2=(A^2+B^2+C^2)(1+\sigma^2)/2$ is a normalization
constant and $f_0=\bra{\ff^2}^{1/2}$ is the rms value of the forcing.
We define the Reynolds number as
\begin{equation}
\Rey=\urms/\nu\kf
\end{equation}
where $\kf=\sqrt{3}k$ is the effective forcing wavenumber.
For $\sigma=1$, we have the standard ABC flow, but we also
allow for other values with $-1\leq\sigma\leq1$.
The flow has positive (negative) helicity for $\sigma>0$
($<0$) and is fully helical for $\sigma=\pm1$.
For $\sigma=0$, we have the Archontis flow with zero helicity.
In particular, for $A=0$ and $B=C=0$, we have a Beltrami flow
when $\sigma=\pm1$ and the Kolmogorov flow for $\sigma=0$.

In the laminar phase, at small values of $\Rey$, the flow
is fully helical, i.e., the vorticity $\oo=\nab\times\uu$
is parallel to $\uu$ with $\oo=k\uu$.
Therefore, $\oo\times\uu=\bm0$, so the only nonlinearity
comes from the dynamical pressure term, $\uu^2/2$.
However, for the ABC flow forcing, $\uu^2=\const$.
Therefore, saturation occurs only when $\urms=f_0/\nu\kf^2$.
The temporal evolution is given by
\begin{equation}
%\half\frac{\dd}{\dd t}\bra{\uu^2}=\bra{\uu\cdot\ff}
%-\nu\bra{\oo^2}\quad\mbox{(laminar)}.
\frac{\dd}{\dd t}\urms=f_0-\nu\kf^2\urms\quad\mbox{(laminar)}.
\end{equation}
The solution is given by
\begin{equation}
\urms(t)=f_0\left(1-e^{-\nu\kf^2 t}\right).
\label{Saturation}
\end{equation}

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{paver}
\end{center}\caption[]{
Total kinetic energy (black),
kinetic energy in the $xy$-averaged velocity (red), and
kinetic energy in the $z$-averaged velocity (blue).
(\url{paver})
}\label{paver}\end{figure}

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{phel_256e}
\end{center}\caption[]{
Evolution of $\bra{\oo^2\uu^2}$ (black) and it contributions
$\bra{(\oo\cdot\uu)^2}$ (red) and $\bra{(\oo\times\uu)^2}$ (blue).
(\url{phel_256e})
}\label{phel_256e}\end{figure}

\begin{table}[htb]\caption{
}\vspace{12pt}\centerline{\begin{tabular}{lccccccc}
Run & $\nu$ & $f_0$ & Re \\
\hline
A &  $5\times10^{-2}$ &         0.1      &  25 \\%32b
B &         $10^{-3}$ & $2\times10^{-3}$ & 100 \\%256a (NaN at t=10, red f0)
B &         $10^{-3}$ & $5\times10^{-4}$ & 100 \\%256b (??)
C &  $5\times10^{-4}$ & $5\times10^{-4}$ &  25 \\%256c
C &  $5\times10^{-4}$ & $2\times10^{-4}$ &  25 \\%256d
C &  $2\times10^{-4}$ & $2\times10^{-4}$ &  25 \\%256e
C &  $5\times10^{-4}$ & $5\times10^{-4}$ &  25 \\%GW256c
\label{Ttimescale}\end{tabular}}\end{table}

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{presults}
\end{center}\caption[]{
Results
}\label{presults}\end{figure}

\begin{figure*}[h!]\begin{center}
\includegraphics[width=\textwidth]{pGW_vs_t_GW256i}
\end{center}\caption[]{
Results
}\label{pGW_vs_t_GW256i}\end{figure*}

\begin{table*}[htb]\caption{
}\vspace{12pt}\centerline{\begin{tabular}{lcccccccc}
Run & $\nu$ & $f_0$ & Re & $t_1$ & $\EEK^{\max}$ & $\EEGW^{\max}$ & $(\oo\times\uu)_{\rm rms}^{\max}$ & $(\nab\cdot\uu)^2_{\max}$\\
\hline
%A &  $1\times10^{-3}$ & $5\times10^{-4}$ &  -- &  894 & 0.037 & $2.1\times10^{-11}$ & 0.11 \\%GW256a
E &  $2\times10^{-4}$ & $2\times10^{-4}$ &  -- & 1121 & 0.017 & $9.0\times10^{-13}$ & 0.109 & $6.0\times10^{-5}$ \\%GW256e
B &  $1\times10^{-3}$ & $5\times10^{-4}$ &  -- &  894 & 0.037 & $2.1\times10^{-11}$ & 0.177 & $7.0\times10^{-4}$ \\%GW256b
H &  $5\times10^{-4}$ & $9\times10^{-4}$ &  -- &  553 & 0.066 & $1.3\times10^{-9 }$ & 0.372 & $7.8\times10^{-3}$ \\%GW256h
I &  $5\times10^{-4}$ & $8\times10^{-4}$ &  -- &  581 & 0.059 & $5.9\times10^{-10}$ & 0.318 & $3.7\times10^{-3}$ \\%GW256i
F &  $5\times10^{-4}$ & $7\times10^{-4}$ &  -- &  638 & 0.054 & $6.0\times10^{-10}$ & 0.259 & $1.9\times10^{-3}$ \\%GW256f
C &  $5\times10^{-4}$ & $5\times10^{-4}$ &  -- &  783 & 0.041 & $9.9\times10^{-11}$ & 0.215 & $7.6\times10^{-4}$ \\%GW256c
D &  $5\times10^{-4}$ & $2\times10^{-4}$ &  -- & 1348 & 0.017 & $5.0\times10^{-13}$ & 0.070 & $4.4\times10^{-5}$ \\%GW256d
K &  $5\times10^{-4}$ &$1.4\times10^{-4}$&  -- & 1653 & 0.0112& $1.3\times10^{-13}$ & 0.047 & $1.1\times10^{-5}$ \\%GW256k
G &  $5\times10^{-4}$ & $1\times10^{-4}$ &  -- & 2098 & 0.0076& $2.1\times10^{-14}$ & 0.026 & $3.2\times10^{-6}$ \\%GW256g
\label{Ttimescale}\end{tabular}}\end{table*}

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{pcomp_noise_sig0_GW128a}
\end{center}\caption[]{
Dependence on noise for the Kolmogorov flow.
}\label{pcomp_noise_sig0_GW128a}\end{figure}

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{presults_Kol}
\end{center}\caption[]{
Results for the Kolmogov flow.
}\label{presults_Kol}\end{figure}

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{t_noise}
%\includegraphics[width=\columnwidth]{t_noise.eps}
%AB: you can omit the ending (and the system can choose)
\end{center}\caption[]{
Time dependence of instability on Gaussian noise (kinetic drive)
}\label{t_noise}\end{figure}

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{dEdt}
\end{center}\caption[]{
Error dependence on time step (kinetic drive)
}\label{t_noise}\end{figure}

%1. GW, spectra
%2. compare w/ t-dependent forcing
%1b. same with weaker forcing
%1c. study dependence of instability onset on amplitude of Gaussian noise

%r e f
\begin{thebibliography}{}

\bibitem[Podvigina \& Pouquet(1994)]{PP94}
Podvigina, O., \& Pouquet, A.\yphyd{1994}{75}{471}
%{508}{On the non-linear stability of the 1:1:1 ABC flow}

\end{thebibliography}

\appendix
\section{Green's function}

Monochromatic
\EQ
\ddot{h}+k^2h=T
\EN
Solution
\EQ
h(t)=k^{-1}\int_0^t \sin k(t-t') \, T(t') \, \dd t'
\EN
The first derivative is
\EQ
\dot{h}(t)=\int_0^t \cos k(t-t') \, T(t') \, \dd t'
\EN
where the derivative on the integral boundary gives zero,
because the resulting term is proportional to 
Second derivative
\EQ
\ddot{h}(t)=T(t)-k\int_0^t \sin k(t-t') \, T(t') \, \dd t'
\EN
Let us now assume that $T(t)$ is given by $\uu^2$ using
\Eq{Saturation}, so that
\begin{equation}
h(t)=\frac{f_0^2}{k}\int_0^t \sin k(t-t') \, \left(1-e^{-2\nu\kf^2 t'}\right) \, \dd t'
\end{equation}
\begin{equation}
\dot{h}(t)=f_0^2\int_0^t \cos k(t-t') \, \left(1-e^{-2\nu\kf^2 t'}\right) \, \dd t'
\end{equation}
Using Ptolemy's identities,
\begin{equation}
\sin k(t-t')=\sin kt \cos kt' - \cos kt \sin kt',
\end{equation}
\begin{equation}
\cos k(t-t')=\cos kt \cos kt' - \sin kt \sin kt',
\end{equation}
and the integrals
\begin{equation}
\int_0^t \cos kt' e^{-2\nu\kf^2 t'} \, \dd t'
=\frac{e^{-2\nu\kf^2 t}}{\sqrt{\omega^2+4\nu^2\kf^4}}\cos(\omega t-\phi)
\end{equation}
\begin{equation}
\int_0^t \sin kt' e^{-2\nu\kf^2 t'} \, \dd t'
=\frac{e^{-2\nu\kf^2 t}}{\sqrt{\omega^2+4\nu^2\kf^4}}\sin(\omega t-\phi)
\end{equation}
where $\phi=-1/(1+\omega^2/4\nu^2\kf^4)^{1/2}$.
%We then find
%\begin{equation}
%h(t)=\frac{f_0^2}{k}\frac{e^{-2\nu\kf^2 t'}}{\sqrt{\omega^2+4\nu^2\kf^4}}
%\left[1-\sin\omega t\,\cos(\omega t-\phi)+\cos\omega t\,\sin(\omega t-\phi)\right]
%\end{equation}
%\begin{equation}
%\dot{h}(t)=-\frac{f_0^2}{k}\frac{e^{-2\nu\kf^2 t'}}{\sqrt{\omega^2+4\nu^2\kf^4}}
%\left[\cos\omega t\,\cos(\omega t-\phi)+\sin\omega t\,\sin(\omega t-\phi)\right]
%\end{equation}
Using again Ptolemy's identities, we find
\begin{equation}
h(t)=\frac{f_0^2}{k}\left(1-\frac{e^{-2\nu\kf^2 t}}{\sqrt{\omega^2+4\nu^2\kf^4}}
\sin\phi)\right),
\end{equation}
\begin{equation}
\dot{h}(t)=-\frac{f_0^2}{k}\frac{e^{-2\nu\kf^2 t}}{\sqrt{\omega^2+4\nu^2\kf^4}}\cos\phi.
\end{equation}

%\clearpage
%\section{Simple model}

%\begin{equation}
%\Psi(x,y,z,t)=\Psi_0\cos\kf x \, \cos \omega_{\rm f} t\, e^{-\xx^2/2R^2-t^2/2T^2}
%\end{equation}

%        fac=ampl_kinflow*exp(-(.5*(t-time_uukin)/tau_uukin)**2)*cos(omega_kinflow*t)
%!
%! uu
%!
%        if (lpenc_loc(i_uu)) then
%          fac2=.5/sigma_uukin**2
%          tmp_mn=fac*exp(-fac2*(x(l1:l2)**2+y(m)**2+z(n)**2))
%          p%uu(:,1)=- 2.*y(m    )*fac2*coskx                *tmp_mn
%          p%uu(:,2)=+(2.*x(l1:l2)*fac2*coskx+kx_uukin*sinkx)*tmp_mn
%          p%uu(:,3)=0.


%In the laminar phase, we have $\uu=\ff/\nu k^2$, so the resulting stress is
%proportional to $f_i f_j$, i.e.,
%\begin{equation}
%f_i f_j=\frac{f_0^2}{3}\pmatrix{
%(\sin kz + \cos ky)^2 & (\sin kz + \cos ky)(\sin kx + \cos kz) & (\sin kz + \cos ky)(\sin ky + \cos kx) \cr
%(\sin kx + \cos kz)(\sin kz + \cos ky) & (\sin kx + \cos kz)^2 & (\sin kx + \cos kz)(\sin ky + \cos kx) \cr
%(\sin ky + \cos kx)(\sin kz + \cos ky) & (\sin ky + \cos kx)(\sin kx + \cos kz) & (\sin ky + \cos kx)^2 }
%\end{equation}

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{pint_exp}
\end{center}\caption[]{
Evolution of $h$ (solid black and dashed blue)
and $\dot{h}$ (solid yellow and dashed red)
for $\gamma=0.1$, $T_0=0.1$, and $k=1$.
The solid lines indicate the numerical solution and
the dashed lines indicate the analytic solution.
}\label{pint_exp}\end{figure}

\section{Exponential growth}

Let us now assume that $T(t)$ is given by $T_0(k)\,e^{\gamma t}$, so that
\begin{equation}
h(t)=\frac{T_0(k)}{k}\int_0^t \sin k(t-t') \, e^{\gamma t'} \, \dd t'
\end{equation}
Using $\sin\phi=(e^{\ii\phi}-e^{-\ii\phi})/2\ii$, we have
\begin{equation}
h(t)=\frac{T_0(k)}{2\ii k}\int_0^t \left[
e^{(\gamma-\ii k)t'+\ii kt} -e^{(\gamma+\ii k)t'-\ii kt} 
\right] \dd t'
\end{equation}
Integrating between the two boundaries yields
\begin{equation}
h(t)=\frac{T_0(k)}{2\ii k} \left[
 \frac{e^{\gamma t}-e^{ \ii kt}}{\gamma-\ii k}
-\frac{e^{\gamma t}-e^{-\ii kt}}{\gamma+\ii k}
\right]
\end{equation}
Expanding this yields
\begin{eqnarray}
h(t)=\frac{T_0(k)}{2\ii k(\gamma^2+k^2)} \Big[
 (\gamma+\ii k)(e^{\gamma t}-e^{ \ii kt})\cr
-(\gamma-\ii k)(e^{\gamma t}-e^{-\ii kt})
\Big]
\end{eqnarray}
or
\begin{eqnarray}
h(t)=\frac{T_0(k)}{2\ii k(\gamma^2+k^2)} \Big[
 \gamma(e^{\gamma t}-e^{ \ii kt})
 +\ii k(e^{\gamma t}-e^{ \ii kt})\cr
-\gamma(e^{\gamma t}-e^{-\ii kt})
 +\ii k(e^{\gamma t}-e^{-\ii kt})
\Big]
\end{eqnarray}
or
\begin{eqnarray}
h(t)=\frac{T_0(k)}{2\ii k(\gamma^2+k^2)} \Big[
-\gamma(e^{ \ii kt}-e^{-\ii kt})
 +2\ii k e^{\gamma t}\cr
 -\ii k (e^{ \ii kt}+e^{-\ii kt})
\Big]
\end{eqnarray}
or
\begin{equation}
h(t)=\frac{T_0(k)}{k(\gamma^2+k^2)} \left(
-\gamma\sin kt
 +k e^{\gamma t}
 -k \cos kt
\right)
\end{equation}
and therefore
\begin{equation}
h(t)=\frac{T_0(k)}{\gamma^2+k^2} \left(
e^{\gamma t} -\cos kt -\frac{\gamma}{k}\sin kt
\right)
\end{equation}
with the derivative being
\begin{equation}
\dot{h}(t)=\frac{T_0(k)}{\gamma^2+k^2} \left[
\gamma\left(e^{\gamma t}-\cos kt\right)+k\sin kt \right]
\end{equation}

Delta correlated $T(k)\sim\delta(k)$ leads to $\Sp(T)\sim k^2$, and
$\delta(k)/k$ leads to $\Sp(T)\sim k^{-2}$.
In simulations with chiral magnetic effect, we have $\gamma=\eta\mu_0^2$,
so the critical $k$ is $k\sim\eta\mu_0^2/c$.

\begin{figure}[h!]\begin{center}
\includegraphics[width=\columnwidth]{anim_select}
\end{center}\caption[]{
Solid line: last time, dotted lines: last 20 times, dashed lines: early times
during growth phase, dashed-dotted lines: early decay phase.
}\label{anim_select}\end{figure}

\section{Numerical solution}

\Fig{anim_select} shows a numerical solution for an initial spectrum
of the source $\propto k^4/[1+(k/\kf)^6]$, where $\kf=20$ was chosen.
The time evolution of the source was $T=t$ for $0<t<1$ and
$1/[1+(t-1)/\tau]^2$ for $t>1$.

\vfill\bigskip\noindent\tiny\begin{verbatim}
$Header: /var/cvs/brandenb/tex/yutong/sound/notes.tex,v 1.21 2021/04/24 14:03:22 brandenb Exp $
\end{verbatim}

\end{document}
