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

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLModulatedPowerLaw.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ABLModulatedPowerLaw.H
Go to the documentation of this file.
1#ifndef ABLMODULATEDPOWERLAW_H
2#define ABLMODULATEDPOWERLAW_H
3
5#include "amr-wind/CFDSim.H"
6#include "AMReX_Gpu.H"
9
10namespace amr_wind {
11
19{
20
21public:
22 explicit ABLModulatedPowerLaw(CFDSim& /*sim*/);
23
25 void post_init_actions();
26
27 void pre_advance_work();
28
29 void post_advance_work();
30
31 void set_velocity(
32 const int lev,
33 const amrex::Real time,
34 const Field& fld,
35 amrex::MultiFab& mfab,
36 const int dcomp = 0,
37 const int orig_comp = 0) const;
38
39 void set_temperature(
40 const int lev,
41 const amrex::Real time,
42 const Field& fld,
43 amrex::MultiFab& mfab) const;
44
45 bool is_active() const { return m_activate_mpl; }
46
47private:
48 const CFDSim& m_sim;
51 const amrex::AmrCore& m_mesh;
54
55 amrex::Real m_zoffset{0.0};
56 amrex::Real m_zref{90};
57 amrex::Real m_shear_exp{0.1};
58 amrex::Real m_umax_factor{1.2};
59 amrex::Real m_bulk_velocity{15.0};
60 amrex::Real m_shearlayer_height{600.0};
62 amrex::Real m_wind_speed{8.0};
63 amrex::Real m_wind_direction{270.0};
64 amrex::Vector<amrex::Real> m_uvec{8.0, 0.0, 0.0};
65
66 amrex::Real m_start_time{0.0};
67 amrex::Real m_stop_time{std::numeric_limits<amrex::Real>::max()};
68 amrex::Real m_degrees_per_sec{0.02};
69
73 amrex::Vector<amrex::Real> m_theta_heights;
74 amrex::Vector<amrex::Real> m_theta_values;
76
77 // Device copies of the above arrays
78 amrex::Gpu::DeviceVector<amrex::Real> m_thht_d;
79 amrex::Gpu::DeviceVector<amrex::Real> m_thvv_d;
80
81 amrex::Real m_delta_t{0.8};
82 amrex::Real m_theta_cutoff_height{250.0};
83 amrex::Real m_theta_gauss_mean{0.0};
84 amrex::Real m_theta_gauss_var{1.0};
85
86 bool m_activate_mpl{false};
87};
88
89} // namespace amr_wind
90
91#endif /* ABLMODULATEDPOWERLAW_H */
Definition ABLModulatedPowerLaw.H:19
amrex::Real m_stop_time
Definition ABLModulatedPowerLaw.H:67
amrex::Real m_bulk_velocity
Definition ABLModulatedPowerLaw.H:59
amrex::Real m_zoffset
Definition ABLModulatedPowerLaw.H:55
amrex::Real m_theta_cutoff_height
Definition ABLModulatedPowerLaw.H:82
amrex::Real m_degrees_per_sec
Definition ABLModulatedPowerLaw.H:68
amrex::Real m_zref
Definition ABLModulatedPowerLaw.H:56
const amrex::AmrCore & m_mesh
Definition ABLModulatedPowerLaw.H:51
void set_velocity(const int lev, const amrex::Real time, const Field &fld, amrex::MultiFab &mfab, const int dcomp=0, const int orig_comp=0) const
Definition ABLModulatedPowerLaw.cpp:111
bool is_active() const
Definition ABLModulatedPowerLaw.H:45
ABLModulatedPowerLaw(CFDSim &)
Definition ABLModulatedPowerLaw.cpp:16
void pre_advance_work()
Definition ABLModulatedPowerLaw.cpp:79
amrex::Vector< amrex::Real > m_uvec
Definition ABLModulatedPowerLaw.H:64
amrex::Real m_shear_exp
Definition ABLModulatedPowerLaw.H:57
amrex::Gpu::DeviceVector< amrex::Real > m_thht_d
Definition ABLModulatedPowerLaw.H:78
const FieldRepo & m_repo
Definition ABLModulatedPowerLaw.H:50
amrex::Real m_start_time
Definition ABLModulatedPowerLaw.H:66
void set_temperature(const int lev, const amrex::Real time, const Field &fld, amrex::MultiFab &mfab) const
Definition ABLModulatedPowerLaw.cpp:212
const amr_wind::SimTime & m_time
Definition ABLModulatedPowerLaw.H:49
amrex::Vector< amrex::Real > m_theta_values
Definition ABLModulatedPowerLaw.H:74
const CFDSim & m_sim
Definition ABLModulatedPowerLaw.H:48
amrex::Real m_theta_gauss_mean
Definition ABLModulatedPowerLaw.H:83
void post_advance_work()
Definition ABLModulatedPowerLaw.cpp:109
amrex::Real m_theta_gauss_var
Definition ABLModulatedPowerLaw.H:84
amrex::Real m_shearlayer_height
Definition ABLModulatedPowerLaw.H:60
void post_init_actions()
Execute initialization actions after mesh has been fully generated.
Definition ABLModulatedPowerLaw.cpp:71
Field & m_temperature
Definition ABLModulatedPowerLaw.H:53
amrex::Gpu::DeviceVector< amrex::Real > m_thvv_d
Definition ABLModulatedPowerLaw.H:79
amrex::Real m_wind_speed
Definition ABLModulatedPowerLaw.H:62
amrex::Vector< amrex::Real > m_theta_heights
Definition ABLModulatedPowerLaw.H:73
Field & m_velocity
Definition ABLModulatedPowerLaw.H:52
amrex::Real m_wind_direction
Definition ABLModulatedPowerLaw.H:63
amrex::Real m_delta_t
Definition ABLModulatedPowerLaw.H:81
bool m_activate_mpl
Definition ABLModulatedPowerLaw.H:86
amrex::Real m_shearlayer_smear_thickness
Definition ABLModulatedPowerLaw.H:61
amrex::Real m_umax_factor
Definition ABLModulatedPowerLaw.H:58
Definition CFDSim.H:47
Definition Field.H:116
Definition FieldRepo.H:86
Definition SimTime.H:30
Definition BCInterface.cpp:7