/home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/temperature/source_terms/ABLMesoForcingTemp.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/temperature/source_terms/ABLMesoForcingTemp.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ABLMesoForcingTemp.H
Go to the documentation of this file.
1#ifndef ABLMESOFORCINGTEMP_H
2#define ABLMESOFORCINGTEMP_H
3
4#include <AMReX_REAL.H>
5#include <memory>
13
15
17 : public ABLMesoscaleForcing
18 , public TemperatureSource::Register<ABLMesoForcingTemp>
19{
20public:
21 static std::string identifier() { return "ABLMesoForcingTemp"; }
22
23 explicit ABLMesoForcingTemp(const CFDSim& sim);
24
26
27 void operator()(
28 const int lev,
29 const amrex::MFIter& mfi,
30 const amrex::Box& bx,
31 const FieldState fstate,
32 const amrex::Array4<amrex::Real>& src_term) const override;
33
34 void mean_temperature_init(const ABLMesoscaleInput& ncfile);
35
37 const FieldPlaneAveragingFine& tavg, const ABLMesoscaleInput& ncfile);
38
39 amrex::Real
40 mean_temperature_heights(std::unique_ptr<ABLMesoscaleInput> const& ncfile);
41
42 amrex::Real mean_temperature_heights(
43 const FieldPlaneAveragingFine& tavg,
44 std::unique_ptr<ABLMesoscaleInput> const& ncfile);
45
46 amrex::Vector<amrex::Real>& theta_error() { return m_err_Theta; }
47
48private:
49 // these are inputs
50 amrex::Gpu::DeviceVector<amrex::Real> m_meso_ht;
51 amrex::Gpu::DeviceVector<amrex::Real> m_meso_theta_vals;
52
53 // this is the instantaneous planar average (at AMR-Wind levels)
54 amrex::Gpu::DeviceVector<amrex::Real> m_theta_ht;
55
56 // this specifies the source term
57 amrex::Gpu::DeviceVector<amrex::Real> m_error_meso_avg_theta;
58
59 amrex::Vector<amrex::Real> m_err_Theta;
60
61 // this should be m_ind_polyOrder+1 (currently, cubic polynomial is assumed)
62 amrex::Array<amrex::Real, 4> m_poly_coeff_theta;
63};
64
65} // namespace amr_wind::pde::temperature
66
67#endif
Definition ABLMesoscaleForcing.H:13
Definition ABLMesoscaleInput.H:11
Definition CFDSim.H:47
Definition ABLMesoForcingTemp.H:19
amrex::Gpu::DeviceVector< amrex::Real > m_meso_ht
Definition ABLMesoForcingTemp.H:50
void mean_temperature_init(const ABLMesoscaleInput &ncfile)
Definition ABLMesoForcingTemp.cpp:40
amrex::Real mean_temperature_heights(std::unique_ptr< ABLMesoscaleInput > const &ncfile)
Definition ABLMesoForcingTemp.cpp:87
amrex::Array< amrex::Real, 4 > m_poly_coeff_theta
Definition ABLMesoForcingTemp.H:62
amrex::Vector< amrex::Real > & theta_error()
Definition ABLMesoForcingTemp.H:46
static std::string identifier()
Definition ABLMesoForcingTemp.H:21
amrex::Gpu::DeviceVector< amrex::Real > m_error_meso_avg_theta
Definition ABLMesoForcingTemp.H:57
amrex::Vector< amrex::Real > m_err_Theta
Definition ABLMesoForcingTemp.H:59
amrex::Gpu::DeviceVector< amrex::Real > m_meso_theta_vals
Definition ABLMesoForcingTemp.H:51
void operator()(const int lev, const amrex::MFIter &mfi, const amrex::Box &bx, const FieldState fstate, const amrex::Array4< amrex::Real > &src_term) const override
Definition ABLMesoForcingTemp.cpp:285
ABLMesoForcingTemp(const CFDSim &sim)
Definition ABLMesoForcingTemp.cpp:16
amrex::Gpu::DeviceVector< amrex::Real > m_theta_ht
Definition ABLMesoForcingTemp.H:54
FieldState
Definition FieldDescTypes.H:14
Definition ABLMesoForcingTemp.cpp:14