Chapter X.1. Documentation for the 2D Navier-Stokes solvers

Table of Contents

X.1.1. General description
X.1.2. Diagnostics
X.1.3. Building and running
X.1.4. Including in larger applications

X.1.1. General description

The available Navier-Stokes solvers are all based on a pseudo-spectral space discretization of the equation based on the vorticity formulation. Time is discretized explicitly using a low-storage 3rd order Runge-Kutta scheme.

Three Navier-Stokes solvers are available at the moment:

  • periodic solver, including viscous or hyperviscous term
  • bounded domain solver based on volume penalization, including viscous or hyperviscous term
  • bounded domain solver based on volume penalization, only for inviscid equation

The second solver for bounded domains treats the penalization term exactly by advancing the solution in physical space instead of Fourier space. Unfortunately this can be done only in the absence of a viscous term. In all cases the nonlinear term is explicit.

A new solver based on active penalization is currently in early development and not documented yet.

X.1.2. Diagnostics

A large suite of diagnostic tools come with the Navier-Stokes solver.

WorkspaceNameInfluential parameter(s)Data typeDescriptionExternal dependency
fourierenstrophytenstrophyscalar floattotal flow enstrophy (without 1/2 factor)HDF5
energytenergyscalar floattotal flow energy (without 1/2 factor)HDF5
palinstrophytpalinstrophyscalar floattotal flow palinstrophy (without 1/2 factor)HDF5
enstrophy_derivativetdZdt, nreplics, replic_timestepscalar floattime derivative of enstrophyHDF5
energy_derivativetdEdt, nreplics, replic_timestepscalar floattime derivative of energyHDF5
fluid_palinstrophytfluidpalinstrophyscalar floattotal flow enstrophy (without 1/2 factor)HDF5
vorticity_spectrumtspectrum1D float arrayflow enstrophy spectrum (non normalized)HDF5
gridvorticity plottmovie, palette, resolutionimagecolor representation of vorticityVTK
pressure plottpressure, pressure_palette, resolutionimagecolor representation of pressureVTK
vorticity_histogram ("pdf")thisto1d size_t arrayhistogram of vorticity obtained by binning all the valuesHDF5
vorticity_minimumtminscalar floatminimum value attained by vorticityHDF5
vorticity_maximumtmaxscalar floatmaximum value attained by vorticityHDF5
vorticitytsave2D float arraycomplete vorticity field at a given timeHDF5
vorticity_radial_averagetradial1D float arrayvorticity averaged along circles centered in the middle of the domainHDF5
vorticity_vertical_averagetvertical1D float arrayvorticity averaged along vertical linesHDF5
waveletsvorticity_tildetsave2D float arraycomplete set of wavelet coefficientsHDF5
vorticity_tilde_histogramthisto1D size_t arrayhistogram of the wavelet coefficients of vorticityVTK
vorticity_tilde_minimumtminscalar floatminimum value attained by the wavelet coefficients of vorticityHDF5
vorticity_tilde_maximumtmaxscalar floatmaximum value attained by the wavelet coefficients of vorticityHDF5
scale_dependent_flatnesstsdf1D array of 3 component float vectorsstatistical flatness of the wavelet coefficients for each scale and directionHDF5
vorticity_Jminus2_histogramtsdpdf1D float arrayhistogram of the wavelet coefficients of vorticity at scale J-2HDF5
vorticity_Jminus2_minimumtsdpdfscalar floatminimum value attained by the wavelet coefficients of vorticity at scale J-2HDF5
vorticity_Jminus2_maximumtsdpdfscalar floatmaximum value attained by the wavelet coefficients of vorticity at scale J-2HDF5
sbs_incoherent_l2quantile,sbs_thresholding, max_iter, penalized_fraction1D array of 3 component float vectorsincoherent enstrophy in each scale and directionHDF5
sbs_coherent_l0quantile, sbs_thresholding, max_iter, penalized_fraction1D array of 3 component size_t vectorsnumber of coherent coefficients in each scale and directionHDF5
sbs_iterationsquantile, sbs_thresholding, max_iter, penalized_fraction1D array of 3 component size_t vectorsnumber of iterations required for each scale and directionHDF5
coherent_l0quantile, sbs_thresholding, max_iter, penalized_fractionscalar size_ttotal number of coherent coefficientsHDF5
incoherent_l2quantile,sbs_thresholding, max_iter, penalized_fractionscalar floattotal incoherent enstrophyHDF5
vorticity tilde plottmovieimagecolor representation of the horizontal wavelet coefficients of vorticity at scale J-2VTK
wavelets.coherentall grid diagnosticsanalyze_coherentapplies grid diagnostics to the reconstructed coherent part
wavelets.incoherentall grid diagnosticsanalyze_incoherentapplies grid diagnostics to the reconstructed incoherent part

All the parameters beginning with the letter 't' indicate the frequency All the diagnostics in Fourier space

X.1.3. Building and running

The three solvers can be build respectively using the following command line instructions:

  • ns2d
  • ns2d mask=disk
  • ns2d mask=disk dissipation=inviscid

X.1.4. Including in larger applications