Skip to content
Snippets Groups Projects
Commit c22adbaf authored by Pierre Augier's avatar Pierre Augier
Browse files

2022strat_turb_toro: better figs

parent d144f653
Branches
No related tags found
1 merge request!72022strat_turb_toro: text
Showing
with 102 additions and 45 deletions
......@@ -357,7 +357,7 @@
Figure~\ref{fig:isotropy-coefficients} ...
\subsection{Ratio of integral scales, velocities and energies}
\subsection{Ratio of integral scales and velocities}
\begin{figure}
\centerline{
......@@ -366,13 +366,9 @@
\includegraphics[width=0.48\textwidth]{%
../tmp/fig_ratio_length_scales_vs_Fh}
}
\centerline{
\includegraphics[width=0.48\textwidth]{%
../tmp/fig_ratio_EA_EK_vs_Fh}
}
\caption{Ratio of ... \label{fig:ratio-vs-Fh}}
\caption{Ratio of integral scales and velocities \label{fig:ratio-vs-Fh}}
\end{figure}
Figure~\ref{fig:ratio-vs-Fh} ...
......@@ -374,9 +370,9 @@
\end{figure}
Figure~\ref{fig:ratio-vs-Fh} ...
\subsection{Mixing coefficient}
\subsection{Mixing coefficient and energy ratio}
\begin{figure}
\centerline{
......@@ -380,5 +376,5 @@
\begin{figure}
\centerline{
\includegraphics[width=0.7\textwidth]{%
\includegraphics[width=0.48\textwidth]{%
../tmp/fig_mixing_coef_vs_FhR}
......@@ -384,2 +380,4 @@
../tmp/fig_mixing_coef_vs_FhR}
\includegraphics[width=0.48\textwidth]{%
../tmp/fig_ratio_EA_EK_vs_FhR}
}
......@@ -385,5 +383,5 @@
}
\caption{Mixing coefficient. \label{fig:mixing-coefficients-vs-FhR}}
\caption{Mixing coefficient (a) and ratio $E_A/E_K$ (b). \label{fig:mixing-coefficients-vs-FhR}}
\end{figure}
Figure~\ref{fig:mixing-coefficients-vs-FhR} ...
......@@ -391,5 +389,5 @@
\begin{figure}
\centerline{
\includegraphics[width=0.7\textwidth]{%
\includegraphics[width=0.48\textwidth]{%
../tmp/fig_mixing_coef_vs_Fh}
......@@ -395,4 +393,6 @@
../tmp/fig_mixing_coef_vs_Fh}
\includegraphics[width=0.48\textwidth]{%
../tmp/fig_ratio_EA_EK_vs_Fh}
}
\caption{Mixing coefficient versus the horizontal Froude number. The colors represent
$\R_2$. Red letters correspond to simulations of table~\ref{table-simuls-regimes}
......@@ -413,5 +413,5 @@
\begin{figure}
\centerline{
\includegraphics[width=0.48\textwidth]{%
../tmp/fig_spectra_regime_D}
../tmp/fig_spectra_regime_V}
\includegraphics[width=0.48\textwidth]{%
......@@ -417,3 +417,3 @@
\includegraphics[width=0.48\textwidth]{%
../tmp/fig_ratio_spectra_regime_D}
../tmp/fig_ratio_spectra_regime_V}
}
......@@ -419,6 +419,6 @@
}
\caption{Spectra and ratio of spectra for simulation D (see
table~\ref{table-simuls-regimes}) corresponding to the dissipative regime.
\label{fig:spectra-D}}
\caption{Spectra and ratio of spectra for simulation V (see
table~\ref{table-simuls-regimes}) corresponding to the viscosity affected regime.
\label{fig:spectra-V}}
\end{figure}
......@@ -423,7 +423,7 @@
\end{figure}
Figure~\ref{fig:spectra-D} ...
Figure~\ref{fig:spectra-V} ...
\begin{figure}
\centerline{
\includegraphics[width=0.55\textwidth]{%
......@@ -426,6 +426,6 @@
\begin{figure}
\centerline{
\includegraphics[width=0.55\textwidth]{%
../tmp/fig_seb_regime_D}
../tmp/fig_seb_regime_V}
}
......@@ -431,5 +431,5 @@
}
\caption{Spectral energy budget for simulation D (see table~\ref{table-simuls-regimes})
corresponding to the dissipative regime. \label{fig:seb-D}}
\caption{Spectral energy budget for simulation V (see table~\ref{table-simuls-regimes})
corresponding to the viscosity affected regime. \label{fig:seb-V}}
\end{figure}
......@@ -434,6 +434,6 @@
\end{figure}
Figure~\ref{fig:seb-D} ...
Figure~\ref{fig:seb-V} ...
\begin{figure}
\centerline{
......
......@@ -42,4 +42,7 @@
make_fig("mixing_coef_vs_FhR")
make_fig("mixing_coef_vs_Fh")
make_fig("ratio_EA_EK_vs_FhR")
make_fig("ratio_EA_EK_vs_Fh")
make_fig("ratio_velo_vs_Fh")
......@@ -45,5 +48,4 @@
make_fig("ratio_velo_vs_Fh")
make_fig("ratio_EA_EK_vs_Fh")
make_fig("ratio_length_scales_vs_Fh")
sys.argv.append("")
......
import numpy as np
import matplotlib.pyplot as plt
from util import save_fig, plot, params_simuls_regimes
from util import save_fig, plot, params_simuls_regimes, add_letters
from util_dataframe import df
......@@ -46,8 +46,8 @@
ax.plot(xs, 5e-2 * xs**-1)
ax.text(0.16, 0.12, "${F_h}^{-1}$")
xs = np.linspace(6e-1, 4, 4)
xs = np.linspace(8e-1, 4, 4)
ax.plot(xs, 5e-2 * xs**-2)
ax.text(1.2, 0.05, "${F_h}^{-2}$")
fig = ax.figure
......@@ -50,5 +50,6 @@
ax.plot(xs, 5e-2 * xs**-2)
ax.text(1.2, 0.05, "${F_h}^{-2}$")
fig = ax.figure
add_letters(fig, "a")
fig.tight_layout()
......@@ -54,5 +55,5 @@
fig.tight_layout()
fig.text(0.85, 0.07, r"$\mathcal{R}$", fontsize=12)
fig.text(0.83, 0.07, r"$\log_{10}(\mathcal{R})$", fontsize=12)
save_fig(fig, "fig_mixing_coef_vs_Fh.png")
......
import numpy as np
import matplotlib.pyplot as plt
from util import save_fig, plot, add_letters
from util import save_fig, plot, params_simuls_regimes, add_letters
from util_dataframe import df
......@@ -5,7 +5,6 @@
from util_dataframe import df
tmp = df[df.Re > 2000].copy()
tmp = df.copy()
tmp["E_A/E_K"] = tmp.EA / (tmp.EKh)
ax = plot(
......@@ -10,5 +9,12 @@
tmp["E_A/E_K"] = tmp.EA / (tmp.EKh)
ax = plot(
tmp, "Fh", "E_A/E_K", c=np.log10(tmp["R2"]), vmin=0.5, vmax=2, logy=True
tmp,
"Fh",
"E_A/E_K",
c=np.log10(tmp["R2"]),
vmin=0.5,
vmax=2,
logy=True,
s=35,
)
......@@ -13,5 +19,36 @@
)
df_tmp = tmp[["N", "Rb", "Fh", "E_A/E_K"]]
letters = {v: k for k, v in params_simuls_regimes.items()}
for index, (N, Rb, Fh, ratio) in df_tmp.iterrows():
if (N, Rb) not in letters:
continue
letter = letters[(N, Rb)]
coef_x = 0.85
coef_y = 0.7
if letter == "O":
coef_x = 0.7
coef_y = 1.04
elif letter == "W":
coef_x = 1.09
coef_y = 0.95
elif letter == "L":
coef_y = 1.2
elif letter == "P":
coef_x = 0.95
coef_y = 1.13
ax.text(coef_x * Fh, coef_y * ratio, letter, color="r")
xs = np.linspace(1.0e-1, 5e-1, 4)
ax.plot(xs, 2e-2 * xs**-1)
ax.text(0.12, 0.06, "${F_h}^{-1}$")
xs = np.linspace(8e-1, 4, 4)
ax.plot(xs, 1.5e-2 * xs**-2)
ax.text(0.8, 0.004, "${F_h}^{-2}$")
ax.set_xlabel("$F_h$")
ax.set_ylabel(r"$E_A / E_K$")
......@@ -19,7 +56,7 @@
fig.text(0.84, 0.07, r"$\log_{10}(\mathcal{R})$", fontsize=12)
add_letters(fig, "c")
add_letters(fig, "b")
fig.tight_layout()
save_fig(fig, "fig_ratio_EA_EK_vs_Fh.png")
......
......@@ -4,4 +4,7 @@
from util_dataframe import df
tmp = df.copy()
tmp["E_A/E_K"] = tmp.EA / (tmp.EKh)
ax = plot(
......@@ -7,4 +10,4 @@
ax = plot(
df,
tmp,
"Fh",
"R2",
......@@ -9,4 +12,4 @@
"Fh",
"R2",
c=df["Gamma"],
c=tmp["E_A/E_K"],
logy=True,
......@@ -12,6 +15,6 @@
logy=True,
vmin=0.2,
vmax=0.6,
vmin=0.06,
vmax=0.22,
s=35,
)
ax.set_xlim(right=1)
......@@ -21,5 +24,5 @@
fig = ax.figure
fig.tight_layout()
fig.text(0.85, 0.07, r"$\Gamma=\frac{\epsilon_A}{\epsilon_K}$", fontsize=12)
fig.text(0.87, 0.07, r"$\frac{E_A}{E_K}$", fontsize=12)
......@@ -25,5 +28,5 @@
save_fig(fig, "fig_mixing_coef_vs_FhR.png")
save_fig(fig, "fig_ratio_EA_EK_vs_FhR.png")
if __name__ == "__main__":
plt.show()
......@@ -8,7 +8,14 @@
tmp = df[df.Re > 2000].copy()
tmp["lz1/lx1"] = tmp.lz1 / tmp.lx1
ax = plot(
tmp, "Fh", "lz1/lx1", c=np.log10(tmp["R2"]), vmin=0.5, vmax=2, logy=True
tmp,
"Fh",
"lz1/lx1",
c=np.log10(tmp["R2"]),
vmin=0.5,
vmax=2,
logy=True,
s=35,
)
xs = np.linspace(1e-2, 4e-2, 2)
......@@ -22,7 +29,7 @@
fig = ax.figure
fig.text(0.84, 0.07, r"$\log_{10}(\mathcal{R})$", fontsize=12)
fig.text(0.83, 0.07, r"$\log_{10}(\mathcal{R})$", fontsize=12)
add_letters(fig, "b")
fig.tight_layout()
......
......@@ -10,7 +10,7 @@
print(sys.argv)
letter = sys.argv[-1]
if letter not in "DLOWP":
if letter not in "VLOWP":
letter = "L"
sim = get_sim(letter)
......
......@@ -9,7 +9,14 @@
tmp = df[df.Re > 2000].copy()
tmp["U_z/U_h"] = np.sqrt(2 * tmp.EKz / tmp.EKh)
ax = plot(
tmp, "Fh", "U_z/U_h", c=np.log10(tmp["R2"]), vmin=0.5, vmax=2, logy=True
tmp,
"Fh",
"U_z/U_h",
c=np.log10(tmp["R2"]),
vmin=0.5,
vmax=2,
logy=True,
s=35,
)
xs = np.linspace(1e-2, 5.0e-2, 2)
......@@ -23,7 +30,7 @@
fig = ax.figure
fig.text(0.84, 0.07, r"$\log_{10}(\mathcal{R})$", fontsize=12)
fig.text(0.83, 0.07, r"$\log_{10}(\mathcal{R})$", fontsize=12)
add_letters(fig, "a")
fig.tight_layout()
......
......@@ -9,7 +9,7 @@
print(sys.argv)
letter = sys.argv[-1]
if letter not in "DLOWP":
if letter not in "VLOWP":
letter = "L"
sim = get_sim(letter)
......
......@@ -10,7 +10,7 @@
print(sys.argv)
letter = sys.argv[-1]
if letter not in "DLOWP":
if letter not in "VLOWP":
letter = "L"
sim = get_sim(letter)
......
......@@ -166,7 +166,7 @@
print([p.name for p in paths_1couple])
params_simuls_regimes = {
"D": (40, 1),
"V": (40, 1),
"L": (40, 20),
"O": (10, 160),
"W": (3, 900),
......@@ -174,7 +174,7 @@
}
if path_base.endswith("polo"):
params_simuls_regimes["D"] = (40, 5)
params_simuls_regimes["V"] = (40, 5)
params_simuls_regimes["O"] = (20, 160)
......
......@@ -5,7 +5,7 @@
df["letter"] = paths_simuls_regimes.keys()
regimes = [
"Dissipative",
"Viscosity affected",
"LAST",
"Optimal strat. turb.",
"Weakly stratified",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment