fluidsim.extend_simul.spatial_means_regions_milestone

Spatial means regions

class fluidsim.extend_simul.spatial_means_regions_milestone.SpatialMeansRegions(output)[source]

Bases: SimulExtender, SpecificOutput

Specific output for the MILESTONE simulations

Notes

This output is used with the solver fluidsim.solvers.ns3d.strat.solver, which solves the incompressible Navier-Stokes equations (possibly with hyper-viscosity) under the Boussinesq approximation with a constant Brunt-Vaisala frequency:

\[ \begin{align}\begin{aligned}\partial_t \textbf{v} + \textbf{v} \cdot \boldsymbol{\nabla} \textbf{v} = - \boldsymbol{\nabla} p + b \textbf{e}_\textbf{z} + D_\textbf{v} + \textbf{F}_h,\\\partial_t b + \textbf{v} \cdot \boldsymbol{\nabla} b = - N^2 v_z + D_b,\end{aligned}\end{align} \]

where \(\textbf{v}\) is the non-divergent velocity (\(\boldsymbol{\nabla} \cdot \textbf{v} = 0\)), \(p\) is the pressure, \(b\) is the buoyancy, \(N\) is the (constant) Brunt-Vaisala frequency and \(D_\textbf{v}\) and \(D_b\) are dissipative terms.

The total dynamic pressure \(P = p + |\textbf{v}|^2/2\) can be computed from \(\textbf{v}\) and \(b\) as:

\[\boldsymbol{\nabla}^2 P = \boldsymbol{\nabla} \cdot (\textbf{v} \times \boldsymbol{\omega}) + \boldsymbol{\nabla} \cdot \textbf{F}_h + \partial_z b.\]

We consider the energy budget

\[ \begin{align}\begin{aligned}\partial_t |\textbf{v}|^2/2 + \boldsymbol{\nabla} \cdot (\textbf{v} P) = \textbf{v} \cdot D_\textbf{v} + \textbf{v} \cdot \textbf{F}_h + v_z b\\\partial_t e_A + \boldsymbol{\nabla} \cdot (\textbf{v} e_A) = - v_z b + b D_b / N^2,\end{aligned}\end{align} \]

with \(e_A = b^2/(2N^2)\).

We take the average of these equations over regions delimited by surfaces along the y and z axis. Some terms written as a divergence can be rewritten as fluxes through 2 surfaces at \(x_{min}\) and \(x_{max}\):

\[\int_V \frac{dV}{V} \boldsymbol{\nabla} \cdot (\textbf{v} P) = \frac{S}{V} \left( \langle v_x P \rangle_{S_{min}} - \langle v_x P \rangle_{S_{max}} \right).\]
classmethod complete_params_with_default(params)[source]

Should complete the simul parameters

classmethod get_modif_info_solver()[source]

Create a function to modify info_solver.

Note that this function is called when the object info_solver has not yet been created (and cannot yet be modified)! This is why one needs to create a function that will be called later to modify info_solver.

_online_save()[source]

Save the values at one time.

_compute_fluxes_regions(field, vx)[source]

Compute for each region the fluxes over xmin and xmax surface

print_keys()[source]

Print the keys associated with the computed quantities

plot(keys='EK', iregion=0)[source]

Plot some quantities for a given region

plot_budget(iregion=0, decompose_fluxes=False, plot_conversion=False)[source]

Plot the energy budget for a given region

Classes

SpatialMeansRegions(output)

Specific output for the MILESTONE simulations