utils Namespace Reference

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

Typedefs

using ActParser = ::amr_wind::utils::MultiParser
 

Functions

std::set< int > determine_influenced_procs (const amrex::AmrCore &mesh, const amrex::RealBox &rbx)
 
void determine_root_proc (ActInfo &info, amrex::Vector< int > &act_proc_count)
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real gaussian3d (const vs::Vector &dist, const vs::Vector &eps)
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real gaussian1d (const amrex::Real &dist, const amrex::Real &eps)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE vs::Vector delta_pnts_cyl (const vs::Vector &origin, const vs::Vector &normal, const vs::Vector &point1, const vs::Vector &point2)
 
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real linear_basis_1d (const amrex::Real distance, const amrex::Real dX)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE vs::Vector compute_tangential_vector (const vs::Vector &center, const vs::Vector &normal, const vs::Vector &point)
 
void read_inputs (TurbineBaseData &tdata, TurbineInfo &tinfo, const utils::ActParser &pp)
 
void prepare_netcdf_file (const std::string &ncfile, const TurbineBaseData &meta, const TurbineInfo &info, const ActGrid &grid)
 
void write_netcdf (const std::string &ncfile, const TurbineBaseData &meta, const TurbineInfo &info, const ActGrid &grid, const amrex::Real time)
 

Typedef Documentation

◆ ActParser

Function Documentation

◆ compute_tangential_vector()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE vs::Vector amr_wind::actuator::utils::compute_tangential_vector ( const vs::Vector & center,
const vs::Vector & normal,
const vs::Vector & point )

◆ delta_pnts_cyl()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE vs::Vector amr_wind::actuator::utils::delta_pnts_cyl ( const vs::Vector & origin,
const vs::Vector & normal,
const vs::Vector & point1,
const vs::Vector & point2 )

Compute distance between two points

Parameters
originOrigin for the cylindrical coordinate system
normalNormal relative to origin (defines cylinder orientation)
point1location of the first point in Cartesian coordinates
point2location of second point in Cartesian coordinates
Returns
distance between points in cylindrical coordinates (angle is in radians)

◆ determine_influenced_procs()

std::set< int > amr_wind::actuator::utils::determine_influenced_procs ( const amrex::AmrCore & mesh,
const amrex::RealBox & rbx )

Return a set of process IDs (MPI ranks) that contain AMR boxes that interact with a given actuator body.

The region of influence of the actuator body is determined by checking for intersections with a bounding box rbox.

Parameters
meshAMReX mesh instance
rbxThe bounding box that defines the region of influence of a turbine

◆ determine_root_proc()

void amr_wind::actuator::utils::determine_root_proc ( ActInfo & info,
amrex::Vector< int > & act_proc_count )

◆ gaussian1d()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real amr_wind::actuator::utils::gaussian1d ( const amrex::Real & dist,
const amrex::Real & eps )

Return the Gaussian smearing factor in 1D

Parameters
distDistance vector of the cell center from the actuator node in local frame of reference.
epsOne-dimensional Gaussian scaling factor
Returns
Gaussian smearing factor in 1D

◆ gaussian3d()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real amr_wind::actuator::utils::gaussian3d ( const vs::Vector & dist,
const vs::Vector & eps )

Return the Gaussian smearing factor in 3D

Parameters
distDistance vector of the cell center from the actuator node in local frame of reference.
epsThree-dimensional Gaussian scaling factor
Returns
Gaussian smearing factor in 3D

◆ linear_basis_1d()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real amr_wind::actuator::utils::linear_basis_1d ( const amrex::Real distance,
const amrex::Real dX )

Compute weighting for a normalized linear interpolant

Parameters
distancedistance between sample location and the reference points
dXspacing between reference points
Returns
normalized integration weight at the sample location

◆ prepare_netcdf_file()

void amr_wind::actuator::utils::prepare_netcdf_file ( const std::string & ncfile,
const TurbineBaseData & meta,
const TurbineInfo & info,
const ActGrid & grid )

◆ read_inputs()

void amr_wind::actuator::utils::read_inputs ( TurbineBaseData & tdata,
TurbineInfo & tinfo,
const utils::ActParser & pp )

◆ write_netcdf()

void amr_wind::actuator::utils::write_netcdf ( const std::string & ncfile,
const TurbineBaseData & meta,
const TurbineInfo & info,
const ActGrid & grid,
const amrex::Real time )