fluidsim.solvers.ns2d.bouss.solver
NS2D Boussinesq solver (fluidsim.solvers.ns2d.bouss.solver
)
- class fluidsim.solvers.ns2d.bouss.solver.Simul(params)[source]
Bases:
Simul
Pseudo-spectral solver 2D incompressible Navier-Stokes equations.
- InfoSolver
alias of
InfoSolverNS2DBouss
- tendencies_nonlin(state_spect=None, old=None)[source]
Compute the nonlinear tendencies of the solver ns2d.strat.
- Parameters:
- state_spect
fluidsim.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.
- state_spect
- Returns:
- tendencies_fft
fluidsim.base.setofvariables.SetOfVariables
An array containing the tendencies for the vorticity and the buoyancy.
- tendencies_fft
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
|
Classes
|
|
|
Pseudo-spectral solver 2D incompressible Navier-Stokes equations. |