# fluidsim.solvers.ns2d.bouss.solver¶

## NS2D Boussinesq solver (fluidsim.solvers.ns2d.bouss.solver)¶

class fluidsim.solvers.ns2d.bouss.solver.Simul(params)[source]

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

InfoSolver

alias of InfoSolverNS2DBouss

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

Compute the nonlinear tendencies of the solver ns2d.strat.

Parameters
state_spectfluidsim.base.setofvariables.SetOfVariables

optional

Array containing the state, i.e. the vorticity, in Fourier space. If state_spect, the variables vorticity and the velocity are computed from it, otherwise, they are taken from the global state of the simulation, self.state.

These two possibilities are used during the Runge-Kutta time-stepping.

Returns
tendencies_fftfluidsim.base.setofvariables.SetOfVariables

An array containing the tendencies for the vorticity and the buoyancy.

Notes

The 2D Navier-Stokes equation can be written

$\partial_t \hat\zeta = \hat N(\zeta) - \sigma(k) \hat \zeta,$

and

$\partial_t \hat b = \hat N(b) - \sigma(k) \hat b$

This function compute the nonlinear terms (“tendencies”) $$\hat N(\zeta) = - \mathbf{u}\cdot \mathbf{\nabla} \zeta + \mathbf{\nabla}\wedge b\mathbf{e_z} = - \mathbf{u}\cdot \mathbf{\nabla} \zeta + \partial_x b$$ and $$\hat N(b) = - \mathbf{u}\cdot \mathbf{\nabla} b$$.

Functions

 tendencies_nonlin_ns2dbouss(ux, uy, px_rot, …)

Classes

 InfoSolverNS2DBouss(**kargs) Simul(params) Pseudo-spectral solver 2D incompressible Navier-Stokes equations.