DTUSpinnerSampler Class Reference

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

#include <DTUSpinnerSampler.H>

Inheritance diagram for amr_wind::sampling::DTUSpinnerSampler:
[legend]
Collaboration diagram for amr_wind::sampling::DTUSpinnerSampler:
[legend]

Public Member Functions

 DTUSpinnerSampler (const CFDSim &)
 
void initialize (const std::string &key) override
 
void sampling_locations (SampleLocType &) const override
 
void sampling_locations (SampleLocType &, const amrex::Box &) const override
 
bool update_sampling_locations () override
 
void post_sample_actions () override
 
long num_points () const override
 
long num_output_points () const override
 
void define_netcdf_metadata (const ncutils::NCGroup &) const override
 
void populate_netcdf_metadata (const ncutils::NCGroup &) const override
 
void output_netcdf_data (const ncutils::NCGroup &, const size_t) const override
 
- Public Member Functions inherited from amr_wind::sampling::LidarSampler
 LidarSampler (const CFDSim &)
 
void initialize (const std::string &key) override
 
bool update_sampling_locations () override
 
void post_sample_actions () override
 
void define_netcdf_metadata (const ncutils::NCGroup &) const override
 
void populate_netcdf_metadata (const ncutils::NCGroup &) const override
 
void output_netcdf_data (const ncutils::NCGroup &, const size_t) const override
 
- Public Member Functions inherited from amr_wind::sampling::LineSampler
 LineSampler (const CFDSim &)
 
 ~LineSampler () override
 
void initialize (const std::string &key) override
 
void check_bounds () override
 Check and fix the bounds of the sampler so the probes are in the domain.
 
void sampling_locations (SampleLocType &) const override
 Populate and return a vector of probe locations to be sampled.
 
void sampling_locations (SampleLocType &, const amrex::Box &) const override
 
void output_locations (SampleLocType &sample_locs) const override
 
void define_netcdf_metadata (const ncutils::NCGroup &) const override
 
void populate_netcdf_metadata (const ncutils::NCGroup &) const override
 
std::string label () const override
 Name of this sampling object.
 
std::string & label () override
 
std::string sampletype () const override
 Type of this sampling object.
 
int id () const override
 Unique identifier for this set of probe locations.
 
int & id () override
 
long num_points () const override
 Number of probe locations along the line.
 
long num_output_points () const override
 Number of output probe locations (after data reduction etc.)
 

Static Public Member Functions

static std::string identifier ()
 
static vs::Vector generate_lidar_pattern (PrismParameters InnerPrism, PrismParameters OuterPrism, double time)
 
static vs::Vector adjust_lidar_pattern (vs::Vector beamPt, double yaw, double pitch, double roll)
 
- Static Public Member Functions inherited from amr_wind::sampling::LidarSampler
static std::string identifier ()
 
- Static Public Member Functions inherited from amr_wind::sampling::LineSampler
static std::string identifier ()
 

Private Attributes

int m_ns {1}
 
long m_ntotal {1}
 
int m_update_count {0}
 
const amrex::Real m_radtodeg {180.0 / M_PI}
 
const amrex::Real m_pi {M_PI}
 
const amrex::Real m_twopi {2.0 * M_PI}
 
const amrex::Real m_threepi {3.0 * M_PI}
 
amrex::Real m_time_sampling {0}
 
PrismParameters m_InnerPrism
 
PrismParameters m_OuterPrism
 
amrex::Vector< amrex::Real > m_lidar_center {0.0, 0.0, 0.0}
 
amrex::Real m_scan_time {2}
 
amrex::Real m_num_samples {984}
 
amrex::Real m_beam_length {270}
 
int m_beam_points {432}
 
amrex::Real m_fixed_yaw {0}
 
amrex::Real m_fixed_roll {0}
 
amrex::Real m_fixed_tilt {0}
 
amrex::Real m_hub_yaw {0}
 
amrex::Real m_hub_roll {0}
 
amrex::Real m_hub_tilt {0}
 
std::string m_spinner_mode {"fixed"}
 
std::string m_turbine_label
 
bool m_hub_debug {false}
 
vs::Vector m_hub_location {0, 0, 0}
 
vs::Vector m_hub_location_init {0, 0, 0}
 
amrex::Real m_last_hub_yaw {0}
 
amrex::Real m_last_hub_roll {0}
 
amrex::Real m_last_hub_tilt {0}
 
amrex::Vector< amrex::Real > m_last_lidar_center {0.0, 0.0, 0.0}
 
amrex::Vector< amrex::Real > m_step_lidar_center {0.0, 0.0, 0.0}
 
amrex::Real m_fill_val {-99999.99}
 

Additional Inherited Members

- Protected Attributes inherited from amr_wind::sampling::LidarSampler
amrex::Vector< amrex::Real > m_origin
 
amrex::Vector< amrex::Real > m_time_table
 
amrex::Vector< amrex::Real > m_azimuth_table
 
amrex::Vector< amrex::Real > m_elevation_table
 
amrex::Real m_length {0}
 
bool m_periodic {true}
 
amrex::Real m_period {std::numeric_limits<amrex::Real>::max()}
 
- Protected Attributes inherited from amr_wind::sampling::LineSampler
const CFDSimm_sim
 
amrex::Vector< amrex::Real > m_start
 
amrex::Vector< amrex::Real > m_end
 
std::string m_label
 
int m_id {-1}
 
int m_npts {0}
 

Detailed Description

Sample data along a line that moves in time

Defines probes along a line defined by a time history from m_azimuth_table and m_elevation_table with a length of m_length. This determines the start and end points at every time-step and divides the line into equal segments as determined by num_points. The length of each segment is given by

\[ m_length / (num_points - 1) \]

Constructor & Destructor Documentation

◆ DTUSpinnerSampler()

amr_wind::sampling::DTUSpinnerSampler::DTUSpinnerSampler ( const CFDSim & sim)
explicit

Member Function Documentation

◆ adjust_lidar_pattern()

vs::Vector amr_wind::sampling::DTUSpinnerSampler::adjust_lidar_pattern ( vs::Vector beamPt,
double yaw,
double pitch,
double roll )
static

◆ define_netcdf_metadata()

void amr_wind::sampling::DTUSpinnerSampler::define_netcdf_metadata ( const ncutils::NCGroup & grp) const
override

◆ generate_lidar_pattern()

vs::Vector amr_wind::sampling::DTUSpinnerSampler::generate_lidar_pattern ( PrismParameters InnerPrism,
PrismParameters OuterPrism,
double time )
static

◆ identifier()

static std::string amr_wind::sampling::DTUSpinnerSampler::identifier ( )
inlinestatic

◆ initialize()

void amr_wind::sampling::DTUSpinnerSampler::initialize ( const std::string & key)
override

Read user inputs and initialize the sampling object

Parameters
keyPrefix used to parse inputs from file

◆ num_output_points()

long amr_wind::sampling::DTUSpinnerSampler::num_output_points ( ) const
inlineoverride

◆ num_points()

long amr_wind::sampling::DTUSpinnerSampler::num_points ( ) const
inlineoverride

◆ output_netcdf_data()

void amr_wind::sampling::DTUSpinnerSampler::output_netcdf_data ( const ncutils::NCGroup & grp,
const size_t nt ) const
override

◆ populate_netcdf_metadata()

void amr_wind::sampling::DTUSpinnerSampler::populate_netcdf_metadata ( const ncutils::NCGroup & ) const
override

◆ post_sample_actions()

void amr_wind::sampling::DTUSpinnerSampler::post_sample_actions ( )
inlineoverride

◆ sampling_locations() [1/2]

void amr_wind::sampling::DTUSpinnerSampler::sampling_locations ( SampleLocType & sample_locs) const
override

Update the position of the sampling locations in time

◆ sampling_locations() [2/2]

void amr_wind::sampling::DTUSpinnerSampler::sampling_locations ( SampleLocType & sample_locs,
const amrex::Box & box ) const
override

Populate the vector with coordinates of the sampling locations inside a box

◆ update_sampling_locations()

bool amr_wind::sampling::DTUSpinnerSampler::update_sampling_locations ( )
override

Determine how the subsampling will be done

Member Data Documentation

◆ m_beam_length

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_beam_length {270}
private

◆ m_beam_points

int amr_wind::sampling::DTUSpinnerSampler::m_beam_points {432}
private

◆ m_fill_val

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_fill_val {-99999.99}
private

◆ m_fixed_roll

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_fixed_roll {0}
private

◆ m_fixed_tilt

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_fixed_tilt {0}
private

◆ m_fixed_yaw

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_fixed_yaw {0}
private

◆ m_hub_debug

bool amr_wind::sampling::DTUSpinnerSampler::m_hub_debug {false}
private

◆ m_hub_location

vs::Vector amr_wind::sampling::DTUSpinnerSampler::m_hub_location {0, 0, 0}
private

◆ m_hub_location_init

vs::Vector amr_wind::sampling::DTUSpinnerSampler::m_hub_location_init {0, 0, 0}
private

◆ m_hub_roll

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_hub_roll {0}
private

◆ m_hub_tilt

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_hub_tilt {0}
private

◆ m_hub_yaw

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_hub_yaw {0}
private

◆ m_InnerPrism

PrismParameters amr_wind::sampling::DTUSpinnerSampler::m_InnerPrism
private

◆ m_last_hub_roll

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_last_hub_roll {0}
private

◆ m_last_hub_tilt

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_last_hub_tilt {0}
private

◆ m_last_hub_yaw

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_last_hub_yaw {0}
private

◆ m_last_lidar_center

amrex::Vector<amrex::Real> amr_wind::sampling::DTUSpinnerSampler::m_last_lidar_center {0.0, 0.0, 0.0}
private

◆ m_lidar_center

amrex::Vector<amrex::Real> amr_wind::sampling::DTUSpinnerSampler::m_lidar_center {0.0, 0.0, 0.0}
private

◆ m_ns

int amr_wind::sampling::DTUSpinnerSampler::m_ns {1}
private

◆ m_ntotal

long amr_wind::sampling::DTUSpinnerSampler::m_ntotal {1}
private

◆ m_num_samples

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_num_samples {984}
private

◆ m_OuterPrism

PrismParameters amr_wind::sampling::DTUSpinnerSampler::m_OuterPrism
private

◆ m_pi

const amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_pi {M_PI}
private

◆ m_radtodeg

const amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_radtodeg {180.0 / M_PI}
private

◆ m_scan_time

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_scan_time {2}
private

◆ m_spinner_mode

std::string amr_wind::sampling::DTUSpinnerSampler::m_spinner_mode {"fixed"}
private

◆ m_step_lidar_center

amrex::Vector<amrex::Real> amr_wind::sampling::DTUSpinnerSampler::m_step_lidar_center {0.0, 0.0, 0.0}
private

◆ m_threepi

const amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_threepi {3.0 * M_PI}
private

◆ m_time_sampling

amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_time_sampling {0}
private

◆ m_turbine_label

std::string amr_wind::sampling::DTUSpinnerSampler::m_turbine_label
private

◆ m_twopi

const amrex::Real amr_wind::sampling::DTUSpinnerSampler::m_twopi {2.0 * M_PI}
private

◆ m_update_count

int amr_wind::sampling::DTUSpinnerSampler::m_update_count {0}
private

The documentation for this class was generated from the following files: