AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/actuator/aero/AirfoilTableI.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
7template <
typename IStream>
11 affile >> num_entries;
13 std::unique_ptr<AirfoilTable> aftab(
new AirfoilTable(num_entries));
14 for (
int i = 0; i < num_entries; ++i) {
15 auto& pp = aftab->m_polar[i];
16 affile >> aftab->m_aoa[i] >> pp.x() >> pp.y() >> pp.z();
19 aftab->convert_aoa_to_radians();
23template <
typename IStream>
24std::unique_ptr<AirfoilTable>
29 while (affile.good() && num_entries < 0) {
30 std::getline(affile, buf);
31 const auto found = buf.find(
"NumAlf");
32 if (found != std::string::npos) {
33 std::stringstream ss(buf);
38 if (!affile.good() && (num_entries < 0)) {
39 amrex::Abort(
"AirfoilLoader: Error reading OpenFAST airfoil file");
43 std::getline(affile, buf);
44 std::getline(affile, buf);
46 std::unique_ptr<AirfoilTable> aftab(
new AirfoilTable(num_entries));
47 for (
int i = 0; i < num_entries; ++i) {
48 auto& pp = aftab->m_polar[i];
49 affile >> aftab->m_aoa[i] >> pp.x() >> pp.y() >> pp.z();
52 aftab->convert_aoa_to_radians();
static std::unique_ptr< AirfoilTable > load_openfast_airfoil(const std::string &af_file)
Definition AirfoilTable.cpp:63
static std::unique_ptr< AirfoilTable > load_text_file(const std::string &af_file)
Definition AirfoilTable.cpp:52
Definition AirfoilTable.H:13