fluidsim.base.output.spatiotemporal_spectra
Spatiotemporal Spectra
Provides:
- class fluidsim.base.output.spatiotemporal_spectra.SpatioTemporalSpectra3D(output)[source]
Bases:
SpecificOutput
Computes the spatiotemporal spectra.
- _tag = 'spatiotemporal_spectra'
- nb_dim = 3
- class fluidsim.base.output.spatiotemporal_spectra.SpatioTemporalSpectra2D(output)[source]
Bases:
SpatioTemporalSpectra3D
- nb_dim = 2
- class fluidsim.base.output.spatiotemporal_spectra.SpatioTemporalSpectraNS[source]
Bases:
object
- save_spectra_kzkhomega(tmin=0, tmax=None, dtype=None, save_urud=False)[source]
- save:
the spatiotemporal spectra, with a cylindrical average in k-space
the temporal spectra, with an average on the whole k-space
- load_spectra_kzkhomega(tmin=0, tmax=None, dtype=None, save_urud=False)[source]
load kzkhomega spectra from file
- compute_omega_emp_vs_kzkh(spectra_kzkhomega, key_spect='spectrum_b')[source]
Compute empirical frequency and fluctuation from the spatiotemporal spectra:
\[ \begin{align}\begin{aligned}\omega_{emp}(k_h, k_z) = \frac{\int ~ \omega ~ S(k_h, k_z, \omega) ~ \mathrm{d}\omega}{\int ~ S(k_h, k_z, \omega) ~ \mathrm{d}\omega},\\\delta \omega_{emp}(k_h, k_z) = \sqrt{\frac{\int ~ (\omega - \omega_{emp})^2 ~ S(k_h, k_z, \omega) ~ \mathrm{d}\omega}{\int ~ S(k_h, k_z, \omega) ~ \mathrm{d}\omega}},\end{aligned}\end{align} \]where \(\omega_{emp}\) is the empirical frequency and \(\delta \omega_{emp}\) is the empirical frequency fluctuation. \(S(k_h, k_z, \omega)\) is the spectra of key_spect.
- plot_kzkhomega(key_field='b', tmin=0, tmax=None, dtype=None, equation=None, xmax=None, ymax=None, cmap=None, vmin=None, vmax=None, plot_omega_emp=False, linscale=False)[source]
plot the spatiotemporal spectra, with a cylindrical average in k-space
equation must start with ‘omega=’, ‘kh=’, ‘kz=’, ‘ikh=’ or ‘ikz=’.
For 3d solvers, key_field can be in State.keys_state_phys + [“Khd”, “Khr”, “Kp”].
- compute_temporal_spectra(tmin=0, tmax=None, dtype=None, compute_urud=False)[source]
compute the temporal spectra by averaging over Fourier space
- plot_temporal_spectra(key_field=None, tmin=None, tmax=None, xlim=None, ylim=None, dtype=None, xscale='log', coef_compensate=0, plot_resonant_modes=True)[source]
plot the temporal spectra computed from the 4d spectra
- load_temporal_spectra(tmin=None, tmax=None, dtype=None, save_urud=False)[source]
load temporal spectra from file
Functions
|
|
|
find the first index such that arr[index] > value |
|
find the first index such that arr[index] >= value |
|
find the first index such that arr[index] < value |
|
get a range of index for which tmin <= times[i] <= tmax |
|
Classes
|
|
|
Computes the spatiotemporal spectra. |