# HG changeset patch # User calpe <miguel.calpe.linares@gmail.com> # Date 1543219768 -3600 # Mon Nov 26 09:09:28 2018 +0100 # Node ID 939215ffc3279b65f6b5b56a53205c6cef380617 # Parent 00ee607dc160bb82132d389895af21e0823362b1 Plots hypo-viscosity only if exists. diff --git a/fluidsim/solvers/ns2d/strat/output/spatial_means.py b/fluidsim/solvers/ns2d/strat/output/spatial_means.py --- a/fluidsim/solvers/ns2d/strat/output/spatial_means.py +++ b/fluidsim/solvers/ns2d/strat/output/spatial_means.py @@ -467,9 +467,6 @@ ax1.plot(t, epsK + epsA, "r", label=r"$\epsilon$", linewidth=2) ax1.plot( - t, epsK_hypo + epsA_hypo, "g", label=r"$\epsilon_{hypo}$", linewidth=2 - ) - ax1.plot( t, epsK_tot + epsA_tot, "k", label=r"$\epsilon_{tot}$", linewidth=2 ) @@ -480,9 +477,18 @@ ax2.set_ylabel(r"$\epsilon_Z(t)$") ax2.plot(t, epsZ, "r", linewidth=2) - ax2.plot(t, epsZ_hypo, "g", linewidth=2) ax2.plot(t, epsZ_tot, "k", linewidth=2) + # If true hypo-viscosity... + if self.sim.params.nu_m4: + ax1.plot( + t, epsK_hypo + epsA_hypo, + color="g", + label=r"$\epsilon_{hypo}$", + linewidth=2 + ) + ax2.plot(t, epsZ_hypo, "g", linewidth=2) + if self.sim.params.forcing.enable: PK = dict_results["PK_tot"] PA = dict_results["PA_tot"]