fluidsim.solvers.ns2d.strat.solver
NS2D solver (fluidsim.solvers.ns2d.strat.solver
)
- class fluidsim.solvers.ns2d.strat.solver.Simul(params)[source]
Bases:
Simul
Pseudo-spectral solver 2D incompressible Navier-Stokes equations.
- InfoSolver
alias of
InfoSolverNS2DStrat
- static _complete_params_with_default(params)[source]
This static method is used to complete the params container.
- 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 perturbation.
- 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”) \(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 \(N(b) = - \mathbf{u}\cdot \mathbf{\nabla} b + N^2u_y\).
Functions
|
Classes
|
|
|
Pseudo-spectral solver 2D incompressible Navier-Stokes equations. |