fluidsim.solvers.ns3d.strat.solver

Stratified NS3D solver (fluidsim.solvers.ns3d.strat.solver)

class fluidsim.solvers.ns3d.strat.solver.InfoSolverNS3DStrat(**kargs)[source]

Bases: fluidsim.solvers.ns3d.solver.InfoSolverNS3D

_init_root(self)[source]

Init. self by writting the information on the solver.

The first-level classes for this base solver are the same as for the 2D pseudo-spectral base solver except the class:

  • fluidsim.operators.operators2d.OperatorsPseudoSpectral3D

class fluidsim.solvers.ns3d.strat.solver.Simul(params)[source]

Bases: fluidsim.solvers.ns3d.solver.Simul

Pseudo-spectral solver 3D incompressible Navier-Stokes equations.

Notes

This class is dedicated to solve with a pseudo-spectral method 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} - \nu_\alpha (-\Delta)^\alpha \textbf{v},\\\partial_t b + \textbf{v} \cdot \boldsymbol{\nabla} b = - N^2 v_z - \nu_\alpha (-\Delta)^\alpha b,\end{aligned}\end{align} \]

where \(\textbf{v}\) is the non-divergent velocity (\(\boldsymbol{\nabla} \cdot \textbf{v} = 0\)), \(p\) is the pressure, \(\Delta\) is the 3D Laplacian operator, \(b\) is the buoyancy and \(N\) is the (constant) Brunt-Vaisala frequency.

The equation for the velocity can be rewritten as (here without the viscous term)

\[\partial_t \textbf{v} = - \boldsymbol{\nabla} (p + |\textbf{v}|^2/2) + \textbf{v} \times \boldsymbol{\omega} + b \textbf{e}_\textbf{z},\]

In Fourier space, we obtain

\[\partial_t \hat{\textbf{v}} = \hat N(\textbf{v}) + L \hat{\textbf{v}},\]

where

\[\hat N(\textbf{v}) = P_\perp \widehat{\textbf{v} \times \boldsymbol{\omega}} + \hat b \textbf{e}_\textbf{z},\]
\[L = - \nu_\alpha |\textbf{k}|^{2\alpha},\]

with \(P_\perp = (1 - \textbf{e}_\textbf{k} \textbf{e}_\textbf{k} \cdot)\) the operator projection on the plane perpendicular to the wave number \(\textbf{k}\).

InfoSolver

alias of InfoSolverNS3DStrat

static _complete_params_with_default(params)[source]

This static method is used to complete the params container.

tendencies_nonlin(self, state_spect=None, old=None)[source]

Compute the nonlinear tendencies.

This function has to be overridden in a child class.

Returns
tendencies_fftfluidsim.base.setofvariables.SetOfVariables

An array containing only zeros.

Classes

InfoSolverNS3DStrat(**kargs)

Simul(params)

Pseudo-spectral solver 3D incompressible Navier-Stokes equations.