Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian@jauslin.org>2022-05-12 09:32:58 +0200
committerIan Jauslin <ian@jauslin.org>2022-05-12 09:32:58 +0200
commit35d91830a2548370f7ecbc13d42729cbc5d70cac (patch)
tree6bf968903a6adbfcdeced28c1dc5b83a88d0d032
parentcbf2b9854a4b87dae92c0234d4f1e82d170a1367 (diff)
Corrections in doc
-rw-r--r--docs/nstrophy_doc/nstrophy_doc.tex7
-rw-r--r--src/main.c8
2 files changed, 9 insertions, 6 deletions
diff --git a/docs/nstrophy_doc/nstrophy_doc.tex b/docs/nstrophy_doc/nstrophy_doc.tex
index 914b0b8..0ec222b 100644
--- a/docs/nstrophy_doc/nstrophy_doc.tex
+++ b/docs/nstrophy_doc/nstrophy_doc.tex
@@ -50,7 +50,7 @@ in terms of which, multiplying both sides of the equation by $\frac{k^\perp}{|k|
\partial_t\hat \varphi_k=
-4\pi^2\nu k^2\hat \varphi_k+\frac{k^\perp}{2i\pi|k|}\cdot\hat g_k
+\frac{4\pi^2}{|k|}\sum_{\displaystyle\mathop{\scriptstyle p,q\in\mathbb Z^2}_{p+q=k}}
- (q\cdot p^\perp)(k^\perp\cdot q^\perp)\hat\varphi_p\hat\varphi_q
+ \frac{(q\cdot p^\perp)(k^\perp\cdot q^\perp)}{|q||p|}\hat\varphi_p\hat\varphi_q
.
\label{ins_k}
\end{equation}
@@ -88,7 +88,7 @@ using a fast Fourier transform, defined as
\end{equation}
where
\begin{equation}
- \mathcal N:=\{(n_1,n_2),\ 0\leqslant n_1\leqslant N_1,\ 0\leqslant n_2\leqslant N_2\}
+ \mathcal N:=\{(n_1,n_2),\ 0\leqslant n_1< N_1,\ 0\leqslant n_2< N_2\}
\end{equation}
for some fixed $N_1,N_2$. The transform is inverted by
\begin{equation}
@@ -110,7 +110,8 @@ provided
\begin{equation}
N_i>4K_i.
\end{equation}
-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\in\mathcal K$, then $|p_i+q_i|\leqslant2K_i$. Therefore,
+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\in\mathcal K$, then $|p_i+q_i|\leqslant2K_i$.
+Therefore,
\begin{equation}
T(\hat\varphi,k)
=
diff --git a/src/main.c b/src/main.c
index 4b68f92..10b1e70 100644
--- a/src/main.c
+++ b/src/main.c
@@ -77,10 +77,12 @@ int read_args(int argc, const char* argv[], ns_params* params, unsigned int* nst
*nsteps=10000000;
params->nu=1./1024/(2*params->K+1);
*/
- params->K=3;
+ params->K=16;
params->h=0.0001220703125;
+ params->h=0.001953125;
*nsteps=10000000;
- params->nu=0.00048828125;
+ //params->nu=0.00048828125;
+ params->nu=0.0078125;
// loop over arguments
for(i=1;i<argc;i++){
@@ -291,7 +293,7 @@ int enstrophy(ns_params params, unsigned int Nsteps){
avg=avg-(avg-alpha)/t;
}
- if(t>0 && t%8192==0){
+ if(t>0 && t%1000==0){
fprintf(stderr,"%8d % .8e % .8e % .8e % .8e\n",t, __real__ avg, __imag__ avg, __real__ alpha, __imag__ alpha);
printf("%8d % .8e % .8e % .8e % .8e\n",t, __real__ avg, __imag__ avg, __real__ alpha, __imag__ alpha);
}