Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fluiddyn
fluidsim
Commits
97a45d1b895d
Commit
f6b28544
authored
Mar 02, 2020
by
Jason Reneuve
Browse files
changed strings to rstrings to avoid escape warnings
parent
4a59d2a0cb9f
Pipeline
#3444
passed with stage
in 12 minutes and 51 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fluidsim/solvers/ns3d/output/spect_energy_budget.py
View file @
97a45d1b
...
...
@@ -259,7 +259,7 @@ class SpectralEnergyBudgetNS3D(SpecificOutput):
if
ax
is
None
:
fig
,
ax
=
self
.
output
.
figure_axe
()
ax
.
set_xlabel
(
"$\kappa_h$"
)
ax
.
set_xlabel
(
r
"$\kappa_h$"
)
ax
.
set_ylabel
(
"$k_z$"
)
ax
.
set_title
(
f
"
{
key
}
, solver
{
self
.
output
.
name_solver
}
, nx =
{
self
.
nx
:
5
d
}
"
...
...
@@ -333,7 +333,7 @@ class SpectralEnergyBudgetNS3D(SpecificOutput):
fig
,
ax
=
self
.
output
.
figure_axe
()
xlbl
=
"k_"
+
key_k
[
1
]
ylbl
=
"$\Pi("
+
xlbl
+
")/\epsilon$"
ylbl
=
r
"$\Pi("
+
xlbl
+
r
")/\epsilon$"
xlbl
=
"$"
+
xlbl
+
"$"
ax
.
set_xlabel
(
xlbl
)
ax
.
set_ylabel
(
ylbl
)
...
...
@@ -342,11 +342,11 @@ class SpectralEnergyBudgetNS3D(SpecificOutput):
)
ax
.
semilogx
(
k_plot
,
flux_tot
/
eps
,
"k"
,
linewidth
=
2
,
label
=
"$\Pi/\epsilon$"
k_plot
,
flux_tot
/
eps
,
"k"
,
linewidth
=
2
,
label
=
r
"$\Pi/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
D
/
eps
,
"k--"
,
linewidth
=
2
,
label
=
"$D/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
D
/
eps
,
"k--"
,
linewidth
=
2
,
label
=
r
"$D/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
(
flux_tot
+
D
)
/
eps
,
"k:"
,
label
=
"$(\Pi+D)/\epsilon$"
k_plot
,
(
flux_tot
+
D
)
/
eps
,
"k:"
,
label
=
r
"$(\Pi+D)/\epsilon$"
)
ax
.
legend
()
fluidsim/solvers/ns3d/output/spectra.py
View file @
97a45d1b
...
...
@@ -242,7 +242,7 @@ class SpectraNS3D(Spectra):
if
ax
is
None
:
fig
,
ax
=
self
.
output
.
figure_axe
()
ax
.
set_xlabel
(
"$\kappa_h$"
)
ax
.
set_xlabel
(
r
"$\kappa_h$"
)
ax
.
set_ylabel
(
"$k_z$"
)
ax
.
set_title
(
"log 3D spectra, solver "
...
...
fluidsim/solvers/ns3d/strat/output/spatial_means.py
View file @
97a45d1b
...
...
@@ -264,6 +264,7 @@ class SpatialMeansNS3DStrat(SpatialMeansBase):
epsA_hypo
=
dict_results
[
"epsA_hypo"
]
eps_tot
=
dict_results
[
"eps_tot"
]
# fig 1 : energies
fig
,
ax
=
self
.
output
.
figure_axe
()
fig
.
suptitle
(
"Energy"
)
ax
.
set_ylabel
(
"$E(t)$"
)
...
...
@@ -275,13 +276,14 @@ class SpatialMeansNS3DStrat(SpatialMeansBase):
ax
.
legend
()
# figure 2 : dissipations
fig
,
ax
=
self
.
output
.
figure_axe
()
fig
.
suptitle
(
"Dissipation of energy"
)
ax
.
set_ylabel
(
r
"$\epsilon_K(t)$"
)
ax
.
plot
(
t
,
epsK
,
"r"
,
linewidth
=
1
,
label
=
r
"$\epsilon_K$"
)
ax
.
plot
(
t
,
epsA
,
"b"
,
linewidth
=
1
,
label
=
r
"$\epsilon_A$"
)
ax
.
plot
(
t
,
eps_tot
,
"k"
,
linewidth
=
2
,
label
=
r
"$\epsilon$"
)
ax
.
plot
(
t
,
epsK
,
"r"
,
linewidth
=
1
,
label
=
r
"$\epsilon_K$"
,
zorder
=
10
)
ax
.
plot
(
t
,
epsA
,
"b"
,
linewidth
=
1
,
label
=
r
"$\epsilon_A$"
,
zorder
=
10
)
ax
.
plot
(
t
,
eps_tot
,
"k"
,
linewidth
=
2
,
label
=
r
"$\epsilon$"
,
zorder
=
10
)
eps_hypo
=
epsK_hypo
+
epsA_hypo
if
max
(
eps_hypo
)
>
0
:
...
...
@@ -291,7 +293,7 @@ class SpatialMeansNS3DStrat(SpatialMeansBase):
PK_tot
=
dict_results
[
"PK_tot"
]
PA_tot
=
dict_results
[
"PA_tot"
]
ax
.
plot
(
t
,
PK_tot
,
"r--"
,
label
=
r
"$P_K$"
)
ax
.
plot
(
t
,
PA_tot
,
"b--"
,
label
=
r
"$P_A$"
)
ax
.
plot
(
t
,
PK_tot
,
"r--"
,
label
=
r
"$P_K$"
,
zorder
=
0
)
ax
.
plot
(
t
,
PA_tot
,
"b--"
,
label
=
r
"$P_A$"
,
zorder
=
0
)
ax
.
legend
()
fluidsim/solvers/ns3d/strat/output/spect_energy_budget.py
View file @
97a45d1b
...
...
@@ -151,7 +151,7 @@ class SpectralEnergyBudgetNS3DStrat(SpectralEnergyBudgetNS3D):
fig
,
ax
=
self
.
output
.
figure_axe
()
xlbl
=
"k_"
+
key_k
[
1
]
ylbl
=
"$\Pi("
+
xlbl
+
")/\epsilon$"
ylbl
=
r
"$\Pi("
+
xlbl
+
r
")/\epsilon$"
xlbl
=
"$"
+
xlbl
+
"$"
ax
.
set_xlabel
(
xlbl
)
ax
.
set_ylabel
(
ylbl
)
...
...
@@ -160,16 +160,16 @@ class SpectralEnergyBudgetNS3DStrat(SpectralEnergyBudgetNS3D):
)
ax
.
semilogx
(
k_plot
,
flux_tot
/
eps
,
"k"
,
linewidth
=
2
,
label
=
"$\Pi/\epsilon$"
k_plot
,
flux_tot
/
eps
,
"k"
,
linewidth
=
2
,
label
=
r
"$\Pi/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
D
/
eps
,
"k--"
,
linewidth
=
2
,
label
=
"$D/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
D
/
eps
,
"k--"
,
linewidth
=
2
,
label
=
r
"$D/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
(
flux_tot
+
D
)
/
eps
,
"k:"
,
label
=
"$(\Pi+D)/\epsilon$"
k_plot
,
(
flux_tot
+
D
)
/
eps
,
"k:"
,
label
=
r
"$(\Pi+D)/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
flux_K
/
eps
,
"r"
,
label
=
"$\Pi_K/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
flux_A
/
eps
,
"b"
,
label
=
"$\Pi_A/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
DK
/
eps
,
"r--"
,
label
=
"$D_K/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
DA
/
eps
,
"b--"
,
label
=
"$D_A/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
CK2A
/
eps
,
"m"
,
linewidth
=
2
,
label
=
"$B/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
flux_K
/
eps
,
"r"
,
label
=
r
"$\Pi_K/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
flux_A
/
eps
,
"b"
,
label
=
r
"$\Pi_A/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
DK
/
eps
,
"r--"
,
label
=
r
"$D_K/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
DA
/
eps
,
"b--"
,
label
=
r
"$D_A/\epsilon$"
)
ax
.
semilogx
(
k_plot
,
CK2A
/
eps
,
"m"
,
linewidth
=
2
,
label
=
r
"$B/\epsilon$"
)
ax
.
legend
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment