/home/runner/work/kynema-sgf/kynema-sgf/src/equation_systems/temperature/source_terms/ABLMesoForcingTemp.H Source File

Kynema-SGF API: /home/runner/work/kynema-sgf/kynema-sgf/src/equation_systems/temperature/source_terms/ABLMesoForcingTemp.H Source File
Kynema-SGF 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 <memory>
7#include "src/core/SimTime.H"
12#include "AMReX_REAL.H"
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 int lev, FieldState fstate, amrex::MultiFab& src_term) const override;
29
30 void mean_temperature_init(const ABLMesoscaleInput& ncfile);
31
33 const FieldPlaneAveraging& tavg, const ABLMesoscaleInput& ncfile);
34
35 amrex::Real
36 mean_temperature_heights(std::unique_ptr<ABLMesoscaleInput> const& ncfile);
37
38 amrex::Real mean_temperature_heights(
39 const FieldPlaneAveraging& tavg,
40 std::unique_ptr<ABLMesoscaleInput> const& ncfile);
41
42 amrex::Vector<amrex::Real>& theta_error() { return m_err_Theta; }
43
44private:
45 // these are inputs
46 amrex::Gpu::DeviceVector<amrex::Real> m_meso_ht;
47 amrex::Gpu::DeviceVector<amrex::Real> m_meso_theta_vals;
48
49 // this is the instantaneous planar average (at Kynema-SGF levels)
50 amrex::Gpu::DeviceVector<amrex::Real> m_theta_ht;
51
52 // this specifies the source term
53 amrex::Gpu::DeviceVector<amrex::Real> m_error_meso_avg_theta;
54
55 amrex::Vector<amrex::Real> m_err_Theta;
56
57 // this should be m_ind_polyOrder+1 (currently, cubic polynomial is assumed)
58 amrex::Array<amrex::Real, 4> m_poly_coeff_theta;
59};
60
61} // namespace kynema_sgf::pde::temperature
62
63#endif
ABLMesoscaleForcing(const CFDSim &sim, const std::string &identifier)
Definition ABLMesoscaleForcing.cpp:14
Definition ABLMesoscaleInput.H:11
Definition CFDSim.H:55
amrex::Gpu::DeviceVector< amrex::Real > m_error_meso_avg_theta
Definition ABLMesoForcingTemp.H:53
amrex::Gpu::DeviceVector< amrex::Real > m_theta_ht
Definition ABLMesoForcingTemp.H:50
amrex::Vector< amrex::Real > & theta_error()
Definition ABLMesoForcingTemp.H:42
amrex::Gpu::DeviceVector< amrex::Real > m_meso_theta_vals
Definition ABLMesoForcingTemp.H:47
amrex::Real mean_temperature_heights(std::unique_ptr< ABLMesoscaleInput > const &ncfile)
Definition ABLMesoForcingTemp.cpp:82
void mean_temperature_init(const ABLMesoscaleInput &ncfile)
Definition ABLMesoForcingTemp.cpp:41
amrex::Vector< amrex::Real > m_err_Theta
Definition ABLMesoForcingTemp.H:55
static std::string identifier()
Definition ABLMesoForcingTemp.H:21
void operator()(int lev, FieldState fstate, amrex::MultiFab &src_term) const override
Definition ABLMesoForcingTemp.cpp:233
ABLMesoForcingTemp(const CFDSim &sim)
Definition ABLMesoForcingTemp.cpp:17
amrex::Array< amrex::Real, 4 > m_poly_coeff_theta
Definition ABLMesoForcingTemp.H:58
amrex::Gpu::DeviceVector< amrex::Real > m_meso_ht
Definition ABLMesoForcingTemp.H:46
FieldState
Definition FieldDescTypes.H:16
Definition ABLMesoForcingTemp.cpp:15
FPlaneAveraging< Field > FieldPlaneAveraging
Definition FieldPlaneAveraging.H:143