# fluidsim.base.solvers.pseudo_spect¶

## Base solver (fluidsim.base.solvers.pseudo_spect)¶

This module provides two base classes that can be used to define pseudo-spectral solvers.

class fluidsim.base.solvers.pseudo_spect.InfoSolverPseudoSpectral(**kargs)[source]

Bases: fluidsim.base.solvers.info_base.InfoSolverBase

Contain the information on a base pseudo-spectral 2D solver.

_init_root(self)[source]

Init. self by writting the information on the solver.

The first-level classes for this base solver are:

class fluidsim.base.solvers.pseudo_spect.SimulBasePseudoSpectral(params)[source]

Pseudo-spectral base solver.

InfoSolver
static _complete_params_with_default(params)[source]

Complete the params container (static method).

compute_freq_diss(self)[source]

Compute the dissipation frequency.

Use the self.params.nu_… parameters to compute an array containing the dissipation frequency as a function of the wavenumber.

The governing equations for a pseudo-spectral solver can be written as

$\partial_t S = N(S) - \sigma(k) S,$

where $$\sigma$$ is the frequency associated with the linear term.

In this function, the frequency $$\sigma$$ is split in 2 parts: the dissipation at small scales and the dissipation at large scale (hypo-viscosity, params.nu_m4).

Returns
f_dnumpy.array

The dissipation frequency as a function of the wavenumber (small sclale part).

f_d_hyponumpy.array

The dissipation frequency at large scale (hypo-viscosity)

plot_freq_diss(self, direction='x')[source]

Plot the dissipation frequencies as functions of k.

directionstr

Direction of the wavevector to plot with (“x”, “y” or “z”)

tendencies_nonlin(self, variables=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.

class fluidsim.base.solvers.pseudo_spect.InfoSolverPseudoSpectral3D(**kargs)[source]

Contain the information on a base pseudo-spectral 3D solver.

_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

Classes

 InfoSolverPseudoSpectral(**kargs) Contain the information on a base pseudo-spectral 2D solver. InfoSolverPseudoSpectral3D(**kargs) Contain the information on a base pseudo-spectral 3D solver. Simul Pseudo-spectral base solver.