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

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABL.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ABL.H
Go to the documentation of this file.
1#ifndef ABL_H
2#define ABL_H
3
4#include <memory>
5
16
34class incflo;
35
36namespace amr_wind {
37
38class ABLMesoscaleInput;
39
40namespace pde::icns {
41class ABLForcing;
42class ABLMeanBoussinesq;
43class ABLMesoForcingMom;
44class HurricaneForcing;
45} // namespace pde::icns
46
47namespace pde::temperature {
48class ABLMesoForcingTemp;
49class HurricaneTempForcing;
50} // namespace pde::temperature
51
64class ABL : public Physics::Register<ABL>
65{
66public:
67 static std::string identifier() { return "ABL"; }
68
69 explicit ABL(CFDSim& sim);
70
71 ~ABL() override;
72
74
75 void post_init_actions() override;
76
77 void post_regrid_actions() override;
78
79 void initialize_fields(int level, const amrex::Geometry& geom) override;
80
81 void pre_advance_work() override;
82
83 void pre_predictor_work() override;
84
85 void post_advance_work() override;
86
88 {
89 m_abl_forcing = forcing;
90 }
91
105
107 {
108 m_hurricane_forcing = forcing;
109 }
110
116
117 const ABLBoundaryPlane& bndry_plane() const { return *m_bndry_plane; }
118 const ABLModulatedPowerLaw& abl_mpl() const { return *m_abl_mpl; }
119
121 const ABLStatsBase& abl_statistics() const { return *m_stats; }
122
123 const ABLMesoscaleInput& abl_meso_file() const { return *m_meso_file; }
124
125 const ABLAnelastic& anelastic() const { return *m_abl_anelastic; }
126
127private:
128 const CFDSim& m_sim;
129
134 Field* m_tke{nullptr};
135 Field* m_sdr{nullptr};
136
138
140 std::unique_ptr<ABLFieldInit> m_field_init;
141
143 std::unique_ptr<ABLBoundaryPlane> m_bndry_plane;
144
146 std::unique_ptr<ABLModulatedPowerLaw> m_abl_mpl;
147
150
152 std::unique_ptr<ABLStatsBase> m_stats;
153
155 std::unique_ptr<ABLAnelastic> m_abl_anelastic;
156
158
162
163 std::unique_ptr<ABLMesoscaleInput> m_meso_file;
164
169 amrex::Real m_init_sdr{25.0};
170
172 bool m_hybrid_rl{false};
173
175 bool m_file_input{false};
177 std::unique_ptr<ABLFieldInitFile> m_field_init_file;
178};
179
180} // namespace amr_wind
181
182#endif /* ABL_H */
Definition ABLAnelastic.H:16
Definition ABLBoundaryPlane.H:110
Definition ABL.H:65
std::unique_ptr< ABLModulatedPowerLaw > m_abl_mpl
ABL modulated power law instance.
Definition ABL.H:146
void pre_advance_work() override
Definition ABL.cpp:171
void register_meso_temp_forcing(pde::temperature::ABLMesoForcingTemp *forcing) const
Definition ABL.H:100
Field * m_tke
Definition ABL.H:134
std::unique_ptr< ABLFieldInit > m_field_init
ABL field initializer instance.
Definition ABL.H:140
std::unique_ptr< ABLMesoscaleInput > m_meso_file
Definition ABL.H:163
Field & m_mueff
Definition ABL.H:131
const CFDSim & m_sim
Definition ABL.H:128
ABLWallFunction m_abl_wall_func
Definition ABL.H:137
pde::icns::ABLMeanBoussinesq * m_abl_mean_bous
Definition ABL.H:157
bool m_hybrid_rl
Hybrid RANS-LES with Nalu-wind.
Definition ABL.H:172
static std::string identifier()
Definition ABL.H:67
const ABLModulatedPowerLaw & abl_mpl() const
Definition ABL.H:118
void register_meso_mom_forcing(pde::icns::ABLMesoForcingMom *forcing) const
Definition ABL.H:96
std::unique_ptr< ABLStatsBase > m_stats
ABL integrated statistics object.
Definition ABL.H:152
const ABLStatsBase & abl_statistics() const
Return the ABL statistics calculator.
Definition ABL.H:121
amrex::Real m_init_sdr
Default value set based on https://turbmodels.larc.nasa.gov/sst.html.
Definition ABL.H:169
pde::temperature::HurricaneTempForcing * m_hurricane_temp_forcing
Definition ABL.H:166
const ABLAnelastic & anelastic() const
Definition ABL.H:125
pde::icns::ABLForcing * m_abl_forcing
Reference to ABL forcing term if present.
Definition ABL.H:149
std::unique_ptr< ABLFieldInitFile > m_field_init_file
File input initializer.
Definition ABL.H:177
std::unique_ptr< ABLAnelastic > m_abl_anelastic
ABL anelastic instance.
Definition ABL.H:155
pde::icns::HurricaneForcing * m_hurricane_forcing
Definition ABL.H:165
void pre_predictor_work() override
Definition ABL.cpp:249
Field & m_velocity
Definition ABL.H:130
const ABLBoundaryPlane & bndry_plane() const
Definition ABL.H:117
void register_hurricane_forcing(pde::icns::HurricaneForcing *forcing) const
Definition ABL.H:106
void register_forcing_term(pde::icns::ABLForcing *forcing) const
Definition ABL.H:87
void initialize_fields(int level, const amrex::Geometry &geom) override
Definition ABL.cpp:96
void post_advance_work() override
Definition ABL.cpp:256
bool m_file_input
File input flag.
Definition ABL.H:175
pde::temperature::ABLMesoForcingTemp * m_abl_meso_temp_forcing
Definition ABL.H:160
void register_hurricane_temp_forcing(pde::temperature::HurricaneTempForcing *forcing) const
Definition ABL.H:111
pde::icns::ABLMesoForcingMom * m_abl_meso_mom_forcing
Definition ABL.H:159
Field * m_sdr
Definition ABL.H:135
void register_mean_boussinesq_term(pde::icns::ABLMeanBoussinesq *term) const
Definition ABL.H:92
Field & m_density
Definition ABL.H:132
std::unique_ptr< ABLBoundaryPlane > m_bndry_plane
ABL boundary plane instance.
Definition ABL.H:143
void post_init_actions() override
Definition ABL.cpp:136
const ABLWallFunction & abl_wall_function() const
Definition ABL.H:73
Field * m_temperature
Definition ABL.H:133
const ABLMesoscaleInput & abl_meso_file() const
Definition ABL.H:123
~ABL() override
void post_regrid_actions() override
Definition ABL.cpp:159
ABL(CFDSim &sim)
Definition ABL.cpp:22
Definition ABLMesoscaleInput.H:11
Definition ABLModulatedPowerLaw.H:19
Definition ABLStatsBase.H:24
Definition ABLWallFunction.H:20
Definition CFDSim.H:47
Definition Field.H:116
Definition ABLForcing.H:17
Definition ABLMeanBoussinesq.H:18
Definition ABLMesoForcingMom.H:26
Definition HurricaneForcing.H:22
Definition ABLMesoForcingTemp.H:19
Definition HurricaneTempForcing.H:12
Definition incflo.H:50
Definition BCInterface.cpp:7