Skip to content
Snippets Groups Projects
Commit 9980813f2c41 authored by vlabarre's avatar vlabarre
Browse files

kh spectra instead of kx spectra + definition of fluxes

parent c5c2efe0146b
1 merge request!62022strat_turb_polo!
Our dataset can be used to do several parametric studies. In this section, we perform such an analysis to identify different regimes in the $(F_h, \R)$ parameters-space, and analyze their spectral and mixing properties. These regimes differ in particular in their isotropy and mixing properties.
\subsection{Large and small-scale isotropy}
\label{sec:res-isotropy}
......@@ -167,6 +168,47 @@
\subsection{Spectral analysis}
\label{sec:res-spectral}
\subsubsection{Spectral energy budget}
\label{seb}
The kinetic energy and potential energy budget for one Fourier mode read
\begin{equation}
\label{eq:seb}
\left\langle \frac{1}{2}\frac{\mathrm{d} |\vvk|^2}{\mathrm{d}t} \right \rangle = \mathcal{I}_{\rm K} + \mathcal{T}_{\rm K} - \mathcal{B} - \epsK ~~~~ \text{and} ~~~~ \left\langle \frac{1}{2N^2}\frac{\mathrm{d}|\bbk|^2}{\mathrm{d}t} \right\rangle = \mathcal{T}_{\rm A} + \mathcal{B} - \epsA,
\end{equation}
\noindent where
\begin{align}
\nonumber
\mathcal{I}_{\rm K} = \left\langle Re \left( \ffk \cdot \vvk^* \right) \right \rangle, \quad & \quad \mathcal{T}_{\rm K} = - \left\langle Re \left( \vvk^* \cdot \left[ \bar{\bar{P}} \cdot (\widehat{\vv \cdot \bnabla \vv}) \right] \right) \right\rangle, \\
\mathcal{T}_{\rm A} = - \left\langle Re \left( \hat{b}^* (\widehat{\vv \cdot \bnabla b}) \right) / N^2 \right\rangle, \quad & \quad \mathcal{B} = - \left\langle Re \left( \hat{v}_z^* \bbk \right) \right\rangle, \\
\nonumber
\epsK = (\nu k^2 + \nu_4 k^4) \frac{|\vvk|^2}{2}, \quad & \quad \epsA = (\kappa k^2 + \kappa_4 k^4) \frac{|\bbk|^2}{2N^2}
\end{align}
\noindent are respectively the kinetic energy injection, the kinetic energy transfer, the potential energy transfer, the conversion of kinetic energy to potential energy, kinetic energy dissipation, and potential energy dissipation rates for a given mode. In this section, we study azimutal average of the energy budget. Namely, we computed the following quantities:
\begin{equation}
F(k_h, k_z) = \frac{1}{\delta k_h ~ \delta k_z} \mathop{\sum \sum}_{\substack{k_h \leq k_h'< k_h + \delta k_h \\ k_z \leq |k_z'| < k_z + \delta k_z}} ~ F_{\kk'},
\end{equation}
\noindent where $F$ can be $E_{\rm A}$, $E_{\rm polo}$, $E_{\rm toro}$, $E_{\rm K} = E_{\rm polo} + E_{\rm toro}$, $\mathcal{T}_{\rm K}$, $\mathcal{T}_{\rm A}$, $\mathcal{T} = \mathcal{T}_{\rm K} + \mathcal{T}_{\rm A}$, $\mathcal{B}$, $\epsK$, $\epsA$, or $\varepsilon = \epsK + \epsA$. The (integrated) one dimensional spectra correspond to \\
\begin{equation}
\label{eq:1dspectra}
F(k_h) = \delta k_z ~ \sum\limits_{k_z} ~ F(k_h, k_z) ~~~~ \text{and} ~~~~ F(k_z) = \delta k_h ~ \sum\limits_{k_h} ~ F(k_h, k_z).
\end{equation}
\noindent In the statistically steady state ($\langle \mathrm{d} \cdot / \mathrm{d}t \rangle = 0$) and away of the forcing region ($\mathcal{I} = 0$), the energy budget (\ref{eq:seb}) leads to $\mathcal{T}_K - \mathcal{B} - \epsK = 0$ and $\mathcal{T}_A + \mathcal{B} - \epsA = 0$, meaning that for each $(k_h, k_z)$ the energy is transfered, converted, or dissipated.
Finally, the one-dimensional kinetic and potential energy fluxes are defined as
\begin{align}
\label{eq:1dkineticflux}
\Pi_{\rm K}(k_h) = \delta k_h ~ \delta k_z ~ \mathop{\sum \sum}_{k_z', k_h' \leq k_h} ~ \mathcal{T}_{{\rm K}}(k_h', k_z'), \quad & \quad \Pi_{\rm K}(k_z) = \delta k_h ~ \delta k_z ~ \mathop{\sum \sum}_{k_h', k_z' \leq k_z} ~ \mathcal{T}_{{\rm K}}(k_h', k_z'), \\
\Pi_{\rm A}(k_h) = \delta k_h ~ \delta k_z ~ \mathop{\sum \sum}_{k_z', k_h' \leq k_h} ~ \mathcal{T}_{{\rm A}}(k_h', k_z'), \quad & \quad \Pi_{\rm A}(k_z) = \delta k_h ~ \delta k_z ~ \mathop{\sum \sum}_{k_h', k_z' \leq k_z} ~ \mathcal{T}_{{\rm A}}(k_h', k_z').
\end{align}
\subsubsection{One dimensional spectra vs $(F_h, \R)$}
\begin{figure}
......@@ -292,36 +334,7 @@
\subsubsection{2D spectra in the LAST regime}
To have a better evaluation of anisotropy in stratified turbulence, it is important to look at 2D $(k_h,k_z)$ energy spectra and energy budget \cite{Yokoyama-Takaoka2019}. The kinetic energy and potential energy budget for one Fourier mode read
\begin{equation}
\label{eq:seb}
\left\langle \frac{1}{2}\frac{\mathrm{d} |\vvk|^2}{\mathrm{d}t} \right \rangle = \mathcal{I}_{\rm K} + \mathcal{T}_{\rm K} - \mathcal{B} - \epsK ~~~~ \text{and} ~~~~ \left\langle \frac{1}{2N^2}\frac{\mathrm{d}|\bbk|^2}{\mathrm{d}t} \right\rangle = \mathcal{T}_{\rm A} + \mathcal{B} - \epsA,
\end{equation}
where
\begin{align}
\nonumber
\mathcal{I}_{\rm K} = \left\langle Re \left( \ffk \cdot \vvk^* \right) \right \rangle, \quad & \quad \mathcal{T}_{\rm K} = - \left\langle Re \left( \vvk^* \cdot \left[ \bar{\bar{P}} \cdot (\widehat{\vv \cdot \bnabla \vv}) \right] \right) \right\rangle, \\
\mathcal{T}_{\rm A} = - \left\langle Re \left( \hat{b}^* (\widehat{\vv \cdot \bnabla b}) \right) / N^2 \right\rangle, \quad & \quad \mathcal{B} = - \left\langle Re \left( \hat{v}_z^* \bbk \right) \right\rangle, \\
\nonumber
\epsK = (\nu k^2 + \nu_4 k^4) \frac{|\vvk|^2}{2}, \quad & \quad \epsA = (\kappa k^2 + \kappa_4 k^4) \frac{|\bbk|^2}{2N^2}
\end{align}
are respectively the kinetic energy injection, the kinetic energy transfer, the potential energy transfer, the conversion of kinetic energy to potential energy, kinetic energy dissipation, and potential energy dissipation rates for a given mode. In this section, we study azimutal average of the energy budget. Namely, we computed the following quantities:
\begin{equation}
F(k_h, k_z) = \frac{1}{\delta k_h ~ \delta k_z} \mathop{\sum \sum}_{\substack{k_h \leq k_h'< k_h + \delta k_h \\ k_z \leq |k_z'| < k_z + \delta k_z}} ~ F_{\kk'},
\end{equation}
where $F$ can be $E_{\rm A}$, $E_{\rm polo}$, $E_{\rm toro}$, $E_{\rm K} = E_{\rm polo} + E_{\rm toro}$, $\mathcal{T}_{\rm K}$, $\mathcal{T}_{\rm A}$, or $\mathcal{B}$. The (integrated) one dimensional spectra correspond to \\
\begin{equation}
\label{eq:1dspectra}
F(k_h) = \delta k_z ~ \sum\limits_{k_z} ~ F(k_h, k_z) ~~~~ \text{and} ~~~~ F(k_z) = \delta k_h ~ \sum\limits_{k_h} ~ F(k_h, k_z).
\end{equation}
In the statistically steady state ($\langle \mathrm{d} \cdot / \mathrm{d}t \rangle = 0$) and away of the forcing region ($\mathcal{I} = 0$), the energy budget (\ref{eq:seb}) leads to $\mathcal{T}_K - \mathcal{B} - \epsK = 0$ and $\mathcal{T}_A + \mathcal{B} - \epsA = 0$, meaning that for each $(k_h, k_z)$ the energy is transfered, converted, or dissipated.
To have a better evaluation of anisotropy in stratified turbulence, it is important to look at 2D $(k_h,k_z)$ energy spectra and energy budget \cite{Yokoyama-Takaoka2019}.
To assess the degree of non-linearity of the flow at each $(k_h,k_z)$, it is now common to use the non linearity parameter, corresponding the ratio between the period of the linear waves to the eddy turnover time \cite{Nazarenko-Schekochihin2011, Meyrand-etal2016, Yokoyama-Takaoka2019, Yokoyama-Takaoka2021}. We define it as
......
......@@ -8,7 +8,7 @@
from util_simuls_1couple import simuls
from util_dataframe_N40_Ri20 import df
from util import save_fig
from util import save_fig, compute_kf_kb_ko_keta_kd
cm = matplotlib.cm.get_cmap("inferno", 100)
......@@ -19,14 +19,6 @@
# Compute forcing, buoyancy, and Ozmidov wavevectors
imax = len(df["N"]) - 1
N = df.iloc[imax]["N"]
R2 = df.iloc[imax]["R2"]
Uh2 = df.iloc[imax]["Uh2"]
kb = N / Uh2**0.5
epsK = df.iloc[imax]["epsK"]
ko = (N**3 / epsK) ** 0.5
keta = ko * R2**0.75
nx = df.iloc[imax]["nx"]
nz = df.iloc[imax]["nz"]
Gamma = nz / nx
......@@ -46,7 +38,40 @@
nh = sim.params.oper.nx
nhs.append(nh)
tmin = max(10, min(t_start + 2, t_last - 1))
data = sim.output.spectra.load1d_mean(tmin)
k = data["kx"]
data = sim.output.spectra.load_kzkh_mean(tmin)
kf, kb, ko, keta, kd = compute_kf_kb_ko_keta_kd(sim, tmin)
kh = data["kh_spectra"]
kz = data["kz"]
data = sim.output.spectra.load_kzkh_mean(
tmin, key_to_load=["A", "Khd", "Kz", "Khr"]
)
kh = data["kh_spectra"]
kz = data["kz"]
delta_kh = kh[1]
delta_kz = kz[1]
KH, KZ = np.meshgrid(kh, kz)
EA = data["A"]
EKhd = data["Khd"]
EKz = data["Kz"]
EKhr = data["Khr"]
Epolo = EKhd + EKz
Etoro = EKhr
EKh = EKhr + EKhd
Epolo_vs_kh = np.sum(Epolo, axis=0) * delta_kz
Epolo_vs_kz = np.sum(Epolo, axis=1) * delta_kh
Etoro_vs_kh = np.sum(Etoro, axis=0) * delta_kz
Etoro_vs_kz = np.sum(Etoro, axis=1) * delta_kh
EK_vs_kh = Epolo_vs_kh + Etoro_vs_kh
EK_vs_kz = Epolo_vs_kz + Etoro_vs_kz
EA_vs_kh = np.sum(EA, axis=0) * delta_kz
EA_vs_kz = np.sum(EA, axis=1) * delta_kh
color = cm(k_max_eta / 1.2)
ax0.plot(
......@@ -51,7 +76,7 @@
color = cm(k_max_eta / 1.2)
ax0.plot(
k,
data["spectra_E_kx"] * k ** (5 / 3),
kh,
EK_vs_kh * kh ** (5 / 3),
label=rf"$k_{{\rm max}} \eta={k_max_eta:.2f}$",
color=color,
)
......@@ -55,8 +80,6 @@
label=rf"$k_{{\rm max}} \eta={k_max_eta:.2f}$",
color=color,
)
k = data["kz"]
ax1.plot(k, data["spectra_E_kz"] * k ** (5 / 3), color=color)
ax1.plot(kz, EK_vs_kz * kz ** (5 / 3), color=color)
......@@ -61,4 +84,4 @@
ax0.set_xlabel(r"$k_x$", fontsize=14)
ax0.set_xlabel(r"$k_h$", fontsize=14)
ax1.set_xlabel(r"$k_z$", fontsize=14)
......@@ -64,5 +87,5 @@
ax1.set_xlabel(r"$k_z$", fontsize=14)
ax0.set_ylabel(r"$E_{\rm K}(k_x) {k_x}^{5/3}$", fontsize=14)
ax0.set_ylabel(r"$E_{\rm K}(k_h) {k_h}^{5/3}$", fontsize=14)
ax0.fill_betweenx([1e-2, 6], kfh_min, kfh_max, color="gray", alpha=0.5)
ax1.set_ylabel(r"$E_{\rm K}(k_z) {k_z}^{5/3}$", fontsize=14)
ax1.fill_betweenx([1e-2, 6], kfz_min, kfz_max, color="gray", alpha=0.5)
......@@ -80,7 +103,7 @@
ax.set_xscale("log")
ax.set_yscale("log")
ax0.set_ylim(bottom=1e-2, top=1)
ax0.set_ylim(bottom=1e-2, top=6)
ax1.set_ylim(bottom=1e-2, top=6)
fig.tight_layout()
......
......@@ -394,6 +394,12 @@
ax.set_yticks([])
# Annotate lines
ax0.text(2e1, 6e2, r"$\chi_d = 1$", color="m", fontsize=12)
ax0.text(4e2, 1e1, r"$\chi_d = 1$", color="c", fontsize=12)
ax0.text(6e1, 1e1, r"$k = k_{\rm b}$", color="c", fontsize=12)
fig.tight_layout()
fig.subplots_adjust(right=0.85)
......
......@@ -34,5 +34,5 @@
tmin = max(10, min(t_start + 2, t_last - 1))
data = sim.output.spectra.load1d_mean(tmin)
data = sim.output.spectra.load_kzkh_mean(tmin)
kf, kb, ko, keta, kd = compute_kf_kb_ko_keta_kd(sim, tmin)
......@@ -38,3 +38,9 @@
kf, kb, ko, keta, kd = compute_kf_kb_ko_keta_kd(sim, tmin)
kx = data["kx"]
kh = data["kh_spectra"]
kz = data["kz"]
data = sim.output.spectra.load_kzkh_mean(
tmin, key_to_load=["A", "Khd", "Kz", "Khr"]
)
kh = data["kh_spectra"]
kz = data["kz"]
......@@ -40,12 +46,27 @@
kz = data["kz"]
spectra_toro_kx = data["spectra_Khr_kx"]
spectra_polo_kx = data["spectra_Khd_kx"] + data["spectra_vz_kx"]
spectra_pot_kx = data["spectra_A_kx"]
spectra_toro_kz = data["spectra_Khr_kz"]
spectra_polo_kz = data["spectra_Khd_kz"] + data["spectra_vz_kz"]
spectra_pot_kz = data["spectra_A_kz"]
delta_kh = kh[1]
delta_kz = kz[1]
KH, KZ = np.meshgrid(kh, kz)
EA = data["A"]
EKhd = data["Khd"]
EKz = data["Kz"]
EKhr = data["Khr"]
Epolo = EKhd + EKz
Etoro = EKhr
EKh = EKhr + EKhd
Epolo_vs_kh = np.sum(Epolo, axis=0) * delta_kz
Epolo_vs_kz = np.sum(Epolo, axis=1) * delta_kh
Etoro_vs_kh = np.sum(Etoro, axis=0) * delta_kz
Etoro_vs_kz = np.sum(Etoro, axis=1) * delta_kh
EA_vs_kh = np.sum(EA, axis=0) * delta_kz
EA_vs_kz = np.sum(EA, axis=1) * delta_kh
ax.set_xscale("log")
ax.set_yscale("log")
ax.plot(
......@@ -47,8 +68,8 @@
ax.set_xscale("log")
ax.set_yscale("log")
ax.plot(
kx,
spectra_polo_kx * kx ** (coef_compensate),
kh,
Epolo_vs_kh * kh ** (coef_compensate),
"-g",
......@@ -54,4 +75,4 @@
"-g",
label=r"$E_{\rm polo}(k_x)$",
label=r"$E_{\rm polo}(k_h)$",
)
ax.plot(
......@@ -56,5 +77,5 @@
)
ax.plot(
kx,
spectra_toro_kx * kx ** (coef_compensate),
kh,
Etoro_vs_kh * kh ** (coef_compensate),
"-r",
......@@ -60,3 +81,3 @@
"-r",
label=r"$E_{\rm toro}(k_x)$",
label=r"$E_{\rm toro}(k_h)$",
)
......@@ -62,6 +83,4 @@
)
ax.plot(
kx, spectra_pot_kx * kx ** (coef_compensate), "-b", label=r"$E_{\rm A}(k_x)$"
)
ax.plot(kh, EA_vs_kh * kh ** (coef_compensate), "-b", label=r"$E_{\rm A}(k_h)$")
ax.plot(
kz,
......@@ -66,8 +85,8 @@
ax.plot(
kz,
spectra_polo_kz * kz ** (coef_compensate),
Epolo_vs_kz * kz ** (coef_compensate),
"--g",
label=r"$E_{\rm polo}(k_z)$",
)
ax.plot(
kz,
......@@ -69,9 +88,9 @@
"--g",
label=r"$E_{\rm polo}(k_z)$",
)
ax.plot(
kz,
spectra_toro_kz * kz ** (coef_compensate),
Etoro_vs_kz * kz ** (coef_compensate),
"--r",
label=r"$E_{\rm toro}(k_z)$",
)
......@@ -75,9 +94,7 @@
"--r",
label=r"$E_{\rm toro}(k_z)$",
)
ax.plot(
kz, spectra_pot_kz * kz ** (coef_compensate), "--b", label=r"$E_{\rm A}(k_z)$"
)
ax.plot(kz, EA_vs_kz * kz ** (coef_compensate), "--b", label=r"$E_{\rm A}(k_z)$")
# Plot k^-2 and k^-3
k = np.array([2e1, 8e2])
......@@ -95,8 +112,8 @@
color="gray",
label=None,
)
ax.text(5e2, 3.0, r"$\propto k^{-2}$", fontsize=14, color="gray")
ax.text(3.5e2, 1e-2, r"$\propto k^{-3}$", fontsize=14, color="gray")
ax.text(3e2, 3.0, r"$\propto k_i^{-2}$", fontsize=14, color="gray")
ax.text(3e2, 1e-2, r"$\propto k_i^{-3}$", fontsize=14, color="gray")
if letter == "W":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment