FPlaneAveraging< FType > Class Template Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
#include <FieldPlaneAveraging.H>
Public Member Functions | |
FPlaneAveraging (const FType &field_in, const amr_wind::SimTime &time, int axis_in, bool compute_deriv=false) | |
virtual | ~FPlaneAveraging ()=default |
virtual void | operator() () |
amrex::Real | line_average_interpolated (amrex::Real x, int comp) const |
amrex::Real | line_average_cell (int ind, int comp) const |
amrex::Real | line_derivative_interpolated (amrex::Real x, int comp) const |
amrex::Real | line_derivative_of_average_cell (int ind, int comp) const |
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) |
amrex::Real | dx () const |
amrex::Real | xlo () const |
int | axis () const |
int | level () const |
int | ncomp () const |
int | ncell_plane () const |
int | ncell_line () const |
int | last_updated_index () const |
const amrex::Vector< amrex::Real > & | line_average () const |
const amrex::Vector< amrex::Real > & | line_deriv () const |
void | line_average (int comp, amrex::Vector< amrex::Real > &l_vec) |
const amrex::Vector< amrex::Real > & | line_centroids () const |
const FType & | field () const |
template<typename IndexSelector > | |
void | compute_averages (const IndexSelector &idxOp, const amrex::MultiFab &mfab) |
void | compute_line_derivatives () |
Protected Attributes | |
int | m_ncomp |
amrex::Vector< amrex::Real > | m_line_average |
amrex::Vector< amrex::Real > | m_line_deriv |
line storage for the derivative of average field | |
amrex::Vector< amrex::Real > | m_line_xcentroid |
amrex::Real | m_dx |
amrex::Real | m_xlo |
int | m_ncell_plane |
int | m_ncell_line |
int | m_precision = 4 |
const int | m_level |
int | m_last_updated_index = -1 |
const FType & | m_field |
const SimTime & | m_time |
const int | m_axis |
const bool | m_comp_deriv |
Detailed Description
class amr_wind::FPlaneAveraging< FType >
Output average of a field on planes normal to a given direction
The user can choose a direction (x, y, or z), the default value is the z-direction. The field is then averaged on planes at the cell-centers at level 0 (coarsest level) along the specified direction.
Constructor & Destructor Documentation
◆ FPlaneAveraging()
amr_wind::FPlaneAveraging< FType >::FPlaneAveraging | ( | const FType & | field_in, |
const amr_wind::SimTime & | time, | ||
int | axis_in, | ||
bool | compute_deriv = false ) |
- Parameters
-
field_in [in] Field to be averaged time [in] Time instance to determine output frequencies axis_in [in] Direction along which planes are computed compute_deriv [in] Should the derivative of the averages be computed
◆ ~FPlaneAveraging()
|
virtualdefault |
Member Function Documentation
◆ axis()
|
inline |
◆ compute_averages()
void amr_wind::FPlaneAveraging< FType >::compute_averages | ( | const IndexSelector & | idxOp, |
const amrex::MultiFab & | mfab ) |
fill line storage with averages
◆ compute_line_derivatives()
void amr_wind::FPlaneAveraging< FType >::compute_line_derivatives | ( | ) |
fill derivatives of line storage
◆ dx()
|
inline |
◆ field()
|
inline |
◆ last_updated_index()
|
inline |
◆ level()
|
inline |
◆ line_average() [1/2]
|
inline |
◆ line_average() [2/2]
void amr_wind::FPlaneAveraging< FType >::line_average | ( | int | comp, |
amrex::Vector< amrex::Real > & | l_vec ) |
◆ line_average_cell()
amrex::Real amr_wind::FPlaneAveraging< FType >::line_average_cell | ( | int | ind, |
int | comp ) const |
evaluate line average at specific cell for any average component
◆ line_average_interpolated()
amrex::Real amr_wind::FPlaneAveraging< FType >::line_average_interpolated | ( | amrex::Real | x, |
int | comp ) const |
evaluate line average at specific location for any average component
◆ line_centroids()
|
inline |
◆ line_deriv()
|
inline |
◆ line_derivative_interpolated()
amrex::Real amr_wind::FPlaneAveraging< FType >::line_derivative_interpolated | ( | amrex::Real | x, |
int | comp ) const |
evaluate line average derivative at specific location for any average component
◆ line_derivative_of_average_cell()
amrex::Real amr_wind::FPlaneAveraging< FType >::line_derivative_of_average_cell | ( | int | ind, |
int | comp ) const |
evaluate derivative of a line average at specific cell for any component
◆ ncell_line()
|
inline |
◆ ncell_plane()
|
inline |
◆ ncomp()
|
inline |
◆ operator()()
|
virtual |
Reimplemented in amr_wind::VelPlaneAveraging.
◆ output_line_average_ascii() [1/2]
void amr_wind::FPlaneAveraging< FType >::output_line_average_ascii | ( | const std::string & | filename, |
int | step, | ||
amrex::Real | time ) |
◆ output_line_average_ascii() [2/2]
void amr_wind::FPlaneAveraging< FType >::output_line_average_ascii | ( | int | step, |
amrex::Real | time ) |
◆ set_precision()
|
inline |
change precision of text file output
◆ xlo()
|
inline |
Member Data Documentation
◆ m_axis
|
protected |
◆ m_comp_deriv
|
protected |
◆ m_dx
|
protected |
line storage for centroids of each cell along a line
◆ m_field
|
protected |
keep track of the last time index that the operator was called
◆ m_last_updated_index
|
protected |
level for plane averaging for now fixed at level=0
◆ m_level
|
protected |
precision for line plot text file
◆ m_line_average
|
protected |
number of average components
◆ m_line_deriv
|
protected |
line storage for the derivative of average field
line storage for the average velocity and tracer variables
◆ m_line_xcentroid
|
protected |
◆ m_ncell_line
|
protected |
number of cells in plane
◆ m_ncell_plane
|
protected |
bottom of domain in axis direction
◆ m_ncomp
|
protected |
◆ m_precision
|
protected |
number of cells along line
◆ m_time
|
protected |
◆ m_xlo
|
protected |
mesh spacing in axis direction
The documentation for this class was generated from the following files:
- /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/FieldPlaneAveraging.H
- /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/FieldPlaneAveraging.cpp
Generated by 1.12.0