/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; }
119 const ABLModulatedPowerLaw& abl_mpl() const { return *m_abl_mpl; }
120
122 const ABLStatsBase& abl_statistics() const { return *m_stats; }
123
124 const ABLMesoscaleInput& abl_meso_file() const { return *m_meso_file; }
125
126 const ABLAnelastic& anelastic() const { return *m_abl_anelastic; }
127
128private:
129 const CFDSim& m_sim;
130
135 Field* m_tke{nullptr};
136 Field* m_sdr{nullptr};
137
139
141 std::unique_ptr<ABLFieldInit> m_field_init;
142
144 std::unique_ptr<ABLBoundaryPlane> m_bndry_plane;
145
147 std::unique_ptr<ABLModulatedPowerLaw> m_abl_mpl;
148
151
153 std::unique_ptr<ABLStatsBase> m_stats;
154
156 std::unique_ptr<ABLAnelastic> m_abl_anelastic;
157
159
163
164 std::unique_ptr<ABLMesoscaleInput> m_meso_file;
165
170 amrex::Real m_init_sdr{25.0};
171
173 bool m_hybrid_rl{false};
174
176 bool m_file_input{false};
178 std::unique_ptr<ABLFieldInitFile> m_field_init_file;
179};
180
181} // namespace amr_wind
182
183#endif /* ABL_H */
Definition ABLAnelastic.H:16
Definition ABLBoundaryPlane.H:111
Definition ABL.H:65
std::unique_ptr< ABLModulatedPowerLaw > m_abl_mpl
ABL modulated power law instance.
Definition ABL.H:147
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:135
std::unique_ptr< ABLFieldInit > m_field_init
ABL field initializer instance.
Definition ABL.H:141
std::unique_ptr< ABLMesoscaleInput > m_meso_file
Definition ABL.H:164
Field & m_mueff
Definition ABL.H:132
const CFDSim & m_sim
Definition ABL.H:129
ABLWallFunction m_abl_wall_func
Definition ABL.H:138
pde::icns::ABLMeanBoussinesq * m_abl_mean_bous
Definition ABL.H:158
bool m_hybrid_rl
Hybrid RANS-LES with Nalu-wind.
Definition ABL.H:173
static std::string identifier()
Definition ABL.H:67
const ABLModulatedPowerLaw & abl_mpl() const
Definition ABL.H:119
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:153
const ABLStatsBase & abl_statistics() const
Return the ABL statistics calculator.
Definition ABL.H:122
amrex::Real m_init_sdr
Default value set based on https://turbmodels.larc.nasa.gov/sst.html.
Definition ABL.H:170
pde::temperature::HurricaneTempForcing * m_hurricane_temp_forcing
Definition ABL.H:167
ABLBoundaryPlane & bndry_plane()
Definition ABL.H:118
const ABLAnelastic & anelastic() const
Definition ABL.H:126
pde::icns::ABLForcing * m_abl_forcing
Reference to ABL forcing term if present.
Definition ABL.H:150
std::unique_ptr< ABLFieldInitFile > m_field_init_file
File input initializer.
Definition ABL.H:178
std::unique_ptr< ABLAnelastic > m_abl_anelastic
ABL anelastic instance.
Definition ABL.H:156
pde::icns::HurricaneForcing * m_hurricane_forcing
Definition ABL.H:166
void pre_predictor_work() override
Definition ABL.cpp:251
Field & m_velocity
Definition ABL.H:131
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:258
bool m_file_input
File input flag.
Definition ABL.H:176
pde::temperature::ABLMesoForcingTemp * m_abl_meso_temp_forcing
Definition ABL.H:161
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:160
Field * m_sdr
Definition ABL.H:136
void register_mean_boussinesq_term(pde::icns::ABLMeanBoussinesq *term) const
Definition ABL.H:92
Field & m_density
Definition ABL.H:133
std::unique_ptr< ABLBoundaryPlane > m_bndry_plane
ABL boundary plane instance.
Definition ABL.H:144
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:134
const ABLMesoscaleInput & abl_meso_file() const
Definition ABL.H:124
~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