SecondMomentAveraging Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
#include <SecondMomentAveraging.H>
Public Member Functions | |
SecondMomentAveraging (FieldPlaneAveraging &pa1, FieldPlaneAveraging &pa2) | |
~SecondMomentAveraging ()=default | |
void | operator() () |
amrex::Real | line_average_interpolated (amrex::Real x, int comp1, int comp2) const |
amrex::Real | line_average_interpolated (amrex::Real x, int comp) const |
amrex::Real | line_average_cell (int ind, int comp1, int comp2) const |
amrex::Real | line_average_cell (int ind, int comp) const |
const amrex::Vector< amrex::Real > & | line_moment () |
void | line_moment (int comp, amrex::Vector< amrex::Real > &l_vec) |
void | output_line_average_ascii (const std::string &filename, int step, amrex::Real time) |
void | output_line_average_ascii (int step, amrex::Real time) |
void | set_precision (int p) |
template<typename IndexSelector > | |
void | compute_average (const IndexSelector &idxOp, const amrex::MultiFab &mfab1, const amrex::MultiFab &mfab2) |
Private Attributes | |
int | m_num_moments |
amrex::Vector< amrex::Real > | m_second_moments_line |
int | m_precision = 4 |
int | m_last_updated_index = -1 |
FieldPlaneAveraging & | m_plane_average1 |
FieldPlaneAveraging & | m_plane_average2 |
Detailed Description
Compute second moments for two variables
Computes second-moment statistics for any two variables. For example, if the velocity field is provided, then it computes the following quantities:
\(\langle u'u'\rangle, \langle u'v'\rangle, \langle u'w'\rangle, \ldots\)
Alternately, using velocity (vector) and a scalar (e.g., temperature \(\theta\)), would compute:
\(\langle u'\theta ' \rangle, \langle v' \theta ' \rangle, \langle w' \theta ' \rangle\)
Constructor & Destructor Documentation
◆ SecondMomentAveraging()
amr_wind::SecondMomentAveraging::SecondMomentAveraging | ( | FieldPlaneAveraging & | pa1, |
FieldPlaneAveraging & | pa2 ) |
◆ ~SecondMomentAveraging()
|
default |
Member Function Documentation
◆ compute_average()
void amr_wind::SecondMomentAveraging::compute_average | ( | const IndexSelector & | idxOp, |
const amrex::MultiFab & | mfab1, | ||
const amrex::MultiFab & | mfab2 ) |
fill line storage with averages
◆ line_average_cell() [1/2]
amrex::Real amr_wind::SecondMomentAveraging::line_average_cell | ( | int | ind, |
int | comp ) const |
evaluate second moment at specific cell for each component
◆ line_average_cell() [2/2]
amrex::Real amr_wind::SecondMomentAveraging::line_average_cell | ( | int | ind, |
int | comp1, | ||
int | comp2 ) const |
evaluate second moment at specific cell for both components
◆ line_average_interpolated() [1/2]
amrex::Real amr_wind::SecondMomentAveraging::line_average_interpolated | ( | amrex::Real | x, |
int | comp ) const |
evaluate second moment at specific location for each component
◆ line_average_interpolated() [2/2]
amrex::Real amr_wind::SecondMomentAveraging::line_average_interpolated | ( | amrex::Real | x, |
int | comp1, | ||
int | comp2 ) const |
evaluate second moment at specific location for both components
◆ line_moment() [1/2]
|
inline |
◆ line_moment() [2/2]
void amr_wind::SecondMomentAveraging::line_moment | ( | int | comp, |
amrex::Vector< amrex::Real > & | l_vec ) |
◆ operator()()
void amr_wind::SecondMomentAveraging::operator() | ( | ) |
◆ output_line_average_ascii() [1/2]
void amr_wind::SecondMomentAveraging::output_line_average_ascii | ( | const std::string & | filename, |
int | step, | ||
amrex::Real | time ) |
◆ output_line_average_ascii() [2/2]
void amr_wind::SecondMomentAveraging::output_line_average_ascii | ( | int | step, |
amrex::Real | time ) |
◆ set_precision()
|
inline |
change precision of text file output
Member Data Documentation
◆ m_last_updated_index
|
private |
precision for line plot text file
◆ m_num_moments
|
private |
◆ m_plane_average1
|
private |
keep track of the last time index that the operator was called
◆ m_plane_average2
|
private |
◆ m_precision
|
private |
line storage for fluctuations
◆ m_second_moments_line
|
private |
outer product of components
The documentation for this class was generated from the following files:
- /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/SecondMomentAveraging.H
- /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/SecondMomentAveraging.cpp
Generated by 1.12.0