ABLFieldInit Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
#include <ABLFieldInit.H>
Public Member Functions | |
ABLFieldInit () | |
void | initialize_from_inputfile () |
void | initialize_from_netcdf () |
void | operator() (const amrex::Box &vbx, const amrex::Geometry &geom, const amrex::Array4< amrex::Real > &velocity, const amrex::Array4< amrex::Real > &density, const amrex::Array4< amrex::Real > &temperature) const |
void | perturb_temperature (const int lev, const amrex::Geometry &geom, Field &temperature) const |
bool | add_temperature_perturbations () const |
Flag indicating whether temperature field needs perturbations. | |
void | init_tke (const amrex::Geometry &geom, amrex::MultiFab &tke) const |
Initialize TKE field. | |
Private Attributes | |
amrex::Vector< amrex::Real > | m_vel |
Initial velocity components. | |
std::string | m_vel_timetable |
File name for velocity forcing time table. | |
amrex::Real | m_vel_speed |
Initial wind speed. | |
amrex::Real | m_vel_dir |
Initial wind direction (rad) | |
amrex::Gpu::DeviceVector< amrex::Real > | m_thht_d |
amrex::Gpu::DeviceVector< amrex::Real > | m_thvv_d |
amrex::Gpu::DeviceVector< amrex::Real > | m_windht_d |
amrex::Gpu::DeviceVector< amrex::Real > | m_prof_u_d |
amrex::Gpu::DeviceVector< amrex::Real > | m_prof_v_d |
amrex::Gpu::DeviceVector< amrex::Real > | m_prof_tke_d |
amrex::Real | m_rho |
Initial density field. | |
amrex::Real | m_deltaU {1.0} |
Amplitude of fluctuations in x-direction. | |
amrex::Real | m_deltaV {1.0} |
Amplitude of fluctuations in y-direction. | |
amrex::Real | m_Uperiods {4.0} |
Number of sinusoidal waves in x-direction. | |
amrex::Real | m_Vperiods {4.0} |
Number of sinusoidal waves in y-direction. | |
amrex::Real | m_ref_height {50.0} |
Reference height for velocity perturbations. | |
amrex::Real | m_delta_t {0.8} |
Amplitude of temperature perturbations. | |
amrex::Real | m_theta_gauss_mean {0.0} |
Mean for Gaussian number generator. | |
amrex::Real | m_theta_gauss_var {1.0} |
Variance for Gaussian number generator. | |
amrex::Real | m_theta_cutoff_height {1.0e16} |
Cutoff height for temperature fluctuations. | |
amrex::Real | m_tke_init {0.1} |
Initial value for tke field. | |
amrex::Real | m_tke_init_factor {0.4} |
Multiplicative factor for init tke profile. | |
amrex::Real | m_tke_cutoff_height {250.} |
Cutoff height for init tke profile. | |
amrex::RealArray | m_top_vel {20.0} |
Top velocity. | |
amrex::RealArray | m_bottom_vel {4.0} |
Bottom velocity. | |
bool | m_linear_profile {false} |
Initial linear velocity profile boolean. | |
bool | m_perturb_vel {true} |
Perturb initial velocity field with sinusoidal fluctuations. | |
bool | m_perturb_theta {false} |
Perturb temperature field with random fluctuations. | |
bool | m_tke_init_profile {false} |
Initialize tke profile non-constant. | |
bool | m_init_uvtheta_profile {false} |
Profiles of u, v, and theta are read in from a NetCDF File. | |
amrex::Vector< amrex::Real > | m_theta_heights |
amrex::Vector< amrex::Real > | m_theta_values |
bool | m_initial_wind_profile {false} |
std::string | m_1d_rans |
File name for 1-D data file. | |
amrex::Vector< amrex::Real > | m_wind_heights |
amrex::Vector< amrex::Real > | m_u_values |
amrex::Vector< amrex::Real > | m_v_values |
amrex::Vector< amrex::Real > | m_tke_values |
Detailed Description
Initialize ABL fields
Constructor & Destructor Documentation
◆ ABLFieldInit()
amr_wind::ABLFieldInit::ABLFieldInit | ( | ) |
Member Function Documentation
◆ add_temperature_perturbations()
|
inline |
Flag indicating whether temperature field needs perturbations.
◆ init_tke()
void amr_wind::ABLFieldInit::init_tke | ( | const amrex::Geometry & | geom, |
amrex::MultiFab & | tke ) const |
Initialize TKE field.
Initialize sfs tke field at the beginning of the simulation.
◆ initialize_from_inputfile()
void amr_wind::ABLFieldInit::initialize_from_inputfile | ( | ) |
◆ initialize_from_netcdf()
void amr_wind::ABLFieldInit::initialize_from_netcdf | ( | ) |
◆ operator()()
void amr_wind::ABLFieldInit::operator() | ( | const amrex::Box & | vbx, |
const amrex::Geometry & | geom, | ||
const amrex::Array4< amrex::Real > & | velocity, | ||
const amrex::Array4< amrex::Real > & | density, | ||
const amrex::Array4< amrex::Real > & | temperature ) const |
◆ perturb_temperature()
void amr_wind::ABLFieldInit::perturb_temperature | ( | const int | lev, |
const amrex::Geometry & | geom, | ||
Field & | temperature ) const |
Add temperature perturbations
This uses amrex::Random and, therefore, executes the loop on CPU and pushes the field to device.
Member Data Documentation
◆ m_1d_rans
|
private |
File name for 1-D data file.
◆ m_bottom_vel
|
private |
Bottom velocity.
◆ m_delta_t
|
private |
Amplitude of temperature perturbations.
◆ m_deltaU
|
private |
Amplitude of fluctuations in x-direction.
◆ m_deltaV
|
private |
Amplitude of fluctuations in y-direction.
◆ m_init_uvtheta_profile
|
private |
Profiles of u, v, and theta are read in from a NetCDF File.
◆ m_initial_wind_profile
|
private |
Adding option for wind heights similar to temperature heights Speed-up RANS calculation using 1-D profile for flat surface
◆ m_linear_profile
|
private |
Initial linear velocity profile boolean.
◆ m_perturb_theta
|
private |
Perturb temperature field with random fluctuations.
◆ m_perturb_vel
|
private |
Perturb initial velocity field with sinusoidal fluctuations.
◆ m_prof_tke_d
|
private |
◆ m_prof_u_d
|
private |
◆ m_prof_v_d
|
private |
◆ m_ref_height
|
private |
Reference height for velocity perturbations.
◆ m_rho
|
private |
Initial density field.
◆ m_theta_cutoff_height
|
private |
Cutoff height for temperature fluctuations.
◆ m_theta_gauss_mean
|
private |
Mean for Gaussian number generator.
◆ m_theta_gauss_var
|
private |
Variance for Gaussian number generator.
◆ m_theta_heights
|
private |
Lookup table containing temperature variation w.r.t. height above terrain
◆ m_theta_values
|
private |
◆ m_thht_d
|
private |
◆ m_thvv_d
|
private |
◆ m_tke_cutoff_height
|
private |
Cutoff height for init tke profile.
◆ m_tke_init
|
private |
Initial value for tke field.
◆ m_tke_init_factor
|
private |
Multiplicative factor for init tke profile.
◆ m_tke_init_profile
|
private |
Initialize tke profile non-constant.
◆ m_tke_values
|
private |
◆ m_top_vel
|
private |
Top velocity.
◆ m_u_values
|
private |
◆ m_Uperiods
|
private |
Number of sinusoidal waves in x-direction.
◆ m_v_values
|
private |
◆ m_vel
|
private |
Initial velocity components.
◆ m_vel_dir
|
private |
Initial wind direction (rad)
◆ m_vel_speed
|
private |
Initial wind speed.
◆ m_vel_timetable
|
private |
File name for velocity forcing time table.
◆ m_Vperiods
|
private |
Number of sinusoidal waves in y-direction.
◆ m_wind_heights
|
private |
◆ m_windht_d
|
private |
The documentation for this class was generated from the following files:
- /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLFieldInit.H
- /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLFieldInit.cpp
Generated by 1.12.0