Class EddySignature

Class Documentation

class EddySignature

Data container for Eddy signature tensors.

Public Functions

void load(std::string file_name, bool print_var = false)

Load data from a *.mat file containing eddy signature data.

TODO overload with load(std::vector<std::string> file_names, bool print_var = false){} to load and average multiple signature files

Parameters
  • file_name: File name (including relative or absolute path)
  • print_var: Boolean, default true. Print variables as they are read in (not advised except for debugging!)

void save(std::string file_name)

Save eddy signature data to a *.mat file.

Parameters
  • filename: File name (including relative or absolute path)

EddySignature operator+(const EddySignature &c) const

Define overloaded + (plus) operator for eddy signatures.

Return
A new EddySignature() with combined signatures of the two eddy types.
Parameters

EddySignature operator*(double a) const

Define overloaded * (multiply) operator for eddy signatures.

Return
new EddySignature() whose signature (g, j) is element-wise multiplied by input a.
Parameters
  • a: The number to multiply by

EddySignature operator/(double denom) const

Define overloaded / (divide) operator for eddy signatures.

Return
A new EddySignature() whose signature (g, j) is element-wise divided by input denom.
Parameters
  • denom: A number to divide by

Eigen::ArrayXXd k1z(Eigen::ArrayXd &eta) const

Get k1z wavenumber array (wavenumber space for each vertical coord, e.g. 50 x 801).

Return
k1z the wavenumber-length matrix
Parameters
  • eta: vertical heights at which to get the k1z value, normalised (i.e. z/delta)

Eigen::ArrayXXd getJ(const Eigen::ArrayXd &locations, const bool linear = false) const

Interpolate the signature \(J_{i,j}(\lambda)\) to new locations in lambda or eta.

To avoid warping the reconstruction, we need to do the convolution and the deconvolution with both the input and the signature on the same, equally spaced, basis. What if we want to do it on a basis different to the positions where the signature was calculated?

This function allows you to get the signature array, j, at different vertical locations

Return
[N x 6] signature array Jij interpolated to input locations
Parameters
  • locations: [N x 1] The lambda (or optionally eta) values at which to retrieve the signature j
  • linear: boolean If true, locations are on a linear basis (i.e. they are values of eta). Otherwise (default) they are on a logarithmic basis (i.e. they are values of lambda).

void computeSignature(const std::string &type, const int n_lambda = 200, const double dx = 0.002)

Calculate eddy intensity functions \(J_{i,j}\) and \(g_{i,j}\).

Eddy intensity functions \(J_{i,j}(\lambda)\) are computed for type A, B1, B2, B3 or B4, which are the eddies described in Ref 1. These functions are the signatures (in terms of turbulent fluctuations) that an individual structure will contribute to Reynolds Stress in a boundary layer. They are used in the convolution integral (36) of Perry and Marusic (1995a) to determine Reynolds Stress profiles.

Eddy spectral functions \(g_{i,j}(k1z,\lambda)\) are then computed from \(J\). These functions are the signatures (in terms of turbulent fluctuations) that an individual structure will contribute to turbulent spectra in a boundary layer. They are used in the convolution integral (43) of Perry and Marusic (1995a) to determine Spectral Tensor profiles.

This method updates class properties j, lambda, eta, g, eddy_type, domain_spacing, domain_extents.

It works by computing induced velocity [u, v, w] of a single eddy structure on a regular grid [x,y,lambda], normalised to the eddy scale and surrounding the unit eddy, then integrating for \(J\) and taking ffts for \(g\).

Perry AE and Marusic I (1995a) A wall-wake model for turbulent boundary layers. Part 1. Extension of the attached eddy hypothesis J Fluid Mech vol 298 pp 361-388

Parameters
  • typestring: one of ‘A’, ‘B1’, ‘B2’, ‘B3’, ‘B4’
  • n_lambdaint: number of points logarithmically spaced in the z direction, between the outer part of the domain and a location very close to the wall. Default 200.

void applySignature(const std::string &type, const int n_lambda = 200)

Apply signature defaults.

Eddy intensity functions \(J_{i,j}(\lambda)\) is applied for type A or B eddies, by digitisation of Figure 20 in Perry and Marusic (1995).

Note that these signatures are incomplete:

  1. Only four terms are given (I11, I13, I22, I33, the remaining two are assumed to be zero)
  2. Eddy spectral functions \(g_{i,j}(k1z,\lambda)\) are not documented in P&M 1995, so can’t be reproduced here. Thus, signatures defined by this method cannot be used for computation of spectra (and sets arbitrary domain_spacing and domain_extents values for the x and y directions).

This method updates class properties j, lambda, eta, eddy_type, domain_spacing, domain_extents.

See Perry AE and Marusic I (1995) A wall-wake model for turbulent boundary layers. Part 1. Extension of the attached eddy hypothesis J Fluid Mech vol 298 pp 361-388

Parameters
  • typestring: one of ‘A’, ‘B1’, ‘B2’, ‘B3’, ‘B4’
  • n_lambdaint: number of points logarithmically spaced in the z direction, between the outer part of the domain and a location very close to the wall. Default 200.

Public Members

std::string eddy_type

Eddy type (or types, if ensembled) used to create the results.

Eigen::ArrayXd lambda

Mapped vertical coordinates used in the analysis.

Eigen::ArrayXd eta

Unmapped (cartesian space) coordinates corresponding to the points in lambda.

Eigen::Tensor<double, 3> g

g (6 coefficients at each vertical coord and wavenumber, e.g 50 x 801 x 6)

Eigen::Array<double, Eigen::Dynamic, 6> j

Eddy intensity functions $Jij(lambda)$, which is [n_lambda x 6] in size, with columns ordered as [J11 J12 J13 J22 J23 J33]. Note that the lower diagonal of the 3x3 Reynolds Stress Tensor is not included due to symmetry.

Eigen::Array3d domain_spacing

Spacing of the regular grid used to create the eddy intensity signatures [dx, dy, dlambda] (note for the third coordinate, points are linearly spaced in a logarithmic domain, so this is d_lambda, not d_z).

Eigen::Array<double, 3, 2> domain_extents

Extents of the regular grid placed over the unit eddy to create the eddy intensity signatures, in [x_min, x_max; y_min, y_max; z_min, z_max] form.