ABLStats Class Reference

AMR-Wind API: amr_wind::ABLStats Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches

#include <ABLStats.H>

Inheritance diagram for amr_wind::ABLStats:
[legend]
Collaboration diagram for amr_wind::ABLStats:
[legend]

Public Member Functions

 ABLStats (CFDSim &, const ABLWallFunction &, const int dir)
 
 ~ABLStats () override
 
ABLStatsMode abl_mode () const override
 
void post_init_actions () override
 
void pre_advance_work () override
 Perform actions before a new timestep.
 
void post_advance_work () override
 Process fields given timestep and output to disk.
 
void compute_zi ()
 Compute height of capping inversion.
 
const VelPlaneAveragingFinevel_profile () const override
 Return vel plane averaging instance.
 
const VelPlaneAveragingvel_profile_coarse () const override
 Return vel plane averaging instance.
 
const FieldPlaneAveragingtheta_profile () const override
 Return instance that handles temperature statistics.
 
const FieldPlaneAveragingFinetheta_profile_fine () const override
 Return instance that handles temperature statistics.
 
void register_forcing_term (pde::icns::ABLForcing *forcing) const override
 
void register_meso_mom_forcing (pde::icns::ABLMesoForcingMom *forcing) const override
 
void register_meso_temp_forcing (pde::temperature::ABLMesoForcingTemp *forcing) const override
 
void calc_sfs_stress_avgs (ScratchField &sfs_stress, ScratchField &t_sfs_stress)
 Calculate sfs stress averages.
 
void calc_tke_diffusion (ScratchField &diffusion, const Field &buoy_prod, const Field &shear_prod, const Field &dissipation, const amrex::Real dt)
 Calculate tke diffusion term by eliminating other terms.
 

Static Public Member Functions

static std::string identifier ()
 

Protected Member Functions

void initialize ()
 Read user inputs and create the necessary files.
 
void calc_averages ()
 Calculate plane average profiles.
 
virtual void process_output ()
 Output data based on user-defined format.
 
virtual void prepare_ascii_file ()
 Prepare ASCII file.
 
virtual void prepare_netcdf_file ()
 Prepare NetCDF metadata.
 
void write_netcdf ()
 Write sampled data into a NetCDF file.
 
virtual void write_ascii ()
 

Private Attributes

CFDSimm_sim
 
const ABLWallFunctionm_abl_wall_func
 
Fieldm_temperature
 
Fieldm_mueff
 
VelPlaneAveraging m_pa_vel
 
FieldPlaneAveraging m_pa_temp
 
VelPlaneAveragingFine m_pa_vel_fine
 
FieldPlaneAveragingFine m_pa_temp_fine
 
FieldPlaneAveraging m_pa_mueff
 
SecondMomentAveraging m_pa_tt
 
SecondMomentAveraging m_pa_tu
 
SecondMomentAveraging m_pa_uu
 
ThirdMomentAveraging m_pa_uuu
 
pde::icns::ABLForcingm_abl_forcing {nullptr}
 Reference to ABL forcing term if present.
 
pde::icns::ABLMesoForcingMomm_abl_meso_mom_forcing {nullptr}
 
pde::temperature::ABLMesoForcingTempm_abl_meso_temp_forcing
 
std::string m_out_fmt {"netcdf"}
 Format of the data output (ascii, netcdf, etc.)
 
std::string m_ncfile_name
 
std::string m_ascii_file_name
 
int m_out_freq {100}
 Frequency of data sampling and output.
 
amrex::Real m_gravity {9.81}
 Acceleration due to gravity magnitude.
 
amrex::Real m_kappa {0.41}
 Von-Karman constant.
 
amrex::Real m_ref_theta {300.0}
 Reference surface temperature.
 
amrex::Real m_zi {0.0}
 Variable to store capping inversion height.
 
int m_normal_dir {2}
 Wall-normal direction axis.
 
amrex::Real m_dn {0.0}
 Cell spacing at the coarsest level.
 
size_t m_ncells_h1 {0}
 Number of cells in the horizontal direction.
 
size_t m_ncells_h2 {0}
 
bool m_do_energy_budget {false}
 Do energy budget.
 

Constructor & Destructor Documentation

◆ ABLStats()

amr_wind::ABLStats::ABLStats ( CFDSim & sim,
const ABLWallFunction & abl_wall_func,
const int dir )

◆ ~ABLStats()

amr_wind::ABLStats::~ABLStats ( )
overridedefault

Member Function Documentation

◆ abl_mode()

ABLStatsMode amr_wind::ABLStats::abl_mode ( ) const
inlineoverride

◆ calc_averages()

void amr_wind::ABLStats::calc_averages ( )
protected

Calculate plane average profiles.

◆ calc_sfs_stress_avgs()

void amr_wind::ABLStats::calc_sfs_stress_avgs ( ScratchField & sfs_stress,
ScratchField & t_sfs_stress )

Calculate sfs stress averages.

◆ calc_tke_diffusion()

void amr_wind::ABLStats::calc_tke_diffusion ( ScratchField & diffusion,
const Field & buoy_prod,
const Field & shear_prod,
const Field & dissipation,
const amrex::Real dt )

Calculate tke diffusion term by eliminating other terms.

Calculate sfs stress averages.

◆ compute_zi()

void amr_wind::ABLStats::compute_zi ( )

Compute height of capping inversion.

◆ identifier()

static std::string amr_wind::ABLStats::identifier ( )
inlinestatic

◆ initialize()

void amr_wind::ABLStats::initialize ( )
protected

Read user inputs and create the necessary files.

◆ post_advance_work()

void amr_wind::ABLStats::post_advance_work ( )
override

Process fields given timestep and output to disk.

◆ post_init_actions()

void amr_wind::ABLStats::post_init_actions ( )
override

◆ pre_advance_work()

void amr_wind::ABLStats::pre_advance_work ( )
inlineoverride

Perform actions before a new timestep.

◆ prepare_ascii_file()

void amr_wind::ABLStats::prepare_ascii_file ( )
protectedvirtual

Prepare ASCII file.

◆ prepare_netcdf_file()

void amr_wind::ABLStats::prepare_netcdf_file ( )
protectedvirtual

Prepare NetCDF metadata.

◆ process_output()

void amr_wind::ABLStats::process_output ( )
protectedvirtual

Output data based on user-defined format.

◆ register_forcing_term()

void amr_wind::ABLStats::register_forcing_term ( pde::icns::ABLForcing * forcing) const
inlineoverride

◆ register_meso_mom_forcing()

void amr_wind::ABLStats::register_meso_mom_forcing ( pde::icns::ABLMesoForcingMom * forcing) const
inlineoverride

◆ register_meso_temp_forcing()

void amr_wind::ABLStats::register_meso_temp_forcing ( pde::temperature::ABLMesoForcingTemp * forcing) const
inlineoverride

◆ theta_profile()

const FieldPlaneAveraging & amr_wind::ABLStats::theta_profile ( ) const
inlineoverride

Return instance that handles temperature statistics.

◆ theta_profile_fine()

const FieldPlaneAveragingFine & amr_wind::ABLStats::theta_profile_fine ( ) const
inlineoverride

Return instance that handles temperature statistics.

◆ vel_profile()

const VelPlaneAveragingFine & amr_wind::ABLStats::vel_profile ( ) const
inlineoverride

Return vel plane averaging instance.

◆ vel_profile_coarse()

const VelPlaneAveraging & amr_wind::ABLStats::vel_profile_coarse ( ) const
inlineoverride

Return vel plane averaging instance.

◆ write_ascii()

void amr_wind::ABLStats::write_ascii ( )
protectedvirtual

Output sampled data in ASCII format

Note that this should be used for debugging only and not in production runs as it can have significant impacts on code performance.

◆ write_netcdf()

void amr_wind::ABLStats::write_netcdf ( )
protected

Write sampled data into a NetCDF file.

Member Data Documentation

◆ m_abl_forcing

pde::icns::ABLForcing* amr_wind::ABLStats::m_abl_forcing {nullptr}
mutableprivate

Reference to ABL forcing term if present.

◆ m_abl_meso_mom_forcing

pde::icns::ABLMesoForcingMom* amr_wind::ABLStats::m_abl_meso_mom_forcing {nullptr}
mutableprivate

◆ m_abl_meso_temp_forcing

pde::temperature::ABLMesoForcingTemp* amr_wind::ABLStats::m_abl_meso_temp_forcing
mutableprivate
Initial value:
{
nullptr}

◆ m_abl_wall_func

const ABLWallFunction& amr_wind::ABLStats::m_abl_wall_func
private

◆ m_ascii_file_name

std::string amr_wind::ABLStats::m_ascii_file_name
private

◆ m_dn

amrex::Real amr_wind::ABLStats::m_dn {0.0}
private

Cell spacing at the coarsest level.

◆ m_do_energy_budget

bool amr_wind::ABLStats::m_do_energy_budget {false}
private

Do energy budget.

◆ m_gravity

amrex::Real amr_wind::ABLStats::m_gravity {9.81}
private

Acceleration due to gravity magnitude.

◆ m_kappa

amrex::Real amr_wind::ABLStats::m_kappa {0.41}
private

Von-Karman constant.

◆ m_mueff

Field& amr_wind::ABLStats::m_mueff
private

◆ m_ncells_h1

size_t amr_wind::ABLStats::m_ncells_h1 {0}
private

Number of cells in the horizontal direction.

◆ m_ncells_h2

size_t amr_wind::ABLStats::m_ncells_h2 {0}
private

◆ m_ncfile_name

std::string amr_wind::ABLStats::m_ncfile_name
private

◆ m_normal_dir

int amr_wind::ABLStats::m_normal_dir {2}
private

Wall-normal direction axis.

◆ m_out_fmt

std::string amr_wind::ABLStats::m_out_fmt {"netcdf"}
private

Format of the data output (ascii, netcdf, etc.)

◆ m_out_freq

int amr_wind::ABLStats::m_out_freq {100}
private

Frequency of data sampling and output.

◆ m_pa_mueff

FieldPlaneAveraging amr_wind::ABLStats::m_pa_mueff
private

◆ m_pa_temp

FieldPlaneAveraging amr_wind::ABLStats::m_pa_temp
private

◆ m_pa_temp_fine

FieldPlaneAveragingFine amr_wind::ABLStats::m_pa_temp_fine
private

◆ m_pa_tt

SecondMomentAveraging amr_wind::ABLStats::m_pa_tt
private

◆ m_pa_tu

SecondMomentAveraging amr_wind::ABLStats::m_pa_tu
private

◆ m_pa_uu

SecondMomentAveraging amr_wind::ABLStats::m_pa_uu
private

◆ m_pa_uuu

ThirdMomentAveraging amr_wind::ABLStats::m_pa_uuu
private

◆ m_pa_vel

VelPlaneAveraging amr_wind::ABLStats::m_pa_vel
private

◆ m_pa_vel_fine

VelPlaneAveragingFine amr_wind::ABLStats::m_pa_vel_fine
private

◆ m_ref_theta

amrex::Real amr_wind::ABLStats::m_ref_theta {300.0}
private

Reference surface temperature.

◆ m_sim

CFDSim& amr_wind::ABLStats::m_sim
private

◆ m_temperature

Field& amr_wind::ABLStats::m_temperature
private

◆ m_zi

amrex::Real amr_wind::ABLStats::m_zi {0.0}
private

Variable to store capping inversion height.


The documentation for this class was generated from the following files:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLStats.H
  • /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLStats.cpp