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(only_root=False, **kargs)[source]
Bases:
InfoSolverBase
Contain the information on a base pseudo-spectral 2D solver.
- _init_root()[source]
Init. self by writting the information on the solver.
The first-level classes for this base solver are:
fluidsim.base.time_stepping.pseudo_spect.TimeSteppingPseudoSpectral
fluidsim.operators.operators.OperatorsPseudoSpectral2D
- class fluidsim.base.solvers.pseudo_spect.SimulBasePseudoSpectral(params)[source]
Bases:
SimulBase
Pseudo-spectral base solver.
- InfoSolver
alias of
InfoSolverPseudoSpectral
- static _complete_params_with_default(params)[source]
Complete the params container (static method).
- compute_freq_diss()[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(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(variables=None, old=None)[source]
Compute the nonlinear tendencies.
This function has to be overridden in a child class.
- Returns:
- tendencies_fft
fluidsim.base.setofvariables.SetOfVariables
An array containing only zeros.
- tendencies_fft
- class fluidsim.base.solvers.pseudo_spect.InfoSolverPseudoSpectral3D(only_root=False, **kargs)[source]
Bases:
InfoSolverPseudoSpectral
Contain the information on a base pseudo-spectral 3D solver.
Classes
|
Contain the information on a base pseudo-spectral 2D solver. |
|
Contain the information on a base pseudo-spectral 3D solver. |
|
alias of |
|
Pseudo-spectral base solver. |