/home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLMesoscaleInput.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLMesoscaleInput.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ABLMesoscaleInput.H
Go to the documentation of this file.
1#ifndef ABLMESOSCALEINPUT_H
2#define ABLMESOSCALEINPUT_H
3
4#include <string>
5#include "AMReX_REAL.H"
6#include "AMReX_Vector.H"
7
8namespace amr_wind {
9
11{
12
13public:
14 // cppcheck-suppress noExplicitConstructor
15 ABLMesoscaleInput(std::string ncfile, std::string var_prefix = "");
16
17 ~ABLMesoscaleInput() = default;
18
19 const amrex::Vector<amrex::Real>& meso_heights() const { return m_height; }
20
21 const amrex::Vector<amrex::Real>& meso_times() const { return m_time; }
22
23 const amrex::Vector<amrex::Real>& meso_u() const { return m_u; }
24
25 const amrex::Vector<amrex::Real>& meso_v() const { return m_v; }
26
27 const amrex::Vector<amrex::Real>& meso_temp() const { return m_temp; }
28
29 const amrex::Vector<amrex::Real>& meso_tflux() const { return m_tflux; }
30
31 const amrex::Vector<amrex::Real>& meso_transition_height() const
32 {
34 }
35
36 bool is_tendency_forcing() const { return m_abl_tendency; }
37
38 int nheights() const { return m_nheight; }
39 int times() const { return m_ntime; }
40
41private:
42 std::string m_filename;
43 std::string m_var_prefix; // to support legacy WRF meso input files
44
45 amrex::Vector<amrex::Real> m_height;
46 amrex::Vector<amrex::Real> m_time;
47
48 amrex::Vector<amrex::Real> m_u;
49 amrex::Vector<amrex::Real> m_v;
50 amrex::Vector<amrex::Real> m_temp;
51 amrex::Vector<amrex::Real> m_tflux;
52
53 // possible unexpected behaviors, as described in
54 // ec5eb95c6ca853ce0fea8488e3f2515a2d6374e7
55 //
56 // See also:
57 // - wind_energy/ABLMesoscaleInput.cpp
58 // - equation_systems/icns/source_terms/ABLMesoForcingMom.cpp
59 // - equation_systems/temperature/source_terms/ABLMesoForcingTemp.cpp
60 //
61 // workaround is to not try to read in and update this transition height
62 // variable on the fly
63 amrex::Vector<amrex::Real> m_transition_height;
64
67 bool m_abl_tendency{false};
68};
69
70} // namespace amr_wind
71
72#endif
Definition ABLMesoscaleInput.H:11
amrex::Vector< amrex::Real > m_transition_height
Definition ABLMesoscaleInput.H:63
amrex::Vector< amrex::Real > m_v
Definition ABLMesoscaleInput.H:49
const amrex::Vector< amrex::Real > & meso_heights() const
Definition ABLMesoscaleInput.H:19
bool m_abl_tendency
Definition ABLMesoscaleInput.H:67
std::string m_var_prefix
Definition ABLMesoscaleInput.H:43
const amrex::Vector< amrex::Real > & meso_temp() const
Definition ABLMesoscaleInput.H:27
bool is_tendency_forcing() const
Definition ABLMesoscaleInput.H:36
amrex::Vector< amrex::Real > m_tflux
Definition ABLMesoscaleInput.H:51
amrex::Vector< amrex::Real > m_height
Definition ABLMesoscaleInput.H:45
int times() const
Definition ABLMesoscaleInput.H:39
const amrex::Vector< amrex::Real > & meso_v() const
Definition ABLMesoscaleInput.H:25
amrex::Vector< amrex::Real > m_u
Definition ABLMesoscaleInput.H:48
const amrex::Vector< amrex::Real > & meso_tflux() const
Definition ABLMesoscaleInput.H:29
const amrex::Vector< amrex::Real > & meso_transition_height() const
Definition ABLMesoscaleInput.H:31
const amrex::Vector< amrex::Real > & meso_times() const
Definition ABLMesoscaleInput.H:21
int m_ntime
Definition ABLMesoscaleInput.H:66
amrex::Vector< amrex::Real > m_temp
Definition ABLMesoscaleInput.H:50
int nheights() const
Definition ABLMesoscaleInput.H:38
std::string m_filename
Definition ABLMesoscaleInput.H:42
amrex::Vector< amrex::Real > m_time
Definition ABLMesoscaleInput.H:46
const amrex::Vector< amrex::Real > & meso_u() const
Definition ABLMesoscaleInput.H:23
int m_nheight
Definition ABLMesoscaleInput.H:65
ABLMesoscaleInput(std::string ncfile, std::string var_prefix="")
Definition ABLMesoscaleInput.cpp:10
Definition BCInterface.cpp:7